Go Down

Topic: WS2811 LED Strip with Nano Clone and Fastled only lighting up white. Help plz (Read 2286 times) previous topic - next topic

PartayPat

Hello,

I've got a WS2811 LED strip (the one with 3 LEDs per chip) and am driving it with an arduino nano clone. I have downloaded the FastLED library and have uploaded the test program. The strip and the nano is being powered by a 12V 6.3A PSU. I have a 330ohm resistor between the data line and pin 5 and a 470uF capacitor between the GND and 12V. The 12V from the PSU drives the 12V on the strip and the Vin on the nano, likewise the GND goes to GND on the strip and nano.

When I power it up the LEDs turn on a brightish white but then stay like that. No flashy flashy, just white on all LEDs.

I have tried using other arduinos; a mega, an uno and another nano, all the same problem. I have tried using a brand new strip, same. I have tried changing the LEDs in the strip, same. I have tried without the resistor and capacitor, still white. I have tried uploading a different code that I used in the past for another project with another strip of WS2811s and a nano, which worked just fine on those, but not here. I have tried different codes in the library, the simple blink one, still white. I have run test programs (example blink). I have tried using a different power supply, you guessed it.

Basically I'm all out of ideas.

This code is what is on it now, mainly because it's simple:
Code: [Select]
#include "FastLED.h"

// How many leds in your strip?
#define NUM_LEDS 10

// For led chips like Neopixels, which have a data line, ground, and power, you just
// need to define DATA_PIN.  For led chipsets that are SPI based (four wires - data, clock,
// ground, and power), like the LPD8806 define both DATA_PIN and CLOCK_PIN
#define DATA_PIN 5
#define CLOCK_PIN 13

// Define the array of leds
CRGB leds[NUM_LEDS];

void setup() {
      // Uncomment/edit one of the following lines for your leds arrangement.
      // FastLED.addLeds<TM1803, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<TM1804, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<TM1809, DATA_PIN, RGB>(leds, NUM_LEDS);
      FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
      // FastLED.addLeds<APA104, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<UCS1903, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<UCS1903B, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<GW6205, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<GW6205_400, DATA_PIN, RGB>(leds, NUM_LEDS);
     
      // FastLED.addLeds<WS2801, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<SM16716, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<LPD8806, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<P9813, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<APA102, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<DOTSTAR, RGB>(leds, NUM_LEDS);

      // FastLED.addLeds<WS2801, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<SM16716, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<LPD8806, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<P9813, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<DOTSTAR, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
}

void loop() {
  // Turn the LED on, then pause
  leds[0] = CRGB::Red;
  FastLED.show();
  delay(500);
  // Now turn the LED off, then pause
  leds[0] = CRGB::Black;
  FastLED.show();
  delay(500);
}


If you're wondering what the white thing is, it's a 3D printed clampy thing that protects the solder joints and clamps the strip and wire in place to avoid it breaking. I've tried powering a normal strip straight out the bag to the same avail so I don't think it's the culprit.

If anyone has a clue as to what's going on please help, feel free to ask for more info if needed.


PaulRB

Are you sure this is a ws2811 strip? Can you read any labelling on the chips?

There appear to be 6 LEDs on the strip shown in your pictures, so two chips? The NUM_LEDS in your sketch should be set to 2, not 10. Worth a try, but not sure if it will fix anything.

PartayPat

Sorry, I guess that picture wasn't very clear. In that "loop" I have 20cm of strip: i.e. 6LEDs and 2chips. There are 5 of these chained up at the moment, so 10 chips total.

(changing the number of LEDs makes no difference, all LEDs still light)

The chip reads: GS1903 C1753

PaulRB

Have a look at this. Sounds the same as your problem. Turns out to be the wrong chip type and colour order and PSU fault. Can you try another PSU? If you don't have another one with sufficient capacity, connect fewer strips.

PartayPat

Thanks Paul. I did have a read of this last night after you mentioned the chip type.

I tried declaring the LEDs as different strips but no luck. However I think we might be on the right track as the last strip I had of these I had to switch the RGB around.

Although I did use the same type of PSU, maybe I just got a duff one this time, I have been having bad luck with Banggood lately.

I've got a 3A PSU of a similar type which I can try tonight when I get home, I'll let you know how it goes.

Just as an aside, what is it about the PSU that would be making this happen do you think? And is there a reasonably priced PSU that you have found to be trustworthy for this sort of thing? Maybe I'm jumping the gun.

PartayPat

I've also got a Novatech 500W ATX Power Supply that I use for my 3D Printer. I guess I could try running it off one of the 12V lines coming out of that. If I'm not mistaken the power coming of that should be pretty clean right?



PartayPat

Okay, so I managed to find 20cm of offcut from the first roll I bought, and sure enough the chips are different (ws2811s) and sure enough they flash like they should (well the rgb is brg but close enough).

So it's definitely the strip that's at fault.

The question is now, can I make these gs1903 work somehow? I have done a lot of soldering already and it would be sad to have to redo it all. Also I have a whole roll of it and it would be nice for it not to go to waste. And there isn't any guarantee I'll get the good stuff even if I did by more.

I guess at least I've learnt a valuable lesson: always check components work before doing a bunch of soldering. And maybe don't trust people selling cheapy cheap stuff on ebay (although I have already learnt that lesson many times and yet here I am).

PaulRB

Poor quality PSUs could emit high frequency noise on the power lines which could corrupt the data flow between the Arduino and the LEDs, I suppose. You would need a good oscilloscope and know what to look for to be able to spot that. But if your ws2811 work ok with the PSU then that's probably not the problem at all.

Are you in the UK? Post me a short strip if you like and I will see if I have any more luck.

PartayPat

Okay so after giving up I randomly decided to plug it in again and lo and behold there was some flashy! All I did was plug it in and for some reason it worked... Well kinda.

Only the first led blinked despite how many leds i defined. the second led was dark while the rest remained illuminated (to the point where the downstream coil was getting warm).

This not working/suddenly working despite doing nada would suggest wiring problem right? But the rest is another mystery on a mystery.

PaulRB

Possibly, yes. Use your multimeter on resistance mode to check the resistance of each cable, solder joint and connector (no power to circuit). Re-heat and apply a spot more solder to each joint to fix any dry joints

PaulRB

Your strip arrived in the post today. Will try to get around to looking at it this weekend.

PaulRB

OK, testing the strip, I immediately got different, changing colours on all leds. But the pattern is not what it should be and seems random. I suspect the data is not getting through without being corrupted in a major way. I tried 400KHz and 800KHz speeds using the Adafruit Neopixel library.



Video


Go Up