Long Data Wire + ESP8266 + Level Shifter

The “How far can I put my controller from my LED’s” question comes up often as we’re all trying to cover our living spaces with wonderful LED projects.
Here’s my short primer on the 3 scenarios (for serially addressable LED’s, WS281x, APA102,etc,etc):

Legend:
D1 is the 3.3V LED data from the ESP-WLED controller.
D2 is the “corrected” LED data after a level shift back to TTL (quasi-5V) levels.
Ro is the kludge resistor used when you’re in scenario “B” and trying to force things back to “A”.
A+,B- LED data “encoded” for long distance transmit over 2-Wires (GND is also required).
LD Pwr is the power required for the long distance receiver (Rx).
Strip Pwr is the power line needed for LED’s, need NOT be 5V, sometimes 12V (or even 24V).
Gnd’s need to be connected together - Common GND.

The “secret sauce” to these diagrams is the “Long Dist Tx” and “Long Dist Rx” modules.
They’re nothing more (or less) than RS485 modules configured for half-duplex TX and RX.
You can look at another thread for my examples of how simple they can be. That thread also talks a little more on my cabling choices for B setups (22/4, alarm wire).

IMHO many people are trying to “force” a scenario B into an A by using just enough wire or adding Ro.
I get it, A is simple, less parts, easy to visualize everything.
Hey, I typically push my setups as A’s without even the Level Shifter or Ro (never used Ro) and lots of them work well.
But if I want to be sure the setup is reliable beyond 3m, I’ll wire it up as a B.

The other nice thing I find with B scenario is I can build it in the “lab” as an A with the controller right near the strip and then go into “production” by adding the Tx/Rx pair after the code is all doing what I like.

Note, you don’t need an extra Level Shifter for B or C, the specs on the MAX485 give you that for “free”.

All the other notes about GPIO’s to use still apply.

4 Likes