Buck converter efficiency (crude power LED driver) - Page 1
Forum section: electronics / projects

author: Powermax
author_rank: Regular Contributor
timestamp: July 05, 2016, 03:21:56 am
content: Quick question: Due to the lack of buck converter chips in my junk bin, I decided to waste the day messing around and experimenting with discrete electronics and a LM339 comparator. Because, why not!I used an N channel MOSFET on the low side, and had a CREE XHP70 LED with several MLCC 0.47uF capacitors in series running from the 12V supply, through a fairly large (12mm dia * 20mm long) 47uH inductor, into the MOSFET. The flyback diode was added in antiparallel across the LED-inductor series. This is equivalent to making a "normal" buck converter, only instead I used an N device instead of a P device and so all the polarities are flipped. My topology of driving the MOSFET was really nothing more than driving the MOSFET with a square wave w/ adjustable duty cycle. If I recall correctly, the duty cycle was something like ~80%. I was able to adjust it with a pot in order to get it to the point where the LED was brightest. If the duty cycle was too high, then the LED was effectively directly across the power supply and limited to less than 2A. If it was too low, then the current was also limited due to inductor action. So it had to be tweaked to maximize power draw.I did notice my flyback diode was the warmest part (TO220 package w/o heatsink) and the transistor, second warmest (TO220 package w/o heatsink). Because I was using a LM339 with 2K pullup resistors, I expect that my quiescent current draw was reasonably high too. I measured about ~68% efficiency at ~110KHz, with an input of 10V at 1.8A and an output of 5.6V and 2.18A output (to the LED). (these figures are just from my memory) and they are about what I expected for my crude first attempt breadboarded circuit, although I was not accounting for the burden voltage of the multimeter when measuring the current to the LED. (I only had one multimeter on-hand for measurements.) so the actual efficiency may have been slightly higher. However, according to my calculations, I should have been dissipating like 6W of power!So HOW IN THE WORLD, can the TO220 packages handle that with no air flow and no heatsink!?!? I am pretty sure things would have got really toasty, (like, 400*C toasty!!!!) right???I guess I might have to repeat the measurements... IDK, what do you guys think? I do know for sure I was pulling close to 20W.So my question is how can I do to make it better? (improve efficiency and stuff?) I would also like to implement current regulation but also optimize it for operation between 9 and 12.6V (3S LiPo).

author: georges80
author_rank: Frequent Contributor
timestamp: July 05, 2016, 04:07:17 am
content: " Because, why not!Also, I have not found a LED driver designed to drive an LED quite like the 6V version of the XHP70."Lots of constant current buck drivers that can work with an XHP70.A decent buck driver should be up in the 90% efficiency range for a non-synchronous rectifier design. But then, you would be looking at a real driver chip (LTC etc) versus hobbling something up. Of course layout is also critical to achieving high efficiency and stability.cheers,george.

author: David Hess
author_rank: Super Contributor
timestamp: July 05, 2016, 04:12:25 am
content: The inductance of 0.47uH is too low. 47uH would be more reasonable.The LM339 comparator is fast enough however an active pull-up is needed for it to drive the power MOSFET efficiently. The high pull down current may cause problems was well so I would add a NPN-PNP pair of emitter followers for driving the power MOSFET. Do not forget to decouple the supply voltages close to the LM339 and any active MOSFET driver.TO-220 packages can handle 2 to 4 watts without a heat sink.Exactly what kind of TO-220 diode did you use? It needs to have a fast reverse recovery which most TO-220 diodes will have.Efficiency higher than 90% is feasible but the diode by itself will contribute much of the loss in a good design depending on the duty cycle.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 05, 2016, 04:50:48 am
content: Schematic, just to be sure?Sounds like you were doing something sorta like this,Except 2N4401 --> Nch, and everything else --> LM339. Not clear what you were doing with it, just an open loop oscillator I suppose?Example:(You might want an emitter follower to drive a MOSFET after that. If you don't have one, you'll probably find you have lots of extra switching dissipation..)In fact I've just shown what you're missing, but let me make it a bit more obvious!Note in the first pic, I've got a current sense resistor in series with the LEDs. This feeds back to the oscillator, throttling it. In essence, it's a hysteretic current regulator: it turns on and off when the current goes too low or too high.The biggest trouble with this is, the current shunt is "up there", tied to +V, and you need to somehow communicate that to the transistor at the "bottom", tied to GND. (Same trouble if you used PMOS!) It's probably better to put the "error amp" or comparator stuff near the shunt, and level-shift the digital (gate drive) signal back the other way.I've made more than a few circuits like this, with "few" transistors; the biggest problem is doing the level shifting without spending a lot of power. For example, if you were doing this from +160VDC -- in a mains powered LED fixture -- you go from a 0-1V current shunt signal (referenced to +160V) down to a 10V gate drive signal on an NMOS transistor (referenced to 0V), or vice versa. That's not easy to communicate; it's tempting to give up and use an optoisolator or something.The other way, is to sense current at the transistor itself. But this doesn't tell you about the current through the inductor, and LEDs, while the transistor is off.Tim

