3 ms·
Interesting, 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 th
by exikyut 9y ago
Interesting, 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 agoFYI, switchmode supplies don't need microprocessors. Many are entirely analog, most of the rest use a small amount of digital logic to control the switching. EG check out the LT3574 datasheet[1] pg 6: the only digital logic is the master latch, and it's just doing the "thermostat-style" switching I mentioned above. Or for an even more basic system: the ringing choke converter[2]. Lots of cheap power supplies use these because they are very simple and require no digital circuitry. Edit: also to get a given voltage out of a microprocessor, you just use an analog-to-digital converter (ADC). Some have them built in, others are external. I like the AD9850 for hobby work, as it has a high resolution and is quite fast. If you need a large voltage range there are ADCs available for that, or you can amplify the signal from a lower voltage one. WRT your issues with sensitivity to SMPS, it probably is audible noise. See if Screen Tunes[3] causes symptoms, it causes audible (but quiet) coil whine of varying frequency on most monitors I've tried. Your issues are unlikely to be directly caused by RF EM, but the side effects of the systems that generate such signals are often detectable by people. [1] http://cds.linear.com/docs/en/datasheet/3574f.pdf http://cds.linear.com/docs/en/datasheet/3574f.pdf [2] http://mmcircuit.com/understand-rcc-smps/ http://mmcircuit.com/understand-rcc-smps/ [3] https://thume.ca/screentunes/ https://thume.ca/screentunes/
- Zak 9y agoThere are commercially-produced flashlights that use SMPS and continuous dimming. As they're all managed by microcontrollers, I'm sure it's actually hundreds or thousands of discrete steps. > At some point I'll find out why LEDs need constant current. There are flashlights that work by connecting a Li-ion battery to an LED through a FET that can use PWM to dim it. This will deliver all the power the battery is capable of providing at a given point on the LED's forward voltage curve. If that sounds like a good way to burn out components, it... can be. Everything needs to be fairly robust. These flashlights do not have constant brightness. Even in lower modes, output tracks battery voltage. Strictly speaking, however, it demonstrates that it's possible to operate LEDs without constant current. Forward voltage drops a bit as temperature increases though, so LEDs are "greedy" and will essentially take all the current available as long as there's sufficient voltage. At some point, this will let the magic smoke out. FET drivers in flashlights only work because the voltage range of the battery and LED overlap, battery voltage sags when it gets a heavy load on it, and some LEDs can handle a lot more current than the datasheet says for a few minutes at a time. None of these things are valid for mains-powered lighting, except that with sufficient heatsinking, many LEDs can be overdriven at a modest cost to longevity.