Trouble controlling a string of Addressable LEDs

I have some Addressable Through-Hole RGB LEDs (Item #2535) that I am trying to use with the Pololu LEDStripColorTester software on an Arduino Uno.

I made a string of 3 LEDs chained together on a breadboard, powered by a pretty hefty 5V power supply. When I first tried to get the LEDs to change color by command through the Serial Monitor, two of them would change color but the last one in the chain would not. (Also, the colors were in GRB order rather than RGB order, but that was not a real problem.) Then gradually none of them would work. That is, they all stayed blue and none of them would change color.

I know the timing on the bit-banging is critical, but I can’t figure out why I get such inconsistent results.

PS: I see on the product page that a 10 microfarad capacitor and a 100 to 1000 Ohm resistor are recommended. I’ll try those tomorrow to see if they help.

Hello.

I am sorry you are having problems using the PololuLedStrip Arduino library with your addressable through-hole RGB LEDs. The red and green channels being switched is expected for your setup. Those addressable LEDs use the WS2811 driver, and as noted in the PololuLedStrip GitHub page:

Blue is the default color that those particular LEDs show before they have received a color, so it sounds like something might be preventing them from receiving data (possibly a bad connection). Can you post pictures of your setup that show all of your connections? Also, how are you powering your system on? Is it possible that the LEDs saw sudden rises in voltage?

-Brandon

Thanks for the reply. I don’t think there’s anything wrong with my wiring, so I have not included a picture.

But let me describe the problem better, since I’ve been able to isolate it. The last LED in the chain does not seem to get its data. It works fine for just one or two LEDs, but when more than two LEDs are in the chain, the last one just stays blue. It doesn’t change. I can see that the data is going out, but the last LED doesn’t get it.

One wrinkle to the problem is that it doesn’t always happen. I’ve built chains of from 3 to 6 LEDs, and sometimes they work fine. Sooner or later, though, the last LED in the chain doesn’t work correctly.

I’ve fiddled with the test program LedStripColorTester, and I’ve pretty sure it works as it is supposed to. (I see now what you mean about the green and red being switched, so that problem is solved.)

Is the Dout for the last LED supposed to go to ground or something? I can’t think of what the issue might be.

PS: I just noticed you asked how I am powering the system on. I power the LEDs on by turning on my bench power supply. So they will see a rise in voltage on the power pins. I’m sending data to the LEDS from an Arduino, and when the Arduino turns on or gets a program uploaded the LEDs tend to flicker.

Can you describe what changes in between the LEDs working and when they stop? Does it work until you power the system down and restart it, or will it suddenly stop working correctly?

The DOUT pin on the last LED does not need to be connected to anything. The problem you are describing sounds like it could either be caused by your setup or code. If it is easy to do, when the last LED in the chain stops working, could you swap it out with one of the other LEDs and see what happens? It would still be helpful if you could post pictures showing your connections to see if they look correct and how you connected the resistor and capacitor you mentioned in your first post. Also, it sounds like you might have made some changes to one of the example programs; can you post the full code that you are using?

By the way, some power supplies can have unpredictable start-up characteristics. It is generally safer to unplug the power leads from your supply, turn on the supply, then plug the power leads back in.

-Brandon

Brandon, thanks for your message.

I’ve tried several different configurations to try and isolate the problem. I now have the following stable situation:

There are 8 LEDs hooked up in a chain and 7 of them work fine. The 8th LED lights up occasionally, but it is not acting correctly. It does not, however, stay blue. It changes color every now and then, but just not the correct color.

I have changed the position of the LEDs within the chain, and the problem is always with the last LED in the chain, so it is not that one of the LEDs is bad.

I have the same trouble using Adafruit’s NeoPixel software to test as with the Pololu LedStripColorTester. That is, the last LED in the chain fails to work correctly.

I have added a 100 Ohm resistor in series between the Arduino output pin and the Din of the first LED in the chain. I have not yet found a big enough capacitor, so I need to add that between +5V and GND on my power.

The power supply does not seem to be the problem. Switching power on and off does not cause the problem to occur.

I’ll try to add a picture of the circuit soon.

Found the problem. The D_out pin on one of the LEDs was bad. I thought I had checked for that, but I guess not because replacing that one LED fixed the problem. Everything works fine now. All eight LEDs work like a charm.

I like the way these lights work. It’s quite elegant.

Thanks for the help.

I am glad you found the problem and were able to get all 8 LEDs working. Thank you for letting us know.

-Brandon