Multiple WS2812B LED Problem

I'm building a project using an Uno with 7 WS2812B 60LED/m strips and 3 WS2812B 144LED/m strips. All 7 of the 60 LED/m strips occupying PINs 0-6 work correctly and one of the 144 LED/m strips in PIN 7 works, however the other two 144 LED/m strips don't. It doesn't matter which of the 3 that I plug into PIN 7 it'll work and the other two won't no matter what PINs they're connected to. I also tried with a different Uno board and I'm getting the same results. Can someone please explain to me why this is happening, I'm assuming it has to do with the hardware ie Arduino because I believe there's nothing wrong with my code. Here's the code I'm using:

#include "FastLED.h"
// STRIPS SECTION
#define NUM_LEDS_STRIP 20
#define NUM_LEDS_FULL 20
#define NUM_LEDS_LONG_STRIP 60
// SHELF SECTION
#define DATA_PIN7 7
#define DATA_PIN8 8
#define DATA_PIN9 9
#define LED_TYPE WS2811
#define COLOR_ORDER GRB
#define NUM_LEDS_SHELF 15

// STRIP SECTION
CRGB ledsStrip0[NUM_LEDS_STRIP];
CRGB ledsStrip1[NUM_LEDS_STRIP];
CRGB ledsStrip2[NUM_LEDS_STRIP];
CRGB ledsLongStrip[NUM_LEDS_LONG_STRIP];
CRGB ledsFull0[NUM_LEDS_FULL];
CRGB ledsFull1[NUM_LEDS_FULL];
CRGB ledsFull2[NUM_LEDS_FULL];
// SHELF SECTION
CRGB ledsShelf0[NUM_LEDS_SHELF];
CRGB ledsShelf1[NUM_LEDS_SHELF];
CRGB ledsShelf2[NUM_LEDS_SHELF];

void setup(){
  delay(1000);
  // STRIPS SETUP SECTION
  FastLED.addLeds<NEOPIXEL, 0>(ledsStrip0, NUM_LEDS_STRIP);
  FastLED.addLeds<NEOPIXEL, 1>(ledsStrip1, NUM_LEDS_STRIP);
  FastLED.addLeds<NEOPIXEL, 2>(ledsStrip2, NUM_LEDS_STRIP);
  FastLED.addLeds<NEOPIXEL, 3>(ledsLongStrip, NUM_LEDS_LONG_STRIP);
  FastLED.addLeds<NEOPIXEL, 4>(ledsFull0, NUM_LEDS_FULL);
  FastLED.addLeds<NEOPIXEL, 5>(ledsFull1, NUM_LEDS_FULL);
  FastLED.addLeds<NEOPIXEL, 6>(ledsFull2, NUM_LEDS_FULL);
  // SHELF SETUP SECTION
  FastLED.addLeds<LED_TYPE,DATA_PIN7,COLOR_ORDER>(ledsShelf0, NUM_LEDS_SHELF).setCorrection(TypicalLEDStrip);
  FastLED.addLeds<LED_TYPE,DATA_PIN8,COLOR_ORDER>(ledsShelf1, NUM_LEDS_SHELF).setCorrection(TypicalLEDStrip);
  FastLED.addLeds<LED_TYPE,DATA_PIN9,COLOR_ORDER>(ledsShelf2, NUM_LEDS_SHELF).setCorrection(TypicalLEDStrip);
  // SET STRIPS
  fill_solid(ledsStrip0, NUM_LEDS_STRIP, CRGB::Green);
  fill_solid(ledsStrip1, NUM_LEDS_STRIP, CRGB::Red);
  fill_solid(ledsStrip2, NUM_LEDS_STRIP, CRGB::MidnightBlue);
  fill_solid(ledsLongStrip, NUM_LEDS_LONG_STRIP, CRGB::MidnightBlue);
}

void loop(){
  delay(1000);
  fill_solid(ledsFull0, NUM_LEDS_FULL, CRGB::Red);
  fill_solid(ledsFull1, NUM_LEDS_FULL, CRGB::Green);
  fill_solid(ledsFull2, NUM_LEDS_FULL, CRGB::Blue);
    
    // SET SHELF
  fill_solid(ledsShelf0, NUM_LEDS_SHELF, CRGB::Green);
  fill_solid(ledsShelf1, NUM_LEDS_SHELF, CRGB::Green);
  fill_solid(ledsShelf2, NUM_LEDS_SHELF, CRGB::Green);

  FastLED.show();
  delay(700);
}

If I remove the one strip from PIN 7 and connect the other two into the PIN even for a second they turn on and hold their color until being powered off. Since I don't mind all three having the same color, well not ideal but also not the end of the world at this point since I'm about to hit my head against the wall trying to get this thing finally finished, would it be best just to order a JK and cycle through them? Thank you for any suggestions.

