Buck converter based LED power supply

Wendy

Joined Mar 24, 2008
23,429
OK, I revamped my original buck converter design, relabeled the designations, and removed some sections I'm pretty sure would have caused problems.



It is basically the same design, except I reversed polarities to allow the LM358 to respond to signals near -V better. This was as serious weakness in the original schematic. I laid it out so it would be closer to the classic buck converter schematic layout.

Other problems are how to prevent surges when connecting the LED to a powered up circuit. We could short the output while connecting the LED, but that seems very kludgy. For anything under 10V a logic level pMOSFET will be required.

I may do another design, getting away from the buck converter design and going to a PWM convention (it will still resemble closely). Wookie and I have had a long term discussion about power conversions, and frankly I'm curious how it would turn out.
 

Attachments

Last edited:

Wendy

Joined Mar 24, 2008
23,429
Wookie, could the LM339 be replaced with a LM393? I think it could, it would be a smaller footprint and one less gate (comparator) to ground out. I don't know if the parts are close enough to substitute though.
 

SgtWookie

Joined Jul 17, 2007
22,230
OK, I revamped my original buck converter design, relabeled the designations, and removed some sections I'm pretty sure would have caused problems.



It is basically the same design, except I reversed polarities to allow the LM358 to respond to signals near -V better. This was as serious weakness in the original schematic. I laid it out so it would be closer to the classic buck converter schematic layout.
Well, the LM358 is a very old and very slow opamp, and you're using a very small inductor. Even at unity gain, the LM358 can be as slow as 0.3v/uS - which is far, far to slow for this circuit.

Other problems are how to prevent surges when connecting the LED to a powered up circuit. We could short the output while connecting the LED, but that seems very kludgy. For anything under 10V a logic level pMOSFET will be required.
The LEDs should be connected prior to powering up the circuit. If the connection is intermittent, it could be possible to get high voltages at the inductor.

I may do another design, getting away from the buck converter design and going to a PWM convention (it will still resemble closely).
A buck-type switcher will be much more efficient than PWM, as with PWM, you still need to limit the maximum current.
Wookie and I have had a long term discussion about power conversions, and frankly I'm curious how it would turn out.
I guess this means you'd like to see your circuit simulated instead of you roasting your LEDs? ;)
 

SgtWookie

Joined Jul 17, 2007
22,230
Wookie, could the LM339 be replaced with a LM393? I think it could, it would be a smaller footprint and one less gate (comparator) to ground out. I don't know if the parts are close enough to substitute though.
Sure, LM393, LM2903 (basically the same part), LM111/211/311, etc - actually lots of comparators with open-collector or open-drain outputs would work just fine, as long as they were pretty fast.

This is one of those applications where the speed of a true comparator comes through. Most opamps just can't switch that fast; and if they can, you'll pay a premium price for them. Why not start with the right tool for the job; a comparator?
 

Thread Starter

tom66

Joined May 9, 2009
2,595
SgtWookie, that's a neat circuit. Lower parts count too compared to mine. Probably better than my circuit due to the use of a p-ch MOSFET. But any chance of a n-ch FET instead? I doubt it would be a drop in replacement, because of the complexity of that circuit.

I'm currently working on another project (if you want to know: raster 256x192 pixel on screen display for PAL/NTSC video signals based on a dsPIC33F), but I'll get back to this one when I'm done with that one. If price/complexity were not a major concern, the dsPIC30F SMPS DSPs would be ideal for this application as I could add a display/interface and eliminate several components in the process. (It implements a half-bridge push-pull converter I think, and the only external components are a gate driver and a few MOSFETs.) Unfortunately, all I have at the moment are some 33Fs and non-SMPS chips. I was also considering using an MC34063A type chip with an external amplifier op-amp for the feedback pin to get to the nominal 1.25V. Any ideas?
 

Wendy

Joined Mar 24, 2008
23,429
Inductive spike I'm not worried about, C3 will absorb and store the surge with the assistance of CR3, since that is what a buck converter does, and part of the reason for it's efficiency. With the PWM design it will turn entirely off, or entirely on if that is required. While the op amp is slow, the U2b is a Schmitt Trigger, it should compensate for a slow slew rate nicely. The switch rate is fixed at 47Khz, it isn't that high speed.

The spike from connecting / disconnecting the LED will come from C3 being fully charged to power supply levels. I don't see around that problem yet, other than shorting the leads together (it is a constant current circuit after all).

I wouldn't mind seeing it simulated, but I'll probably also build it. I'll also take a closer look at yours for some concept ideas.
 
Last edited:

Ghar

Joined Mar 8, 2010
655
What about adding some components to detect when a load is connected, keeping the FET off (and voltage zero) until an LED is plugged in. This could be done by pulling down the current setting reference to zero.
You could have a high impedance (a few kilohms maybe) tap to the output straight from the input supply which will bias the detector circuit.
 

Wendy

Joined Mar 24, 2008
23,429
If you have an idea how to do this I would like to see it. Try to keep the parts count as low as possible though.

I may try to do this with a LM393 only. First things first though. Only reason I had anything drawn in the first place is I had the same idea as Tom last year about this time.

Wookie has some good ideas to, maybe he can figure it out. I can't swear to it, but I think his design has the same problem. His configuration is a ripple regulated design, which means the frequency is not fixed, it will go all over the place unless it is feeding an LED. Since my idea is a PWM regulated type the frequency is stable, but I can't swear as to the current.
 

Ghar

Joined Mar 8, 2010
655
I think that no matter what regulation scheme you go with, even a fast PID loop or something, you will still have this problem. That diode will turn on quickly and short the cap before you get a response.

I already thought of an issue with my idea but I'm sure something can be worked out. I'll play around with it later tonight.

Of course, if you're willing to tolerate more ripple you don't really need the cap. You could also up the frequency and downsize the cap for the same ripple but less damaging surge capability.
 
Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
SgtWookie, that's a neat circuit. Lower parts count too compared to mine. Probably better than my circuit due to the use of a p-ch MOSFET.
I'm not "in love" with P-ch MOSFETs, but it kept the circuit reasonably simple. Using a 555 for the gate drivers might've kept things a bit more simple than all of the other razzmatazz I have in there. Using an N-ch MOSFET with a high-side boost would've been better.
But any chance of a n-ch FET instead? I doubt it would be a drop in replacement, because of the complexity of that circuit.
Well, it wouldn't exactly be a drop-in replacement.

It might be simplified quite a bit by using an N-ch logic level MOSFET driven by a PIC that had a comparator. Even the low-end 10F or 12F PICs would likely do the trick. Use a low-value sense resistor from the source terminal of the MOSFET to GND, and trigger the comparator from that. Since even these cheapie 8-bit uC's have a built-in 4MHz oscillator, speed won't really be an issue. Gate drive might be, depending on what MOSFET is used. There are some very capable (high Id; drain current) logic level MOSFETs with very low Qg's (total gate charge.)

I'm currently working on another project (if you want to know: raster 256x192 pixel on screen display for PAL/NTSC video signals based on a dsPIC33F), but I'll get back to this one when I'm done with that one. If price/complexity were not a major concern, the dsPIC30F SMPS DSPs would be ideal for this application as I could add a display/interface and eliminate several components in the process. (It implements a half-bridge push-pull converter I think, and the only external components are a gate driver and a few MOSFETs.) Unfortunately, all I have at the moment are some 33Fs and non-SMPS chips. I was also considering using an MC34063A type chip with an external amplifier op-amp for the feedback pin to get to the nominal 1.25V. Any ideas?
Well, did you know there are dedicated LED buck driver ICs that require only a couple of external caps, inductor, and resistor or two besides the LEDs themselves? They're mighty efficient, too.

There are PICs that have internal opamps. Why use an external opamp if you don't have to? Or, simply use a low value for the reference for a comparator.
 

Thread Starter

tom66

Joined May 9, 2009
2,595
I was thinking of using an ADC and a current shunt. The ADC would need a low voltage reference, and this could feed the PWM controller. For example:

If ADC voltage < Reference
& Hysteresis: Increase SMPS frequency
If ADC voltage > Reference & Hysteresis: Decrease SMPS frequency

This could even be implemented with a PIC16F. Some of those have half-bridge SMPS PWM built in. They even have dead time control.

