Buck converter based LED power supply

SgtWookie

Joined Jul 17, 2007
22,230
The problem with using an N-ch MOSFET is current sensing; it'll have to be on the high side, and common comparators like the LM311, LM393, LM339 can't "see" within about 1.5v of Vcc, although they can sense right down to ground.

Rail-to-rail and "over the top" comparators are available, but are much more expensive. Also, obsolescence and package types becomes problematic for hobbyists.
 

Thread Starter

tom66

Joined May 9, 2009
2,595
Yes, I know, but I was talking about over specifying the FET.

I will definitely have to investigate using a high side current shunt. Would the shunt go on the LED side? I am designing a V3 version, using an n-ch FET. It has slow start and a remote shut-off input.
 

Ghar

Joined Mar 8, 2010
655
This isn't really an issue with this project but having low-side current sensing on a safety grounded power supply can be problematic.
If you use it to power some circuit and then use your scope on it you will short out the sense resistor with the earth ground, eliminating the current limit.
This assumes you clip the scope ground lead to the supply negative (indirectly of course) but that's usually the case when working with a bench supply.
 

Thread Starter

tom66

Joined May 9, 2009
2,595
This isn't really an issue with this project but having low-side current sensing on a safety grounded power supply can be problematic.
If you use it to power some circuit and then use your scope on it you will short out the sense resistor with the earth ground, eliminating the current limit.
This assumes you clip the scope ground lead to the supply negative (indirectly of course) but that's usually the case when working with a bench supply.
Good point. The 0.01 ohm resistor, though, will only drop 30mV max. (3A), so for most cases it is ok.
 

Thread Starter

tom66

Joined May 9, 2009
2,595
Thought I'd bump this - Bill & SgtWookie, how is the project going?

I would really like to get LED lights up in my room and elsewhere. Now that is a project.
 

Wendy

Joined Mar 24, 2008
23,421
I've got all the parts in a glass (made out of glass), just a matter of finding time. I suspect the soldering will take about 3 hours, give or take.
 

Wendy

Joined Mar 24, 2008
23,421
I spent about 5 hours building it today, not my best work because this bug has me making bonehead mistakes, which I had to tear down and rebuild. Also found my stock of PN2907's were actually PN2222A's, so I substituted with a PN4403.

Found a couple of minor errors, here is the updated layout.



Question, I wonder how much difference it would make to substitute a conventional diode (such as a 1N4007) for the Shottky? I'm using a Shottky for the first build, but would a substitute make a large difference?

L1 on the top and L1 on the bottom are in different locations, but I don't think I'll worry about that now. L1 is one of those parts that will have a lot of geometries that may need to be corrected by the various builders.

Because I'm going to test this almost to destruction I used two 2400 resistors for R4 to make a ½W part.

I may build later versions and see.

**************************

I thought about it in my muddling fashion, a Schottky is absolutely necessary. Since the part I have is a 20V max spec that will be the max for this board.
 

Attachments

Last edited:

Wendy

Joined Mar 24, 2008
23,421
OK, I'm getting way ahead of myself. I've almost finished the prototype, but I had a lot of time on my hands far away from home, so I came up with this.



It would be nice if it worked, but the prototype will tell.

The second drawing is meant to transfer to the top of the board, giving a component layout. The colors will turn into a gray scale if printed on a laser printer.

Use MS Paint to print it, and it will come out to scale.

.
 

Attachments

Thread Starter

tom66

Joined May 9, 2009
2,595
Great work Bill.

Unfortunately you cannot substitute a diode like the 1N400x series because they are designed for 50Hz/60Hz circuits and not a switching supply which operates at 1kHz+. If it works, it will increase the ripple and probably heat up to destruction as it does not conduct fast enough. For the Schottky I recommend you use something like the SB130, rated for 30V reverse and 1A continuous, but pretty much any Schottky will work.

Did you lay out that supply without a netlist or even a PCB editor? Congratulations, you have done something I could never do! :) I will have a look at designing one with surface mount parts if I get some spare time. Oh, and one thing I might add in my version is a voltage reference. That diode will vary from 500mV up to 700mV depending on supply voltage which will vary the current considerably. The problem is a 0.7V reference is difficult to come by, though a voltage divider can be used.

One thing I am really worried about is Q3. I don't think it will be happy with the high peak currents from the SMPS when running a 1W LED. Because of the fast switching action it will spend a lot of time in the linear/ohmic region and dissipate a lot of heat. That TO-92 package won't be any good for getting rid of heat.
 
Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
I recommend using a 1N914/1N4148 for D1 (CR1); they are small, cheap, and it's what I used in the original simulation. You could substitute a 1N400x or 1N540x for CR1, but it's Vf will be somewhat lower at the same current, which will tend to limit the upper end of the current unless you decrease the value of R2 to compensate.

CR2 must be at least a fast-recovery type diode, but a Schottky diode is preferred.
A 1N400x or 1N540x will turn ON plenty fast enough; the problem is the recovery time as it's far too long at these frequencies. Keep in mind that the 1N400x and 1N540x work OK at up to about 1kHz, but this circuit will be switching at around 60kHz.

The reason that a Schottky is preferred over a fast-recovery type diode is the comparatively low Vf. Keep in mind that roughly 1/2 the time, the LED current will be passing through CR2. You want a low Vf to decrease the power dissipation in CR2; as that's simply wasted power.

A more elegant solution is to use a MOSFET as an "ideal diode" in a synchronous switch arrangement. MOSFET drive requirements are somewhat more complex, as you must take the turn-on and turn-off times into account, as having both MOSFETs on at any given point will result in disaster.
 

SgtWookie

Joined Jul 17, 2007
22,230
Tom66,

Meanwhile, here's a circuit using a comparator that has better-than rail-to-rail inputs with an N-ch MOSFET and high-side current sensing. Note that your typical comparator won't work.

R2 sets the current through the LED.

Should be pretty efficient. It switches at about 133kHz.

Caps not shown are across the comparator's power pins, across the collectors of Q1,Q2 and across the voltage supply.
 

Attachments

Thread Starter

tom66

Joined May 9, 2009
2,595
Tom66,

Meanwhile, here's a circuit using a comparator that has better-than rail-to-rail inputs with an N-ch MOSFET and high-side current sensing. Note that your typical comparator won't work.

R2 sets the current through the LED.

Should be pretty efficient. It switches at about 133kHz.

Caps not shown are across the comparator's power pins, across the collectors of Q1,Q2 and across the voltage supply.
Very cool. But I don't see any way the reference can be adjusted, or am I missing something?
 

Wendy

Joined Mar 24, 2008
23,421
I did correct my post about using the Schottky, it was a brain fart.

One of the design goals I'm aiming for is to go down to as low a voltage as possible for the power supply. I'm not sure what that is yet, but it will be part of the experiments establishing the parameters. I also like the availability of the LM393, as well as its wide range of power supply voltages. It also applies for the MOSFET. I think I'm going to have to buy a different make, but I'll burn up this one first. It is works as is, then good enough.

The reference diode CR1 really isn't critical. I'm using 1N4007 diodes because I literally have thousands of them (paid $1 for a reel).

A MOSFET, if it working efficiently, doesn't get hot. I've had some experience with this with other circuits, they were room temperature and stayed that way. Part of it is the Ron value, low ohmage is a must. The other part is switching speed. Heat on the MOSFET will be a result of the switching, not the current.

I know my current make/model is not the best. It is what I have, if it doesn't work I'll get better, but I suspect you won't like my choice. It must be a low ohmage logic type, since I am after a low voltage power supply. Anyone can do a high voltage power supply with a conventional MOSFET (and good to excellent conventional MOSFETs are very easy to get).

I've been thinking test protocols. I'll start off with 1Ω for a load, and use a variable power supply to compare input and output currents and graph the results. I'll be using 4V - 15V.

Then I will use the 1Ω resistor with the pseudo 1W LED shown below, and repeat the experiment.



Anything else I should do? I do not have the facilities for temperature chambers.

Both the designs shown last still have one major issue, one that can not be addressed at this time. They have caps on the output. This is a very bad thing, since a LED hot connected will take a current surge provided by the capacitor. The only resolution I can see involves a lot more parts, or something like a µC to sense a load and slowly bring it up.

When/If this design is released it has to be emphasized that the LED must be connected on power up.
 

Thread Starter

tom66

Joined May 9, 2009
2,595
One thing to add, Bill, is a resettable fuse on the output. Use a ~600mA type. These "blow" temporarily, but then once allowed to cool down for a few seconds return to the normal, conducting state (though they retain a few ohms of resistance after an event.)

It might be worth picking up some 1W LEDs. Here, I bought two for about £5, which is probably more expensive than you can get them in the US. Your pseudo LED will work for some time, but you'll need to test it on a real world output.

Another idea to slow start the LED is to use a capacitor on the reference (the diode.) If it was around 100µF, it would delay the start up considerably. Also, an NTC could be used for slow start on the output. And, some way to limit the output to around 4.5V would prevent blowing up an LED by accidently reversing it, as most LEDs are damaged by reverse voltages exceeding 5V. That could be done with a 3.9V zener and a transistor (3.9V + appx 0.7V = 4.6V) to pull down the gate control. This would be optional because some people would want to control larger series arrays of LEDs.

On one of my original simulations I found 6V was about enough to run a 3W LED, with a Vf of 3.2V. Below 6V, the increasing losses in the diode and MOSFET become a problem, and the fet can't pass enough current into the output inductor to meet the required output.
 

Wendy

Joined Mar 24, 2008
23,421
The simulator is actually very close, this isn't the first high power LED project I've done, the simulator works extremely well. The dropping voltage is very close (to within a couple of millivolts), and the LED indicates power nicely. I've got a 1W LED as a gift, but the simulator is still the way to go for a test and burn in (in case it fails).
 

Thread Starter

tom66

Joined May 9, 2009
2,595
Here's my schematic. It's more or less the same as your schematic. I've replaced the somewhat unstable diode reference with a zener reference (which produces 5.1V.) And instead of grounding out the other comparator and wasting it, I've repurposed it as a voltage comparator to limit the supply to 4.5V, using the 5.1V reference.

That's how it should work in theory, but I'm unsure. When the comparator trips high, it should pull the bases of the gate drive transistors low, shutting down the output. But, I'm unsure whether the comparator's output is inverted to compensate for the pull-up resistor, in which case the inputs will need to be reversed.

Obviously as this supply has a 5.1V reference it can't operate properly below about 6V, but if the Vref were replaced with lower voltage references and the overvoltage comparator were modified then it would work fine.

And I've added some slow start caps (the 10µF caps on the references) and a PTC to protect the supply and the LED.
 

Attachments

Wendy

Joined Mar 24, 2008
23,421
I can barely make out the schematic (yellow on black is very unreadable, plus the schematic will not fit on the screen and lines tend to disappear with the reduced size), but from what I can see you're used the second comparator as a shut down (or voltage regulator). That will work as long as you're only driving one LED. For other colors the zener will need to be reduced, and there is always the possibility multiple LEDs will be chained on the design.
 

Thread Starter

tom66

Joined May 9, 2009
2,595
I can barely make out the schematic (yellow on black is very unreadable, plus the schematic will not fit on the screen and lines tend to disappear with the reduced size), but from what I can see you're used the second comparator as a shut down (or voltage regulator). That will work as long as you're only driving one LED. For other colors the zener will need to be reduced, and there is always the possibility multiple LEDs will be chained on the design.
Sorry, that's the default colour scheme of gEDA, I've kind of got used to it. Here's one with a lighter scheme. I just used GIMP's Value Invert, which has caused some fringing of the colours.

I mentioned the shutdown voltage limitation in the last post. It could be disabled by adding a zero ohm link to the circuit which could be soldered in if the limit was required. A trimpot could also be used to limit the voltage.
 

Attachments

retched

Joined Dec 5, 2009
5,207
You should look at that schematic in post 118 with 3d glasses! Woah! Reminds me of the 60's.... You know, the 60's I wasn't born in! ;)
 
Top