What are your compile results? Uno is memory constrained. Please show us what the usage information is post-compile, because even if it compiles, the libraries use much more memory during the .addleds action.

The obvious thing would be a memory issue, but if i add all of your leds up i come to 225 ? There should eb enough memory for that. The UNO has only 2KB of RAM and 3 bytes per pixel ar required for the buffer, but i have run 340 leds without issue.

The other thing that crosses my mind is that FastLED may only be running at 1 port at a time ? Basically all your working pins are on PORTD .. I don't know i am not fan of the FastLED library and even though the ability to send from multiple pins, one after the other, this is not happening synchronized. Is a feature that adafruit_neopixel doesn't have.

But that is not the way one is supposed to use addressable ledstrip. You are supposed to just daisy chain them and transmit from a single pin, and if you go beyond about 680 LEDs you should consider multiple output pins, but then in true parallel, and that is anyway, way beyond what an UNO can handle.

So i guess if you wire things a bit differently you won't hit any snags.

One more thing

WS2811 use a 50us break-time, (there is actually an older datasheet that also specifies 300us break-time and i even have some of the chips but this is a completly different matter.) and you are using WS2812b chips which use a 300us break -time. I don't know what it says in the FastLED library for break-time for WS2811, but you do need more than 50us. On the other hand with all those extra outputs there probably is plenty of break-time anyway.

Well there may not be anything wrong with your but you are using a 3rd party library.
Still credits for posting it !!

I recommend you not to hot plug those strips. It is a big cause of damaged strip.

Make it all 1 Strip !
Or at least reduce the number of output pins and daisy chain some of the strips. Be sure to insert/inject 5v & GND along the way. Use thick(er) cable for power lines and thin for the data line.

What PSU are you using ?

Hi, @xvmodvx
Welcome to the forum.

Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.
Not a cut and paste picture.

You do not have to show the complete length of each strip, just the start and stating what the strips are.

How are you powering your project?
Have you worked out how much current your LEDs require?

Thanks... Tom.... :smiley: :+1: :coffee: :australia:

I want to start off by thanking you guys for replying, when I woke up this morning I was amazed how many responses I received in under 24 hours and how much you guys are trying to help, so thank you. So at the moment I have all three running into a single wire and it connected into the one working PIN, but I would really like to figure out why I'm getting the results that I'm getting for future reference and help deepen my understanding.

to TomGeorge:
I'm uploading my terrible drawing of the circuit, hopefully you can make sense of it lol I'm using a 5V 10A power supply which should be more than enough, the numbers I listed in my code were rounded up some and I'm pretty much safe even if they all were at their 60mA max.

to Deva_Rishi
I know people usually daisy chain them, but I also read of people using multiple outputs and using millis(). My programming is my strength verses my knowledge about electronics so it seemed the easier way to go especially for how I was wiring the shelves up. That being said I'm now in this position so lesson learned lol
The LEDs are suppose to be WS2812B but when I used that in the code none of the LEDs lit up for the 144/m, but changing it to WS2811 they turned on. I saw someone else using WS2811 for WS2812B and figured it had to do with them being cheap Chinese LEDs. How would you suggests I address the break-time? I know it's not recommend to hot plug but I thought stating it that way made it come across more clear that for some reason it's most like an issue with the 2 extra PINs or hardware, but thanks for looking out. you're right but f*** I hate soldering onto those 144/m LED strips lol

to camsysca
I'm uploading a screenshot. this seems to me to be the most likely cause besides just being a bug but what do I know

Again thank you guys


They are meant to be daisy chained, that is what i said. programming wise it doesn't matter an awful lot, instead of coloring a whole 'strip', you color a section of 'the strip' . The function you use for filling a whole strip are not complex to re-write, particularly if programming is your strength.

Timing wise they are the same or interchangeable. They must be WS2812b. WS2811 used for 5v is quite rare (and usually not that cheap, i have some 'side-emitters' and some X-mass lighting bulbs which are 5v WS2811)
You would ahve to look through the code of the library to find how the break time is defined for different chip protocols. That said, since you are using multiple outputs, the breaktime is huge for every single output, because there is no transmission during the transmission of any of the other outputs (it is not really in parallel, almost impossible on an AVR, can be done on an ESP32 with a different library)

That is why they have 3-pin plugs available. Trust me, my friend has bought some WS2812b 2020 package strip at 160 leds/m That is another level again. When using 5v the chance of breaking something is less than with 12v but not non-existing. I just remove power from the system as a matter of routine, that saves a lot of head-ache.

Looking at your setup i would just daisy chain the data line and leave the power connections as they are, not to much work, just soldering a wire onto the Dout of most of the strips and connecting from there on.

I don't like FastLED so i am not going to dive into the issue you have, but i would say it is most likely some kind of bug that is causing your issue. Even just checking out the github page may already provide you with the answer you are looking for.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.