2812B with Arduino doesn't light up

Hello kind people of this forum,
I seek your help. I bought WS2812B RGB LED stripe for my project.
First tried to just light it up with my Raspberry PI Zero W, but no luck. Then i hooked it up to external power supply and tried again. No luck. Then I tried to replace PI with Arduino Uno. No luck again.
I will supply my wiring setup at the end of this post.
Would someone be kind to look at it and point me in the right direction?
Also - if the LED stripe is faulty, can I cut it in some place in hopes of next piece not being damaged?
Additional info - current flows through the LED stripe, because i put my tongue at the end of it and it tasted like acid. Also - GPIO 16 from Arduino IS connected to the DIN, but I don’t have white cable, so it looks like it may have been wrongly wired.

Thank you

1 Like

Hi @Marek148726, thanks for the comprehensive write-up and pictures - this all certainly looks like it should work.
Just a couple of sanity checks though:

  • Is the output of the switchmode power supply 5V DC?
  • Is the data connection reliable? It’s a little hard to tell from the picture but there may be a short between Din and ground. image
  • Could you provide the arduino code you’re using? You can paste code in between backticks (left of the ‘1’ key as follows:

these are my
multiple lines
of code

To answer your other question, yes you can cut the strip and try with the next LED along, but let’s see if we can avoid it :wink:


Hello @Michael, thank you for making time for helping me.

  1. Yes the output is 5 V DC, 15 A.
  2. I don’t know if it is reliable, this strip came pre-soldered this way from China.
  3. I won’t post the whole code, because it is just the strandtest example from adafruit library.
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
 #include <avr/power.h> // Required for 16 MHz Adafruit Trinket

// Which pin on the Arduino is connected to the NeoPixels?
// On a Trinket or Gemma we suggest changing this to 1:
#define LED_PIN    6

// How many NeoPixels are attached to the Arduino?
#define LED_COUNT 60

// Declare our NeoPixel strip object:
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
// Argument 1 = Number of pixels in NeoPixel strip
// Argument 2 = Arduino pin number (most are valid)
// Argument 3 = Pixel type flags, add together as needed:
//   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
//   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
//   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)
//   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
//   NEO_RGBW    Pixels are wired for RGBW bitstream (NeoPixel RGBW products)

// setup() function -- runs once at startup --------------------------------

void setup() {
  // These lines are specifically to support the Adafruit Trinket 5V 16 MHz.
  // Any other board, you can remove this part (but no harm leaving it):
#if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)
  // END of Trinket-specific code.

  strip.begin();           // INITIALIZE NeoPixel strip object (REQUIRED)
  strip.show();            // Turn OFF all pixels ASAP
  strip.setBrightness(50); // Set BRIGHTNESS to about 1/5 (max = 255)

// loop() function -- runs repeatedly as long as board is on ---------------

void loop() {
  // Fill along the length of the strip in various colors...
  colorWipe(strip.Color(255,   0,   0), 50); // Red
  colorWipe(strip.Color(  0, 255,   0), 50); // Green
  colorWipe(strip.Color(  0,   0, 255), 50); // Blue

  // Do a theater marquee effect in various colors...
  theaterChase(strip.Color(127, 127, 127), 50); // White, half brightness
  theaterChase(strip.Color(127,   0,   0), 50); // Red, half brightness
  theaterChase(strip.Color(  0,   0, 127), 50); // Blue, half brightness

  rainbow(10);             // Flowing rainbow cycle along the whole strip
  theaterChaseRainbow(50); // Rainbow-enhanced theaterChase variant

This morning I got it to work by bypassing the first DIN input and sticking a pin that you use for sticking picture on something into the second DIN. Then I touched the pin with the wire that transmits the data and it worked flawlessly. I will now check if DIN and GROUND are touching on the first LED.
If they aren’t I will cut the first strip and solder appropriate cables to the second LED.
Now I have a few more questions - if anyone has time.
a, Do I need capacitator for the 5V input to the LED? How long will it run before getting damaged if I omit this step (I think I have only 1 amp breadboard); I also have only 100 µF capacitator, but 0.1 µF is mentioned in some articles regarding wiring WS2812B.
b, I replaced Arduino Uno with Raspberry PI Zero W now, but it only has 3,3 V output from GPIO. It works tho. Should I get a logic level shifter to up the current on data line to 5V?
Thank you all for your time


It doesn’t look like there could be short between DIN and GND. I will buy solder iron and cut the first piece today I think :smiley:

1 Like

I have used various WS2812 LED display devices in my projects.
To answer your questions:-

a. Definitely yes. 100uF helps smooth out the supply when starting up.
How long it lasts without depends on how tolerant the LED chips are. Hard to say.
0.1uF would be to smooth out short duration spikes in the supply. If your supply is good, probably not needed.

b. 3V3 output from Pi should be ok. Logic level 1 and 0 would be recognised by the chip even with 5V supply. But input to Pi definitely should be through a level converter. 5V into a 3V3 GPIO pin would damage the PI.

Note: in all my projects I have used a 470 ohm resistor in series connecting the GPIO output to the LED strip.


Great troubleshooting tip there :wink: Nice one!

1 Like

Thank you. I wasn’t aware that PI receives data from the strip. I thought it only sends them to it.

Checkout my capacitator and resistance setup :smiley: As far as I know the capacitator should be working and the resistance is 440 ohm - I used two 220 ohm resistors in series. That’s the closest I can get to 470 with resistors I currently have. I know it’s ugly, but I’m limited with what I have now. Next time I will experiment with protoboard I think.

I don’t own level converter, so I will have to wait for it. Will plug it in the breadboard.

Hi Marek,

It’s quite hard to see from the image, but it looks like those resistors aren’t in series. If that first one goes from row 1 to row 1 it’s essentially just being bypassed and you’re only using one (please excuse my absolutely awful paint drafting, I need to reinstall Fritzing :sweat_smile:) if you move the resistor to resistor connection to another row that should work fine.

Best of luck with the project! Have a Merry Christmas!


No. The strip does not send data.

My reference was only to other devices that may send data to the Pi and that work on 5V.

Sorry if I caused any confusion.

Oh. Any idea what fried my Raspberry PI then?:smiley: I though it was due to the GPIO pin receiving 5V, but it must have been faulty micro usb cable or sth. I already ordered two identical raspberrys.
Also I remembered, that it was working for a short period of time, it went dead after like 2-3 minutes of controlling the strip.

So I need to wire it like this.

Wired it like this. Now waiting for the new Raspberry PI :smiley: