The WS2812b protocol is a fairly simply protocol based on toggling the data pin between 0v and 5v. That makes something akin to a square wave. I have heard people refer to this hardware protocol as TTL (“transistor to transistor logic”) and it is common on circuit boards.
The trouble with this square wave is it can’t be transmitted very far. Your mileage may vary, but from what I’ve heard, a couple of meters is really pushing the limit. Above that and you’ll start to see flashing LEDs, dropouts, noise, and general unhappiness. This is caused because electromagnetic interference from the environment interferes with the square wave and distorts the TTL signal. The longer the run, the more interference you get.
If you plan to put your controller more than a meter or two away from the beginning of your LED strips, or if you need to run a long dark wire between two of the LEDs on your strip, you should seriously consider using something called differential signaling for those sections. The most common protocol you’ll see here is RS-422.
The theory behind RS-422 is pretty simple: it uses two wires. One of them has a signal on it and the other one has the reverse of that signal. Any interference affects both wires equally. Therefore, the difference between the two signals stays the same even when there is interference.
As a result, you can expect to be able to run ws2812b signals hundreds of meters using the RS-422 protocol.
The easiest way to get started with RS-422 is to buy pairs of dinky little “MAX485” boards. Just search for this on Amazon or Ebay and you’ll find loads of them; they look like this:
Here’s how you hook them up:
- On both sides, connect VCC to 5V and GND to ground.
- On the transmit side, connect DI to your input and DE and RE to VCC.
- On the receive side, connect RO to your output and DE and RE to GND.
- Then connect the A and B between the two boards with twisted pair, as long as you want.
Those little boards are built around a common, readily available chip, the MAX485. Depending on your situation you can just build your own little circuit board… it’s just a single IC, some resistors, and capacitors. Here’s a schematic:
The LED on that schematic is totally optional. If you want to use 12V instead of 5V, well, technically, the MAX485 is rated up to a max of 12V, but to be safe, I put in a tiny little LD11177V50C which steps 12V down to 5V. This is useful when you are using long runs of 12V LEDs and you only have 12V available at the beginning of the LED strip.