WS2811 SPI Driver Using One Transistor And Passives


We love the WS28xx projects because even if we never plan to use them, the signal timing is like the most addictive puzzle game ever. For instance, check out this WS2811A driver which uses hardware SPI to generate the signals.

The WS28xx offerings place a microcontroller inside an RGB LED, allowing them to be individually addressed in very long chains or large matrices (still a chain but different layout). But the timing scheme used to address them doesn’t play well with traditionally available microcontroller peripherals. [Brett] had been intrigued by some of the attempts to bend hardware SPI to the will of the WS2811 — notably [Cunning_Fellow’s] work featured in this post. He took it a great step forward by simplifying the driver to just one transistor, three resistors, and a capacitor.

Click through the link above for his step-by-step description of how the circuit works (it’s not worth re-explaining here as he does a very concise job himself). The oscilloscope above shows the SPI signal on top and the resulting timing signal below. You will notice the edges aren’t very clean, which requires the first pixel to be very close to the driver or risk further degradation. But, since the WS28xx drivers feature a repeater which cleans up signals like this, it’s smooth sailing after the first pixel.


6 thoughts on “WS2811 SPI Driver Using One Transistor And Passives

  1. The DHT11 temperature/humidity sensor has a similar variable pulse width protocol, except it’s the sender and the microcontroller is the receiver. I had an idea to use a UART and a bit check, but ended up reverting to the more usual timer capture as the UARTs ended up being used for other stuff.

  2. His idea is ingenious. i can’t think of any way to make it any simpler.
    You could make the timing more precise with a 74HC221 (Dual non-retriggerable monostable multivibrator). This beauty has 3 trigger so that you can make it trigger on the clock output and select the monoflop based on the level of the data output. But you must calibrate the pulswidth with an oscilloscope.
    But again way more complicated than his solution, just use an ws2812 to retime your signal..

    @cyberteque: No its kind of a pulswidth protocoll. The frequeny is 800kHz. A low level equals 28% and the high level is 87%.

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.