Seeking advice on running 7 x WS2812b strips of 72 LEDs each over a distance

Thread Starter

Edward Pattillo

Joined Jan 6, 2019
7
I'm new to Arduino but have been coding for decades. My major shortcoming is knowing near nothing about electronics and circuitry. I'm really enjoying the learning process but, at present, my aspirations seem to outpace my ability.


I'm prototyping a system that will illuminate each step of the staircase I'm building in our tiny house project. I want it to be controlled by two simple buttons that can be mashed as people ascend/descend the stairs; hence, one button would live at the top of the staircase and one at the bottom. I've already coded and tested that and it's working great .... AT CLOSE proximity to the breadboard/Arduino Uno that I'm using.

Here's the Git repo for the project if you're interested.

The problem comes when I'm running the buttons and LEDs from a distance. I've not yet hooked up all the strips since the first one went nutso when I hooked it up. I attached a 100uF capacitor across the positive and negative near the strip and that seemed to stabilize it ..... when the long button circuit is disconnected. I can substitute a testing button circuit on a breadboard just next to the Aduino and this works fine. When I pull this out and plug in the long actualbutton circuit, the LED strip goes unstable again.

It's got me a bit frustrated at the moment so any help would be greatly appreciated.

The first LED strip starts at about 1.5 metres from the arduino and power source (20 AWG for + and ground, 22 AWG for data line).
The first button is about 2.5 metres from the Arduino. (22 AWG)
The second button is about 8 metres from the Arduino. (22 AWG)

Each step would have a single WS2812b strip of 72 Individually programmable LEDs. There are 7 steps in the staircase so 7 x 72 = 504 LEDs in total.

I've got got 5V @10amps driving the circuit as you can see in the drawings below. (I know that more amperage would be ideal but we never plan to run this on full brightness. It's meant to be a bit dim/subtle and I've coded it to not go over 50% brightness.)

I've gone to a bit of trouble to make a schmatic and Fritzing breadboard to clearly communicate my currently dysfunctional idea.
(Better quality images: schematic | breadboard).



And here's an example of what the end result would look like. I used one strip at a close distance for this image.



 

Sensacell

Joined Jun 19, 2012
3,442
If I understand your explanation, the LED drive system works, but the input switch is the trouble?


The way you have connected the switches is incorrect- it leaves the inputs in a very noise sensitive 'floating' state.
Try the configuration below, the 330 ohm resistors pulling the inputs up will substantially improve the noise immunity.

I would also reduce the value of the data line series resistor by half - 220 ohms.

img183.jpg
 

BobTPH

Joined Jun 5, 2013
8,938
Agree with @Sensacell on the low value pullup for the inputs. I ran a PIC button through over 10m of wiring the same way.

I would use no resistor on rhe data line, it serves no purpose and makes it more susceptible to noise. I have done various WS2812B projects with PICs and never used a series resistor. If anything, you might want a resistor to ground at the beginning of the strip. This would increase noise immunity, similar ro the pullup on the buttons.

Bob
 

Sensacell

Joined Jun 19, 2012
3,442
Agree with @Sensacell on the low value pullup for the inputs. I ran a PIC button through over 10m of wiring the same way.

I would use no resistor on rhe data line, it serves no purpose and makes it more susceptible to noise. I have done various WS2812B projects with PICs and never used a series resistor. If anything, you might want a resistor to ground at the beginning of the strip. This would increase noise immunity, similar ro the pullup on the buttons.

Bob
It does protect the output from shorts to voltages above 5V, and limits fault currents when shorted to ground.
It can also help damp some of the ringing on the long line.

How would a pull down on an output improve noise immunity?
The output pin is actively driven high and low by the output stage transistors, never floating.
it would also reduce the output voltage swing.
 

BobTPH

Joined Jun 5, 2013
8,938
It would enforce that a certain amount of current flows to raise the input to high. Remember that there is s long wire between the output and the resistor / input. It will also pick up EMI, with its inductance isolating it from th output at high frequencies.

Bob
 

Thread Starter

Edward Pattillo

Joined Jan 6, 2019
7
The way you have connected the switches is incorrect- it leaves the inputs in a very noise sensitive 'floating' state.
Try the configuration below, the 330 ohm resistors pulling the inputs up will substantially improve the noise immunity.
Slightly improved. It's still very hit and miss. Certainly not reliable enough to install in the house yet. Sometimes the clicks are ignored. Other times the controller registers multiple clicks. Sometimes it gets it right. This all works at close proximity to the controller when I have it on the bench. It's just the long distance that's the issue.

Maybe I should look into getting some shielded cable? This 22 AWG is running through the frame of a steel-framed house. That's gotta be picking up some sort of interference.
I would also reduce the value of the data line series resistor by half - 220 ohms.
Done. Cheers.
I would use no resistor on rhe data line, it serves no purpose and makes it more susceptible to noise. I have done various WS2812B projects with PICs and never used a series resistor. If anything, you might want a resistor to ground at the beginning of the strip. This would increase noise immunity, similar ro the pullup on the buttons.
I experimented with removing the data line resistor. It works ok, but occasionally gives a little flash which isn't in the animation I loaded. With the 220 Ω resistor in, the flash goes away.
 
Top