I need a better PWM controlled Boost converter design

Thread Starter

lesrhorer

Joined May 21, 2024
9
A few years ago I designed a high power (100 Watt) LED flashlight. It worked fairly well, but over time I have made various improvements and updates. Recently, I switched the design from an analog device to a digital device controlled by an ATtiny88. I am not happy with the DC boost converter section, however. I am using this QSKJ Boost converter to increase the battery (19.8 volts - 24.9 volts) to between 26.2 volts @ 0.01 amps and 33.0 volts @ 3.0 amps. The main issue is I have to convert the Arduino's 1.9 KHz PWM output to an analog voltage, because the QSKJ will not take a PWM input, the fact it is using a UC3843A 500 KHz PWM controller itself to produce the up-conversion notwithstanding. The fact the boost converter does not provide any control input means the board needs to be modified - which isn't great, and I have to kludge the interface like this.

This is far from ideal, but the Arduino's 1.9KHz PWM output is far too low frequency to make a reasonable boost converter directly. Ideally, I would like a 0.39% duty cycle (a pulse of about 526μs) from the Arduino to produce 26.2 volts, which will only source 0.010 amps or about 1/4 watt. This still produces a reasonable amount of light and will allow the flashlight to have an incredible run time from a single charge. On the other end of the spectrum, a 99.6% duty cycle (524ms) should ideally produce right at 33 volts (99 watts). I would like the boost converter to have at least an 80% or better efficiency, and of course it will need to be able to deliver 4 amps maximum output. The output should be reasonably well regulated, although the ripple can be rather large, perhaps 100mV. The circuit board can be 4 layers, if need be, but the maximum size is 35mm wide x 70mm long. The components can be about 30mm tall.

Does anyone have any good ideas for a design? I've not come up with anything.
 
Last edited:

Thread Starter

lesrhorer

Joined May 21, 2024
9
What determines if you want 26.2V @10mA or 33V@ 3A?
The PWM output of the Arduino. The PWM control is an 8 bit value from 1 to 255, with each increment increasing the high pulse by 526μs, or a duty cycle increase of 0.39% per bit. Thus, a value of 10 for the analog output will produce a pulse with a 5.26ms on time and a 128ms off time. A value of 128 produces a square wave.

Or did you mean, "How is this determined?" The light intensity is set by an EC11 rotary encoder, which has 20 detents per revolution . I will increase / decrease the value of the register by 3 or 4 for each detent as the knob is turned.
 

Ian0

Joined Aug 7, 2020
10,277
if you search about a bit you should find a boost converter for driving LEDs which has a PWM input, and many of them work down to 200Hz.
The boost converter runs a 100kHz or so, and is gated on and off by the PWM signal.
This one doesn’t quite meet spec, because it needs PWM >5kHz
https://www.diodes.com/assets/Datasheets/AL8853.pdf
but you get the general idea
You could probably use the good old AL9910 without too many extra bits. How much latitude do you have for the brightness changing a bit as the battery discharges?
 

Thread Starter

lesrhorer

Joined May 21, 2024
9
This one doesn’t quite meet spec, because it needs PWM >5kHz
https://www.diodes.com/assets/Datasheets/AL8853.pdf
Yeah, that is a shame. I might be able to manipulate the ATtiny88 timer registers directly, but that is not very portable.

You could probably use the good old AL9910 without too many extra bits. How much latitude do you have for the brightness changing a bit as the battery discharges?
Hmm, maybe. A big advantage of using a boost converter is it should have a stable output voltage with battery usage. That is one of the selling points of the design. A changing output curve also makes it much more difficult to calculate the remaining battery charge, which is another advantage of the design. I suppose a 10% drop in output power is acceptable. The full range of output is covered by about 8V I'm guessing about 0.5V output differential for a 5V drop in input voltage, or 20dB isolation would be OK. 30dB would be better,
 

Ian0

Joined Aug 7, 2020
10,277
If you could increase the battery voltage so that it is more than the maximum LED voltage, you could use a buck converter, and this one is controllable by PWM down to 100Hz.
https://www.diodes.com/assets/Datasheets/AL8863.pdf

I think if you search through a lot of manufacturers’ websites, you might find one that does exactly what you looking for. By then, you will have read a lot of data sheets!
(Your project not mine - you can do the tedious stuff!)
 

ronsimpson

Joined Oct 7, 2019
3,220
MP3362 This is not quite the right part but close. It regulates the current and does not care about the voltage. That is the way to drive LEDs.
What I did was use a Constant Current LED PWM and get the LED working at 3A.
Next use a 6 or 8 pin micro to drive the enable pin. You can turn on/off the power at 200hz to 2khz at the duty cycle you want. Your eye will not see 200hz flashing, it sees a dimmer light.
Some of the white LEDs change color with very little current. That is one reason to drive them hard at a low duty cycle.
While you can build one at a time lights in voltage mode and probably be just fine, I have worked for several companies that purchase 20million LEDs a year and we never put a voltage on a LED. Always a current.
 