The original circuit I posted is pulse modulation based but not necessary pulse width modulation. A better circuit would combine a linear ramp and a comparator to generate a PWM signal, which is then fed to a power switch (preferably a FET) of some kind. I actually designed a PWM based SMPS with a quad op-amp (two op-amps for the ramp, one for a comparator, and one for an overvoltage shutdown.) I spec'd in a TL084 as it is quite a fast op-amp (capable of about 50KHz apparently when doing a linear ramp.)
 

SgtWookie

Joined Jul 17, 2007
22,230
Well, ADC takes a relatively long time to perform a conversion vs a comparator, which could result in running too much current through the LED(s).

It's really pretty easy to get a "soft start" out of a comparator-based buck; just use a large enough RC time constant on the reference side so that you don't overshoot the max current.

You could do about the same thing with the PWM module; start out with a low duty cycle and slowly increase it until you achieved the desired current. Using an ADC seems to be a bit of overkill, along with unnecessarily slowing the response time and complicating the input circuitry.
 

Wendy

Joined Mar 24, 2008
23,429
I always strive for minimum parts count, I think Wookie does to, though we go about it differently. We might disagree on what is necessary, but the goal is the same.

Part of the fun for me is to figure out new and original ways to do a job with less.
 

Thread Starter

tom66

Joined May 9, 2009
2,595
The advantage of the micro, is of course the ability to easily control the current parameters from an interface. It also allows for dimming, and programmable patterns. I could even connect an 18F4550 to a USB port to control it from a computer.
 

Wendy

Joined Mar 24, 2008
23,429
Whatever works, works. Do pay heed to Wookies admonition about soft start though. It will save the LED and probably extend it's life.
 

SgtWookie

Joined Jul 17, 2007
22,230
<snip>
I wouldn't mind seeing it simulated, but I'll probably also build it. I'll also take a closer look at yours for some concept ideas.
I'll save you some time. The LM358 will not work for your concept.

You're running both sides of the opamp open-loop, and thinking that it'll be able to keep up with the 40kHz triangle wave from the LM555.

It won't.

You also have to swap the inverting and non-inverting inputs of one of the two opamps.
 

Thread Starter

tom66

Joined May 9, 2009
2,595
How about dedicated ICs? I know I wrote this back a while ago, but how easy would it be to use a MC34063A as a constant current regulator? Cheap in quantity and low external parts count (integrated NPN) would make it ideal...
 

Wendy

Joined Mar 24, 2008
23,429


I see what you mean about the polarity, it is an easy fix. I also think the PWM will be there, since slew is compensated for by the 556 following. I'll build one and see.

Here is the reason I think it will work. I drew signals to scale using 12VDC, the slew rate is a match.



The meat of the PWM remains. The problem gets worse as power supply voltages increase, but I can drop the oscillator rate.
 

Attachments

Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
Bill,
Download ONsemis' datasheet for the LM358.

Look at Figure 3, "Large-Signal Frequency Response"

Note that with Vcc=15, Vee=GND, Rfb=100k, Rload=2k, gain=-100, at 40kHz the P-P output is about 3.8v. That will not be enough to trigger the 555 timer, and you're talking about running at 12v instead of 15v.

Download TI's datasheet. Look at the slew rate. It's given at 0.3V/uS - at unity gain. You're running open-loop.

Since you're going to be slamming the outputs into saturation, their response time will be even worse.
 
Last edited:

Ghar

Joined Mar 8, 2010
655
I haven't had much time but I've played with this briefly.

Here is a simulation of an unregulated no-load buck when you suddenly connect a string of 3 diodes.
With no load the output overshoots the target (would be 6V under load) and just stays there, with the capacitor slowly discharging.

When you connect the diodes you get the large spike of current, the output drops then slowly rises again. This would depend on the size of the cap obviously.

buck_diodeshort.png

I haven't even really thought about the details, this is just the first thing that came to mind. It's just generically the type of thing I'm going to play around with:

buck_loaddetector.png

The goal is to use that PNP to suppress gating and keep the FET off (and output 0V) until a load is connected. I don't really have a good location in this circuit but in yours Bill it could be used as part of one of the comparator pull ups maybe.
 
Top