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

488 posts / 0 new
Last post
Jensen567
Offline
Last seen: 5 months 1 week ago
Joined: 04/10/2017 - 16:59
Posts: 491
Location: MD/DC Area USA

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.

Jerommel
Jerommel's picture
Offline
Last seen: 5 months 2 weeks ago
Joined: 01/04/2014 - 13:18
Posts: 5721
Location: the Hague, Netherlands

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…

2Q19

Schoki
Schoki's picture
Offline
Last seen: 1 day 20 hours ago
Joined: 03/27/2017 - 15:34
Posts: 215
Location: Germany

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.

Schoki
Schoki's picture
Offline
Last seen: 1 day 20 hours ago
Joined: 03/27/2017 - 15:34
Posts: 215
Location: Germany

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.

Schoki
Schoki's picture
Offline
Last seen: 1 day 20 hours ago
Joined: 03/27/2017 - 15:34
Posts: 215
Location: Germany

Too much information at once? Big Smile

Phlogiston
Phlogiston's picture
Offline
Last seen: 4 days 17 hours ago
Joined: 10/27/2016 - 16:57
Posts: 883
Location: Scotland

Big Smile Perhaps!

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

Persechini
Persechini's picture
Offline
Last seen: 2 days 19 hours ago
Joined: 07/11/2017 - 03:32
Posts: 505
Location: Brasil

Mine is quite simple, as most of it’s features already exist in the FET+1 MTN driver and LD-4 driver, but I’d like a simpler/more accessible (i.e. made in china with free shipping) option

Regulated driver, max 3 to 4,5 amp depending on config (could be single channel, could be a 2 channel amc + another higher amp regulator). If dual sided, that the spring is narrow enough to enable the use of a retaining ring (have soldering/desoldering drivers) by letting the AMCs sit closer together. Bleeder resistor for illuminated tailcap, plus ATtiny25 and OTC for Bistro compatibility

In my Tree

My collectionEmisar: D4 / D1 / D4 (broken) ― Convoy: C8 Clear / S2+ Clear / S2+ / S2+ UV / S6 ― Nitecore: Tube / Thumb / Concept 1 / HC30 / HC33 / TIP / TIP CRI / TINI ― Lumintop: Tool AAA / Tool AA / HLAAA / EDC05 ― Sofirn: SF10 / SF12 / SF12 / SF14 / SF14 / SF14 / SP10A / SP10A (gifted) ― Jaxman: E3 ― UTorch: UT01 ― Trustfire: Z2 ― Skyfire: SF-065 (trashed)

ToyKeeper
ToyKeeper's picture
Online
Last seen: 9 min 47 sec ago
Joined: 01/12/2013 - 14:40
Posts: 9992
Location: (469219) 2016 HO3

If I understand correctly, two of the main roadblocks right now are waiting for gcc and avrdude to support the 1616/1617 chips?

The driver will likely also need some acupuncture holes or pogo pads to facilitate flashing.

As for firmware, I’ve got a lot of the hardware abstraction already done, to enable e-switch firmwares to run on a variety of driver types. I just haven’t used it on anything beyond tiny25/45/85 with 7135 and/or FET PWM channels, so the first other driver type will likely require some additional plumbing work.

In any case, all the FSM UIs should work with little or no change once the toolkit itself has had a new driver added.

Lightbringer
Lightbringer's picture
Offline
Last seen: 2 hours 20 sec ago
Joined: 08/30/2016 - 14:12
Posts: 9748
Location: nyc
Schoki wrote:
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.

I’d be happy with a simple 1×AA 1-mode 1A+ driver for LEDs, even if it’d require NiMH over alkaleaks. Highest output I can find is for 800mA (FT driver).

Better for 1- or 2×AA, eg, 1V-3V.

09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0

Jerommel
Jerommel's picture
Offline
Last seen: 5 months 2 weeks ago
Joined: 01/04/2014 - 13:18
Posts: 5721
Location: the Hague, Netherlands

Schoki wrote:
Too much information at once? Big Smile
It’s a bit out of my league / over my head, but i think i understand generally what you’re saying.
The problem is ‘lossless current sensing’ if i’m not mistaking.

Maybe you can increase the magnetic field enough to use a hall sensor.
Maybe by making a small electro magnet with a couple of windings of 0.8mm copper wire?

2Q19