Ian0

Joined Aug 7, 2020
10,277
MP3362 This is not quite the right part but close. It regulates the current and does not care about the voltage. That is the way to drive LEDs.
What I did was use a Constant Current LED PWM and get the LED working at 3A.
Next use a 6 or 8 pin micro to drive the enable pin. You can turn on/off the power at 200hz to 2khz at the duty cycle you want. Your eye will not see 200hz flashing, it sees a dimmer light.
Some of the white LEDs change color with very little current. That is one reason to drive them hard at a low duty cycle.
While you can build one at a time lights in voltage mode and probably be just fine, I have worked for several companies that purchase 20million LEDs a year and we never put a voltage on a LED. Always a current.
I knew there had be one somewhere that did exactly what he wanted!
 

ronsimpson

Joined Oct 7, 2019
3,220
At the university, the kids want to use the PWM in the micro to make power supplies. They don't understand that you may need to change the duty cycle very fast. A dedicated PWM can adjust the duty cycle, every cycle. The current limit function in a real PWM probably responds in 10nS while a micro might take 10mS. I have seen too many senior projects blow up when the load changes.
 

Ian0

Joined Aug 7, 2020
10,277
At the university, the kids want to use the PWM in the micro to make power supplies. They don't understand that you may need to change the duty cycle very fast. A dedicated PWM can adjust the duty cycle, every cycle. The current limit function in a real PWM probably responds in 10nS while a micro might take 10mS. I have seen too many senior projects blow up when the load changes.
If power supplies could be controlled by microcontrollers, then there would be no need for the myriad of PWM power supply chips that are available!
 

Thread Starter

lesrhorer

Joined May 21, 2024
9
If you could increase the battery voltage so that it is more than the maximum LED voltage, you could use a buck converter, and this one is controllable by PWM down to 100Hz.
https://www.diodes.com/assets/Datasheets/AL8863.pdf

That is far from practical, for a number of reasons. First of all, at a minimum that would require an S11 battery pack with a minimum voltage of 36.3 volts and a maximum of 46.2 volts, and I don't think such a thing exists. A custom battery pack is not a good idea, at all. Secondly, going above 25.2 volts creates a number of issues with parts specs. Thirdly, the BMS would have to have 11 elements, rather than 6, and that is a very significant problem, again for a number of reasons, not the least being there are not enough analog GPIO pins on the Arduino to measure 11 different cells. I know I did not mention it previously, but the Arduino does a great deal more than just control the LED. Here is the board top, and this is the board bottom of the control system. Ther is no room for the board to be larger, but making the battery an S11 would make the board much larger, not to mention more complex and expensive.
 

ronsimpson

Joined Oct 7, 2019
3,220
If power supplies could be controlled by microcontrollers, then there would be no need for the myriad of PWM power supply chips that are available!
Most young engineers think 50%= half voltage, simple. Most computers have PWM. Let's save 50 cents. But now they need a much faster computer. Software people don't know what a real switching power supply does.
I have made power line inverter that use a computer. Where we are making 220V AC at 50/60hz locked to the power line. Some computers are made to do that job and have more to it than a simple counter making a duty cycle.
 

Thread Starter

lesrhorer

Joined May 21, 2024
9
If power supplies could be controlled by microcontrollers, then there would be no need for the myriad of PWM power supply chips that are available!
Controlling the driver digitally and driving the output are two very different things. MCUs and SBCs do a great job of setting the level for all sorts of power systems.

At the university, the kids want to use the PWM in the micro to make power supplies. They don't understand that you may need to change the duty cycle very fast.
Which is a secondary reason why I am not trying to do that, although this power supply does not require anywhere nearly the regulation of a typical power supply.

A dedicated PWM can adjust the duty cycle, every cycle.[.quote]
Yes, but again that level of regulation is not required, here. The load is not very active, at all. It changes slowly with temperature, is all.

The current limit function in a real PWM probably responds in 10nS while a micro might take 10mS. I have seen too many senior projects blow up when the load changes.
My senior year is almost 50 years behind me, although that is not very relevant. What is relevant is this is not a general power supply with an indeterminate load. It is a very specific, nearly unregulated power supply for a well known load.
 

Thread Starter

lesrhorer

Joined May 21, 2024
9
MP3362 This is not quite the right part but close.
Why do you say that? At first blush, at least, it looks great. I do have some concerns, however.

It regulates the current and does not care about the voltage. That is the way to drive LEDs.
Typically, yeah. Generally any bipolar semiconductor should have a comparatively high impedance power source in order for it to be stable, whether it is a transistor base, a Zener diode, or an LED. Driving a low impedance load with a low impedance source is not the best idea. It's begging for thermal runaway, for one thing.

