4 ms·
I've long wondered how this is actually done electronically. The only approach I've ever been able to come up with is a digipot connected to a linear power supp
by exikyut 9y ago
I've long wondered how this is actually done electronically. The only approach I've ever been able to come up with is a digipot connected to a linear power supply, but that would generate a bit of heat at low brightness settings, and I suspect even a 256-step digipot would exhibit visible fade "jumps".
As someone who knows zero about electronics fundamentals... how is this done?
- Zak 9y agoLinear regulators are fairly common in flashlight drivers. They do generate waste heat at low output levels since the difference between battery voltage and LED forward voltage is just burned off, but the heat itself isn't a significant problem. Efficiency is more of an issue, but low-output runtime in LED flashlights is so long that most people will be able to charge their battery long before it runs out. Switch-mode power supplies are the high-end version. These can step the input voltage up or down to produce the required output voltage and can regulate current to one or many desired levels. More information on how both of these work is easy to find with a google search, but I should note that some things written about linear regulators assume a target voltage. When used to drive LEDs, regulators with a target current are required.
- exikyut 9y agoInteresting, thanks very much for the insight. > Switch-mode power supplies are the high-end version. These can step the input voltage up or down to produce the required output voltage and can regulate current to one or many desired levels. The way you wrote this makes it sound like SMPS don't have the smooth progression linear regulators do, which is in line with what I understand about SMPS designs. I presume the controller is connected to (or incorporates?) a digipot or similar, or is it actually possible to define an arbitrary reference voltage (derived from a digipot for example)? > More information on how both of these work is easy to find with a google search, but I should note that some things written about linear regulators assume a target voltage. When used to drive LEDs, regulators with a target current are required. Sure thing. And yeah, I find the constant-{voltage,current} thing a very fascinating/interesting quirk of LED regulation. At some point I'll find out why LEDs need constant current.
- SAI_Peregrinus 9y agoThe brightness of an LED depends on the current through it. The current through an LED increases exponentially with increasing voltage. It's very difficult to directly control the voltage precisely enough to keep the LED lit at a given brightness, but it's a lot easier if you can just control the current. Switchmode supplies can output any voltage, they're not limited to discrete steps. Their only disadvantages are increased complexity and potentially increased output noise, depending on the design. Most good switchmode control chips use a bandgap voltage reference internally, that provides a temperature-independent fixed voltage. Then an internal error amplifier and some feedback from the output is used to control the output voltage. Think of it like a thermostat: if the output voltage is too low/high, the supply senses that and starts boosting/dropping the output. Once the output goes over/under the threshold the boosting/dropping stops, and the output starts to fall/rise. The supply keeps switching it around the output threshold. (Linear regulators do exactly the same thing, they just only drop the voltage instead of being able to boost, drop, or both. They also drop the voltage in a less efficient but less noisy manner.)
- exikyut 9y ago> The brightness of an LED depends on the current through it. The current through an LED increases exponentially with increasing voltage. It's very difficult to directly control the voltage precisely enough to keep the LED lit at a given brightness, but it's a lot easier if you can just control the current. I see. So set the current, let it draw the voltage it wants. Heh. > Switchmode supplies can output any voltage, they're not limited to discrete steps. Right - the issue I was getting at was the problem of getting an arbitrary representation of a desired voltage out of a microprocessor and into the real world. Digipots are the only way I'm aware of to do that (apart from PWM). Thanks for the very interesting and highly informative wall of text :) Open question, in case this piques your curiosity: I'm very interested what your comments might be on https://news.ycombinator.com/item?id=15005811 https://news.ycombinator.com/item?id=15005811, and any suggestions/ideas you might happen to have. I've long thought that what I describe in this post is noise-related, SMPS noise in particular, but I'm absolutely stumped on how to pinpoint/narrow things down any further.
- SAI_Peregrinus 9y agoAny voltage-mode linear regulator can be connected to form a constant-current driver. It's best to use adjustable regulators if doing this, to improve stability. And of course a dedicated current-source is better still, as they will tend to have a wider possible operating range.