PL9823 (adressable RGB-LED) with fastLED-library

I wanted to make an LED-cube, so i bought a bunch of PL9823's (adressable RGB-LED's, these)
Then I did everything as shown in this YouTube video.

  • installed the fast-LED library
  • set up the LED (shortest leg to pin3, longest leg to GND, leg inbetween to +5V)
  • uploaded the BLINK-example (see below)
  • nothing happened, the LED continuously shows a bluish-green light ... :confused:

This is the sketch:

#include <FastLED.h>

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

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

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

So... I'm pretty sure I did everything right, but then again... why doesn't it work?

Couple of notes:

Al though it may work without (especially when plugged in directly into the Arduino), you should have:

  • a resistor (like 300Ω) to the first led's DIN or after a longish stretch of cable.
  • Have a decoupling capacitor (say 100nF) close to every led

Janosik:
So... I'm pretty sure I did everything right, but then again... why doesn't it work?

Have another look at the video here and come back to that statement :wink:

septillion:
Couple of notes:

Al though it may work without (especially when plugged in directly into the Arduino), you should have:

  • a resistor (like 300Ω) to the first led's DIN or after a longish stretch of cable.
  • Have a decoupling capacitor (say 100nF) close to every led

Just gave it a try, but it doesn't help... :cry:

septillion:
Have another look at the video here and come back to that statement :wink:

Yes, you are right... I should have changed it back to WS2812B in my original post, but I forgot... :-[
I tried all of the provided settings. None of them work.

I am starting to think that my LEDs are broken.

From an Amazon review it says

A few things to note though:

  • The timing is different from the "standard" WS2812B (read the manual - it needs to be a bit slower)
  • If you have a chain with WS2812Bs first, followed by these PL9823s, the timing actually sorts itself out (so you can use code you already have)
  • The data format of the WS2812B is GRB (ie green is sent first), but these are RGB so you'll have to swap the red & green channels to get the colours right. Bear that in mind if you are mixing the two types!

I finally know what's wrong with my LEDs ...
They are not PL9823, but ordinary RGB LEDs with common cathode.
I complained to the seller, and he paid me back immediately. I don't even have to send the LEDs back! :slight_smile:
He also removed the "PL9823" entry from his Ebay-offer.

DOH!!!!! Glad you found out! That wasn't something that popped up in my head.