author: Powermax
author_rank: Regular Contributor
timestamp: July 05, 2016, 02:08:04 pm
content: Wow, so many replies in a short time!A: Yes, it was an open loop circuit. (one comparator generated a sawtooth waveform at the noninverting input (astable), the other compared that to a voltage level.)B: I used a 1K pullup resistor and used a voltage buffer (push pull emitter follower) to drive the MOSFET gate very hard. In series between the emitters of my 2N3904 and 2N3906 transistors is a 10 ohm resistor and a very low ESR MLCC 0.47uF capacitor. Even at 100KHz I was able to get a very square waveform.C: I used a 1000uF bulk filter capacitor for the input and more of those nice low ESR low inductance 0.47uF MLCC types directly across each component (the LM339 and the emitter follower.)D: For current measurement, my idea was to use a very small shunt resistor between the source and ground, but it just occured to me that would not be accurate because it would effectively measure input current, not so much output current (not take into account efficiency or voltage/current ratio of the conversion)E: OK I am pretty sure at this point I did have over 90% efficiency, I had to! My TO220 devices only got slightly warm vs the LED that got hot (estimated 50*C) even with a small heatsink, and with almost 20W of input power, I could not have possible been dissipating more than a fraction of watt in each device. (65*C/Wja)F: Oh, yeah, I was indeed using a 47uH inductor! Typo. I fixed my original post.

