Here Come The RGB LED Clones

ws2812 and clones timing

It seems like every third project on Hackaday uses WS2812 RGB LEDs in some way. We all love our blinkenlights, and bright, cheap, serial controlled RGB LEDs are the bees knees.

As with all products these days, competing manufacturers have discovered the huge market for these things, and clones are now available. [Tim] recently took a look at the PD9823, as well as three versions of the WS2812. [Tim] is considered something of a WS2812 guru here at Hackaday. You might remember him from his WS2812 driver optimization article, which should be required reading for any WS2812 hacker.

As many of us know, the timing characteristics for these LEDs can be a pain to work with. The values also differ between the WS2812S and WS2812B. [Tim] discovered that the new through hole WS2812D parts are different yet again, though rather close to the B parts. The PD9823’s designers must have studied the WS2812’s closely, as their 190ns time base falls directly between WS2812S 166ns time and the 208ns time of the WS2812B. The PD9823 also requires a slightly longer reset pulse.

The takeaway is that well written drivers such as [Tim’s] should have no problem with the new parts, but compatibility is something to keep in mind as more clones hit the market.

20 thoughts on “Here Come The RGB LED Clones

    1. I was about to ask the same question. Even a cursory look at the datasheet shows that the timing is relatively slack, and easily achievable – I used a 16MHz 8051.

    2. I think people mean that the timings are short, the required duration is very small comparable to most hobby microcontroller clock. This means that the code needs to be very efficient, it does not work trivially with bit banging over some HAL functions that take their time. This makes it difficult to drive them.

      It’s not the precision of the duration of the pulses that matters this much, which is what the 1000 LED from arduino proves.

    1. Is there any online thing that can show this?
      I have to admit i tried only a small amount of colors on the LEDs, but on one test I did try to sweep the green channel from 0 PWM to 255 and visually i can see every step up to about half the brightness. There it might only be a problem with the eye, as the pwm increases the brightness linearly while the eye does not sense linearly.

    1. No, but there is the WS2811 driver IC that can actually drive 3 leds in series on each channel, which should work at 12V. You can find strips where you can actually control 3 LEDs and work at 12V. They should be a bit more efficient than 5V strips.

    1. >Tim is accessing the color struct via a uint8 pointer? (line 106)

      Why would it be a problem? cRGB is declared as:

      struct cRGB { uint8_t g; uint8_t r; uint8_t b; };

      So on the AVR it will be 3 bytes in a row. If you have cRGB[2] it’ll be 6 bytes in a row.
      It wouldn’t work on an arch that would pad the uint8_t’s in the struct for alignment etc but it doesn’t matter on the AVR.

    1. Most LEDs can support a higher current if the duty cycle is small. It should be possible to put 8X the current if your duty cycle is less than 1/8.

      But yeah, these intelligent LEDs make a led cube much easier to wire.

  1. Don’t forget the UCS1903 chip – same sort of 3 LED, data in/data out setup.

    You can get the UCS1903 as a SOP-8 chip. Nice for those of us who want to make our own custom setup. Does anyone know if you can get the WS2811 or PD9823 as a discrete component that a hobbyist can solder?

  2. I’m considering using a few WS2812B’s on a PCB with planes and a regulated 3.3V supply. Unlike a flex circuit/strip voltage drop is not a problem. Does anyone have experience running these things from a 3.3V rail?

Leave a 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.