Hi! I’m using an IoT RedBoard to drive an LED strip, using the FastLED library. I am using some example code and am noticing some behavior that I have a hard time understanding.
Use a second pair of 12V outputs with a barrel connector to power the RedBoard
Upload some example code to the board to do something interesting with the light strip (I’m new and can only add 2 links, but it’s the “ColorTemperature” Example in the FastLED library.)
Expected
Light strip displays the rainbow effect described in code
Actual
Light strip does “freaky weird flashes” in many colors
What’s really weird is that if I supply power to the RedBoard with the 12V barrel connector, and I additionally plug in a USB-C cable which is connected to nothing the signal seems to get to the LED strip just fine. I see the expected behavior.
Suspicion
Does plugging in a USB-C cable alter the “clock rate” of the digital outputs in any way? My LED strip does not use a clock wire. The “freaky weird flashes” effect seems an awful lot like “data is moving, but can’t be interpreted properly by the LED strip.” I feel fairly confident that the FastLED library is set to the correct chipset for the lights.
I also observe that the code has built-in periods where it asks the lights to turn off, and during this time, the strip does go dark. But when we ask for rainbows, we get “weird glitchy flashes.” Plug in a USB-C cable to the jack, and everything works as expected.
I’m pretty confused by what I’m seeing and would love it if someone could help explain it. Thank you!
weird indeed. Hard to help with not enough information.
Assume you use the SparkFun IoT RedBoard - ESP32 Development Board. With USB-C connector in place (not connected to anything else) the only part that comes to my mind is the GND connection to the shield. As such not knowing the wiring diagram, are you sure the GND connnections are in place between the two 12 volts outputs ? ( Don’t know your power supply and could not find documentation on the link)
for further potential help:
Do you have a wiring overview (what is connected to what)?
can you share sketch?
any pictures ?
You’re right about the board. (I had linked to it, but had to remove the link because I’m new.)
I’ll gather the rest of info you’re asking for and share it when I get a chance. I suspect a video might be the most efficient way to demonstrate what I’m seeing, but I might also make a sketch of the circuit as you recommended. I have tried to start with KiCad but at this point in my learning, a sketch in Photoshop will be faster for me.
A quick test seems to indicate that your intuition is spot on. It’s not whether the magic cable is plugged in—I can switch from “freaking out” to “works great” by touching an open wire to any metal on the RedBoard. If it’s a short jumper wire, things are still half-glitchy… but if the wire is about 1 meter long it looks fine. My own body has an effect as well, but it’s not as “healing” as a 1m wire.
I’m not an EE at all, and didn’t know that open wires of sufficient length could act as a ground (or at least smooth things out if your real ground connection is iffy.) But it sure seems like the prime suspect here is my wiring.
It still seems like it would be worthwhile to capture a quick video of the effect and post it here for posterity’s sake in case anyone else runs into this problem sometime. Hopefully that video will end with “and here was my bad ground connection and the real fix.”
I was video calling with a retired EE last night. He spent his career in transmission lines, however, and doesn’t know as much about DC electronics. I asked whether my “long enough wire to nothing” was acting as a capacitor, and he replied “exactly.”
During the call, I was tinkering around and thought I’d try this:
I wasn’t expecting it to be able to drive the lights (spec sheet says they want a total of 90W, and at 12V.) But I thought maybe I’d get a few of the LEDs to do something? I was just being curious.
The results of that little experiment were an instantly fried RedBoard which no longer operates at all. I should have been less bold in my hacking around! So now I’ll be waiting a couple of days for a new board to arrive.
Things that did not work so far:
My power supply provides 3 separate “copies” of +12V and GND. I started with my RedBoard and light strip on separate pins, but putting the two wires for each side of the circuit on the same pin didn’t help. (I’ve drawn the first diagram reflecting this arrangement.)
I made a new male barrel jack using 18AWG wire instead of 22AWG
I confirmed that the polarity on the barrel jack matches what the board indicates I should supply (positive inside, negative on the collar.)
I have also tried using a completely separate 12V “wall brick” power supply to the RedBoard while leaving the LED strip on the one linked in my first post. This resulted in no lights activating at all, presumably because they’re essentially 2 distinct circuits with only the signal line sort of connecting them?
I also used a multimeter to inspect the AC supply (+126V), DC outputs (+12.6V) and grounding of the metal case of the power supply. If I hook up just the barrel adapter to the power supply with no closed circuit, the case shows a few (about 3V if I recall) volts AC potential vs. the home’s ground. With nothing connected at all to the power supply’s outputs, the case showed 0-1V AC. I don’t remember noticing anything unexpected as I poked my multimeter around the circuit. I was checking voltages only.
Things I’m considering when a new RedBoard arrives:
Put in a capacitor at point(s) A or B? How big should I use?
Tie a ground pin on the RedBoard back to negative coming out of the power supply? This feels really wrong to me.
Try providing power via some other means, such as the USB-C port?
I have also tried using a completely separate 12V “wall brick” power supply to the RedBoard while leaving the LED strip on the one linked in my first post. This resulted in no lights activating at all, presumably because they’re essentially 2 distinct circuits with only the signal line sort of connecting them?
it is a good try…connect the wall wart to the ESP32 and the other power supply to the LED. Make sure to connect and EXTRA wire between the ESP32 GND and the GND of the led. Then give it try.
The symptoms you describe are often caused by bad grounding. I know that @paulvha mentioned it, but I will reemphasize that you must use common grounds. Adding an additional ground wire between the RedBoard and the strip can only help.
You’re absolutely right! Grounding is often overlooked, but it can make a huge difference. I’ve had similar issues before, and adding that extra ground wire really helped stabilize everything. It’s such a simple fix but can save you from a lot of headaches. Thanks for bringing it up again!
Thank you all! After checking and re-checking everything, tying together every blasted ground wire and pinout I could find, and soldering together all my wires instead of twisting, I appeared to find the immediate problem: I believe that the 3-pin JST connector I was using for the final connection to the light strip seems to have been bad. Perhaps the interface between those pins and the ones on the strip wasn’t the greatest, leading to all of the weirdness I was seeing. When I swapped out that single component for one of the apparently-identical JST connectors that was included with the light strip, suddenly I was able to get a clean behavior! So the immediate issue in this thread is solved. Thank you!
(At some point, I also tied DC negative to the house’s ground wire, although that doesn’t seem to matter in this case. As I said, I was really focusing on trying to make good clean connections to ground throughout. And not fry any more boards or light strips…)
So I continued on and discovered a new problem, which is that I want/need the controller to be a little bit separated from the start of the light strips. (Approximately 3m.) I’ve learned that a signal line from the RedBoard to the start of the light strip can’t be too long. It looks a lot like I’m going to need to use a signal amplifier to make it more than a few cm.
I did get a chance to make a little video of the behavior I was seeing, will probably post it here when I get a chance. But the problem that made me start this thread is resolved. Thank you!