author: Siwastaja
author_rank: Super Contributor
timestamp: July 05, 2016, 05:14:35 pm
content: Self-oscillating, hysteresis controlled current-mode converter is almost as simple as what you are doing, and much more robust.Use a comparator to turn on the FET when the voltage over a current sense resistor is lower than a threshold level, and turn it off when the level is exceeded. The circuit will oscillate at a frequency determined by the inductor and comparator hysteresis, providing fail-safe pulse-by-pulse current limiting, stable loop, and fairly accurate current control (with no voltage control, but you won't need it with LEDs).Consider using the comparator output signal to drive an integrated bootstrap FET driver (salvaged from older motherboards, typically in SO8 package next to the CPU supply FETs; you can also salvage the FETs) for synchronous rectification - you can easily reach 95% efficiency.

author: Powermax
author_rank: Regular Contributor
timestamp: July 05, 2016, 09:24:50 pm
content: Quote from: Siwastaja on July 05, 2016, 05:14:35 pmIt's funny, I had this exact idea and have made a circuit to do that in LTspice using a couple random comparators and BJTs. I tried making it in real life but I had issues with parasitics and inconsistant operation. I realized the mistake I had (no hysteresis as intended due to a mistake in wiring) and I am now trying to simplify things down. I thought that doing that would be a stupid idea, but actually I really like it's elegance and simplicity. Even though the frequency is not carefully controlled, and I predict that higher input voltages will result in faster switching and pontenially lower efficiency (more switching losses).I think the majority of my power loss is going to be in a current sense resistor. I would like to use a value of 0.01 ohms or lower, but I only have some giant 15W 0.25 ohm resistors. I might instead try to use a bit of steel wire from a twist tie, but IDK the temp-co of that. I measured a resistance of 60mOhms by passing 200.00mA through it and measuring the voltage drop across the wire.

author: Powermax
author_rank: Regular Contributor
timestamp: July 05, 2016, 10:23:17 pm
content: OK so I got it to work nicely with a single comparator, emitter follower buffer amp, and a MOSFET and of course the classic buckeroo configuration. Now the question is if I can replace that horrible flyback diode with another MOSFET designed to conduct when the diode conducts. Hopefully eliminating the 300mV or so forward voltage. AKA, time for synchronous operation!I did that (use a P channel MOSFET for the high side and a N channel MOSFET for the low side) in LTspice, But as expected, that resulted in MOSFET shoot-through, causing spikes of up to 200A!:O Online schematics show using 2 N channel devices, one for the high end and one for the low end. But that would mean I need to apply 7V OVER my supply voltage to the high MOSFET to get the thing to saturate! So is there a simple way to do this or is that just not worth the effort? This whole thing is really just a learning experience for me, although it would be nice to make a final protoboard of the LED driver so I don't have to buy one lol!

author: Back2Volts
author_rank: Unknown
timestamp: July 06, 2016, 04:49:47 am
content: I assume the LEDs are red

author: Fungus
author_rank: Super Contributor
timestamp: July 06, 2016, 05:24:11 am
content: Quote from: Back2Volts on July 06, 2016, 04:49:47 amI would have said blue/violet.(I don't think they make black LEDs).

author: David Hess
author_rank: Super Contributor
timestamp: July 06, 2016, 06:41:57 am
content: Quote from: Powermax on July 05, 2016, 10:23:17 pmYou can however non-overlapping drive has to be provided. You may still want a parallel schottky diode to prevent the MOSFET body diode from conducting because of the body diode's reverse recovery.QuoteThe simple way is to use the switching node to power a charge pump to provide the bias for the upper MOSFET.

author: Siwastaja
author_rank: Super Contributor
timestamp: July 06, 2016, 07:14:21 am
content: Quote from: Powermax on July 05, 2016, 10:23:17 pmThe only really easy way to achieve this is to get the integrated bootstrap half-bridge driver chip, as I mentioned earlier. They drive two N-channel fets and provide higher-than-input drive voltage using a charge pump. Lots of these chips on the market, but for some reason, not much below $1 even though they are so common and from multiple manufacturers.Get one with a single PWM input + enable input. They also exist in a variety with high fet and low fet control inputs, in which case you need some logic.These chips integrate logic to drive the right fet depending on the PWM input, deadtime generation, charge pump to drive high side FET, under-voltage lockout feature which is 100% essential when using such a charge pump, and strong drive (typically around 2A) so you can use rather large FETs to minimize Rds(on) without having problems with switching losses. They only require two external ceramic caps and potentially a schottky diode for the charge pump (some chips integrate that). Most do not even require gate resistors, and they also integrate gate pulldown resistors, so you have minimal part count.But I do realize that it's not very easy to place the sense resistor on the ground side of the lower FET. Even if you can filter it enough to work, you are measuring input current, not output current, which is OK for a LED driver with fairly well regulated input voltage, i.e., if you use a 19V laptop charger brick all the time, for example. I can't come up with any other really good solution than high-side current sensing after the inductor. Using a small-value current-sense resistor with an integrated high-side sense amplifier (fast enough to handle the switching speed; products up to 100 kHz are low-cost and common) is best. These amplifiers can also give good accuracy even at gain=100, which would minimize the losses.High-side sense amplifier, integrated bootstrap driver and two well chosen N channel MOSFETs could easily give you 95-96% efficiency, or even more. I measured 96% using this exact self-oscillating topology in a battery charger (10V to 3.6V) with steady, stable operation at 70 kHz.Note that input caps are non-trivial! They are easily the most notable cause of power loss if you underestimate their importance. You need surprisingly large bank of ceramics and low ESR electrolytics paralleled.

author: David Hess
author_rank: Super Contributor
timestamp: July 06, 2016, 08:18:11 am
content: I would tend to make a discrete driver just for the fun of it but the LTC4442 is a good example showing what must be done:http://www.linear.com/product/LTC4442

author: Powermax
author_rank: Regular Contributor
timestamp: July 06, 2016, 05:08:45 pm
content: Quote from: Back2Volts on July 06, 2016, 04:49:47 amLol, I am making all my comments red (actually brown!) so that I can see at a glance if I was the last post or notQuote from: Siwastaja on July 06, 2016, 07:14:21 amYeah, I figured that I would be limited to the use of a high side N channel FET, and the only way I could imagine making that work well is with my MAX680 charge pump. (although it appears those are meant to only convert 5Vdc into 10Vdc.And I probably won't be buying chips to make a crappy converter lol! If so, then I'd get a proper buck or boost converter PCB!I built my LTspice simulation up in reality (for the current regulation) but unfortunately I cannot get reliable hysteresis to make the circuit oscillate at lower than 200KHz, and 200KHz. I am using a 7808 and a pot to set up a very small voltage on one input of the LM339, and connecting the other end directly to the 60mOhm shunt. The problem is that I am still dealing with voltages in the millivolts, very close to the ground rail, and it appears that my comparator has a significant enough offset voltage or something to it to cause it to not work as expected.Unfortunately, because I was limited to using the IRF9530, with a very sh*tty 300 mOhms or resistance, I could not keep it cool when powering the 4.8A LED at full power. (I assume based on it getting hot that i was dissipating a watt or 2 in it. According to calculations, assuming I was driving it at 2A, I think there was close to 1.2W) I wish P channel devices were not so sucky.I like the 50mOhms of on state resistance my other random N channel MOSFET was rated at.Attached to this reply is my simulated schematic.[/ color]

author: Powermax
author_rank: Regular Contributor
timestamp: July 08, 2016, 01:48:06 am
content: I went ahead and uploaded the schematic I used. However it did not work as well as expected, I think probably because the low side current shunt resistor was nothing more than a bit of steel wire as part of a twist tie (60mOhms measured). In my last comment I posted the schematic (.ASC file) if anyone is interested. I can convert that to a JPG pic here if anyone cares.