Cool WS2811 Trick Makes LED Art Installation Smooth

Normally, when a project calls for addressable LEDs, we just throw a strip of WS2812s and an Arduino together, cobble together some code from the examples in the FastLED library, and call it a day. We don’t put much thought into what’s going on under the hood, unless and until we run into an LED project that’s a little more challenging.

Inventor [Leo Fernekes] found himself in such a situation recently, when he pitched in on an LED art installation. The project called for rings of LED bars around the trunks of trees on a private estate. The physical size of the project and the aesthetic requirements created significant challenges, though. One of these was finding a way to control the LED bars, each of which draws about 100 mA and needs to be very smoothly dimmed. [Leo] looked at the WS2811 LED driver, but found that the low drive current and the 8-bit PWM output failed to tick either of those boxes.

[Leo] solved both problems by using two of the three PWM channels on the chip in concert — one to control the current and one to PWM the LED. The circuit he came up with is deceptively simple — just four transistors, a Schottky diode, and a bunch of passives. The other clever bit is the data interface between LED bars, which can be configured as either single-ended or differential. This allows the same interface to be used for the short distance between bars on a tree, and the longer runs between trees.

As usual, [Leo] does a great job of explaining his design and how it works, which we find very instructional. He did something similar when he managed to dim a non-dimmable LED fixture.

19 thoughts on “Cool WS2811 Trick Makes LED Art Installation Smooth

  1. Hm, the claim that the ws2811 has a builtin gamma correction is news to me. Isn’t the whole problem with the coarse resolution in low intensities due to *no* gamma correction?

    1. There is an inherent weakness in numerical control at small values. No matter what, the difference between 1 and 2 is a bigger jump than between 30 and 31. This cannot be overcome with a correction table of any kind. What they did here was essentially add more bits to raise the floor on the resolution.

        1. ?? How ?? The least significant bit ‘on’ represents the shortest possible PWM interval, the next bit up doubles the value, a 100% change in brightness. No way around that.

          1. In an ideal world you’d use more bits on the output than on the input. For the non-ideal ws2812 LEDs I typically use a gamma table where in the low end a lot of values are duplicated, grudgingly accepting the not-dark-enough “1” value.

            There also are mechanisms like e.g. implemented in the “FadeCandy” which uses “temporal dithering” by sending the LEDs alternating values, but this needs short LED strips for a high update frequency.

          2. What I was wondering is, could we use the 3 outputs to drive a passive R-2R resistor ladder DAC. So the LSD on one channel would be worth half as much as the LSB on the next channel, and so on. Then again with passives we’re wasting power, so probably not a great solution. Anyway was just something I was thinking of when watching your video. With the built in gamma correction it probably would not have been a good solution. Anyway food for thought

  2. This looks a lot like what I usually do and how I work :-)
    https://hackaday.io/project/16943-pixelavenue
    https://hackaday.io/project/8308-ws2811-power-dac
    https://hackaday.io/project/6955-rosace
    https://hackaday.io/project/6954-mons2015-led-screen-electrosuper
    and more that I haven’t covered on HaD.io …
    For one project that is installed at the Roissy airport, I implemented 14-bit PDM with FPGA to satisfy the artist’s demanding requirements…
    Anyway, the current+pulse trick described there is awesome :-)
    Now, what do we do with the remaining channel ?

Leave a Reply to charlesCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.