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



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

  • \$\begingroup\$ Are you developing the app yourself? It looks like the guy in the video pretty much bought something that is no more than an LED soldered to a TRS plug. \$\endgroup\$ Sep 10 '15 at 12:46
  • \$\begingroup\$ Yes i will develop the software. Actually these samples creates a sine sound wave and activating the led. I made a research, some of them used some resistors and transistors in the circuit. I just need a circuit diagram to complete this project \$\endgroup\$
    – Memik
    Sep 10 '15 at 12:51
  • \$\begingroup\$ And you are using a battery external to the iPhone that is intended to power this LED? I'm just trying to get a feel of what your exact expectations are. \$\endgroup\$ Sep 10 '15 at 13:03
  • \$\begingroup\$ Yes led is powered by an external power source, i will use iPhone like a switch that to turn off and on the led \$\endgroup\$
    – Memik
    Sep 10 '15 at 13:48
  • \$\begingroup\$ This topic has been covered here before although the answer there was also tentative (but looks more promising than the one below.) \$\endgroup\$
    – Fizz
    Sep 11 '15 at 3:58

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.


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.

  • 1
    \$\begingroup\$ You cannot send a DC voltage out the earphone jack. Doesn't work. You would have to send out and audio signal. Best case, your LED blinks real fast - if you put out a high frequency (>100Hz) tone then you wouldn't see the blinks. You'd have to use full volume, though, and put the transistor below the LED instead of above it. The way you've done it, the signal from the phone has to be higher than V1. \$\endgroup\$
    – JRE
    Sep 10 '15 at 16:08
  • \$\begingroup\$ Yeah, I was kind of thinking he could output some sine waveform and get a sort of PWM effect; however I tried to ignore that thinking because I wanted to abstract the android end from what the circuit end could be. \$\endgroup\$ Sep 10 '15 at 16:12
  • \$\begingroup\$ @JRE: Maybe the one on the iPhone can! (joke). More seriously, you need to rectify the AC sound signal before feeding it to the transistor's base. Since efficiency isn't really a concern, a half-wave rectifier should do it. \$\endgroup\$
    – Fizz
    Sep 11 '15 at 0:45
  • \$\begingroup\$ Come to think of it a bit more, you probalby need to amplify the audio signal a bit first (with another transistor), because there probably won't be enough voltage left after rectification otherwise, even with a Schottky. Measuring my non-iPhone Android phone, it maxes out at 0.68V peak on audio... Alternatively, build a charge pump and charge the capacitor one more than one cycle. \$\endgroup\$
    – Fizz
    Sep 11 '15 at 1:22
  • 1
    \$\begingroup\$ More here: electronics.stackexchange.com/questions/28971/… \$\endgroup\$
    – Fizz
    Sep 11 '15 at 4:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.