A more efficient driver (digital to analog controlled buck)

I believe there are, and part of what I've done here also is put out an idea for how we can make one compatible with existing software. It may be kind of obvious, but yeah.. anyway, here it is all in one summary if nothing else. Like I said, not saying it's my idea. I did work through the homework problem though and thought I'd share.

You don`t understand what is buck driver.
It will have efficiency curve with one extremum, neverless what changes are you going to make.
There is always consensus in L-C characteristics, you can get little better effincy with half-load, but with bigger output ripples, or vice versa.
To have 90% efficiency at 5% load, you need different pcbs with different frequency, L and C, and switch between them on different loads.

Pretty sure the MTNmax drivers are non pwm controlled with true current regulation. The problem of voltage ripple remains which limits the maximum current the led can tolerate but for power and size they can’t be beat.

If I understand correctly that converter will convert 4.2v 50% into 2.1v, not enough to even light up the Led, if it can even handle the high currents. The Led vf is not linear like that.

Couple of things:

The family of buck drivers linked in the OP can handle a wide range of Vin and Vout — Vin from 6V to 42V and Vout from 1.25V to 42V. The output is completely adjustable, so there should be no problem driving a 3V led from a 2s configuration, or even a 3s.

There is a problem with the linked buck drivers — the minimum Vin is 6V, meaning that it won’t be able to fully drain your batteries, since a 2s configuration fully drained is right around 5.6-5.4V, depending on whether you want a low-voltage cutoff at 2.8 or 2.7V per cell.

This really depends on which switching regulator you’re talking about. Yes, there are some regulators which have an efficiency curve with a sharp peak. Efficiency might be 95% at a particular Vout and Iout, but drops below 70% if deviating from that specified output by too much. On the other hand, there are also adjustable regulators out there with a very high efficiency (>90%) across a wide variety of output voltage and output currents. Furthermore, many regulators have a “burst mode” which enables them to maintain high efficiency at light loads. For our purposes, a driver with this means that moonlight and firefly modes can be extremely efficient without sacrificing efficient mid and high modes.

Again, this depends. There’s switching converters which have FETS built-in, but there’s also switching controllers, which require external FETS to drive the load. As a general rule, regulators with built-in FETS will have a lower current limit. At least one of the family of drivers you linked to in the OP is a controller which requires an external FET.

Analog dimming is ideal for our purposes. While PWM dimming has the advantage of avoiding a tint shift (in certain use-cases), analog dimming is obviously more efficient. The problem with analog dimming for most of these regulators is that it has a small dynamic range. In the driver OP linked, there’s only a 250:1 analog dimming ratio (in contrast to a 10,000:1 PWM dimming ratio), which means that at a 5A maximum, it could only go down to about 20mA. Obviously this is still very low, but a 1mA firefly mode it is not. Fortunately, this isn’t really a problem, as most drivers allow you to use both PWM and analog dimming. So it would be possible to dim from 5A to 20mA (or whatever point you like) via analog control, and dim via PWM the rest of the way.

There’s also no need to limit ourselves to switching regulators explicitly designed to be LED drivers. It is very possible to use general purpose switching regulators, which regulate an output voltage rather than current, and hook them up to a microcontroller for analog dimming. I know of at least three ways to do this. One is via the low-pass RC filter mentioned in the OP. Another is by connecting a pot or digipot to the feedback pin of the controller. Most buck/boost/buck-boost regulators require a feedback loop to maintain a low output voltage ripple. At their most basic, these feedback loops involve a resistor voltage divider with the bottom resistor usually connected to ground. By replacing or augmenting that bottom resistor with a pot or digipot (where the digipot would be controlled by serial output from the microcontroller), it’s possible to change the output voltage (which for an LED means the output current, which is what we’re interested in) without disrupting the balance of the feedback loop. A third way is to replace that bottom resistor with an independent voltage source. This can easily be accomplished by connecting the microcontroller to a small external serial-controlled DAC. Pumping an external voltage into the feedback network means that the switching regulator will lower its output voltage to compensate, and vice versa. This method is perhaps the easiest, and it can allow a wide dynamic dimming range too. These styles of analog dimming, in conjunction with a burst mode for efficient ultra-low outputs, would make for an excellent LED driver with high efficiency across the board. TI, Linear, and Maxim, to mention only three, all make suitable regulators. But the design of these drivers is much more complex than a comparatively simple linear regulator, as you have to deal with electrical noise generated from the high switching frequencies.

-frontporchcarver

I agree with kiriba-ru that PWM’ing a buck converter cannot maintain the design efficiency. Same goes for PWM with low pass filter, or even an analogue voltage.

I found a linear relationship more or less between the PWM duty cycle and the efficiency of a buck driver. Here is a reference to the LTC3454 buck/boost driver efficiency, in the buck mode, at different led currents. PWM at 10% duty cycle equaled approximately 16% hit in efficiency. Higher PWM duty cycles would mean less of an efficiency penalty.

I already addressed this in my response. I'm not saying this more efficeint than a 1s PWM or 1S linear regulator. I'm saying it's more efficient than a PWM'd buck regulator or a buck regulator with linear regulation after it. I should probably make it more clear in the OP.

So what you get are the advantages of a buck, (and any disadvantages) and remember sometimes we MUST use a buck... but we don't add EXTRA inefficiencies to it that just are not necessary.

5% load with PWM and 5% load without PWM are both still inneficient to some buck designed for higher current, and I guess about equally so, but one also has PWM innefficiency from the LED added on top of that and one doesn't.

Yeah… I don’t have delusions (at this point at least) that this is simple. RMM apparently said the same to TA, and the Ti manual makes it pretty clear too that dealing with electrical noise is difficult. For the amateur or at least off-hours enthusiast crowd it might be more effort than it’s worth to anyone to try. But if anyone does take a stab at this Ti buck, maybe this DA method isn’t too much harder.I’ve also read rumors about these methods of modifying the sense voltage. I guess that’s an option for chips without this analog control feature. You still a DA converter as FPC points out.

Another trick I might like actually is just using a pot knob on the flashight case. Analog user control, avoids the D to A and gives continuous control. The downside to continuous control for the user is you don't get predictable battery life, and fitting pots on cases might be tricky? Doesn't some light have this?

Unfortunately, the LTC3454 isn’t a particularly efficient regulator. Linear, TI, Maxim, etc., all offer some regulators now with peak efficiencies as high as 96% and 98. Furthermore, the LTC3454 doesn’t offer the sort of input and control that conduces to efficient LED control of the type I’m speaking about. Instead of an FB or CTRL pin where an analog voltage can control the regulator’s output, the 3454 has two resistor-coded current values which are enabled/disabled by EN1 and EN2, where the efficiency of EN1 can reach 90 typical and EN2 80% typical. PWM through these inputs is switching the regulator on and off, which will be highly inefficient because of the internal soft-start timer. I’m not saying it’s necessarily a bad choice for a LED driver, but its applications are limited and it’s not the best for many scenarios.

There’s not really a huge reason why a buck regulator can’t be nearly as or more efficient than a linear regulator, even when the input and output voltages of the linear regulator are well matched (as in a 1s config).


On a more general side note, there’s at least three things going on here in this thread that need to be appropriately differentiated. More specifically, three different uses of PWM.

  1. PWM referring to the switching frequency of the regulator
  2. PWM dimming, which is a feature specific to switching regulators designed as LED drivers
  3. PWM from the microcontroller, which can be used to control the switching regulator’s output.

As regards (1), the PWM duty cycle of the switching regulator, this refers to how quickly the controller switches the FET (s) (either internal or external) to step-up or step-down the voltage of the source. The load never sees this PWM, because it’s smoothed out by the inductor and the input/output capacitors. Nickleflipper, you’re right to point out that the switching frequency and duty cycle of a regulator are connected to its efficiency (this is absolutely true!). A low switching frequency, say 100kHz, can make for a very efficient regulator. The downside is that it requires inductors and capacitors with a large inductance and capacitance, respectively. A higher switching frequency, say 1MHz, will drop the efficiency of the regulator, but allow for much smaller components because the energy stored by the inductor and filtered by the capacitor is comparatively less for each cycle. How much the switching frequency affects the efficiency of the regulator is a function of the individual regulator — it depends. Some are highly frequency dependent, others less so. Furthermore, the duty cycle of a given PWM frequency, which is varied as Vin and Vout vary, has an effect on efficiency. Again, it just depends on the individual switching regulator’s characteristics.

(2), PWM dimming in switching LED drivers isn’t the same as the switching frequency or duty cycle of the regulator. It’s a feature specific to certain regulators designed specifically for driving LEDs, and is not the same as sending a PWM signal through the RUN or ENABLE pins to turn the regulator on and off. It’s unrelated to the efficiency of the regulator (or at least not as related as many of these other factors) — it’s just related to the efficiency of the LED. Obviously, we want to avoid PWM dimming in general and control an LED with constant current (which is why we’re more interested in the analog control of the regulator).

(3) PWM from the microcontroller, converted into an analog signal and sent either into a CTRL pin on an LED driver or the FB (feedback) pin on a general purpose switching regulator, is unrelated to the frequency of the regulator. In these cases, the analog voltage is fed into an error amplifier and compared to an internal reference voltage. The switching regulator tries to keep the FB voltage equal to its internal Vref, and so either lowers or raises its output (basically by changing the duty cycle, although in more complex regulators there are additional factors at work) until the two match. How we change that analog signal — whether via changing a resistor value with a mechanical or digital pot or directly influencing the voltage via PWM sent through a low-pass filter or DAC — doesn’t matter to the regulator as long as there’s not an unnecesarily large voltage ripple in the signal, which there shouldn’t be in a well designed feedback loop. The switching regulator only sees the analog signal. Obviously, since the signal controls the output, it has an effect on efficiency, but in a driver with an efficient regulator (say, the LTC3785, which is a regulator I’m interested in making use of in the future) this efficiency remains fairly high over a wide range of Vin and Vout. For the 3785, efficiency is over 90% in most use cases for output currents ranging from 200mA to 10A, and by enabling its Burst mode, the efficiency can stay high (>80%) even down to 1mA of output current.


As an aside, a well-designed buck-boost regulator offers huge advantages in a 1s config as more and more LEDs are coming out with low Vfs. I’m thinking of the Nichia 219C, XP-G3, and the new XP-L2, all of which feature very low Vfs. Using a buck-boost regulator to drive them with a single li-ion takes advantage of that lowered Vf, whereas it makes a linear driver less efficient (although it does allow for it to stay “in regulation” longer at higher currents). The further advantage of a buck-boost driver is that it’s possible to maintain constant output over the entire voltage range of the li-ion cell, something which isn’t possible with a linear regulator.

I just don’t agree with this statement based on the experimental data gathered with the LTC3454. The PWM figure alluded to in previous post went thru a low pass filter first. I expect that other buck drivers would vary from my results. I am open for discussion. Does anyone have reference to a flat efficiency curve across any sort of dimming method?

Regarding your point 2, I wondered this.. is the regulator already doing what we want with the PWM input signal. If so great. I think in that first buck I linked, if I read the manual right, that one does not. I'm pretty sure the Ti also does not from the way it words the difference with the PWM and analog control, but I'll have to check again more closely. Others might do it right though in the way you say. Why not? Sorry, no time to read the rest right now... will soon.

I misworded that in the sense now clarified in much discussion. As for filtering the PWM though, Page 4 of the MAX manual clearly shows their "typical application" idea of what PWM looks like with that regulator, and it's square pulsed LED current. I think filtering before a PWM input on a regulator won't work. And I am skeptical about how efficient filtering PWM output can easily be. I would be quite a bit surprised if the RMM's regulators, design linked above and available at MTN, are not sending square pulses to the LEDs, but I'm not certain.

I might have missed something in the "previous post" still. A bit distracted now, so forgive me if I lost part of that point.

OK, I have a reply back from RMM in that thread, yes, his driver is really PWM to the LED's. Of course all this stuff is dependent on someone's free time, and on making it fit in the desired light, keeping it cheap, in some cases keeping it DIY-able, and not causing more problems than you fix etc... So no delusions here. Simple is also good, just exploring ideas.

Sorry, I should have been more clear. On a switching regulator designed as a dedicated LED driver, the PWM input is used to send PWM to the LED. Most switching regulators designed as LED drivers aren’t designed for the types of applications we envison. Usually, they’re either designed to drive a single LED at a low voltage and low current, typically only a few hundred milliamps, or a string of a bunch of LEDs in series at a high voltage and low current. So in those use cases, PWM to the LED makes sense — since your max current to the string of LEDs is say, 300mA, PWM dimming allows you to keep a high efficiency while not worrying about the tint shift that occurs when driving LEDs with a variable current. This is hugely different from our applications, where we want to drive the LED at 5A or so on max. Since the LED isn’t very efficient at that current and produces fewer lumens/watt, PWM dimming from that max is also very inefficient. Accordingly, the PWM input on a dedicated LED driver switching regulator isn’t really what we’re after, since it’s effectively the same thing as PWM through a single FET. That’s why you’re on the right track to want analog control, which on many regulators is sent through a FB or CTRL pin. I’m not actually all that familiar with dedicated LED drivers so I can’t speak to their internal mechanisms, but general purpose switching regulators may actually be a much better fit for our purposes since they’re often simpler and it’s still very easy to control them with an analog voltage signal.

Here’s a decent example. The efficiency of this regulator peaks at around 95% and stays above 90% from an output current between 200mA and 6A with a Vin=9V and a Vout=5V. Now obviously that’s a constant voltage example, because that particular regulator is designed to output a user-selectable but constant voltage. So it doesn’t officially support an implementation where the output voltage changes, only an output with a constant voltage but varying current. But if you download the provided demo circuit here and simulate it in LTSpice, you’ll find that you can easily change both the output voltage and current by varying the resistor R3 (a higher value equals a lower output current). An actual working circuit could use a wide-range digipot or DAC. Running an efficiency calculation shows that the simulated circuit maintains a comparatively high efficiency (~85-90%) over a wide output range, even when Vin=9V and Vout<3V. And it’s worth noting that demo circuit isn’t the most efficient design (and also that it’s just a simulation with a load resistor rather than a simulated LED, so it’s not going to take into account a few factors) and could definitely be improved upon.

Correct. Sending an analog voltage to a PWM input won’t do anything good.

Also correct. It wouldn’t make much sense to use an RC filter on PWM output from a switching regulator…it’d be a little redundant.

No worries, it all becomes a bit confusing, and it is hard to make blanket statements about generic drivers. Each individual driver seems to have it’s own quirks. For instance the LTC3454 has several valid dimming techniques! (see Fig. 3 page11).

@FrontPorchCarver:

That LTC3785 is certainly a very efficient dc-dc converter. Lot of parts involved. Having dealt with the LTC data sheets and a live example, I am always suspicious or skeptical of the the top line efficiency charts they come up with.

If the FB or Iset pin can be set with a DAC, then the newer low pin count Pic microcontrollers typically have a built in 5 bit DAC module. They can be supplied by an internal fixed voltage reference, so that it would not vary as the battery voltage decreases. Not sure about the ATtiny’s.

Fair enough — it’s certainly true that datasheet figures don’t always pan out in practice. And I should have browsed the whole datasheet more thoroughly before commenting on it. But since they’re only claiming >80% efficiency with EN2 enabled, I suspect it’s less efficient than some of their other offerings. But again as you said, theory != practice, etc.

Good to know. I don’t think the smaller ATtiny’s have that though I could be wrong. Although a 5 bit DAC might not always be precise enough - on at least one converter I’ve tested in LTSpice, a 1mA->3A output range corresponded to only ~150mV of difference on the FB pin.

Oops, only 32mv resolution with 5 bit DAC, not good. Would have to go 14pin device like the PIC16f1783 with a 8bit DAC for possible 4mv resolution, it also has 2 OPA’s if in need. Not altogether sure if some sort problem could arise when switching between bit settings?

0K fellows, seems you're getting pretty technical here.

Here's my take on this: since we can use multiple output pins from a microcontroller (ATtinies, etc), we could use them to make a DAC to enable a sort of low resolution multi-staggered current sensing combined resistor. Example:

Let's say we use 3 output channels to enable/disable (switch) FETs, each one in series with a different value current sensing resistor, on the low side after the load. We could also set a relatively very high value current sensing resistor which, with all our channels shut down, would allow us to have a moon mode.

We set the moon sensing resistor to the desired value. With all three current control channels disabled, this would be the current to the led. Now, we select the desired maximum drive current, and divide it by the maximum binary number which the amount of channels available can represent, 7 in this case (23 - 1). For 5600mA of driving current, that would be 800 (mA). So, (let's say) channel/FET 0 would have a current sense resistor tuned for 800mA, channel/FET 1 would have one for 1600mA (half value), and channel/FET 2 would have one for 3200mA. Which such an array, by consecutively enabling/disabling the different drive channels we could set the driving current in any range from 800 to 5600mA (+ the moon mode driving current, which would be insignificant here) in 800mA steps, just by sending a representation of a 3 bit binary number through the channels: moon, 800mA, 1600mA, 2400mA, …, 5600mA. Each additional channel would double our “resolution”.

And, of course, completely PWM free (yet it could still be used, though).

Hope this helps.

Cheers ^:)