Vibration motor meets the Headphone jack

687474703a2f2f692e696d6775722e636f6d2f7678716a3532472e6a70673f31

Although vibration motors are common in Mobile phones, procuring button sized vibration motors were the ultimate challenge. (There were a couple of good ones on ebay, but couldn’t find one at this point of time)

But once that was resolved, one of the leads of the vibration motor was connected to the headphone jack and the ground of the headphone jack to the other lead.

Now square wave signals are played through the headphone jack using Audacity. Although one can feel the motors vibrating, using an operational amplifier such as LM324 helps to intensify the vibrations. ( Power source to LM324 – Battery/Arduino )

drawing

 

 

Note:

One of the weirdest but yet satisfying experience with the vibration motor is when you connect the vibration motor through the audio jack without any amplifier. You can hear the music being played through the vibration motor. The motors seems to be dancing to the music being played. We tried so hard to capture the phenomenon but the sound was too feeble to be picked up. That shouldn’t stop you from giving it a shot.

The anatomy of a headphone jack

Most of us live under the simple algorithm : Plug a headphone into the jack and move on with life. But the beauty of it is what happens during those instances when you insert the jack and the mobile/laptop recognizes the device to be indeed a headphone jack.

Most modern smart-phones and laptops detect a headphone using the following simple principle :

Establish a potential difference between the mic and the ground ( ~ 2- 3 V ) and observe the resistance. If its high, its air and probably nothing has been inserted. If its really low, then a headphone jack has been inserted.

drawing

And the fact that a potential difference is constantly being given between the mic and the ground allows us to plug in a led and light it up .

Corollary 😉 :

All that the phone is looking for low resistance value. You can very easily fool the phone to think that an aluminum foil is a headphone jack.

Older headphone jacks

This answer by Rick on stackexchange answers this question so accurately :

Yjl5u

” Headphone jacks have extra contacts inside, which act as switches. The the drawing below, pins 4 and 5 are intended for sensing that the plug was inserted. They are not intended for audio signal. When the plug is not present, the switche, which are formed by 2 & 4 and 3 & 5, are closed.

When the plug is inserted, these switches are open. The plug flexes 2 and 3 slightly, and they break contact with 4 and 5. You could insert a 3.5mm plastic rod [a dummy] into the jack, which will open the contacts, and the phone might think that earphones are plugged in. ”

 

Headphone jack plugged in or not ? (Software end)

In a previous post , we talked in depth about the /dev/input directory in Linux.  This video talks about how the computer knows whether a headphone jack has been plugged in or not from a software point of view.

LED as light sensor !!?

Sometime ago there was a post on reddit which claimed that you can use your LED as a light sensor to detect the intensity of light. We decided to try it out and oh boy! it completely changed our perspective on the LED.

We just took a LED and performed an AnalogRead on the Arduino. Check this out:

Preparing a headphone jack for hacking

This is one of the most frequently asked questions regarding our project on the headphone jack : I have an old headphone, how do I configure it to do all the stuff that you feature on your blog ? This post will be a pictorial DIY edition of it.

One of the first steps is to procure an old headphone ( in working condition or otherwise).

headphones-678033_640

And then cut off the mic and the rest of the earphones with it. ( But don’t throw it away! ) The reason why we do this is because when you want to hack into a device, its a boon to have accessibility to the Input/Output ports.

schematics

When you strip open the wire that you have, in the case of a TRRS headphone jack you will find 4 wires (Left,Right,Mic and ground) and with a TRS (Left, Right and Ground). The next step is to attach female jumper wires to them so we can plug in anything we want.

aaaa.jpgIMG_20170615_001144

These wires are not your conventional “plug and play” type i.e If you take these wires  and plug them into anything it won’t work. This is because they have a non-conductive plastic-like coating in them that prevents the wires from shorting.

Therefore soldering them to the jumper wire is a bit tricky. But in our experience it helps to preheat the wires before soldering and also to wrap the wire in a braid fashion for longer life.

IMG_20170615_020254IMG_20170615_021617

And similarly you solder the rest of the wires as well. Now in order to find out which wire corresponds to what, connect a speaker between the Left/Right and the ground, plug it into your computer and start playing tones.

IMG_20170615_023307drawing1

If you are asking where am I going to find a speaker ? Well just use the speaker from your headphone that you stripped off in step 1 and solder two wires to its terminals like the picture above and you are all set.

 

 

The headphone jack meets an actual spark gap!

So, we had the opportunity to test out the headphone jack with an actual spark gap and it was absolutely wonderful. Check it out:

With the data we can actualy find out the frequency of the spark occurrence. In our case it turned out to be ~ 34 – 36 Hz. And since this is in the Audible range we can actually hear this (somehow we missed this when making the video)

Screenshot from 2017-06-10 20:01:07

Audio file : GoogleDrive

**

Part – I – Lightning detector with a simple headphone jack

Part – II – Detecting switching ON/OFF of Tube Light using headphone jack

Part – III – Cigarette lighter spark detection using headphone jack

 

DIY: Obstacle detector with Audible feedback (IR sensor + Headphone jack + 555 timer)

We were inspired by the buzzer that you find in mobile and laptop showrooms – the ones that produce this annoying high frequency tone if you fiddle a ‘little too much’ with the displayed product.

schematic

We use a 555 timer in its Astable mode to produce the frequency tone and couple it with a digital IR sensor module. We do this by connecting the output pin and the ground parallel to R2 in the figure.

single-ir-sensor

And as a result when there are no objects in the vicinity, the system produces a high frequency tone, but when an object is introduced the sound dies out.  This is attributed to the change in resistance value.

Here is another variation of the same:

Cigarette Lighter spark detection using headphone jack

This is part-III of the post series on detecting electromagnetic waves using headphone jack. In this we capture the EMW that emanate from the spark gap junction on a lighter. This is analogous to our gas lighter experiment but conducted at a smaller scale.

Screenshot from 2017-06-07 11:41:35

We say that this is analogous to the Gas lighter experiment because the waveforms obtained are extremely similar in nature.

Screenshot from 2017-06-07 13:35:47

 

Check out:

Part – I – Lightning detector using headphone jack 

Part – II  – Detecting switching ON/OFF tubelight with a headphone jack

 

Detect switching ON/OFF of Tube-light with a simple headphone jack

Now in our previous post, we established that the headphone jack can be used to successfully detect electromagnetic disturbances ( Sparks and Lightning ). In this post, we explore the interaction of the tube light with the headphone jack.

qa1c05f65

Here is a close up of the peak that you saw in the video:

wj3GjJ

Nowadays of course, we have moved on Non-flickering tubelights and it is highly unlikely that we might be able to detect the peculiar peaks that you see on this. But to be sure we are currently working on this and we will keep you guys posted on the results.

Also if we could incorporate this into a IoT network, things will go crazy!!!

 

*   Image Source