Data/clock signal cable for long run (20m) between PB and first pixel

Hi there,

I am using a PixelBlaze to drive about 1000 SK9822 pixels (100ft/30m of strips) for a deck lighting project. The 5Vdc power cables have been run already for power injection. The PixelBlaze is about 60-70ft (20m) away from the first pixel. I know it should be closer, but I put the PB in the same enclosure as the 5Vdc power supply, and given the layout of my garage, I was limited to where I could put it.

I bought a spool of 100ft (30m) of 18AWG stranded hookup wire for the data and clock signals. In my house, I tested the setup and was able to perfectly drive a single 5m strip with the 100ft of data/clock wire still on the spool. Great! So I unspooled the wire to install outside, and it doesn’t work. I’m guessing the wire being on a spool did some black magic stuff that mitigated any interference/capacitance issues that enabled PB to work.

I know I’m pushing the limits of things, but what kind of cable would be best for me to use to try to get this to work? I’m guessing some sort of shielded twisted pair would be best, maybe a Cat6/7 cable? If I try this out, what’s the best way to use the pairs to best help the data and clock signals get from the PB to the LED strip to minimize interference?

I’m thinking of using two pairs, one for the signal and one for the clock. Connect data and clock to a solid color (blue/green) of a pair, and then connect the second pair wire (white) and drain to the DC negative as a reference.

Any thoughts?

Thanks :slight_smile:

Hi! Welcome back.

Have a look at these two threads which pretty much confirm your instincts.

Use two pair: GND+DAT and GND+CLK. If that still doesn’t work, the differential transceiver should.

Hi @jeff, thanks! I just ordered a STP cable, so I’ll know later this week if this works :slight_smile: Fingers crossed!

For runs that long I definitely recommend a differential signal, and you might want galvanic isolation as well.

The lengths of the data + clock becomes important as these have to arrive at the same time, and different lengths can cause small delays that push the 2 signals out of phase from each other, even with a differential signal.

An output expander uses a single data line though, and could be placed at the far-end and provide data+clock, so you’d only need a single differential pair.

1 Like

Thanks @wizard. I’m going to give the STP a shot first, and maybe to to reroute it to make it a bit shorter as a second shot, then look at going to differential on the twisted pair.

I’m looking at the Sparkfun RS-485 breakout board referenced in the threads @jeff linked above, and am a bit confused on the setup. I’m guessing I would need four of these boards? Two next to the PB for data/clock and two at the LED strip to receive those signals. I get where the RS-485 output is, but not sure where the wire from the PB would go. Guess I need to study the schematic a bit more.

Yes, 4 total. I think how it works is the DAT and CLK from Pixelblaze would each be connected to the “data in” line on the datasheet, which is labeled “RX-I” and “DI” on the pdf schematic.

buy an output expander, at that rate, you’ll be happier you did.

All of the differential RS485 chips I’m seeing are half-duplex transceivers - they can transmit or receive (not simultaneously) on their A and B input/outputs. You’ll need to pull a pin high or low on either end to set it to output or input mode, and will only be using half of each transceivers functionality since this will be one-way communication.

An output expander will mean 1 data line and thus 1 pair, and only 2 transceivers: one to transmit, one to receive the serial data. The downside is that you’ll be limited to 800 pixels and 800KHz bit rates on the output with the current firmware (when WS2812 isn’t used, it is technically possible to use other data rates). I didn’t realize you had 1000 pixels, so that does complicate it slightly.

You could split your 1000 pixels up across 2 channels on a single expander, but then you’d have data + clock running quite a distance from the expander to reach both, unless you ran your differential data to the mid point, and wire the strips with data direction going outward from that. With data originating from the middle, your indexes wouldn’t be linear anymore, and would need extra code to appear seamlessly with most 1D patterns.

RS485 is bus capable, so another option would be to use 2 receiving transceivers + expanders reading from the same pair, and run the differential pair to the start and to the midpoint. Your data+clocks will be short, total bandwidth pretty good, and pixel indexes can be linear.

I run 1440 pixels in my garden.

The wire to the first pixel is about 40ft (goes through the wall to controller indoors).

I used cat 5 UTP. One side of a pair connected to 5V, the other for clock or data. So two pairs used.

I did build a line driver and impedance matching circuit as well, but my initial installation (5 years ago) wasn’t using a Pixelblaze, so I’m not sure if it’s still needed.

I did have to drop the frequency down to 4MHz, as pixels at the far end of the strip would start glitching at higher frequencies (these are APA102C strips).

So no differential transmitters or anything needed for 40ft or so.

Hi @Nick_W, thanks for the input. I’m roughly 50% longer distance, so fingers crossed I’ll have similar fortune as you.

I’m still waiting for Amazon to deliver the SFTP cable I ordered a couple of days after my initial post… They dropped the ball, well, more likely the shipping carrier; it sat stuck ‘waiting to deliver’ about 3 hours away for 1.5 weeks. They finally agreed to ship another one, pending delivery tomorrow!

@wizard There are driver chips with dual tx or rx only, if you want to save some space. They are RS-422, which has the same electrical characteristics of RS-485 but is defined as one-way or one-to-many communication.

SN75157 dual driver
SN75158 dual receiver

And these are some of the few options still available in the 8-pin DIP package!

Well, I did have some success finally!

Using two pairs and grounding the shield, drain, and unused wire for each pair at each end, I was able to get things working with a 100ft SFTP cable after reducing the clock speed to 1MHz. I could get away with 2MHz if I reduced the number of LEDs.

With 1000 LEDs I was getting frame rates of 20-25fps. I have a shiny new PB3 waiting to be installed, so am hoping with the ESP32 that’ll increase. I had low FPS with WLED on an ESP8266, and swapping it out with an ESP32, I had zero issues with speed; everything was buttery smooth.

In my control box, I’m also going to have another microcontroller running WLED so that I can switch between the two using a relay. WLED doesn’t make it easy to change the clock speed like PB in its settings, so I’ll need to do some investigating to see if and how I can do that.

All that being said, I’m thinking about building another box to separate my power supply and the LED drivers. This will let me get the PB closer to the LED strips. I’m not sure why I didn’t think of that at first, but as long as I have a good WiFi signal there, it should be doable, and I should be able to get my data/clock cable length down to less than about 8 feet.

Given what @Nick_W said about glitching at the far end of the strip, I’m wondering if I’ll run into that issue at 1MHz. Even more of a reason for me to consider relocating the PB closer to the start of the LED strips.

Here’s my original box with 150A power supply, PixelBlaze, WLED controller, relay board, and an ESP32 to control the relays, fan, and 5Vdc power supply output. The box is a bit deeper than I needed, but it worked well. It’s a shame I might pull out the PB, as I liked having everything in one box. Now that the box is installed in my garage, the small wires coming out of the fuse blocks have been replaced with the appropriate size wire. With 90A fuses, that tiny wire would be the fuse! :slight_smile:


Glad you got it working. Did you build an impedance matching network? Two in line 100Ohm resistors, and two 15pF capacitors to ground.

Makes a difference if the pb doesn’t have impedance matching built in. I can run 1440 pixels at 4MHz this way.

Also OMG a 150A PSU! I run two 12V 20A PSU’s to give 24V@20A, then out in the garden at each strip I convert 24V to 5V with a buck converter.

Here are some picks of the current rig. I plan to switch in a pb3 in the same way that you do, as it’s very hard to reprogram the M0’s in place.

You can see the UTP connected in the last pic. The chip is the line driver/level shifter to generate 5V signals from 3.3V.


This is a nice looking build. @Nick_W where do you buy your box and fitted perforated board?

I think they were from mouser.

There are optional air vents on the side of the box as well, or it’s sealed.

I’ll have to check…

1 Like

Ok they were these:

And this

Took a while to find the order, I built it in 2016 - still working just fine!

I have a smaller box, just the same, but 6A 12V PSU and using a single ARM M3 controlling the deck lights.

1 Like