WS2811 flood light wrong colors

Sorry if posting under the wrong category.

I am using ESP32 S3 to control a WS2811 12-24VDC floodlight (see pic). I am powering the single pixel floodlight by a separate 12VDC supply and share ground with S3. The fixture did not come with any documentation but I opened the cover and the chip says WS2811.

The light works with the blink example that comes with the FasLED library. I made my own code below and the problem is I am not getting any of them correctly. I tried both RGB colors and HSV, and the latter is a bit more predictable. I switched to GRB, BRG, etc. and kept getting wrong colors. I commented several line to give an idea of what I am getting. Any thoughts?

Here is my code using RGB color order:

#include <FastLED.h>

#define NUM_LEDS 1
#define DATA_PIN 20
#define BRIGHTNESS 64  // 0-255
#define LED_TYPE WS2811
#define COLOR_ORDER RGB
CRGB leds[NUM_LEDS];

void setup() {
  Serial.begin(9600);
  FastLED.addLeds<LED_TYPE, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);
  FastLED.setBrightness(BRIGHTNESS);
}


void loop() {
  leds[0] = CHSV(250, 255, 255);  //Green
  FastLED.show();
  //leds[0] = CHSV(90, 255, 255);  //purple blue
  //leds[0] = CHSV(128, 255, 255); //pinkish red
  //leds[0] = CHSV(190, 255, 255); //purple
  //leds[0] = CHSV(190, 255, 255); //bluish white


  //leds[0]=  CRGB(0, 0, 255);    //not green - getting a washed blue
  //leds[0] = CRGB(255, 0, 0);  //getting a good red
  //leds[0] = CBRG::Blue;       //getting nothing!
  delay(1000);
}


one seller’ web site has this note: “It needs to be used with WS2811 SPI controller and DC12V LED power supply.”. Are you using the SPI controller? Have you contacted the seller’s help line?

Ws2811 generally needs a 5V data signal to work reliably.

Are you using a level shifter of some kind to convert the 3.3V signal to 5V?

If you are unable to locate the documentation, use the API to discover what methods etc are available. Just select a library (included .h files) and right click then select Go to Definition.

PS: on RGB order, (0,0,255) is blue… (0,255,0) is green.

Thank you.
I switched to Arduino Uno, modified the code and now getting wrong colors randomly changing! Very, very odd.
I have successfully used FastLED and Neopixel with variety of LED strips in the past with no problems at all. I even added a 220ohm in series on the data line with no luck. There must be something with the

Try 128.

Yes that is correct. From your description, a few things.

  • There is a chance that an older WS2811 chip has been used which require a 300us frame reset time just like the WS2812b, so select that as your chip type (if you actually do a delay(1000) between every update it shouldn't matter though)
  • There is a chance that the output is inverted and for every channel being set to 255, that actually turns it off. If a dedicated controller is provided, who knows what is required. The best way to figure this out is to use the blink example but chance the length between ON & OFF so one is clearly longer than the other.
  • 5v logic levels are required so i would test with an UNO first (as you have tried)
  • If you are going to change RGB modes, do that here #define COLOR_ORDER RGB set brightness to full (or don't set it at all) and no correction are other fancy stuff and just use a CRGB color to figure out what the order should be.

Increase this to 2 or something. a 1 fielded array is a bit strange and may cause some issues to the compiler. (shouldn't but hey, who knows and won't hurt)

Great possible solutions. I will try them and report back.

I inherited this from another project and cannot locate any documentation. The pic I included is what look most similar to what I have. If you look at the board pic, it clearly has Gnd, 12-24, and a data connector. There is no SPI.

It works. I followed your suggestions and now I get clean colors. As to the flickering, it turned out that the lead cable from my bench power supply was worn out and needed change.

Many thanks to all.

Sincerely,

Hello again,

Thanks for the help to make floodlights work using and UNO.

I am taking my project to the next level by 1) switching to esp32-S3, 2) using a level shifter (SN74(A)HCT125(N)), and everything works great.

Since I have 16 of these floodlights and would like to do some fun animation, I tried to use wLED which works great on a simple LED strip. With the lights, I get lots of flickers and inconsistency.

Can you suggest any resource I can use to figure why and what setting on wLED might be causing this?

250 "H"ue is Pink (redish-white), so the color order is out of order.

Describe "inconsistency" and how has fixing the "flickering" not fixed the flickering? If your power supply wiring was bad, have you checked your other wiring? Is the power supply being overloaded? Are the LEDs overheating?

It is not WLED. That is a commercial product that works, right, always.

Your wiring.

The three lights I have connected work perfectly using FastLED on the ESP. No overheating.

When I boot the ESP with WLED, the lights seem to respond with color change and some of the effect but they flicker rapidly and randomly. The same setup fine with a 24V LED strip with both FastLED and WLED. So, I suspect that there is a setting I am not doing correctly in WLED.

Not according to you.

WLED does exactly what it is programmed to do. Check the settings you have given WLED and your wiring.

Because the FastLED and WLED were programmed for the "strip". Using one WS2811 means the other sketches are writing outside the boundaries of leds[0]