FastLED not working on UNO

Hi, I've been trying to control some WS2815 led with an arduino UNO, but the leds kept going random colours. I decided to try and check if the issue was with those strips, or software, by testing with some WS2811 led I had(3 led per unit). I had sufficient power for it, so that's not the problem, but with the WS2811 less they just turned on, full brightness, white, and wouldn't do anything. I used the code below, and some examples but nothing worked

#include <FastLED.h>
#define NUM_LEDS 36
#define LED_PIN 2
CRGB leds[NUM_LEDS];


void setup() {
FastLED.addLeds<WS2811, LED_PIN, RGB>(leds, NUM_LEDS);
for (int i=0; i<NUM_LEDS; i++) {
  leds[i] = CRGB(0,0,0);
}
FastLED.show();
}

void loop() {
}

Pls help, I need to try and fix this ASAP and if possible with the WS2815 leds

Thanks in advance

Can you post a schematic?
Do you have long wires?

Have you seen this thread: Add support for WS2815 · Issue #940 · FastLED/FastLED · GitHub

I'd have to check the datasheet, but i think one of the differences is that the reset time or break is 280uS minimum, but that should mean you will be able to get them to respond to the first show() you send.

I don't have a schematic but I've connected 12V to the strip, data from pin 2 to DI (on the WS2815 the BI was left floating) and the Arduino's been connected to my computer for power. The longest wires I have are the 12V power supply, which is less than a meter long.

I'm new to FastLED so I don't know how to adjust timing and what that has to do with it, but if there's anything I need to add to the code pls let me know.

I'd have to check the datasheet, but i think one of the differences is that the reset time or break is 280uS minimum, but that should mean you will be able to get them to respond to the first show() you send

I haven't been able to get them to respond to anything, they won't even turn off!!

Have you got the gnd of the strip connected to the gnd of the UNO?
Please draw a schematic and post an image?

Have you got a series resistor in the data line to the strip as recommended by the infomation sheets of the WS2815.

Do you have a DMM?
Do you really have 36LEDs in your strip?

Thanks.. Tom... :smiley: :+1: :coffee: :australia:


Here's a schematic for each of the strips. I'm understanding why this might not work for the WS2815s, but not why the WS2811s aren't working(unless it's because of the unique GNDs)

Do you really have 36LEDs in your strip?

Yes, I really do, I have two strips of 18 wired in series to each other.

I don't have a DMM, the closest I have is a multimeter that isn't particularly accurate with exact voltages.

I also never realised that I needed a resistor, because I bought the strip from amazon, from BTF lighting and it said that I could just use it like a WS2812 strip, just connect the DI straight to the arduino and leave the BI floating, and I never thought to confirm it. What resistor should I put?

Your code says pin 2 is the led pin, but your schematic shows pin 1 (TX).

So just to confirm, Are the GND of the Arduino and the GND of the strip connected or not ? (They should be !!)

This should work if the GND's are connected, though the WS2815's do have a longer frame reset time. I understand you couldn't find the WS2815 symbol, but this makes sense.

The GNDs are not connected, I know now that I need to connect them.

Do I also need to connect the BI to GND on the WS2815 strips?

And for the longer frame reset time, is there anything I need to change in the code, or should I keep the code for WS2812B? All the wires will be short as this is a portable project.

Also I did connect the strips to pin 2, I just accidentally put it on the wrong pin in the schematic

It's the backup input which is used in the rest of the strip if there is no signal on Di, you can either connect it to data or to GND for the first pixel, it doesn't really matter much.

You could modify the library to use 300us frame-reset instead of 50us (older WS2811's actually also use that frame-reset time, but for ledstrip that is sold within the last few years they use 50us, there is even 2 different datasheets) or you could simply add

delayMicroseconds(300);

before every show(); if you have an issue with the leds updating. The initial signal should be received just fine regardless.

Sorry if I missed it but shouldn't there be a significant decoupling cap for the LED strip.

Ok, I’ll connect BI to GND, modify the reset time, and connect up the GNDs to each other, the latter is probably the main problem if I understand correctly. I’ll let you know if it works as soon as I test it. Thanks!!

It's optional, rarely the issue.

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