Issues with WS2811 Vs WS2812B

Hi,
I have noticed a wired issue with WS2811.
I have tried same sketch on both WS2812 and WS2811.
the code works as expected with WS2812 with no issue, but it goes completely bizarre when used with WS2811.
for example, the color of LED will become purple instead of Yellow. and also, the effect with WS2811 does not work as it does with WS2812.

I am aware of voltage difference; one is 5 v and the other is 12 V and I am using the two different circuits with same code.

Has anyone worked with WS2811 and experience same issue.
if not what other 12 V LEAD strip I can use that is compatible with WS2811B?

here is what I used in my code.

#include <FastLED.h>

#define LED_PIN     7
#define NUM_LEDS   7   // WS2811 has group of 3 led work together therefore the actual number should be devided by 3 ( 21 leds in strip /3 = 7)
#define BRIGHTNESS  255


CRGB leds[NUM_LEDS];

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

void loop() {
  // right turn
  //for(int i = NUM_LEDS - 1; i >= 0; i--) {
    //leds[i] = CRGB::Red;
    //FastLED.show();
    //delay(70);
    //leds[i] = CRGB::Black;
  //left turn
  for(int i = 0 ; i < NUM_LEDS; i++) {
    leds[i] = CRGB::Yellow;
    FastLED.show();
    delay(70);
    leds[i] = CRGB::Black;

Attack that problem first with the simplest possible code. Just try setting all LEDs to the same basic color ... Red, Blue, Green.

Since you didn't bother to post a complete code, I can't see what color order you're using. But, are you sure it's the same for both strips?

2 Likes

that is what I am not sure. I thought both strips can use same color code

Here is something from page 58 of the Adafruit NeoPixel Uberguide related to RGB and GRB strips:

// 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)

Thank you for the refrence.
my question is if this is going to work with FASTLED library I am using?

I pasted the whole code.
I am setting up the color to Yellow, but purple is what I get.
WS2811 also has group of 3 LEDs work together I suppose that makes a huge difference I suppose.

try leds[i] = CRGB::Red; and say what color you see.

It doesn't matter.

I said in my previous post that you should try the basic colors (Red, Blue, Green). That way only one LED illuminates at a time. @kolaha just told you the same thing. Why did you try Yellow?

It's not that complicated. There are only 6 possible combinations for the Color Order. You could have tried them all and gotten your answer by now.

Any time you try something new, ALWAYS post the complete, updated code in the new post.

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