# Can I get constant current at the output of a buck convertor (to drive a LED)?

I want to drive a LED with a buck converter circuit as shown in the schematic below. In order to keep the circuit simple, the system will run open-loop (i.e.; there won't be any voltage or current feed-back). Is it possible to set the LED current to a fixed value by means of calculating the appropriate $D$ (duty cycle) value? Or, in this circuit model, will the LED current theoretically approach to infinity because of lack of a resistive element in the path?

• Why isn't the 555 gnd connected to gnd? Isn't the LED in backwards? What' L2 doing? (I think I'd use a resistor there.) – George Herold Oct 23 '14 at 14:55
• @GeorgeHerold GND of 555 set to the source pin of the MOSFET for gate-driving properly. I fixed the LED direction. C and L2 are for increasing the filter degree; please ignore it. I want to keep the circuit as efficient as possible; therefore I want to avoid using a resistor in the main current path. – hkBattousai Oct 23 '14 at 15:05
• You can't connect your 555's gnd to the MOSFET source. Think about what'll happen when the MOSFET turns on - where will that 'gnd' now be? – brhans Oct 23 '14 at 16:36

Yes, it is possible to calculate the duty cycle to acheive a specific LED current, given a specific set of conditions. If you know the 12 V supply will stay fixed, know the LED forward voltage, and use a reasonable forward drop accross the diode, then this can be done.

I actually did something like this in a commercial product, except that the power voltage was from a battery and could vary. The formula from battery voltage to PWM duty cycle is non-linear and not easy to solve in real time in a small micro. However, this was done with a table. I set up the table to take the raw 8 bit A/D reading directly and produce the value to write into the PWM duty cycle register. All the conversions and calculations (which included a divide and a square root) were performed by the preprocessor using floating point math, and the result loaded into the table at build time. It worked quite nicely. The LED current stayed within 10% of the target over the full battery voltage range.

The design has too many problems to be worth trying to fix. Better is to use a circuit that is designed to work properly and better still is to accept some sense losses in order to increase (not decrease) simplicity and designability.

An N Channel MOSFET (as shown) must have its gate driven above its source by Vgs_operating. Typically this is 3 to 6 volts and is seldom less than 1V with even very low Vgsth MOSFETS. As the source is at V+ = 12V potential when the MOSFET is on (as brhans notes) the gate must be driven ABOVE V+ by Vgs_operating. ie to from 13 to 18 V depending on the MOSFET used. You thus need either a higher voltage than +12V for the 555 to drive the gate (from a bootstrap driver or other source, or to use a P Cannel MOSFET.

Whereas a voltage source can be implemented open loop by using Vout ~= Vin x Dt/T, attempting to use this to set an LED current rather than voltage is approximately impossible (for values of approximately close to "certainly").

Chances are the LED Vf will be slightly more than 2V at 200 mA but if we assume it is 2V as shown then if a current sense resistor dropping 0.1V is used in the LED Cathode to ground connection then an efficiency loss of ~= Vsense/V_LED = 0.1v/2v = 5% is incurred. This is liable to be acceptable enough in reality.

The reasonably low cost and easy to use NCP3065 / NVC3065 has a 0.235V sense voltage. This can be reduced with a few extra resistors. Overall efficiency is not marvellous (see fig 17 & fig 20 in NCP3065 datasheet. It will be higher than shown there as graphs are for 700 mA or higher.

Modern synchronous output ICs for a few dollars will allow lower Vsense.

A hall effect sensor could be used to provide approximately zero loss current sensing.

Overall efficiencies of 90%+ should be achievable.

Assuming the MOSFET was switching properly- it would not work.

The circuit will approximate a fixed voltage source of voltage 12V * (ton/(ton+toff)) and a low output impedance. That will not result in a controlled current through the LED- it will tend to lead to too much or too little current.

If you need it to supply a constant current, you'll need a sense resistor somewhere and some kind of feedback (not necessarily closed loop around the LED, but at least the switch current needs to be controlled).