Hacker News new | ask | show | jobs
by rowinofwin 1317 days ago
If you want to have a range of brightness you have a couple of options. One option is to vary the voltage you supply to the led, leading to a reduced brightness at lower voltages. The alternative is to use pulse width modulation, basically turning the led on and off fast so that it is on for a percentage of the time at full power.

Going with lower voltage is less efficient as the LED will output less light per voltage but not linearly, it will still use most of the power of full brightness at half.

Choosing PWM allows you to skip this problem by keeping the voltage identical but by using human persistence of vision to get the ideal number of photons to your eyes per your perception frame. The problem comes from making a slow PWM signal, say 60Hz, or having two similar but not identical PWM signals near each other, such as two different TV screens with a different backlight PWM frequency. That can make you see flashing because of the out of phase brightness peaks and troughs lining up.

5 comments

I've noticed a couple of LED bulbs (one with warnings that it's non-dimmable) where the PWM (presumably) means that even when I'm not looking for it, I'll move my hand quickly to grab something and it looks like I'm in a 20fps computer game, fun novelty but it wears off. Fortunately there are plenty where I don't see this.
The most jarring thing is seeing the flicker when you move your eyes. If you scan your vision past a flickering light, you'll have multiple discrete images of that light left on your retina.

Strobing can also be dangerous around rotating machinery, like a lathe, because at certain RPM the machine will appear to not be spinning.

I believe the solution is to use a buck converter with enough inductance to ensure that the current to the LED is not interrupted.

I get this effect when using a dimmed led headlamp in the rain. I can see the rain drop fall in discrete steps.
I've definitely noticed that with my bike light. You don't notice the flickering normally, but rain makes it looks like you're playing a video game at 3fps. (I think I measured the flicker and the PWM frequency was like 400Hz, which is not quite as bad as 3fps.)
> Going with lower voltage is less efficient as the LED will output less light per voltage but not linearly, it will still use most of the power of full brightness at half.

I don't think this is true? Aren't LEDs more efficient at lower voltages/currents?

You're right -- look at any LED datasheet and you'll see the efficiency get lower at higher currents.

The real reason for PWM dimming is simplicity, expanse and size.

Turning an LED on and off is a lot simpler than a real constant-current LED driver: indicator LEDs can be driven directly from a digital output on a microcontroller, or switched with just a mosfet. Constant current is always going to be more components.

In AC-powered applications, making an LED not flicker at 100/120Hz requires capacitance for energy storage, which are bulky and unreliable.

Constant current LED drivers usually use PWM for brightness control. They still have a low value shunt resistor to set the fixed current limit. Making a system with variable current adds much more complexity.
True, some do, though some don't (and some have both). Even dedicated LED drivers using PWM can be better than simple PWM by using smarter modulation to get high resolution without reducing the frequency to something noticeable.
They consume less for sure but the light they emit decreases faster, thus per light the efficiency decreases.

This is because leds have a fixed voltage drop and just a bit above that your light efficiency is almost zero.

The other way is to have a constant current source, this gives you much better control versus the voltage source.
I don't think this is the flickering the original poster is referring to. Dimmers are a bit of a nightmare with LEDs, however. I usually buy high quality (pricey) dimmer switches and good quality LEDs that are listed by the dimmer as compatible.

The flicker that bothers me, and maybe the GP, is likely due to cost cutting in the LED power supply. Not enough filtering or ability to handle the normal voltage dips in a home electrical system. As above, the solution is usually to spend more $ on bulbs, but not a guarantee.

Triac based dimmers + LEDs are quite a dumb combo, effectively the dimmer cuts the sine wave and the LED driver tries to determine how much it was cut.
I wonder if a good solution would be to have a fairly hefty capacitor taking charge from the supply side and then have the system measure the capacitance to determine how it will light the bulb from there. It could check for a capacitance drop to know it is using too much power and drop the output brightness using voltage or PWM, then bring it back up as the capacitor fills more. You would definitely get fluctuations, but increasing the capacitor size would absorb most types of fluctuation and also allow a system agnositc approach, able to ignore whether it is a PWM, sine cutting, or other method of dimming on the power supply. A nice benefit would be the very slight curve in the light output when you turn it off, just extending the lighting a few parts of a second as the capacitor drains.
You need to be discharging the capacitor somehow; I suppose it was meant to measure the charge, even then measuring the cut off of the sine is not hard. It's just all retrofitting design - led into incandescent bulbs, LED drivers into sine cutters - all to preserve the existing lighting fixture.

I have some near ceiling lights that allow dimming via a remote control (infra red or 433MHz) or fast switching on/off (remembering their state afterwards).

There are other ways to communicate, e.g. using the zero cross - the dimmer can send whatever signal to the lights downstream - the latter would read it and set the brightness.

Is there no way to manufacture more persistent phosphor for white LEDs?
The white ones are actually 'blue' - but all that is not needed, the LEDs are current driven devices and even if they get a bit more relative output flux with higher currents, it's close to negligible. Overall phosphorus is 'bad' for the LEDs, reducing luminosity, increasing temperature.

Also the PWM can be in the high 30KHz w/o much of switching sacrifice loses, not even dogs would react on it.