Go Down

Topic: trouble getting WS2812B working (Read 3358 times) previous topic - next topic


I bought a 5m WS2812B LED strip off aliexpress http://www.aliexpress.com/snapshot/303493598.html
my strip looks a little different from the one on the listing.
I tried using a bunch of different libraries Adafruit NeoPixel, FastSPI_LED2 and PololuLedStrip. None of it made any difference.
I tried to drive it from an UNO and a Nano. It made no difference. I thought i might've damaged the first LED and so cut it out and re soldered the leads to the next link. I'm powering the strip using a computer PSU at 5V. I dont know what to try next. Any help would be greatly appreciated.



what is the resistor there on the data line for? I don't think I use one on my LED strips. Are the grounds tied together?

I can see what's in your picture, but where do the red and white pairs of wires go?



First, thanks for the response.
The resistor came soldered on the data line. I removed it now and it still doesnt work. This is my setup with the UNO.

The red goes to the 5V from the desktop power supply. The white goes to the negative on the power supply and the GND on the UNO.
This is one of the sketches I tried from the FastLED library to move a white led along the strip.
Code: [Select]
#include "FastLED.h"
#define NUM_LEDS 13
#define DATA_PIN 12
void setup() {
       FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);
void loop() {
   for(int whiteLed = 0; whiteLed < NUM_LEDS; whiteLed = whiteLed + 1) {
      leds[whiteLed] = CRGB::White;
      leds[whiteLed] = CRGB::Black;


That looks like the example, and I don't see anything glaring. I have a similar strip and tomorrow I will try to hook mine up like the picture you've shown.

You've also tried the neopixel library with no luck?




Thanks Jimmy. Yea, I tried the Neopixel library too. Not a single light lit up with either.


I looked at my led strips and they use the WS2811 Leds or the earlier version of the
WS2812 with six leads on each chip instead of four. I do have some bare WS2812 leds with four leads,
like yours. I will try to hook them up and try your code this weekend.



I have used the four-lead WS2812B LEDs and they work fine with the existing code. You might have some that are set to 400KHz instead of 800KHz, or otherwise configured differently. I would check all the connections with a multimeter, and try to make sure you haven't accidentally given them 12V from that supply.
Unique RGB LED Modules and Arduino shields: http://www.macetech.com/store


I stopped using the connector that came soldered onto the strip, soldered on new leads and I got it to work with 12 LEDs. but when i connected the rest of the 150, it stopped working. couldnt work on it for longer. I'll clean up all the connections and try to get it to work again. Thanks for all your help!


Hi ,have you used the search window in the top right hand corner of this page,   WS2812B brings up a lot of posts.

Tom...... :)
Everything runs on smoke, let the smoke out, it stops running....


The GND-Line of the Power Supply and the GND-Line of the Arduino must have a connection (but only the gnd!

2.: don't use a PC Power unit: It often makes troubles because PC-Power units have their own logic. It would be better to buy a seperate 5v power supply, then it should work, if your code is ok.

If you want to see of your code is working: take the 1 Pixel you cut off your stripe and hook only this one to the arduino (directly, without power supply by a PC-Supply). Sry for my worse English ;-)

Have fun

Go Up