LEDs take 2V or more to light up, but a single alkaline cell produces only 1.5V on a good day. So we're screwed, we have to use two cells, right? Ha! The electronicician's old friend, the inductor, knows how to fix that. We can build a whole switching supply to power the LEDs, although a single transistor is enough for a mere flashlight. A blocking oscillator is an excellent choice, having been given the nickname "joule thief", because it can power 3V (blue or white) LEDs from a nearly-dead cell that might be giving only 0.8V under load. That's not a bad voltage ratio, especially for silicon transistors!
Here's the first "joule thief" I built. I had two Radioshack white LEDs laying around that I wanted to put to use. I made a dinky flashlight with them. After some experimenting, I was able to use this small toroid (it's only about as big as the TO-92 transistor) with a 2N4401 to supply the LEDs at 5MHz typical operating frequency. And yes, the LEDs do actually blink at 5MHz -- the yellow phosphor might not, but the blue chip itself does. At least, I suspect they do... I haven't actually measured them blinking!
Here's the complete circuit. It has much lower inductance, much higher current and much higher efficiency than the awful things I see elsewhere on the internet -- for some reason, a single 1k series base resistor is quite popular. That thing must take a microsecond to turn off! This thing turns off in less than 50 nanoseconds. At 5MHz, efficiency is probably a little lower than it could be at, say, 1MHz, but this works well enough.
Here's the light output. It's enough to see inside a dark room, or read comic books under your bedsheets, but it's never going to blind anyone.
About a year later (that being now, 12-2008), I came into posession of some superbright red LEDs, from a very generous donor. 190 LEDs sitting around is unfathomable, so I quickly put ten of them to good use:
First of all, these LEDs are rated at 70mA each, so ten will need 700mA. If the voltage is about doubled (Vf ≈ 2V), the current demand has to be double, too, so I might draw more than 1.4A from a cell at 1V. The duty cycle will be roughly 50%, so current might go from zero to 2.8A peak during the charging phase (and drop from 2.8A to zero while discharging into the LEDs). This is getting beefy pretty quickly! I also need a transistor that can sink that kind of current, and it needs to do it at less than 0.3Vce(sat). 2N4401 isn't any good anymore, it simply doesn't have a big enough junction! Offhand, I know Zetex makes transistors like this, but they're on the expensive side, and I think I want something that can dissipate a little power (just in case!). After some browsing, I picked the C5001 (2S- or KTC5001; they seem to be identical, which isn't always the case with KEC types!) for sale at Mouser, which was a little cheaper, but still nowhere near a 2N4401. I figure given the scope of this project (potentially 5A peak collector current), the expense is justified.
Here's the array of LEDs, assembled. I soldered the LEDs to copper strips (0.020" thick), wired every other strip together (since the LEDs are arranged "| A-K | K-A | A-K |"), tacked on the transistor, inductor and support components. The inductor is wound quadrafilar on a little ferrite rod and comes to about 0.8μH. Despite the stiff inductance, this circuit operates at 400kHz. Thanks to transformer action, the transistor is ganked off in about 50ns, which should give excellent efficiency. Incidentally, this is my very first use of surface mount components, including the multilayer ceramic chip capacitor, which is in the second picture just below the red power wire, a little square of tan material.
This is an alternate way to power the LEDs. I figure their series resistance will cost some power due to the peaky nature of the current waveform, so by rectifying and filtering the output I can get clean DC to the LEDs instead. This assumes an ideal rectifier of course; fortunately, they exist, very nearly anyway. The MBRS410 specified has a voltage drop of 0.3V or less at 6A, which is pretty good, and not too much (about 12% of the total) at this voltage. In the photograph, I actually used an M2FH3, which has similar specs. The filter capacitor, another 10μF ceramic, is impressively stiff for its size; there is little ripple on the LEDs, which act like constant current sinks relative to the capacitor's miniscule reactance.
And finally, here's the shine. This was powered by a single AA cell, drooping to a palty 0.8V. Even at this level, the output is enough to see your way in the dark and put ten simultaneous spots in your eyes if you dare look into it. Powered by a fresh D cell, this thing will light up a whole wall quite nicely. These LEDs have a very uniform output and relatively wide angle, which is very nice to have in a flashlight.