I would like to individually control the brightness and colour of 100 RGB LEDs. I would like to do this with a fairly smooth current through each LED. I.E. I would not like to use the traditional PWM method, because that causes irritating flicker on the retina, and problems when filming them.

One way to do this would be to use an inductor to smooth out the current, but this also requires a capacitor, a diode and a transistor. With 100 RGB LEDs, that comes to 900 components!

What other ways are there to achieve smooth current control through LEDs? Are there any chipsets which do this?

The following are my other requirements:

  • must be reasonably efficient, so no entirely linear solutions.
  • must be able to control current from 0mA to 50mA in reasonably small steps.
  • low cost and low component count would be nice.
  • 1
    \$\begingroup\$ Have you tried using a higher frequency PWM? \$\endgroup\$ – ocrdu Jan 3 at 0:02
  • \$\begingroup\$ You have used a lot of vague language in your requirements. Can you put some numbers on "reasonably efficient", "reasonably small steps", "low cost", and "low component count"? \$\endgroup\$ – Elliot Alderson Jan 3 at 0:05
  • \$\begingroup\$ Most people use WS2812 leds (Neopixels). These seem to video ok based on the zillions of youtube vids. The single chip version is the WS2811. You don’t want a ‘chipset’ as that implies a collection of different chips to perform a function. \$\endgroup\$ – Kartman Jan 3 at 0:13
  • \$\begingroup\$ Do you need to individually change the color of each diode? Of so, how fast do you need to update them? If you don't, a normal power supply can do this with it's dimmer function. \$\endgroup\$ – user1850479 Jan 3 at 0:14
  • \$\begingroup\$ I would go with higher frequency PWM, but if you did want to smooth with an inductor, capacitor and resistor, you only need one inductor and capacitor per power supply, not per LED. \$\endgroup\$ – Math Keeps Me Busy Jan 3 at 0:15

The usual solution to control lots of RGB LEDs is individually addressable LEDs like WS2812B. I believe these have a PWM frequency of 400Hz, so perhaps addressable LEDs based on a chip like GS8208, which has a PWM frequency of 8kHz, would be preferable.

Since each LED has its own free running oscillator, they won't be synchronized. The frequency of each LED will drift randomly. They don't turn on and off at the same time, which means the PWM flicker of all the LEDs is smoothed.

8 kHz PWM produces absolutely no visible flicker, and these LEDs are available on readymade strips, so you should really try that first.

If you still have flicker problems, then the next easiest solution would be to use a readymade LED strip with control chips like WS2811 and solder capacitors in parallel with the LEDs to smooth the current. This won't work with GS8208 because of its particular output structure which puts all the LEDs in series to get higher efficiency when a white color is selected (and also allows higher supply voltage).

But with a chip like WS2811, or perhaps one that has higher PWM frequency, each LED is connected independently to a PWM current source. This means efficiency is worse than GS8208 for white and better for single color, and supply voltage has to be 5V, but... adding capacitors could work.

The next solution would be to control each LED individually, which would indeed require tons of components. You'd have to use linear current regulators, because it isn't realistic to use switching current regulators due to component count. These would need to regulate the current, which means you'd have to add current sense resistors and switching current regulation chips.

You could get almost the same efficiency by using just three voltage output buck converters, generating just the minimum voltage for each color, and using that as power supply for each color. Then the linear current driver would use very little power.

But you still need one DAC channel per LED (3 per RGB LED) which may be filtered PWM (add one resistor and cap) and a cheap voltage controlled current source, ie an opamp, FET, and resistor. You could make it with just one transistor or two, but then it'll have substantial offset voltage, which means you won't know where the zero brightness point is.

So really, try it with GS8208, see if 8kHz PWM frequency does the trick first.

  • 1
    \$\begingroup\$ WS2813 has 2kHz PWM. \$\endgroup\$ – user263983 Jan 3 at 11:33
  • \$\begingroup\$ Much better than 400Hz then \$\endgroup\$ – bobflux Jan 3 at 12:13
  • \$\begingroup\$ Thanks, I wasn't aware that the newer WS28xx chips had such a high PWM frequency. I'll try those first and see how it goes. \$\endgroup\$ – Rocketmagnet Jan 3 at 23:29

Depending on what's sourcing the PWM, you can push the frequency up into the kilohertz range and if you STILL need per-LED smoothing after that you can use a simple RC filter with the resistor that's almost certainly already there to limit LED current.

Not good enough? Filming with high-speed cameras? LEDs will handle megahertz PWM, but that's not cheap any more.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.