Oh, Man, I spent lots of hours playing with this a couple of years ago...
First, some links. Check out
www.candlepowerforums.com for anything you want to know about flashlights...the electronics forum is full of really good people who know their shee-it. A good thread:
This
Step-up Voltage Regulator is designed to be retrofitted into a 2-cell AA Maglite, and boosts/regulates the current going to a 1 Watt LED replacement for the normal bulb.
There are a lot of methods to regulate the Voltage for a flashlight.
If you have a power source with a higher voltage than your bulb requires, you can:
1. Use a linear regulator. This basically uses a transistor as a variable resistance, and a sensing circuit that monitors the output voltage. If the voltage is low, the transistor is turned on a bit more (resistance drops). If the voltage is high, the transistor is turned off a bit more (resistance increases). Extremely simple and cheap (an LM317 and two resistors, retail cost < $1), but not very efficient if the input voltage is high compared to the output voltage.
2. Use a PWM (Pulse-width modulator). Basically, an on-off switch with a sensing circuit. The output voltage is turned on and off so the "average" output voltage is correct. Imagine having 10V input, and wanting 5V output - this type of circuit will turn on for 50% of the time (10V x 50% = 5V). If the input voltage drops to 8V, the duty cycle goes up to 62.5%, etc. Not quite as simple or cheap, but very efficient for things like light bulbs that smooth out the on/off spikes.
3. Use an inductor-based "buck" circuit. I'm a bit cloudy on how these work - it's similar to the boost circuit below, but the circuit is laid out differently.
If you have a power source with a lower voltage than your bulb requires, the normal answer is an inductor-based boost circuit. Take a look at
This Circuit, and ignore R3/R5. The basic operation is:
1. The ZXSC300 turns on the transistor, pulling current through the inductor. This creates a magnetic field inside the inductor, storing energy.
2. The ZXSC300 turns off the transistor. Inductors hate it when you try to turn off the current flowing through them - the magnetic field tries to collapse, but due to the physics involved, the energy stored in the field has to go somewhere. The practical result is that the inductor attempts to force the current to continue to flow. Being as the path to ground is interrupted, this has the effect of continuously raising the voltage at the output of the inductor until a new path is found. In this circuit, the LED is running at about 3V, so what happens is that the higher voltage from the inductor flows through the diode. Some is stored in the Capacitor, some flows through the LED.
3. The ZXSC300 then turns the transistor back on. No more current flows through the diode, voltage across the inductor causes the current flow to start climbing, building a magnetic field in the inductor.
4. Goto 2.
Kinda brain-twisting, but very elegant. I built a couple of these; turns a Maglite into something quite useful.
/frank