LED drivers and Accessories you want, but don’t exist

Could be fixed by making the mode progression non-linear in time. And one wants visual linearity anyway…

But that’s quite pointless. Only makes it more complex (from an end user point of view).
Obviously the high mode is always 100, and the next usable mode downward should be 30 or 33% of that, the one below that another decrease of the same magnitude.
Or is this a personal thing?
Every light i own that uses smaller or larger steps i like less in that respect than a Nanjg 3 mode driver light.
Ramping is not user friendly either (in my opinion), you always end up where you didn’t really want to end up or it has to be very slow.
It could work well with 2 buttons (up and down) though.

The new MCU’s are cheaper by about 10-20% from the prices I have seen.

We can’t use the existing MCU’s for new driver designs due to space constraints. A tiny85 takes up almost half the usable space on a 17mm driver, there is no room for anything else except what we have been doing.

The new MCU’s come in tiny 3x3mm packages that allow the space for new driver designs.

For example, that driver that was posted earlier in this thread is impossible with a tiny85, just not enough space.

Okay, thanks for explaining. :+1:

Jerommel, just wait till you have played with Narsil and things change for you :wink:
There is a lot I really want added and even deem important like a couple of “safe mode groups” limiting both modes and highest output, so when handing a light to somebody who knows nothing it ia safe for example.
Not only for safety but also pretty useful in small lights, find the best top mode it can run without overheating

But also I want two switches operating two sets of LEDs separately for the Q16. I think we would need two drivers now but with more pins maybe one driver can do it (yeah sorry I am a technical newb)

A single driver can do that, the only issue would be space depending on how the LED were controlled. Although unless you are talking about different color LED’s you are pretty much always better off driving all the LED’s at a lower current then running a few of them harder.

Well needing two sets of LEDs each set of two having a different function (2 for throw and 2 for flood). Makes a lot of sense to be able to choose either or both for max output.

BTW, how about some waffer level package chips? These can be nearly 3 times smaller than Attiny1616.
Example here
Not sure if it has all that is needed. Not sure if it’s hand-solderable. And it’s slightly more expensive than Attiny. But is significantly more powerful while saving another 5.7 mm².

is there any driver that i can modify the current limit by changing resitor?( voltage divider, not shunt resitor)

I think the LD-3 and the new LD-4 from led4power can, or the LD-25 sold by Simon.
(All FET CC drvers)

there are some limit, the range of changing current is quite narrow
(2 to 3amp on 3amp version), what i want is wider current selection, like 0.5 to 10A, all determined by a fomular with 2 resitor

You can change current down to ~50% WITHOUT any resistor change, just via config. Settings.

By changing one resistor,you can change current to practically any value you want.

Woah, you didnt mention that we can change resitor to get the current we want

I have to know which one on the LD3, i’ll PM you (led4power).
because i bought 6 of them, all 12 Amperes, which in hind sight wasn’t all that smart… :person_facepalming:

I’d like to hear what your thoughts on converting standard DC-DC converters into controllable constant current LED drivers are.

The best way I have thought of would be to replace the resistor divider usually found on the feedback pin to set the voltage. I figure if you use a sense resistor coupled to an op-amp, so the circuit would adjust voltage up until the current hit the feedback level.

I haven’t yet figured out a control scheme from the MCU though. My first ideas would be either a digitally controllable op-amp or a digitally controllable potentiometer to change the amplification factor of the op-amp. The issue I see here though is it might be difficult to find suitable components to support both high amplification for low currents and potentially no amplification or even reduction for very high currents.

I can’t find any decent 1x AA drivers either…
One mode would suit most of my needs, but they’re usually not current regulated and have low efficiency (so it seems).

It’s a little strange though, isn’t it?
You can buy all sorts of LEDs, hosts, batteries and parts, but the choice in drivers is disappointing…

That’s why this thread is here. Tomorrow (or today actually) I will write some text about ideas I collected about turning a voltage regulated converter in a current regulated one. I think Linear Technology has an IC which could be used for 1xAA/AAA, at least I found one a few weeks ago.

If you look at a chip manufacturer’s site for switching LED drivers, you notice that there are many options for low current applications (<=700mA), but fewer chips are available for high current uses, and the highest current option is sometimes not high enough for flashlight enthusiasts. On the other side, there are many chips for constant voltage available that meet all the requirements, but output a constant voltage, completely unsuitable for LEDs that require constant current.

The usual way voltage mode converters control the voltage is with a voltage divider. The chip tries to meet a specific voltage at the voltage divider, so a constant voltage is on the output, no matter what load is connected to it (when talking about an ideal voltage regulator, a lot of factors play a part in real world). When there is a load transient (jumping current requirement), e.g. the current drops, the converter still is at the old duty cycle for the old load, resulting in rising voltage. The converter recognizes the voltage rise, because the voltage on the voltage divider at the feedback pin rises as well. The converter‘s aim is to get back to the specific voltage the chip wants to have on the voltage divider. So, in our case, we have to make a circuit that outputs a specific voltage when specific current flows through our load, which then is connected to the feedback pin.