Jerommel
Jerommel's picture
Offline
Last seen: 5 months 2 weeks ago
Joined: 01/04/2014 - 13:18
Posts: 5721
Location: the Hague, Netherlands
Lightbringer wrote:
Schoki wrote:
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.

I’d be happy with a simple 1×AA 1-mode 1A+ driver for LEDs, even if it’d require NiMH over alkaleaks. Highest output I can find is for 800mA (FT driver).

Better for 1- or 2×AA, eg, 1V-3V.

Which FT driver would that be? The good old Nanjg 102?

2Q19

Lightbringer
Lightbringer's picture
Offline
Last seen: 2 hours 20 sec ago
Joined: 08/30/2016 - 14:12
Posts: 9748
Location: nyc
Jerommel wrote:
Lightbringer wrote:
Schoki wrote:
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.

I’d be happy with a simple 1×AA 1-mode 1A+ driver for LEDs, even if it’d require NiMH over alkaleaks. Highest output I can find is for 800mA (FT driver).

Better for 1- or 2×AA, eg, 1V-3V.

Which FT driver would that be? The good old Nanjg 102?

Think this is the one I use for matchmods:

https://www.fasttech.com/product/1127402-12-aaaaa-1-mode-800ma-linear-bo...

At least it’s what I could find right off. Big Smile

There’s the 5-mode which just populates the blank spot for the µC.

09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0

Schoki
Schoki's picture
Offline
Last seen: 1 day 20 hours ago
Joined: 03/27/2017 - 15:34
Posts: 215
Location: Germany

Jerommel wrote:
The problem is ‘lossless current sensing’ if i’m not mistaking.
It’s not just lossless sensing, but building a circuit to amplify the current signal without creating too much error is difficult as well. Another thing is to get small current steps on the high levels (you may end up …0.5A, 1A, 5A or so).

Jerommel wrote:
Maybe you can increase the magnetic field enough to use a hall sensor.
Maybe by making a small electro magnet with a couple of windings of 0.8mm copper wire?
You create a coil (called solenoid), which is what we have to avoid. Even if the inductance is really low, I don’t want to try that. A coil (with all of it’s effects) on the output of the converter between the led and ground maybe could even prevent a buck or boost converter from working at all. The converter could oscillate because of the inductance, it would never reach the wanted current. And I don’t even want to know what self-induction could do to a GND signal and it’s connected chips…

Lightbringer wrote:
I’d be happy with a simple 1×AA 1-mode 1A+ driver for LEDs, even if it’d require NiMH over alkaleaks.

Let’s see, maybe I can do something about that. 17mm diameter?
——

For the firmware people:

To make all the DigiPot buck and boost designs work (maybe some more changes in the future are needed, but just to make it work, this is required), we need a change in the firmware. Instead of a pwm signal on the output of the MCU (like in many firmwares), we need the MCU to put out an SPI or I2C signal for a DigiPot (I think SPI is easier to implement). Very often you don’t even need a real SPI signal, but rather 3 pins with the first beeing a “device select” pin, the second pin is just oscillating, and the third pin puts out the data (8-16 bit length).
——

Another thing: I have now found a pretty easy way to make a switching converter work with e.g. bistro or biscotti (in theory, hopefully it works in practice), but it’s limited: It needs 2 DigiPots (there are chips with 2 in 1 package), so more surface area. I think the difference of the forward voltage created by the LED (lowest to highest mode) shouldn’t be more than 1V or so, to keep the current steps small.

Lightbringer
Lightbringer's picture
Offline
Last seen: 2 hours 20 sec ago
Joined: 08/30/2016 - 14:12
Posts: 9748
Location: nyc
Schoki wrote:
Lightbringer wrote:
I’d be happy with a simple 1×AA 1-mode 1A+ driver for LEDs, even if it’d require NiMH over alkaleaks.
Let’s see, maybe I can do something about that. 17mm diameter?

Yep. 800mA is okay (for 3V from alkies, or 2.4V from NiMH), but it’d be nice to be able to run a bit higher from NiMH cells that can put it out pretty reliably. 2 eneloops in a modded MiniMag would kill, if enough light output would result. Even 1.5A or so would help.

One other item on my wishlist would be a decent 1-mode (as to not complicate things) so that a single 18650 or 26650 could decently drive an XHP. An F13 that can dissipate some decent heat could make good use of an XHP35 or XHP50. Right now, I’m using this to drive a regular XM-L or XP-L (forgot what’s in there) from a 26650.

