WS2811 allways lighted up

Hi all,

I am new to this. I have a LED strip with WS2811 driver connected to a NodeMCU following the schema

but even with this easy code I am not able to control the LEDS. They are allways lighted up

#include <FastLED.h>

// How many leds in your strip?
#define NUM_LEDS 100
#define DATA_PIN 5

// Define the array of leds
CRGB leds[NUM_LEDS];

void setup() { 
      FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS);
}


void loop() {
    for(int i=0; i<NUM_LEDS; i++){
        leds[i] = CHSV(160, 255, 128);
        FastLED.show();
        delay(50);
        leds[i] = CHSV(0,0,0);
        FastLED.show();
    }
}

Any advice? Tryied looking for on internet but seems anyone has this problem, so I may missunderstanding something trivial.

Thanks in advance

With 100 LEDs you need just over 2A of current to drive them correctly, will you get that with your regulator?

You have no large capacitor across the strip and the bi-directional level shifters are the wrong thing to use. Reports suggest they are marginal at best.

The number of LEDs you declare is 100 but with the WS2811 this number should actually be one third of the number of LEDs you have so it looks likely this is wrong. That however would not stop it working.

What colour do they light up? Sometimes these LEDs light up on power up, if that is the case it suggests the setup is simply not working and you could just as well have nothing lighting up.

Don't use the "Bi-directional level shifter". Use a 74HC04 with two inverters in series so you have a non-inverting buffer. Connect the inputs of the other unused inverters to ground.

Hi Grumpy_Mike and Paul__B,

Thanks for your time :smiley:

I have a 60led/m and a 5 meter strip which means 300 LEDS, but I though that, as they are controlled by one driver at a time, I had to set the number to 100. Am I right?

Weird thing is once I power the LED strip I get all 3 collors lighted up. And I checked with a diod LED if it was sending somethind to the DIN pin and I can see the led blinking every time I send a message.

I am using this LED strip: and for the level shifter I am using this one

Thanks a lot.

Regards,
Joan

I had to set the number to 100. Am I right?

Yes. But at 60mA your power supply needs to supply 6A, does it?

That level shifter is not good enough, it won't work fast enough.

You need something like this:-

The code is not right as well. It turns the LED on and 50mS it turns it off. So it will look like it is on all the time because it is flashing very quickly.

You need a series resistor because of this:-

Theorically, every LED consumes 20mA. So if we have 300 LED (100 Drivers) the consumption is 18 A (12 V/212W)

Buying the chip. I will let you know. Thanks for the explanation.

ttecles:
Theorically, every LED consumes 20mA. So if we have 300 LED (100 Drivers) the consumption is 18 A (12 V/212W)

3*20mA = 60mA per LED, but three LEDs in series on your 12volt strip (all using that same current).
So 12volt/60mA for three LEDs = 100 sets of three x 0.06Amp = 6Amp (not 18Amp).

Note that the LEDs on a 12volt addressable strip can only be controlled in sets of three.
No individual control possible.
Leo..