WS2812b only lights up few ms when powered

Hi,
I recently bought a WS2812b strip and now I'm trying to get it working.
Before this I used Arduino only one time to do a very simple project.
Actually I'm just trying to test this with one led.
I uploaded this code to the board:

#include <FastLED.h>
#define DATA_PIN     2
#define NUM_LEDS    1
CRGB leds[NUM_LEDS];
void setup() {
  FastLED.addLeds<WS2812, DATA_PIN, GRB>(leds, NUM_LEDS);
  
}
void loop() {
  
  leds[0] = CRGB::Blue;
  FastLED.show();
  delay(500);
}

The issue is that the led is not powering at all: when I power the devide it just light up for few milliseconds and then immediately turns off.
I used a multimeter and between the +5V and GND pins of the led I get the 5 volts...
Can please someone help me in this?
Thank you in advance for your attention :slight_smile:

P.S.: this is how I connected the pins:

I happened to have a single pixel of WS2812 strip laying around so I wired it to my Uno as in the photo and loaded your code. The LED lights up steady blue and stays on. I do not know why yours is turning off. Are you sure that the posted code is the code that was uploaded to your board?

I suggest that you try a different pixel to eliminate the LED as the fault.

It is recommended that a 470 Ohm be placed in series between your DATA_PIN and the Din of the WS2812 strip. That is not the source of your problem but the resistor will protect the DATA_PIN form overcurrent.

Hi @barca95, welcome to the Arduino forum.

In an other topic someone has the same board as you. Photo: https://forum.arduino.cc/t/lcd1602-hello-world-example-prints-hello-world-but-not-counting/862203/6.
That board is behaving very strange, and we don't know what is wrong.

Can you tell where you bought it ?
Do you have an other Arduino board ?

You can put a sketch between lines with three backslash-single-quotes, or use the </> button.

```
Your sketch
```

Thank you for your reply and suggestions.
I tried to do an Hello world sketch and I can get the outputs in "Serial Monitor".
This is the product UNO R3 CH340G + MEGA328P SMD Chip di 16Mhz Per Arduino UNO R3 scheda di Sviluppo USB CAVO ATEGA328P Un set|uno r3|uno r3 unouno ch340g - AliExpress .
Unfortunately I have an another board but I discovered that it is copy because it has the "TM" text... the behaviour is the same as this board

That is a good plan.
The way you use solid wire to connect to the UNO is not very reliable, jumper wires (or header pins) are better. You can also add an extra capacitor between 5v & GND on the pixel. The tantalum capacitors on the boards should be easily enough, but a bit more won't hurt & might help.

1 Like

Thank you for your reply. I tried to do with one led because I was interested to build a 10 leds strip but I had issues. So I tried to cut another 1-piece led and I get the same issues.
In one of my test with external power source I noticed that inverting the touching of the +5V and GND in the led side and having the cable touching both the 5V and Din in the led I get the led that is working (I guess, I got a similar blue color I programmed but don't know if it was a case) .

Hi,
it looks like this UNO uses an Atmega328 clone controller,

see that the seller writes in the title:

"UNO R3 CH340G + MEGA328P SMD Chip for 16Mhz Per Arduino UNO R3"
MEGA328 and not Atmega328, which is an @TM.
RV mineirin

@barca95, could you make a closeup photo of the microcontroller so that we can read the text on it ?

This is an enhanced image of the board in your link:
mega
I think that there should be "Atmel" on the chip. I think the image is more blurry above the text. Someone edited the photo to remove "Atmel" ?

@ruilviana Do you have a link to that chip ? I can not find it.

Thank you for your reply.
I see:
ATMEL
MEGA328P
U-TH
and other codes

Thank you for your reply,
I was thinking to add more elements when I got all working, just to be sure that all is ok without having lots of things connected.
I used jumped wires and then switched to this to see if the issues was related with my cables.

@Koepel
Hi,
No, I searched the web, and found nothing about it.

RV mineirin

So do think that the issue could be related to the board? Maybe I should send the sketch in a different way...
It is strange because I get the "Hello world" and the other clone (different from this) do the same things

I'd say that is not very good for the arduino pin. If you want to make sure that it is working, try a different color.
Also change

FastLED.addLeds<WS2812, DATA_PIN, GRB>(leds, NUM_LEDS);

to use ws2812B, pretty sure the data protocol is the same though.

Changed to

  FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);

but all is the same.
As I can I'll try to change color and see what happens with that wrong connection.
Thank you for your reply

As board I selected "Arduino Uno"... but maybe I have to select another thing because of the microcontroller Atmel Mega328P :thinking:

Tested, and here is everything is working normal.
Arduino Uno clone with CH340G.
Arduino IDE 1.8.15 in linux. Board "Arduino Uno" selected.
FastLED 3.4.0 via the Library Manager.
Single core wires.
USB powered.
Result: Bright blue led constant on.

Hi and thank you to all.
I buyed some alligator clips and cutted another led. I got it working.
So the issue is with the soldering, does anyone has any tip to solder led strips? I didn't applied any fluid before soldering, just fused material.
I got +5V and GND continuity and 5V in the led with soldering.
Thank you to all


I always use a bit of Kester liquid flux when soldering new (un-tinned) pixels. Scrape any oxidation away before applying flux and soldering. Tin the terminals first, then solder the header.

I just tin the exposed end of the strip, then add tinned wire, heat up both, and if i am doubtful i check for shorts. I do use a suction pump in case of to much tin. The strip i get these days is so much easier to solder than the first batch we bought, the exposed area was just so small you had to get the cut exactly right, and they would break really easily. You can also easily check if the connections are OK, The WS2812B has only 4 pins Din, Dout, 5v+ & GND. You can check is the soldering is good with a multimeter.
I would use a bit of multi-strand wire in between the strip and the header pins. The header pin may break the flimsy copper / plastic sandwich. I've never had strip with WS2812B's to be fair, i have only soldered right onto the LED and adding a capacitor, and use them for getting a LED into a small space.