Best method for making an adjustable CC LED Driver? - Page 1
Forum section: electronics / projects

author: Mutad0r
author_rank: Contributor
timestamp: January 03, 2024, 08:15:53 am
content: Hi,I need to make a very accurate adjustable and stable constant current LED driver. I haven't had to make anything like this before, so I'd hope to get some feedback on whether the solution I came up with is any good. Or if there's some better way to make this kind of a circuit.My idea so far is to use a LT3474EFE as the CC driver IC. It has an adjustment pin to which you can feed a voltage for adjustment of the current.The reference designs in the datasheet show that you could do that with a voltage divider connected to the reference voltage produced by the IC.I need to be able to set the current digitally, so I can't have plain resistors or an analogue potentiometer in there. So I thought of using a digital potentiometer instead.I have no experience with digital potentiometers. Are they good, reliable, and accurate for this kind of use case?Is the concept of using a CC IC with a digital potentiometer for adjustment a good idea, or is there some "standard" way of making an adjustable CC source that I'm not aware of? Any other recommendations?The driver will need to drive LED's at up to 1 amp, and it probably should have a 1mA adjustability if possible. Most important is current stability, accuracy, and reliability. Component price is not a big issue.I need to fit 3 drivers onto a 5cmx5cm board, so off the shelf drivers that fit my requirements are impossible to find.Thanks for any replies

author: Marco
author_rank: Super Contributor
timestamp: January 03, 2024, 11:14:33 am
content: You can just use a DAC to set VAdj, no digital pot needed. The switching ripple is not a problem?

author: r6502
author_rank: Regular Contributor
timestamp: January 03, 2024, 12:30:18 pm
content: Hi Mutad0r,it is a lot easier using PWM signal. Many of the constant current regulators for LED supply accept PWM control of the LED current, so, you do not need a digital poti for current adjustment. This also present on the LT3474EFE. When you use a 16bit counter of your µC you have a really good resolution.You wrote you will have "very accurate" and "constant" driver, do you have an idea, what you mean with constant - is it 1% or is is 1ppm? When you quantify your requirement and tell a little bit about the application and the field where you will use it is easier to answer ...Guido

author: Mutad0r
author_rank: Contributor
timestamp: January 03, 2024, 01:13:10 pm
content: The LED driver would be used in a test equipment where the LED's are used to make the test image. The LED's are calibrated to be used at a specific current. Once calibrated, the current doesn't need to be changed. Adjustability of LED current is required when LED's are changed for different tests.PWM would be a lot easier, but it has caused some problems in the past, where the PWM signal has started to make the LED visibly flash with low shutter times of the test camera.Our most common solution right now is to use a Keysight benchtop PSU in constant current mode.The description of how accurate it has to be is difficult. If I asked my boss, I'd asked how close to 0 can I get. For that reason I've been looking at components which are as accurate as possible, since money is a smaller problem than trying to figure out the exact requirements.Using a DAC I think I'd need a lot bigger resolution DAC, to compensate for the "lost resolution" after 1.25V, which is the max adjustment voltage for the CC chip I mentioned.We haven't checked for ripple. But it's most likely not a very big problem.

author: Marco
author_rank: Super Contributor
timestamp: January 03, 2024, 07:02:13 pm
content: Quote from: Mutad0r on January 03, 2024, 01:13:10 pmDepends on the micro/DAC, also resolution is cheaper on a DAC than a digital pot.

author: Mutad0r
author_rank: Contributor
timestamp: January 03, 2024, 09:07:11 pm
content: I'll look into the DAC again. Not too worried about the cost at this point. More about the ease of use and how good the selection is.And I just remembered that I tested a demo board of the CC chip a couple of months ago with a oscilloscope. I measured the voltage over the LED and the intensity of the LED with a sensor from Thorlabs. Neither showed any ripples for the demo board.Thanks for your comments.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: January 04, 2024, 12:53:57 am
content: Quote from: Mutad0r on January 03, 2024, 08:15:53 amYou have not given numbers, but if you also expect those 3 drivers to track, and really do needvery accurate adjustable and stableyou probably should look to measure the LED current, and use that as feedback for the drive signal.If you get a MCU with 14b ADC and 12b DAC, this should be relatively simple. The Arduino UNO R4 Minima might be used (1 DAC, tho PWM DACs are possible), or the EFM8LB1 might be used (4 Analog DACS)Quote from: Mutad0r on January 03, 2024, 08:15:53 amThe simplest classic CC is a low offset opamp and a N-MOSFET, with source resistor as current sense.Drain current is = Vin/RS

author: Mutad0r
author_rank: Contributor
timestamp: January 04, 2024, 09:09:17 am
content: It's hard to give numbers in this case right now, because the requirements given are "as good as possible"I did think of using feedback from the LED current to verify stability, but not to improve stability. I'll give that a go.Thanks for the message and suggestions!

author: PCB.Wiz
author_rank: Super Contributor
timestamp: January 04, 2024, 07:31:50 pm
content: Quote from: Mutad0r on January 04, 2024, 09:09:17 amHere is a good example of OPAMP and MOSFET current regulation. It can be used with P or N mosfets, with rail-rail opamps, tho the PFET version will usually need level shifting from some 0-Vset output.https://www.ti.com/lit/ab/snoaa79/snoaa79.pdfThese days, you can get very good opamps, with < 100uV offsets* and a (eg) 0.1% resistor lets you define current to 0.1% + voltage ref errors.Voltage Ref's of << 1% are also easily available.*Addit : examples could be TLV4387 and OPA4387

author: ajb
author_rank: Super Contributor
timestamp: January 04, 2024, 08:33:25 pm
content: Quote from: Mutad0r on January 03, 2024, 01:13:10 pmThis isn't an issue at all. You can scale the output of the DAC as needed, either externally, or by selecting a more appropriate reference voltage. Or if you're mixing a DAC into a driver's feedback node, you compensate for this naturally in the design of the summing network.Quote from: Mutad0r on January 04, 2024, 09:09:17 amCareful with this. Improving performance by adding an extra current feedback loop -- which is essentially what you're talking about here, a slow current control loop that corrects the fast current control loop in the driver -- requires that the outer loop be substantially better than the inner loop in the ways that you care about. Using a single outer loop with a single ADC/reference is great for improving consistency across the three drivers, but at the same time it subordinates the accuracy/stability of the drivers to the accuracy/stability of the outer loop. If the new outer loop has, for example, a voltage reference with substantially worse drift than the voltage references in the drivers, then you've just made the drift of the whole system worse by adding that outer loop.To do this right you should start with a high quality voltage reference and measurement ADC. Those are the most important factors in this, and should be picked for their specific performance characteristics, rather than just whatever's built into an MCU. The DACs are less important, as long as they provide sufficient resolution, since they are inside the loop. The exact MCU doesn't matter at all, it just has to read from the ADC, do some math, and write to the DACs -- anything will do that. Fundamentals are important too, of course, all of the normal rules for precision mixed signal circuitry apply. Phasing of the measurement against ripple also matters.