Go Down

Topic: PL9823 acting weird (Read 309 times) previous topic - next topic

GouStoulos

Apr 29, 2017, 08:01 pm Last Edit: May 02, 2017, 08:15 pm by GouStoulos
Hello! So i wanted to use my UNO and some pl9823 led's as lighting for my pc case. I had everything laying arround, so i thought why not. I am still a begginer when it comes to arduinos.
So i made this(i m so sorry if it hurts your eyes. i have no idea how to draw a schematic):

I am powering the LED's from a molex connector from my PC's PSU.
So i uploaded some of fastLED's examples, and they all had issues. Almost all of the led's are flickering and changing colours epilepsy style. Well, not always. When the are not all powered on, and they run fine. The only values i have changed on the code where my Data pin, clock pin, and the number of led's.
Everything is soldered, so i guess its not a connection issue. I double checked to be sure, and all connections seem good to me.
Any ideas?
Thanks in advance!

PaulRB

#1
May 01, 2017, 02:19 pm Last Edit: May 01, 2017, 02:23 pm by PaulRB


How is the Arduino powered? Does it have a common ground with the leds?

Why are your two data lines connected at opposite ends of the led strip/chain?

Why are you using two data lines anyway? pl9823 does not appear to have separate pins for clock & data. Post your sketch, I wonder if you are initialising the string correctly.

GouStoulos

#2
May 01, 2017, 04:04 pm Last Edit: May 01, 2017, 04:13 pm by GouStoulos
hey man. thanks for the reply!
the arduino is powered through usb. so no, it doesnt have common ground. i am planning to hide it somewhere in the case, and power it from the same molex connector.

i am using the cylon example from the fastled library. so when i saw the clock pin in the code, i assumed that this is where the data line should end up. i guess i was wrong. removing the "clock pin" didnt make any difference.

here is a video, so you can see what i mean. https://youtu.be/VC75tbf6-8A
as you can see, the few led's on the right are working properly, while the others, are flashing and going nuts.
when blue and red colors cycle through the case, all seem to work fine.

edit: i am now running the arduino from the very same molex connector, and the issue is still here. i am running it from the 12v rail. 12v on the vin pin, and ground on the ground pin

PaulRB

#3
May 01, 2017, 09:14 pm Last Edit: May 01, 2017, 09:20 pm by PaulRB
So... You don't need any further help, I assume. That's why you didn't post your sketch as I suggested.

PS. If you do still need help and want to post your sketch, please don't piss everyone off by doing it wrong. Read the forum guidelines first.

GouStoulos

#4
May 02, 2017, 07:52 pm Last Edit: May 02, 2017, 07:58 pm by GouStoulos
I am sorry, but i didnt post my sketch, because as i said i am using the cylon example from the fastLED library. I thought that this is enough. I guess i was wrong.
Here is the sketch. The only things i have modified are the used led's, and the data pin

Code: [Select]
#include "FastLED.h"

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

// 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 4
#define CLOCK_PIN 13

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

void setup() {
Serial.begin(57600);
Serial.println("resetting");
LEDS.addLeds<WS2812,DATA_PIN,RGB>(leds,NUM_LEDS);
LEDS.setBrightness(84);
}

void fadeall() { for(int i = 0; i < NUM_LEDS; i++) { leds[i].nscale8(250); } }

void loop() {
static uint8_t hue = 0;
Serial.print("x");
// First slide the led in one direction
for(int i = 0; i < NUM_LEDS; i++) {
// Set the i'th led to red
leds[i] = CHSV(hue++, 255, 255);
// Show the leds
FastLED.show();
// now that we've shown the leds, reset the i'th led to black
// leds[i] = CRGB::Black;
fadeall();
// Wait a little bit before we loop around and do it again
delay(10);
}
Serial.print("x");

// Now go in the other direction. 
for(int i = (NUM_LEDS)-1; i >= 0; i--) {
// Set the i'th led to red
leds[i] = CHSV(hue++, 255, 255);
// Show the leds
FastLED.show();
// now that we've shown the leds, reset the i'th led to black
// leds[i] = CRGB::Black;
fadeall();
// Wait a little bit before we loop around and do it again
delay(10);
}
}

PaulRB

#5
May 02, 2017, 11:19 pm Last Edit: May 02, 2017, 11:22 pm by PaulRB
I needed to see you sketch to check the parts that have to be configured for the type & number of leds, pins used etc.

Your code looks OK at first glance. So lets try some things. They may not help, but we need to "eliminate them from our enquiries".

1. Make sure we have a good direct common ground between the Arduino and the leds, with an extra wire.

2. Try a low value resistor (100R~1K) between the Arduino data pin and the first led.

3. A large cap, eg. 470uF or 1000uF, across the power lines going to the strip.

GouStoulos

Thank you for your help Paul! I really do appreciate it!

1. I added the extra wire, but there is no difference.

2. I only have 250R resistors available right not. Tried with 1, 2 and even 3. But there was no difference.

3. I am gonna have to pick some up, so i can test it. Gonna update in a day or two!

schaensi

#7
Aug 05, 2017, 03:55 pm Last Edit: Aug 05, 2017, 04:02 pm by schaensi
Hey I had the same problem with a Trinket and 31 of the PL9823.
I used the Neopixel library.
With a laboratory power supply they flickered. But then I used a standard 5 V table power and voilĂ ! Everthings fine. The table power puts out about 500 mV extra. Thats the whole difference.
I switched the laboratory power supply to about 5.48 V and everything works perfect.

Go Up