WS2812 flicker - but not in lab - Page 1
Forum section: electronics / beginners

author: sjones
author_rank: Newbie
timestamp: January 20, 2020, 12:09:05 am
content: Sorry for the dumb question and the long explanation.I built some lights out of WS2812 strips. There are 6 lights (fixtures, if you will), 36 pixels each. The data lines are connected serially (as if they were a continuous strip), while each fixture is powered in parallel. That is, the power for fixture #2 comes from tapping the power of fixture #1 just after the first pixel (made assembly a little easier), and so on. I'm using a 5V 15A power supply - so there's plenty of current and shouldn't be any voltage drop issues.Using an ESP32 for the controller. The lights and the ESP32 are powered+grounded in parallel. That is, the ESP32 is not powering the lights directly itself. The data line is level shifted from 3.3V to 5V.This setup works completely fine and as expected at home on the bench using all the same gear - power supply, etc.However, when I take this to the commercial building where it's supposed to be installed as decorative stage lighting it doesn't behave nearly as nice. It mostly works, and mostly does what it's supposed to, but it's like there's some kind of weird glitch where the LEDs will flicker, often the wrong color, every 10-15 seconds or so. Sometimes it's a whole fixture, sometimes just part of it. I'm watching the lights right now on the bench and they're completely fine.I tried putting a ~400 ohm (pull up?) resistor between the 5V and data lines as they come out of the ESP32 before they get to the first fixture. It didn't seem to help. It's running fine right now on the bench with the resistor, and while I thought it helped, got back to the venue and it had made no difference.I'm more or less a hardware noob, but it seems like there's some kind of interference that's making the lights glitch. I'm guessing the building's power isn't very clean, and this power supply is maybe passing the noise through? Any suggestions on how to diagnose and/or resolve this? I have a tray full of electrolytic caps, but I have no idea what uF to use or where it should go except probably between 5V and ground?I have a digital scope and if necessary could take it to the venue with me - but to be honest, I'm still trying to figure out how to use the scope properly so I'm not 100% sure what I'd be looking for. thanks!

author: james_s
author_rank: Super Contributor
timestamp: January 20, 2020, 03:57:25 am
content: A scope sounds like exactly what is needed here, so the first thing I'd suggest doing is set aside an evening to read the manual and learn how to use the scope properly.Then I would first scope the power rails to see if the LED strips are getting clean power, then look at the data line and see what the pulses look like. Are you using the same wiring on the bench? Long wires can cause weird issues like this. You might also have something that is generating interference being picked up by the wiring.

author: Jwillis
author_rank: Super Contributor
timestamp: January 20, 2020, 05:50:57 am
content: It could be that there is something very noisy connected to the mains at the commercial building . What ever you do DO NOT connect the probes of your oscilloscope directly to the mains. You can of course check your supply low voltage output for interference. Are the ESP32 stand alone or are they controlled over Bluetooth or Wifi. You may be getting interference on your connection to those .

author: james_s
author_rank: Super Contributor
timestamp: January 20, 2020, 05:53:43 am
content: I figured that goes without saying but I suppose it doesn't hurt to clarify. When I refer to "power rails" I mean the low voltage DC *output* of the power supply.