I’m also curious if shortening the data wire length helps!
What is happening is that the zero bit pulse is being interpreted as a one, but only occasionally at random. My guess is that the timing is close to the threshold between a zero and one, and random noise occasionally pushes it to a one. There’s a little bit of jitter/noise in the timing generating the signals, and you might be getting electromagnetic interference, I wouldn’t be surprised if your roughly 50 flashes a second lined up with the mains cycle in your house. It could also be fluctuations in the voltage at the LEDs, or any combination of these things.
Without knowing the cause, we can still shoot in the dark a bit with a hack.
- Try adding some bulk capacitance for power at your LEDs.
- If you pull down the output, the output voltage will lower, and that might be enough to reduce the resulting size of the 0 pulses. Too low and the pulses won’t ever be recognized. You could wire up a potentiometer (between data and GND) and try to dial it in.
- If the LEDs work close to the expander, move the expander to the LEDs! The data to the expander has CRC checks and can survive longer runs without causing glitches than WS2812 data can.
- Try using an LED close to the output to regenerate the signal (if the LED close to the output gets good data, it will generate compatible output pulses for the far LEDs)
- Try a V3 expander