3
\$\begingroup\$

I am building a totem for a music festival that consists of three rotating rings covered in addressable LED strips. Each layer is connected to the one inside it via a servo on one side and an electrical slip ring on the other side. The totem is controlled with an ESP32-DevKitC and runs off of a high-capacity rechargeable 12V battery, using a large buck converter to step down to 5V. A diagram and picture is shown here.

ring totemdiagram

I finished a prototype a few weeks ago but realized that I couldn't drive the 5V strips at max brightness because the low voltage and high current was causing too large of a drop across the slip rings, which have an inherent resistance of around 0.3Ω each. So I switched to running the system at 12V and stepped down the power at each ring locally using some tiny 5V regulators (not shown on the diagram above, but present in the schematic at the bottom). This allowed me to run the LEDs at max brightness.

However, when I try to light up all of the LEDs at max brightness, I get randomly colored flickering which looks like what you see when you connect addressable LEDs to a data line without properly grounding them to the voltage of the controller. This doesn't seem to be a power issue - if I disconnect the data line the LEDs stay at the max brightness and don't flicker (although the pattern doesn't change). Additionally, if I run all of the LEDs below max brightness, or if I run only some of the LEDs at max brightness, the problem mostly disappears, although occasional flickering still occurs every few seconds.

I suspect this issue is caused by the ground lines having to pass through a non-negligible resistance when crossing the slip rings, so when high current is being drawn, the ESP32 and the LED grounds don't share a common reference voltage. If I connect a wire directly from the input ground line on the inside of the outermost ring to the ground of the ESP32, bypassing the outermost slip ring, the flickering stops, suggesting this is what is happening. (See schematic below.) But given that the rings need to rotate, this isn't a viable solution since all electrical connections must pass through the slip rings.

electrical schematic

Any suggestions on what I can do to eliminate the flickering here other than turning down the brightness?

\$\endgroup\$
2
  • \$\begingroup\$ Using bluetooth (or another wireless connection)? If it's for indoor use and semi-temporary installation, you could just tape the receiver PCB on the ring to save weight and size. If it requires an IP67 box and a solid construction, then it may be more difficult. \$\endgroup\$
    – Fredled
    Commented Mar 22 at 13:27
  • \$\begingroup\$ Ben I've rolled back your question to how it was when I made my answer. Once an answer is given that provides information about your errors, you have to be very careful about making amendments to your question so that they don't make the given answer appear to be wrong. \$\endgroup\$
    – Andy aka
    Commented Mar 22 at 22:18

3 Answers 3

2
\$\begingroup\$

If you have a lot of current going through the ground, it will increase the voltage between the ground pin on the LED and the ground pin on your ESP32, which will decrease the effective voltage that the LEDs see on their control pins. In theory, this would be more of a problem for the first LED, since the each LED (I assume) regenerates the control signal, but then any errors would be propagated anyway, and you also have multiple slip rings in series.

It looks like each LED draws about 40mA max, and you do have a lot of them, so I can imagine the 0.3 ohms could be causing a significant issue, but have you also verified that your slip rings are very stable (i.e. no disconnections or electrical noise when you move them)?

If the problem really is the resistance, then there are two things you could do (apart from trying to reduce the resistance:

  1. Have another wire that comes out of the ground of the LED strip and use that for powering the esp32 - since the esp32 takes very little current compared to the LED strip, it will reduce the delta between the control board ground and the ground reference for the LEDs - you could also try other stuff related to this like powering the esp32 manually and having it control transistors (or an IC) that drive the signal relative to the LED strip
  2. Isolate the ground with an isolation IC - this requires having an IC on the LED strip side to get the isolated signal back
  3. Put a controller on the LED strip side
  4. Overdrive the signals (i.e. sending 0V low and 12V high), and then use a resistor+zener diode on the LED strip side to step them back down to 5V/0V
\$\endgroup\$
2
  • \$\begingroup\$ Can you elaborate what you mean by "Have another wire that comes out of the ground of the LED strip and use that for powering the esp32"? \$\endgroup\$ Commented Mar 22 at 1:35
  • 1
    \$\begingroup\$ Having another terminal on the slip ring - on the LED side, it just connects directly to the ground of the first LED (a separate trace that only connects to the rest of the led-strip-ground at the pin of the LED itself) - on the stationary side, that pin connects to the ground of the ESP32 - importantly, the ground of the ESP32 does not connect to the ground of anything else on the stationary side (including the battery) - the only grounding is through the slip ring and back out again \$\endgroup\$
    – BeB00
    Commented Mar 22 at 2:28
2
\$\begingroup\$

You can't run WS2811 protocol on these kinds of connections and get a reliable outcome.

Your problem has nothing to do with power and everything to do with conducted and radiated noise.

The "data" used to communicate with your LED's does not use ANY form of error correction and nothing more than simple edge transitions to encode data. What that means is that if ANY noise gets into the data stream ANYWHERE in the entire string of LED's you will get the wrong values communicated (the chip can't tell the difference between the value you wanted and the value it received) and ALL of the possible values are valid (just a different color). That's why you see the flickering.

I did a quick mockup of your situation using an ESP32 transmitting to a set of tape segments connected by discrete wires as shown in your photo. This is what the data signal looks like on the third segment's input:

enter image description here

You see those wild oscillations at the edges of the intended signal? That's called "ringing" because the shape resembles the audio signal of a bell being rung and because the signal is caused by internal wave reflections in the wires as the wavefront oscillates (again, like a bell).

When the ringing (or other noise condition) gets bad enough (meaning "tall" enough), the led chip confuses the ringing edge for the signal's edge resulting in it thinking you meant a different number and it also thinking you sent more numbers than you actually did. This causes the wrong color for not just this LED but for many LED's after it.

This behavior is very rarely associated with power supply insufficiencies. By way of comparison, this is what a weak-short condition (a weak short is a good approximation of an insufficient power supply) looks like:

enter image description here

The taller signals are normal and the shorter ones are the data running into a (weakly) shorted out segment. Notice how the wave lacks the ringing present in the corrupted signal -- it's just too small now to be detected or interpreted correctly. The LED's will hold their last commanded value (color) or will turn off/blink.

Fight the noise, Fix the problem

This isn't a fight you are guaranteed to win if you can't rewire the lamp (use shielded twisted pair or coax to run the data lines; separately from the power pair), here are some changes that can be retrofitted that will very likely fix the problem:

1. Amplifier immediately prior to chain start

Use an extra pixel immediately prior to the first slipring connection. That is, the (long) wire from the controller to the light fixture should encounter a pixel immediately before it encounters the slipring. Because the pixel chip (WS2811, et al.) regenerates the data signal at its data output, this pixel is acting like an active filter and signal amplifier.

2. Add a discrete low pass filter immediately after the slipring

Using discrete components add a 47 Ohm resistor before the data input on the first led after every slipring and after the slipring output. Then add a 100 picoFarad capacitor between the data input and ground after the resistor to create a first-order passive low pass filter (with about a 30MHz pass band). This is enough bandwidth for the WS2811 to detect the edge as "square" (it will be rounded by the filter), but too little bandwidth to allow most of the RF noise to pass.

3. Shorten/eliminate discrete wire length

The edges in your LED data signal contain energy at frequencies in excess of 100MHz. At these frequencies wires (even relatively short ones; on the scale of centimeters/inches) can radiate like antennas. You want to make your wiring as bad of an antenna as possible. You do that by keeping the wires short and by keeping them as close to a ground wire or led strip as possible.

\$\endgroup\$
1
\$\begingroup\$

Addressable LEDs use PWM while drawing high current, so they pulse a lot of current through the ground. If that ground is shared with data and has high resistance then that current pulses becomes voltage noise on the data circuit. To the extent that the decoupling capacitance is effective, the average current becomes a DC reduction in signal amplitude. Additional capacitance might help or may not (although it's probably worth trying a few low ESR electrolytic caps). Your buck converter stabilizes the voltage to power the strips but does nothing for the data line.

You said bypassing the first slip ring ground (where current is highest) resolves much of the problem, so one solution would be to add an extra terminal specifically for the data ground. Then power the ESP off it's own battery or with an isolated power supply so that LED return current cannot pass through the data ground. Downside is you'd need a different slip ring or to reallocate one of the existing pins (perhaps you could share data between two servos?).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.