I see no reason a decent cell can’t push more regulated power through a decent chip. 2.8A into an L or L2 is great, but it could use a little more oomf it the host can handle it.

The F13 takes a 22mm driver, the P60/P90/D26 in the MiniMag a 17mm. 20mm is common enough in other lights, too, eg a SK98.

09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0

Schoki
Schoki's picture
Offline
Last seen: 1 day 20 hours ago
Joined: 03/27/2017 - 15:34
Posts: 215
Location: Germany

First try on a 1-mode Buck-Boost converter for 2-3AA or 1 LiIon cell:

It uses a TPS63020. You have to calculate max current yourself (see page 13 in the datasheet), but it can do more than 800mA, even worst case. The current can be programmed via one resistor. There’s a jumper as well to choose between normal mode and low current high efficiency mode (see figures 10 and 11 in the datasheet).

Texas_Ace
Texas_Ace's picture
Offline
Last seen: 5 hours 55 min ago
Joined: 03/24/2016 - 07:44
Posts: 8537
Location: Everything is brighter in Texas

How do the spring pads work? They appear to be seprate from the rest of the underside, is that simple so the IC can be heat sinked with those vias or are they V+ and ground?

Jensen567
Offline
Last seen: 5 months 1 week ago
Joined: 04/10/2017 - 16:59
Posts: 491
Location: MD/DC Area USA

From what I see the left pad with the vias is V+, the right pad is floating and is just to hold the spring, and the middle vias go to the ground ring and are there to heatsink the IC.

Schoki
Schoki's picture
Offline
Last seen: 1 day 20 hours ago
Joined: 03/27/2017 - 15:34
Posts: 215
Location: Germany

Jensen567 got it right Thumbs Up

Agro
Agro's picture
Offline
Last seen: 1 hour 22 min ago
Joined: 05/14/2017 - 11:16
Posts: 4757
Location: Ślōnsk

I just stumbled upon a tool to program attiny1616 and other tinyAVR chips:
https://github.com/mraardvark/pyupdi

Schoki
Schoki's picture
Offline
Last seen: 1 day 20 hours ago
Joined: 03/27/2017 - 15:34
Posts: 215
Location: Germany

I’m not that involved into this, how can we program the new Tinys then? With an USB to TTL adaper? How does this work on the software-side to get the code sent to the MCU?

Schoki
Schoki's picture
Offline
Last seen: 1 day 20 hours ago
Joined: 03/27/2017 - 15:34
Posts: 215
Location: Germany

Now this is something more powerful:

This is a 1-Mode boost converter with an MP3431 on a 17mm board, powered with 1×18650 or something similar (max. input current 19A!). Current is set with one resistor, like the 1-Mode buck-boost circuit before (of course you can change the current sense resistor as well).
If it doesn’t get too hot, this circuit could supply (calculated values) up to 6-7A to an XHP50/50.2/70 (the lower the forward voltage of the LED the better), or a bit over 3A to an XHP35.
Heat probably will be a problem, but for short bursts, it should work.

Jensen567
Offline
Last seen: 5 months 1 week ago
Joined: 04/10/2017 - 16:59
Posts: 491
Location: MD/DC Area USA

Liking the nice fat copper traces going to the SW, GND, and OUT pins, and especially the nice short path from the chip GND pin to the driver ground ring. In a host with a retaining ring for the driver, or soldered driver, you should get good heat transfer out of it for high current.

Dutcheee
Offline
Last seen: 2 days 22 hours ago
Joined: 12/19/2015 - 21:40
Posts: 433
Location: Netherlands

Nice thread!
I’d like to see a 10~12mm sized driver for 10440 flashlight with high cri nichia. Preferably e-switch with Narsil or comparable ramping firmware, blinking out the voltage and supporting lighted tailcap. With a true moonlight and direct drive mode. Thermal regulation would be nice, but I think can only be accomplished with the driver behind the MCPCB.

(Being able to run it on AAA as a fallback would be a nice bonus, but definately too much to ask for. )

To build something as amazing as CRX did here Lumintop Tool Ti
but running Narsil would make me a very happy man!

ToyKeeper
ToyKeeper's picture
Online
Last seen: 9 min 47 sec ago
Joined: 01/12/2013 - 14:40
Posts: 9992
Location: (469219) 2016 HO3

The PyUPDI thing looks interesting. With a need for only 3 pins instead of 6, it should be significantly easier to design drivers which support acupuncture-style reflashing… particularly since one of the pins is VCC and one is GND, so only one actual programming via should be needed on linear drivers. This also allows using physically smaller chips, so more room on the driver for other stuff.

