# 1 Watt White LED Power Supply Circuit for battery operation Using Atmega

FreePC project file, gerber and png copper and silk-screen: 1wattledbuck.zip
Introduction
I have some 1 watt warm white LEDs left over from a project and the application for them was obvious: A better battery operated lamp for use when the power fails, which it does frequently, especially during the rainy season. And this one should cast enough light with which to read without a lot of strain.
The Circuit
This LED light uses a buck converter to step down the voltage from four AA cells to the lower voltage necessary to power a 1 watt warm white LED. In this case, the LED requires 250 ma at 3.2 volts. The circuit should close the loop around the current through the LED, since that is what determines the amount of light emitted and is also related to power dissipation. The astute reader will realize that 250 ma x 3.2 volts is only 800 mW; this can be made much higher as will be explained later, but I decided to go easy on the battery and the LED itself.
There are plenty of integrated circuit switch mode power supply controllers available in parts of the world that can handle the task quite well. But what if you are an experimenter or student without access to such specialized parts? A discreet component version would be more widely accessible, and besides that, it’s more fun. As it turned out, the parts count and board space for the discreet component power supply can be pretty small.
Long ago, I decided that a current fed buck converter is usually the best solution for driving LEDs from higher voltages. The control loop is very simple -running to the desired current on each cycle of oscillation, it needed no loop filter, which made ithe circuit inherently stable.

While looking on the web for examples to explain the topology to a friend, I came across an article published by Dhananjay V. Gadre, in which he described a simple three transistor current fed buck converter. His circuit used two NPN bipolar transistors and one P-channel MOSFET.
Having many cheap N-channel high current MOSFETs, costing about 16 cents each, and only a few expensive P-channel MOSFETs, I turned the circuit “upside-down” so it uses two PNP bipolar transistors and one N-channel MOSFET. The other modification I made to the circuit was to add hysteresis to the “comparator” which is made up of Q1 and Q2. The resulting circuit is shown in Figure 1. The hysteresis helps keep oscillation smooth until the battery voltage drops to the point that oscillation cannot be sustained because of the fact that at that battery voltage, less than the required current can be made to flow through the LED, at which point the circuit goes open circuit, placing the battery voltage across the LED, and the LED continues to glow but grow dimmer until the battery voltage drops below that voltage at which the LED will not light.
Start the analysis by imagining that Q3’s gate is held at battery voltage and that Q3 is conducting current through L1, the LED, and R1. Whenever the current through R1 is sufficient to cause a high enough voltage drop across R1 to cause significant base current into the base of Q2, Q2 turns on, thereby turning off Q1, which in turn results in Q3 turning off. The hysteresis provided by the positive feedback through R3 to the base of Q2 assures that Q2 remains on until the current through R1 decreases to below the trip point. Current, decreasing with time, continues to flow through L1, via D1 and current, diminishing with time, continues to be supplied by C1 to R1 as well results in the current through R1 gradually decreasing. When it has decreased sufficiently for Q2 to turn off (taking hysteresis into account), Q2 does turn off, thereby turning on Q1, which in turn turns on Q3. When Q3 turns on, current again begins to increase through L1, the LED, and R1. The threshold at which Q2 turns on is now higher because of the hysteresis from R3, and when that threshold is attained, Q2 switches off and the cycle begins anew.
The fact that the loop is closed around LED current is significant. The light output of an LED is nearly linearly proportional to current and is specified in data sheets, while light output as a function of voltage is fairly nonlinear and is not a controlled parameter. It should be clear that the LED current is equal to the base-emitter voltage of Q2 divided by R1. In the case of a 2.2 ohm resistor, this came out to 0.6V/2.2 ohms = 272 ma, which is close to what was observed. See Figure 2, below. The base-emitter voltage of Q2  reduces approximately 1.8 millivolts for each degree of temperature rise. This “thermal drift” is wholly acceptable as a trade off to obtain the simplicity and economy of the circuit.  Yes, the circuit could be made to have very low drift at the cost of increased complexity, but a drift of 16 millliamps over temperature will not be noticed visually.
If you decide to build this circuit, you can choose the current through the LED by selecting an appropriate value for R1. The value of the resistor is found by dividing the peak base-emitter forward voltage of Q2 by the desired current.  For a 2N2907, the peak base-emitter forward voltage will be approximately 0.65 volts in this circuit.
In general, this circuit is very forgiving and will work with a wide range of component values. This lends itself to being a “junkbox project”, in other words, a project built mostly from parts on hand.
Then 2N2907 should be recognized as being an easily-substituted part. A 2N3904, BC556, BC557, or similar should work, though I did not test these specific transistors in the circuit.

The MOSFET needs to have a fairly low Vth (gate threshold voltage) to assure that with as little as 4 volts of gate drive, the FET remains saturated. It should also have a low of an on resistance to minimize losses, especially at lower input voltages. The maximum drain voltage is equal to the maximum battery voltage plus the forward drop of D1.

There are plenty of integrated circuit switch mode power supply controllers available in parts of the world that can handle the task quite well. But what if you are an experimenter or student without access to such specialized parts? A discreet component version would be more widely accessible, and besides that, it’s more fun. As it turned out, the parts count and board space for the discreet component power supply can be pretty small.Long ago, I decided that a current fed buck converter is usually the best solution for driving LEDs from higher voltages. The control loop is very simple -running to the desired current on each cycle of oscillation, it needed no loop filter, which made ithe circuit inherently stable.
While looking on the web for examples to explain the topology to a friend, I came across an article published by Dhananjay V. Gadre, in which he described a simple three transistor current fed buck converter. His circuit used two NPN bipolar transistors and one P-channel MOSFET.Having many cheap N-channel high current MOSFETs, costing about 16 cents each, and only a few expensive P-channel MOSFETs, I turned the circuit “upside-down” so it uses two PNP bipolar transistors and one N-channel MOSFET. The other modification I made to the circuit was to add hysteresis to the “comparator” which is made up of Q1 and Q2. The resulting circuit is shown in Figure 1. The hysteresis helps keep oscillation smooth until the battery voltage drops to the point that oscillation cannot be sustained because of the fact that at that battery voltage, less than the required current can be made to flow through the LED, at which point the circuit goes open circuit, placing the battery voltage across the LED, and the LED continues to glow but grow dimmer until the battery voltage drops below that voltage at which the LED will not light.

Start the analysis by imagining that Q3’s gate is held at battery voltage and that Q3 is conducting current through L1, the LED, and R1. Whenever the current through R1 is sufficient to cause a high enough voltage drop across R1 to cause significant base current into the base of Q2, Q2 turns on, thereby turning off Q1, which in turn results in Q3 turning off. The hysteresis provided by the positive feedback through R3 to the base of Q2 assures that Q2 remains on until the current through R1 decreases to below the trip point. Current, decreasing with time, continues to flow through L1, via D1 and current, diminishing with time, continues to be supplied by C1 to R1 as well results in the current through R1 gradually decreasing. When it has decreased sufficiently for Q2 to turn off (taking hysteresis into account), Q2 does turn off, thereby turning on Q1, which in turn turns on Q3. When Q3 turns on, current again begins to increase through L1, the LED, and R1. The threshold at which Q2 turns on is now higher because of the hysteresis from R3, and when that threshold is attained, Q2 switches off and the cycle begins anew.
The fact that the loop is closed around LED current is significant. The light output of an LED is nearly linearly proportional to current and is specified in data sheets, while light output as a function of voltage is fairly nonlinear and is not a controlled parameter. It should be clear that the LED current is equal to the base-emitter voltage of Q2 divided by R1. In the case of a 2.2 ohm resistor, this came out to 0.6V/2.2 ohms = 272 ma, which is close to what was observed. See Figure 2, below. The base-emitter voltage of Q2  reduces approximately 1.8 millivolts for each degree of temperature rise. This “thermal drift” is wholly acceptable as a trade off to obtain the simplicity and economy of the circuit.  Yes, the circuit could be made to have very low drift at the cost of increased complexity, but a drift of 16 millliamps over temperature will not be noticed visually.
If you decide to build this circuit, you can choose the current through the LED by selecting an appropriate value for R1. The value of the resistor is found by dividing the peak base-emitter forward voltage of Q2 by the desired current.  For a 2N2907, the peak base-emitter forward voltage will be approximately 0.65 volts in this circuit.
In general, this circuit is very forgiving and will work with a wide range of component values. This lends itself to being a “junkbox project”, in other words, a project built mostly from parts on hand.
Then 2N2907 should be recognized as being an easily-substituted part. A 2N3904, BC556, BC557, or similar should work, though I did not test these specific transistors in the circuit.
The MOSFET needs to have a fairly low Vth (gate threshold voltage) to assure that with as little as 4 volts of gate drive, the FET remains saturated. It should also have a low of an on resistance to minimize losses, especially at lower input voltages. The maximum drain voltage is equal to the maximum battery voltage plus the forward drop of D1.
D1 is a one amp Schottky diode to minimize forward voltage drop, and thus the losses in D1. A three amp Schottky would probably improve efficiency a little bit by lowering the forward drop a little more. If you don’t have a Schottky diode, then try a fast recorvery diode of the type used in switching power supplies, just make sure the current rating is high enough.