What I did was use a Constant Current LED PWM and get the LED working at 3A. Next use a 6 or 8 pin micro to drive the enable pin. You can turn on/off the power at 200hz to 2khz at the duty cycle you want. Your eye will not see 200hz flashing, it sees a dimmer light.
That could work, although it won't be an 8 pin micro, for the reasons I previously gave. The Arduino is going to be doing a lot of A/D and lots of calculations in addition to merely setting the intensity. An ISR routine is going to be looking for interrupts from the rotary encoder. Six inputs are going to be measuring the voltage taps on the battery and then calculating the voltage of each individual cell. These values, plus the total battery voltage are then displayed on 7 segment LED display. If the voltage of any cell drops below 3.4 volts, the flashlight will beep and flash the display, letting the user know the battery is getting low. Based upon theoretical values, the MCU will estimate the remaining battery time in hours and minutes and display that, as well. (There are a few models of this light. The big one can last for months on a single charge at the lowest intensity setting.) If the voltage of any cell drops to 3.3V, the flashlight will issue a very long beep and then shut down the light completely.

Some of the white LEDs change color with very little current. That is one reason to drive them hard at a low duty cycle.
Yes, but this is a flashlight, not a display or theater lighting. More-or-less white is good enough. 'Better than a conventional incandescent light, certainly. Nonetheless, driving the LED at a constant current with a varying duty cycle is a very good idea. Thanks!

While you can build one at a time lights in voltage mode and probably be just fine
You lost me. Huh?

Getting a bit deeper into it, I do have some concerns. First of all, as I asked above, please explain why you think this is not the right part.

Secondly, I am having a little trouble swallowing the specs on this chip. It can really sink 4 amperes average through the inductor? Seriously? I realize N-MOS transistors have very low on resistances, but 4A through a chip only 5mm² in area? Even by the specs, 80 milliohms x 4 amperes x 80% duty = 160 mW, but the max dissipation is 120 mW, and that would not seem to account for heat when the FET is not saturated.

On page 14 of the datasheet, there are several components (D2, C7, R6, and R10) that hve no value, but are labeled as "NC". What does that mean? Non Critical? Indeed, I am struggling to see why any of them would actually be required. ????
 

Ian0

Joined Aug 7, 2020
10,277
Secondly, I am having a little trouble swallowing the specs on this chip. It can really sink 4 amperes average through the inductor? Seriously? I realize N-MOS transistors have very low on resistances, but 4A through a chip only 5mm² in area? Even by the specs, 80 milliohms x 4 amperes x 80% duty = 160 mW, but the max dissipation is 120 mW, and that would not seem to account for heat when the FET is not saturated.

On page 14 of the datasheet, there are several components (D2, C7, R6, and R10) that hve no value, but are labeled as "NC". What does that mean? Non Critical? Indeed, I am struggling to see why any of them would actually be required. ????
NC = not connected (usually, in this context) as it’s not likely to be “normally closed”.

The FET will always be either off or saturated. There will be switching loss as it transitions between the two.
 

Thread Starter

lesrhorer

Joined May 21, 2024
9
NC = not connected (usually, in this context) as it’s not likely to be “normally closed”.
Well, neither make much sense in this context. It certainly does not suggest any values. More to the point, I can't see these devices would serve any purpose, irrespective of their values. Why a resistor and capacitor in series across the MOSFET? Why two resistors in parallel between the LED and ground? These make no sense.

There is also a lot of inconsistency between Figure 3 on page 12, the description of the Short Load Protection on Page 12, and the schematic on page 14 around the FB pin (pin 6). I don't follow this, at all. Is diagram A correct, or diagram B? Diagram B is closer to the schematic on page 14, but neither is like Figure 1 on page 10.

The FET will always be either off or saturated. There will be switching loss as it transitions between the two.
That is my point, exactly. Even if there is no switching loss during transitions, the maximum current specifications are a bit over the maximum power dissipation spec. Add to this the fact there IS always at least a little switching loss as the transistor transitions between off and saturated, and the situation is even worse. It's never a perfect square wave of voltage and current vs. time. That puts us even further above the max power spec. It's a good recipe for component failure, especially since this may operate close to spec over significant periods of time. Of course, I could limit the current to, say, 2.4 amperes, but then it is no longer 100 Watts. It's 80 watts.
 

Thread Starter

lesrhorer

Joined May 21, 2024
9
The spec sheet says it is supposed to handle up to 4A, but I am just not convinced it will work. I could place an external transistor in front of the chip, but I am not sure that would work, either. The block diagram shows there is an internal comparator with a resistor across its inputs in line with the MOSFET drain, so the device might need at least some current to operate reasonably well. I'm thinking perhaps I could add a resistor across the source and gate (which is usually required anyway) of an external P-channel MOSFET?
 
Top