I want to use my iPhone 3G's headphone jack to power an LED.
October 19, 2008 7:22 PM   Subscribe

How can I use the iPhone 3G's headphone jack to power an LED?

I've cut the speakers off from an old set of headphones, and now I want to wire the headphone jack and attached wires to a small, white LED bulb. I'm hoping to use the LED for illumination when I take macro close-up photos with the iPhone's built-in camera. I've already rigged up a macro lens to the camera, I just need the LED attached to the end of the headphone wires to illuminate the shots.

BTW, provided I get the headphone jack to power the LED, will volume control affect the LED's output in anyway?

Thanks!
posted by buzzbash to Technology (8 answers total)
 
I take it that you've taken a voltmeter to the headphone jack and ascertained that you have 3.5V?

I ask that question because assuming that the iPhone's doesn't come with DC power supplied on a nonstandard jack, I cannot think of a way to power an LED from headphone-level audio. At rest, without output, the jack isn't going to output any voltage.

You *might* get something if you were to build a rigged audio file that causes the system to output audio that maximizes power. But, you're going to get AC not DC. You'll have rectify that if you want DC from it.

You'd do better with an incandescent lamp.
posted by Netzapper at 7:58 PM on October 19, 2008


Also, no, the volume won't affect the LED's output. Although, depending on your circuit and your LED and audio file, if you turn your volume down far enough the LED won't work. An LED either has enough voltage to work, or not. Dimming an LED is accomplished by flashing it on and off very quickly with different duty cycles.

By the way, an oscilloscope will make building the audio file much easier.

The more I think about it, you might actually be able to get a duty cycle from an audio file that directly powers an LED well enough to do what you want. Assuming that the iPhone's using a simple DAC output, you might be able to just max it out and leave it there--send through a "silent" PCM stream that doesn't move. Thing is, I'm not entire sure what the DAC (or the software) is going to do with such a file. You'll need to play with that--an oscilloscope is going to make this way easier, btw.
posted by Netzapper at 8:07 PM on October 19, 2008


I'm not sure it would work, but MAYBE something like the joule thief. You'd probably need to add a few diodes to serve as a rectifier.
posted by Good Brain at 8:22 PM on October 19, 2008


Nope, nope, and nope. The only reference I can find quickly is a little dodgy but puts the output power at 30mW/channel for an iPod; I'd expect the iPhone to be similar and the number seems pretty reasonable to me.

By way of comparison, a single red LED needs 20mA x 2V = 40mW of power. Even if you're (ideally) crafty with your audio file, the system just doesn't have enough capacity to deliver power to light more than a dim LED (note that a white LED at roughly the same brightness would be 20mA x 4V = 80mW, and we're still not talking about any brightness you'd want to write home about).

A "bright enough" white LED might need something along the lines of 150mA @ 4V, or about 600mW, and you're now an order of magnitude beyond what you have available to you (and I'm skeptical even that would be enough light; you're probably talking 400mA or more @ 4V).

(On preview -- the joule thief can boost the voltage to light a white LED, but it can't make power where there is no power, and doesn't solve the fundamental problem.)
posted by range at 8:35 PM on October 19, 2008 [1 favorite]


Range's data is pretty definitive. One thing to consider is that those state are for power consumtion at a 100% duty cycle (on 100% of the time). LED brightness is often controlled by pulsing the current at high frequency and adjusting the width of the on-portion of the pulse. An LED that is on only 50% of the time should require about half the average power draw. I'm not sure, but so think the joule thief might work this way, automatically stabilizing on whatever duty cycle is sustainable by the combination of load and supply.

Even so, it probably isn't what you want, since it would be dimmer than full brightness.
posted by Good Brain at 9:14 AM on October 20, 2008


Not to be Captain Negative, but that doesn't work either -- if you run at 50% duty cycle, you'll use 50% power but you'll also be 50% dimmer (or probably not exactly 50% dimmer; human perception of "apparent brightness" is a freaky thing).

The joule thief works as a quick & dirty boost converter -- it steps up a low voltage source (like a AA battery) to have sufficient voltage to power on a white LED, by running an oscillating current through an inductor. The output current is roughly sine-wave-ish and so the LED ends up running somewhat below 50% duty cycle. But again, your problem isn't voltage (well, that might be a problem too, but compared to your other problem it doesn't rate) but that you're output-power limited in a way a plain battery wouldn't be.
posted by range at 10:11 AM on October 20, 2008


Response by poster: Thanks everyone for your input. Lots of food for thought. I definitely need to learn more about LEDs--and this has been a wonderful jumping off point for that task. Thanks again!
posted by buzzbash at 9:51 PM on October 20, 2008


Best answer: The iPod / iPhone dock connector provides voltage out to power various accessories like FM transmitters, microphones, and the like.

iPod dock connector pinout

If you were to pick up a dock connector, wire your LED to pins 1 (GND) and pins 18 (+3.3V) with the appropriate resistor (depends on the specs of your LED -- approx. 47 ohm should be OK), LET THERE BE LIGHT!

IANAEE (electrical engineer) / not responsible for temporary blindness, damage to iPod or small animals / YMMV / etc.
posted by Perplexer at 4:22 PM on October 21, 2008


« Older Tips for launching & running an eBay store?   |   natural solutions for ADD and depression Newer »
This thread is closed to new comments.