How does current sensing work?

There are two ways sensing current:

  1. When current flows through a resistor, depending on the current (Ohm’s law), it creates a voltage drop. The more current flows through the resistor, the more voltage drop you get over the resistor.
  2. A conductor creates a magnetic field when current flows through it. The more current flows, the stronger the field is (Ampere's law). This magnetic field can be measured by hall effect sensors.

Ways to use the current sense methods for voltage mode switching

The easiest way to control the current is this one:

The sense resistor is directly connected to the feedback pin of the converter. If the feedback voltage is 1V, the voltage drop over the resistor always is 1V. It’s very inefficient, and there is just one current option possible. To improve the efficiency, we can add an OpAmp with a digital potentiometer controlled by a microcontroller, forming a noninverting amplifier. Now the sensed voltage drop over the resistor can be a lot smaller because it gets amplified by the OpAmp, and many different output levels are available, thanks to the programmable digital potentiometer:

This is not the only possible way to connect a potentiometer. One of the two resistor can be a normal one, and the other resistor can be a potentiometer as a rheostat, or a resistor before the potentiomter can be used to get some amplification even when the potentiometer is programmed to the miniumum.

This is the basic circuit. Now we get into a different topic that sometimes creates a problem: Amplification

An example: You got a converter that always tries to get 1V on the feedback pin, and you want a powerful driver that puts out 10A with 100mV maximum drop over the sense resistor to get good efficiency. The value of the resistor then needs to be: 0,1V/10A=10mOhm. So on the maximum level the OpAmp needs to amplify the signal by 10. If you want to go down with the current, you need to increase the amplification, so for 50mA we need a factor of:

Voltage drop over R: 0,01Ω*0,05A=0,0005V or 0,5mV

Factor: 1V/0,0005V=2000

We need a factor of 2000 to get to 50mA. And if we want to go down more, it gets even worse. With 10mA we need 10000. And to again half that, we need double the amplification, so the needed factor goes up exponentially. That’s why you get so many small current steps (0,1mA steps) on the low current side, if you try to get these low currents. But if you go up with the current the steps get bigger and bigger, so in the end the gap between steps could be 4A or so. But this is not our only problem. The more we go down with the current, the less voltage drop is over the sense resistor. And with 10mA current or 100µV drop over the resistor we already are below the input offset of many OpAmps, creating huge amplification errors (of course there are some OpAmps that have a very low offset voltage, but the bandwidth of them is usually pretty low). We need to get that amplification factor down.

Luckily, some chips have a special pin on them for voltage tracking. It then uses an externally connected voltage as the reference instead of the internal one. Depending on the allowed input voltages, we maybe can input a 0.2V external reference, greatly decreasing the needed factor:

0,2V/0,0005V=400

Now these are factors we can work with. But what if there is no such pin available on the chip?

This is where we add two resistors and a constant voltage source:

It basically is a voltage divider that gets biased by our feedback from before. Now, if the current rises, the voltage on the feedback pin rises, and the converter tries to lower that feedback voltage, giving us the current we want. That way we don’t need to have very high amplification factors. The formula to calculate the needed resistors is:

Now to get the problem with the current steps solved, we can use a MOSFET to change the resistance of R1 (R2 can be changed too) and use a different new feedback voltage. For low currents we can set the new voltage reference pretty low (0,05V or so) to keep that low amplification. To still get many small current steps on high current operation, we can switch off that mosfet to lower the top resistor value, and use a higher new feedback voltage (maybe 0,8V).

If you have a chip with a special pin, you can just change the voltage on that pin, but if you don’t have that, you can use this option.
Now the high new feedback voltage is for the high current part, the low new feedback voltage is for low currents, lowering the needed amplification. This way you don’t need to find a balance between really low and really high amplification factors, and get many small current steps. The problem with the OpAmp (needing really low input offset, and Rail-to-Rail operation on in- and output) still isn’t completely solved though.

And hall effect sensors?

The other option for sensing current is magnetic field sensing. There are ICs out there specifically made for current sensing, but these chips aren't an option for low current drivers. Their analog output noise is problematic (400-70mA sense error because of noise, unamplified). But on high current applications, they could be used.

This text is just about the conversion and amplification. There are other things to keep in mind, e.g. bandwidth and slew rate of the OpAmp to keep the converter stable and prevent oscillation (the higher the amplification factor, the lower the bandwidth). Another thing is compensation of the feedback (how fast and until which frequency the converter reacts to voltage changes on the feedback pin), which is sometimes internal, sometimes external (then you know the requirements of an OpAmp better).

These ideas not only apply for buck converters (as I used them on my pictures) but on any converter that works like this with a feedback pin.

I hope everything is correct. If there are any mistakes or if something is unclear, please tell me.

Too much information at once? :smiley:

:smiley: Perhaps!

All useful ideas, though, so it’s nice to have them written down here :slight_smile: