I have a test setup using an UNO and an LED strip with 21 LEDs (WS2812B) and the NeoPixel libraries. The test strip preforms perfect for all of the examples. I have a large 5V power supply powering it with the recommended capacitor to the power and a resistor on the data line.
My real setup is a series of six 21-segment strips linked together to create a continious chain. The wires to each strip are home run to the centralized UNO. This makes my data wire runs long. I have seen over and over that I not to have the initial data wire as short as possible howere I am unclear actually how long that is. I have to go about 10ft to my first strip. However from my first strip to my second, its another 10ft back to the centralized area, and then another 10ft to strip number two. This continues issue continues for each wire data wire connecting the strip segmnet.
As of now I have 2 strips connected. The first strip is running the examples fine, however the second strip does not. It appears that the timing may be off due to the longer wire length.
Any ideas on how to remedy this? I am unsure if the 2812 LEDs that I have already have the built in resistor, but others have said if your unsure, put it in because it cant hurt, so I did. In a short test, I removed the resistor and the second strip seemed to display the example fine. Will removing this resistor cause me long term problems? Will I run into more timing issues as I wire in the remaining 4 strip segments?
If so, is it possible to alter my code so the data for the first segment get its packet of data from one UNO output pin, and the second segment gets its data from another pin, the third another, and so on? Will this also create timing issues? I am assuming that the neopixel libraries only will use PWM outputs, reducing my number of segments. Is this a true assumption?
Any comments, suggestion, or even a point in the right direction is welcomed.
Neopixel runs at 800khz bitstream, it may be that you are getting data reflections in the wire and thats is causing data corruption. Maybe there is a way of terminating the data at the end(s)
I havent tried this, but I am sure with a bit of poking around you may find something on google about single-ended data transmissions at high speed over long lengths
Thanks for the reply. I don't think that I have opened ended circuits. Though each segment pulls its 5volts from a centralized power source, the signal wire starts at the arduino, goes through the resistor, into the IN side of segment one, comes out the OUT side of segment one, travels about 10ft back to the centralized location where it is jumpered to another wire that runs 10 more feet to the IN side of segment two, and so on until it reaches the six and final signal OUT, where it is not terminated.
Would there need to be termination at the end of the final segment?
I am no expert on this, but maybe there should be a termination to ground at the last node. I used to work on CAN systems (similar speed and electrical layer to DMX) - 250kbps always needed a 120ohm resistor across the differential connections to properly terminate the signal and stop any noisy data reflections at nodes and end of line... this is all that crossed my mind when i read your post, although the resistor value would be different to 120ohm as it is dependant on data speed
CMOS input impedance is so low that the receiving end of the wire might as well be open-ended.
You definitely would not want a 120 ohm resistor to ground, because that would try to draw 42 milliamps. If anything try something like 4.7K and maybe that will help.
For maximum reliability over long data runs, I've been using differential pair signaling over CAT5. You'll need something like SN65176 or other differential pair transmitters/receivers/transceivers.
I know this reply is late... but it might help someone else that stumbles on this thread looking for a solution. You don't mention connecting the ground of the Arduino to the ground of the LED strip. Not doing so can often result in flaky behavior. Short runs seem to work without the common ground, but the longer the data line, the more important that ground is.
To date, I've run a signal from an Arduino to a strip through a 100-foot telephone extension cable (so the pairs weren't even twisted). One wire carried the signal, a second one tied the ground from the Arduino to the ground on the strip. Perfect performance on the strip! WITHOUT the common ground, the strip hardly lit up at all -- in fact I thought it was a power supply issue at first.