Turn on/off led via headphone jack in iPhone

iphoneled

I have an iPhone project , I need to turn on and off a led powered with a battery using iPhone via 3.5 mm jack.

there is some examples what I need

https://www.youtube.com/watch?v=w0VopnVZQ-w

http://www.ipinlaser.com

I need suggestions. I know some simple basics on circuits but I'm totally noob about this.

Best Answer

I'm not that great with Android App development so I'm assuming you can make the headphone jack output a voltage in reference to the "common" ring. This guy got his android to output a waveform that was dependent on the accelerometer device readings.

Most smartphones have TRRS jacks on them, where the breakdown looks like this:

enter image description here

So if you can control the voltage difference between "Left" or "Right" and "Common", then you could exploit that.

Have the voltage difference feed into a transistor, while your external battery drives your LED. This is a much better method because you don't really want your phone to drive your LED, you just want it to say "OK, turn on, now turn off" etc.

schematic

simulate this circuit – Schematic created using CircuitLab

So it's just a really simple circuit, where the phone activates/deactivates the transistor. When the voltage of "LEFT or RIGHT" goes HIGH, current will travel from the battery, through the transistor and through the LED. Setting the voltage to ground will stop any current from flowing.