I’m assuming a usb-serial adapter of some sort would work.

It also looks like gcc got support for attiny1616/1617 about three months ago, with a release target of gcc 8.0, so as soon as that’s widely available it should be relatively straightforward to build binaries for those chips.

A proof of concept could probably be done now, using pre-release tools, but the barrier to entry seems a bit high for common use.

Texas_Ace
Texas_Ace's picture
Offline
Last seen: 5 hours 55 min ago
Joined: 03/24/2016 - 07:44
Posts: 8537
Location: Everything is brighter in Texas
Schoki wrote:
Now this is something more powerful: This is a 1-Mode boost converter with an MP3431 on a 17mm board, powered with 1×18650 or something similar (max. input current 19A!). Current is set with one resistor, like the 1-Mode buck-boost circuit before (of course you can change the current sense resistor as well). If it doesn’t get too hot, this circuit could supply (calculated values) up to 6-7A to an XHP50/50.2/70 (the lower the forward voltage of the LED the better), or a bit over 3A to an XHP35. Heat probably will be a problem, but for short bursts, it should work.

Wow, I really like that MP3431, good find!

That has a LOT of potential.

Agro
Agro's picture
Offline
Last seen: 1 hour 22 min ago
Joined: 05/14/2017 - 11:16
Posts: 4757
Location: Ślōnsk

Schoki wrote:
Now this is something more powerful:

This is a 1-Mode boost converter with an MP3431 on a 17mm board, powered with 1×18650 or something similar (max. input current 19A!). Current is set with one resistor, like the 1-Mode buck-boost circuit before (of course you can change the current sense resistor as well).
If it doesn’t get too hot, this circuit could supply (calculated values) up to 6-7A to an XHP50/50.2/70 (the lower the forward voltage of the LED the better), or a bit over 3A to an XHP35.
Heat probably will be a problem, but for short bursts, it should work.

Now that’s serious stuff!

Quad XHP35 HI under Carclo 10622 with well over 4 klum OTF and little under 100 lm/W while delivering those lumens. 1000 lm for 1.5h from a single 18650 cell. Flooooooody.
C8 or similar with dedomed XHP50.2 doing 3500 lm and (???) 100 kcd, sustaining 2000 lm for long.
C8 or similar with XHP35 HI doing 2500 lm and XXX kcd.

My favourite UT02 with XHP50.2 doing 3500 lm and 180 kcd?

And those numbers are conservative.

Too bad that with one mode it needs a big host to dissipate the heat…

Jensen567
Offline
Last seen: 5 months 1 week ago
Joined: 04/10/2017 - 16:59
Posts: 491
Location: MD/DC Area USA

TA, if you want to do some development with the MP3431 with your own boost driver series PM me, I can give you some info on the chip so you can have a board ready for when they go on sale, hopefully soon.

Schoki
Schoki's picture
Offline
Last seen: 1 day 20 hours ago
Joined: 03/27/2017 - 15:34
Posts: 215
Location: Germany

You can already order them on Mouser

Texas_Ace
Texas_Ace's picture
Offline
Last seen: 5 hours 55 min ago
Joined: 03/24/2016 - 07:44
Posts: 8537
Location: Everything is brighter in Texas
Jensen567 wrote:
TA, if you want to do some development with the MP3431 with your own boost driver series PM me, I can give you some info on the chip so you can have a board ready for when they go on sale, hopefully soon.

Yes, this is the best boost IC I have seen so far for our uses, I am sure that I will start playing with it once the next gen MCU’s ave matured. And once I have some spare time again, been too busy to even read BLF the last few months.

Kind of in a holding pattern until those MCU’s mature anyways. The features they offer are good but the most important thing is the size, we simply can’t progress any further with the large SOIC8 MCU’s, there is no room for anything else.

Now if we could just find a similar speced IC for a buck and buck/boost driver we would be set.

Jensen567
Offline
Last seen: 5 months 1 week ago
Joined: 04/10/2017 - 16:59
Posts: 491
Location: MD/DC Area USA

MPQ8633B would be the Buck IC with similar specs, I have info on that one too. No high power Boost-Buck that I am aware of yet, but the MP28164 is a 4.2A Boost-Buck chip.

Not affiliated with MPS in any way, i just found their catalog and thought they make some nice chips for flashlight drivers.

Pages