Stupid simple WS2812 driver
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dot-driver
driver-firmware
python
.gitmodules
PROTOCOL.md
README.md

README.md

Rainbow Vomit

The stupid simple WS2812 driver

Why?

I wanted to drive WS2812 LEDs from a computer. For some reason that's not a solved problem?

What?

Pixels get clocked at 800 kbps, and each pixel is 24 bits. If you want a 30 Hz refresh rate, you should be able to drive smooth video to a strand of 1024 pixels.

I want a USB interface, and USB FS can do 12 mbps. So that means I should be able to run about 8 channels at 800 kbps with some room for overhead.

So I should be able to run smooth video on a 8192 LED setup without even diving into high speed USB.

For some reason, most simple drivers can't come close to these specs. Respect for the Pixel Pusher though, it's just large, expensive, and uses Ethernet.

How?

I tricked the STM32F105 into doing this for me. It took a lot of fiddling with the DMA engine and USB peripheral. It's an extension of the approach here to 8 channels (all four channels on two timers.)

I've included a binary in the git repository because the timing is very finicky and you may not get full speed on your compiler.

Anything else?

Why yes, thanks for asking.

You may not want your display topology to require daisy-chaining LEDs together until you reach 1000 pixels. So, I'm going to make a multiplexer board that splits a single channel into N strips. It will distribute pixels round-robin to all the connected strips so you can use more of a star topology in your setup. This will operate entirely on the WS2812 protocol, so you can use any driver, not just mine.

I also find it weird that this doesn't exist yet.

Now what?

Maybe Adafruit or Sparkfun will steal my design and mass produce it. That would be cool.