Buck converter based LED power supply

Thread Starter

tom66

Joined May 9, 2009
2,595
I noticed a lot of people have been asking for power supplies for LEDs.

Unfortunately, linear power supplies are often not an option, especially when dealing with high power modules (>100W) that are now available. The main problem is inefficiency, and getting rid of heat. They are also an issue because the power transistors can be hard to get hold of.

So, I have designed a primitive switch-mode buck-converter based LED power supply. But it is not voltage controlled, it is current controlled. I have not fully tested this design yet, but it should work. A few changes might be required with the diode-AND logic, because I did not simulate that part; it might not provide enough current to turn the TIP122 all the way on or off.

The core of this design is based on the LM339, a quad voltage comparator. (You can also substitute a LM393 dual comparator, but the LM339 is more common and I have a few so I spec'd that in.) An oscillator is gated with a control signal which turns on an off a TIP122, a power darlington transistor. Many components in this can be changed or substituted for alternate parts if necessary; it's not critical.

The efficiency under full load is about 75-80%, and under light load (<20mA) is 45-50% (calculated from simulations; this does not include the logic current which may be greater.) It uses a current shunt (10mΩ) on the low side to sense current and the current is set using coarse and fine potentiometers. The current ranges from zero to about 2.5 amps (with a limit of 5 amps), depending on the choice of inductors, capacitors, diodes and transistors. At high currents, a fan is recommended, and so is good heatsinking. Due to the high efficiency usually only a heatsink is required for lower current levels.

Power input can vary from +8V to +24V. Recommended power ratings for any power supply are usually 30% to 50% greater than the LED's rating, for safety and due to losses in the supply. For lower power levels, a 9V battery may be used. I will probably design a portable version of this with a limited current range for testing LEDs, maybe zero to 500mA.

One important point of note is that you should never connect the LED backwards because the supply can easily exceed the Vrrm of the LED and fry it, especially if set to a high current level. And, usefully, this supply is not just limited to LEDs. It will work with any kind of device, whether or not they have a non-linear response to voltage, like an LED.

Additions I may make to this are:

  • A milliammeter/ammeter based on a panel meter of some kind. The voltage can be taken from the internal feedback loop.
  • External voltage input for adjusting current.
  • Portability (see above.)
I welcome feedback on this. Also, the schematic is public domain, but I would appreciate a mention if you distribute it. And there is no warranty on it.
 

Attachments

Wendy

Joined Mar 24, 2008
23,429
If you can manage it use a MOSFET, logic level or otherwise. This is because a BJT uses 1/10 the current just turning off and on, which is extremely inefficient. This relatively simple change over would boost efficiency a lot.
 

Ghar

Joined Mar 8, 2010
655
May I ask what was the motivation behind the two stage output filter, with the smaller capacitor on the outside?

One comment is that pots tend to have their wiper briefly disconnect when you're moving them, especially as they get worn out. When that happens the current will tend to shoot upwards will it not?
 

Thread Starter

tom66

Joined May 9, 2009
2,595
Bill, I haven't done much with MOSFETs, though I would consider it in a future revision.

Ghar,
1) The reasoning for the two stage filter is to reduce ripple. Not terribly important for LEDs, but in testing other sensitive devices it matters. Without it, the ripple is about 300mVp-p, with it, it is reduced to 20mVp-p.
2) Probably. However, the supply takes a good few milliseconds to ramp up. I guess a fix here would be to put a small (<10µF) cap on the reference voltage which would delay any change.
 

timrobbins

Joined Aug 29, 2009
318
I would also recommend moving the current set pots to the upper arm, and cap filtering to also achieve slow-start.

And I can't see the reason for 5V reg supply. Why not just operate from input level - the 339 is fine - the oscillator freq variation may still be fine - and a 5V1 zener can regulate the ref level. And related to this is that the circuit config doesn't appear to allow hard switching of Q1, which is a fundamental benefit of wanting to use a switchmode. This would also negate any benefit from swapping to a FET for lower potential hard-switched loss.

Best for C1 to be from Q1c to D3a, and bypassed. Also C3 to be bypassed.

Ciao, Tim
 

Thread Starter

tom66

Joined May 9, 2009
2,595
The 5V reg has much greater line regulation than a zener, but I see your point. If the 5V line changes, the output current varies. Though the circuit draws only a few mA so I could use a zener maybe in a future version.

What do you mean about bypassing C1/C3? I've never heard that, unless you mean filtering?
 

timrobbins

