I've designed, in simulation, an adjustable constant-current supply based on an LM2596-ADJ buck converter IC.
I chose STW8B12C LEDs for simulation because three of them in series roughly matches up with the I/V curve of the LEDs I'll be using in practice, which don't have a model available. In practice there'll be 24 pairs of two series LEDs, constituting a total maximum continuous load of 2.4A. The schematic above is trimmed down to a smaller array just for convenience.
R_sense is just for simulation purposes. AD820 was chosen arbitrarily for simulation but I'm pretty sure any jellybean rail-to-rail opamp will work here. Input capacitors were omitted for simulation since they have no effect when V1 has no internal resistance and there are no inline parasitics.
The operating principle of the circuit is fairly simple:
- R1 provides the feedback for constant-current operation. The value for 2.4A max operation is 500mΩ.
- The supply current is controlled by a 0-3.3V input from a DAC. This is simulated by V3 here.
- The opamp on the left operates in a positive-offset, negative-gain configuration. This turns the 0V to 3.3V range from a DAC (simulated here by V3) into a 3.3V to 1.27V output. Technically the opamp could be omitted and the DAC output could be used directly, but the opamp ensures the voltage remains between 3.3V and 1.27V during boot or MCU failure, and lets the full DAC range be utilised.
- The output of the opamp "pulls" the sensed current value away from the LM2596-ADJ's nominal feedback voltage (~1.25V) via the R2/R3 divider. Technically the opamp should be outputting a range of 3.3V to 1.25V, but 1.27V makes the resistor selection easier and the 20mV delta is so tiny that it can be ignored.
- When DIM is at 3.3V, FB_shift is at 1.27V, and the LM2596-ADJ operates normally.
- When DIM is at 0V, FB_shift is at 3.3V, and the LM2596-ADJ drops the operating current down to around 10mA.
- The operating current scales (close to) linearly with the DIM voltage.
This appears to work very well, at least in simulation. There's a small nonlinearity at the low end of the control scale, but it's acceptable. There's also a power-on transient where the LEDs get around 30mA through them for 1-2ms, but this is well within spec and also acceptable.
The use-case is for stage lighting fixtures controlled over Art-Net. The 24V supply will come from an off-the-shelf AC/DC SMPS module. A separate buck converter will supply the 5V rail, and the 3.3V rail for the MCU will be linearly regulated from there too. The LEDs will be on their own dedicated aluminium PCB, whereas the rest of the circuit will be on a standard FR4 board mounted behind. Interconnection between the PCBs will be via a header.
At full power R1 will dissipate around 3W, so I'll construct it from a number of larger value resistors in parallel (probably 6x 3Ω 1W) to keep the thermal dissipation manageable. I'll probably put those resistors on the aluminium PCB too, since it doesn't really affect the length (and inductance) of the feedback path.
I'm looking for general feedback on the design, to see if I've made any glaring errors, and also some input with design questions I still haven't fully resolved:
- Should I add small value resistors (e.g. 200mΩ) to each chain, to help with current balancing and uniformity? Perfect visual uniformity across the LED array isn't critical; I'm more concerned about lifetime impact from overdriving a chain.
- 1N5819 for D1 was chosen arbitrarily based on other LM2596 designs I saw. From simulation I suspect that it is possibly on the limits of being in-spec for this task. While the RMS power looks to be about 200mW max, the RMS current is around 1A, which seems a bit close for comfort. The peak current spikes are still well within the peak rating of the part. Should I consider a different fast Schottky with a higher If(AV)?
- LTspice's estimation of the RMS power dissipation in L1 is 13W, which is clearly incorrect. I suspect it is mischaracterising the energy stored in the inductor as dissipated energy. I've seen this occur before in other simulations, too. Am I correct in my assessment? Given that most power inductors are specified at 100kHz and the LM2596 switches at 150kHz, I presume any shielded inductor rated for ≥3A and with ≤150mΩ DC resistance will be fine here and I don't need to derate?
- In simulation the ripple current on C1 (set to 0.5Ω ESR) is very low (<100mA RMS) during steady state operation, with a short power-on transient averaging 3A for 2ms. Based on this and a rule of thumb that 10x the ripple current is ok for short transients, I'm assuming that pretty much any 35V ≥300mA rated aluminium electrolytic capacitor should be fine here?
- Given the input voltage of 24V and an output voltage of around 20V, the graph on page 5 of the LM2596-ADJ datasheet indicates that I should expect above 90% efficiency at 3A load. In simulation I'm seeing around 91.5%. My intuition is that I should expect around 85% efficiency in practice. This would yield a worst case power dissipation of 0.15×2.4A×(24V-20V)=1.44W. If all of that was dissipated in the LM2596 itself, with a θJA of 30°C/W for the TO-263 package on a reasonable sized plane, there would be a 43°C rise above ambient. However, since I'm deriving the power loss numbers from efficiency graphs, it seems to me that a non-insignificant portion of that power is dissipated in the diode and passives rather than the chip's internal switch. Would 800-900mW be a reasonable estimate of the maximum continuous power dissipation in the chip?
- The LM2596 has internal thermal power dissipation limiting. I would like to add additional thermal throttling to the design to help prevent the LEDs overheating. The obvious answer is to have the MCU sense the temperature, via a sensor IC or a thermistor on an ADC pin, and handle it in software. However, I could instead add an NTC thermistor pullup (e.g. 470kΩ, β=4750K) to the FB line so that the feedback voltage is pulled up as the LED temperature rises. There are benefits to both approaches. The software approach gives me more control over thermal throttling behaviour, but if the MCU crashes it won't do anything, and there's additional cost associated if I go with a temperature sensor IC for better precision. The NTC pullup approach is reliable even if the MCU crashes, but is less flexible and somewhat less precise. Are there any additional upsides/downsides I missed?
I've uploaded the LTspice simulation file (.asc) to Gist. I created the LM2596-ADJ model based on the answer to this question.