Main Content

Blinking RGB LEDs with 555s and a handful of 74-series logic

The goal of this project is to display colorful patterns on a strip of WS2812 or SK6812 RGB LEDs (aka NeoPixels) without the help of an MCU.

Addressable RGB LEDs are driven through a series of pulses, with different pulse-widths representing 1s and 0s making up 24 bit colors, and another longer pulse to mark the end of a refresh cycle. Sounds like the perfect target to exercise a handful of 555 timers.

The project can be split into two parts:

Driver for the LED strip
Generator of the color patterns

The protocol to talk to RGB LEDs consists of three pulses. According the datasheet for the common WS2812B those are:

0 bit: 0.4 us high and 0.85 us low
1 bit: 0.8 us high and 0.45 us low
reset: longer than 50 us low
The datasheet specifies +/- 150 ns, but luckily for us the LEDs are not that fussy.

The plan is to use a 555 configured as an astable oscillator to generate the master clock at approximately 800 kHz, which is equal to the duration of one bit.

Two monostable oscillators generate the 0.4 us pulse for 0 bits and 0.8 us for 1 bits respectively. Two AND gates and a NOT gate select one of the two pulses depending on whether a 0 or 1 bit needs to be sent to the LEDs. The flip-flop synchronizes the incoming bit stream (more on that later) with the master clock to avoid switching in the middle of a bit.

For the reset pulse, a counter and a bunch of logic gates will count the bits and trigger another monostable oscillator after all LEDs are updated. The output signal of this module is normally high and goes low for 50 us, overriding any other output via the AND gate.”

Link to article