Joined Aug 29, 2009
318
Yup - filtering the hf splatter relating to the switching transients - but in essence it is all about reducing the loop area taken by the transient current (ie. bypassing the larger loop through physically larger parts) using a physically smaller cap with a more direct path.
 

Thread Starter

tom66

Joined May 9, 2009
2,595
I designed this circuit from what little I know about switching regulators (mostly from simulations and videos, haven't been taught anything about these in my education yet), so please excuse my knowledge when I say: "What?"

The main reason for C1 is to smooth out the large current pulses the buck regulator takes, and to reduce the dips in voltage (and thus output) if a cheap wall wart is used. I found the combination of C1, C3, C5, L1 and L2 to work well. I didn't really put much thought into it, other than the fact that ripple was low and it worked. :)
 
Last edited:

timrobbins

Joined Aug 29, 2009
318
No probs. A big part of switchmode design is about managing the switching transitions. This is not just switching related losses, but also controlling the transient change in currents as they transfer from circulating in one loop to another loop. Minimising the loop impedance (at high frequencies), and the loop area, has a large impact on the emi that egresses from the circuit. This is all important for commercial designs, but may not be noticable if you aren't looking for it.

Some viewers may have good links that introduce the topic - well worth it, as they bring in to view a whole new world of design and circuit influences. Unfortunately simulation doesn't bring the issues out unless you get to quite detailed models and appreciate all the parasitic components.

Your circuit may not push very far into the harsh world of smps, as the frequency may be quite low, and the switching slow and unsaturated. But if you want higher efficiency, then that does require more detailed attention to the switchmode aspect.
 

Thread Starter

tom66

Joined May 9, 2009
2,595
That's why I used a bipolar transistor and a relatively slow switching frequency (<10kHz). If I wanted higher efficiency or faster switching, I would probably have used a dedicated IC with a built in FET.

EDIT: The main reason for this was to replace all the linear regulator based power supplies you see for high power LEDs. When dealing with such high power levels, linear regulation is not an option. Even this basic SMPS will, hands-down, beat any other linear regulator.
 

Wendy

Joined Mar 24, 2008
23,429
A LM358 can go very near to ground (negative power supply), which is a good characteristic. I've been meaning to do something similar in my copious free time, but simply haven't had a chance. Want some ideas on how I would do it?
 

Thread Starter

tom66

Joined May 9, 2009
2,595
This supply may work better with op amps instead of comparators. A relaxation oscillator is simpler with an op amp than with a comparator. Bill, I would like to see your ideas on this.
 

Wendy

Joined Mar 24, 2008
23,429
This is one I drew up about a year ago, I have no idea if it will work.



The LM358 is a standard op amp, a dual as a matter of fact. Unlike most op amps the input responds closer to the negative voltage than most, and the output will also go a lot closer to the negative rail. If you are measuring small voltage this is needed. I drew the above schematic before I knew this little tidbit of information.

I used a CMOS 556 to drive the MOSFET better. For under 10V you need a logic level type.

I didn't show a ground as is my usual method because I was trying for a module approach.

I have another schematic that may be better, but I'm going to have to dig to find it.

If you want to simulate a high wattage LED I came up with this. The idea is a high wattage LED is expensive, better to use cheap parts first to test it out.



This came from this thread. It is meant to simulate a 700ma LED, and CR1-4 does get hot.

High-Power LED Flasher
 

Attachments

Last edited:

Thread Starter

tom66

Joined May 9, 2009
2,595
That's pretty neat. I'm curious as to whether a gate driver would be an option for my design, but I'm trying to make all the parts standard. The 556 is a neat idea, I'll consider designing around a CMOS 555/556.
 

Thread Starter

tom66

Joined May 9, 2009
2,595
I found these cheap LED testers on the 'net:

http://www.rapidonline.com/Electron...tronics/LED-Testers/LED-Tester-TruOpto/123551

Well, it turns out they're pieces of crap. They aren't current limited; they are just a box of resistors, a 9V battery and a switch.

I reckon I can do better, for less. Adjustable current setting and a 9V battery. (One of the things I would like to do is to compare LEDs. Well, since the buck converter is capable of supplying about 8V, this allows you to parallel two diodes to compare brightness at the same current level.) A more advanced model could determine polarity using a H-bridge and switching between the two modes, though care would have to be taken to avoid damaging the LED by exceeding Vrrm.
 

Wendy

Joined Mar 24, 2008
23,429
I have something similar, it cost $5 at the time, so I'm not disappointed.

http://www.bgmicro.com/LED1063.aspx



He's what it looked like when I opened it up to repair a broken battery wire.



I would still recommend buying one for a shop. It is a time saver, especially if you have thousands of LEDs like I do.

.
 

Attachments

Thread Starter

tom66

Joined May 9, 2009
2,595
The problem is with the resistors is that the current is inaccurate. That is, it might be OK with a fully charged 9V battery and a 2V red LED, but it won't be any good for 3.5V blue/white ones. Yours has a battery warning which is neat, but the one I looked at didn't even have that. It's great for testing LEDs to see if they work, but I'm cheap: I just stick a 9V battery on the two terminals to see if they light. This is OK for most signal LEDs as they can handle an overload for a few seconds. Don't do it with bright ones though you'll often toast them.
 

Wendy

Joined Mar 24, 2008
23,429
The circuit isn't meant to be that accurate, but it doesn't have to be actually. They plan best case/worst case conditions (the battery is fully charged, the resistors are at the bottom of their tolerance, the LED under test isn't dropping much voltage, etc) and work from there. It really is a go/no go tester, and one of the things we keep fighting is the myth that LEDs are super sensitive. For a short test like this you might knock a couple of hours off of a several thousand hour lifespan if you get it wrong.

It isn't always easy to tell what the color of an LED is, or it's approximate brightness, or even if the LED is working. This gets the job done. You could build better, but what is it you're actually using it for?

There really is a technicians vs. engineers point of view, this is one of them I suspect. Kinda like my tag line.
 

Thread Starter

tom66

Joined May 9, 2009
2,595
Yeah, I guess so. A go/no go tester would be good, so the two devices aren't really comparable. However, I do think that even basic constant current limiting (using a pass transistor) could be reliably achieved with few parts. That was my original idea, but I decided a switch mode version worked better.
 

SgtWookie

Joined Jul 17, 2007
22,230
Here's another version I threw together, using one channel of a quad LM339 comparator, a P-ch power MOSFET, and supporting components.

This is not an LED tester; it's a buck-type driver that in it's current configuration can supply from around 0A to 1A.

R4, R7, VR1, and D1 establish a voltage reference.
R4 is sized approximately as:
R4=(Vsupply - 1) x 1k
This provides roughly 1mA current through D1, which maintains a reasonably stable 600mV drop across itself.

There is a subtle advantage to using a 1N4148 as a voltage reference; as the diode temp rises, the voltage drop will decrease, which will decrease the current in the LEDs, which should drop the temp back down. This helps to prevent thermal runaway, which otherwise could quickly destroy the LEDs.

R7 limits the maximum reference voltage output to approximately 100mV, which limits maximum current to approximately 1A. Changing R7 to 1k and VR1 to 5k would allow a range of 0A to ~5A. The inductor should be upgraded to carry at least 2x the desired current output.

C2 provides a "soft start" feature. Without C2, there would be an initial high-current spike through the LEDs until the regulator stabilized. Subjecting LEDs to high currents (even momentarily) will decrease their service life.

C4 is an optional filter capacitor. If the circuit is more than a couple of inches from the supply, it is required.

Not shown is a 0.1uF (100nF) bypass capacitor across U1's supply pins, which is mandatory.

Q1 and Q2 charge (turns off) and discharge (turns on) the P-channel MOSFET M1's gate, respectively. M1 was chosen for low total gate charge (Qg) and low Rds(on) for the voltage range to give fast on/off switch times. R2 snubs the gate's tendency to "ring", or oscillate, when suddenly charged or discharged. R1 tends to keep Q1 turned on, charging the gate (turning it off) The R1-R8-ZD1 network provide a current source to U1's output; as an open-collector output, it can sink current but not source it.

When U1's output turns ON, it sinks current from ZD1, which turns on Q2, which discharges M1's gate, turning it ON. ZD1 limits the discharge to Vsupply-V(bkdn)ZD1, which is 5.1v, so 9.9v. This is enough to turn the MOSFET fully ON, without discharging it excessively - which would slow turn-off time. If Vsupply changes, the Zener diode's voltage would need to be updated.

R5 was originally used to provide some hysteresis feedback. The R6/C1 network actually provides sufficient delay on it's own, so R5 can be omitted.

L1 was sized to provide rapid response to changes in current, yet keep the power dissipation in M1 low. It should have at least a 2A current capacity. Radio Shack sells a 100uH 2A inductor that could be used. D3 provides a current return path when M1 is turned off.

C3 should be a low-ESR type. It keeps the current flow through the LEDs very constant by reducing ripple current.

R3 is a 100m Ohms, or 0.1 Ohm current sense resistor. The voltage developed across R3 is due to the current passing through it.

This buck converter operates at around 90kHz once the target current is reached.
 

Attachments

Last edited:
Top