Truly bizarre behaviour (WS2812B, Nano and Adafruit library)

Hi All,

I'm fitting under-cabinet lighting in my kitchen, using WS2812B 60 LED/M strips. I have 3 'sections' each connected to a different pin on my Arduino Nano (non-genuine, I think its Elegoo). The Nano, and each strip is separately powered by wires off a 5v Constant Current power supply - I think it was 40W. Each strip of about 80LEDs has power and earth fed in about halfway down the strip and I can light them full bright white without any discernable issues with the colour.

The Nano and PSU sit on top of one of the cupboard, wires fed behind and through the wall, and both sections that side of the room work fine.

Yesterday, I found time to fit the 3rd segment, which is on the other side of the room. I have run wires (24AWG multi-core, same as the rest of them) under the upstairs floorboards and down to the other island. Power supply is a constant 5.05V, though the LEDs are a little redder I'm OK with that. I've put a 100uf and 0.1uf capacitor over the power rails

The wierd behaviour is that unless I am physically in contact with the metal of the signal wire, the lights flicker, show the wrong colours, plain don't light up and basically do whatever they like.. What on earth is going on?? I've been called green-fingered before, but I've never heard of anyone touching a wire to make it work.. The wire is solidly soldered, and I have also tried cutting the wire a few CM back to fit a resistor - it doesn't matter WHERE I touch it as long as I do.

The wire under the floor runs alongside both mains electric and copper pipe - is this likely to be causing sufficient interferance as to cause this problem? If so, as I can't route the wires anywhere else, what can I try, before I throw my hands to the sky and simply connect another Nano to drive this 3rd segment?

Many thanks,
Leo

You could try using shielded wire.
https://www.homedepot.com/p/Southwire-By-the-Foot-18-4-Gray-Stranded-CU-CL3R-Shielded-Security-Cable-57573099/204725141
Also comes in 500 foot spools, I doubt you need that much.
Ground the shield at the Arduino end.

Thank you. Do you think it likely thats whats causing the issue? We've also used ferrite beads at work (or rather those who work with the hardware have..)

Quick update - worked out it was only when I was also touching ground (through the double sided tape on the back of the strip most times.

Didn't work with just wires, eventually trial and error with a few different values; 470ohm resistor linking the signal wire to ground (as well as going to the strip) and its working just fine now

cerwin:
Didn't work with just wires, eventually trial and error with a few different values; 470ohm resistor linking the signal wire to ground (as well as going to the strip) and its working just fine now

Not sure from your description, but you did already have the 330 or 470 Ohm resistor in series with the data input to the strip, located at the strip as well as the 470 µF capacitor across the 5 V at the same point, did you not?

This is the exact reason that series resistor is specified, a parallel resistor may have a similar effect. :grinning:

The other reason why a resistor from the signal wire to ground might work is if there is no common ground between the Arduino and the power supply driving your LEDs.