Adafruit is open and shipping! Let's build back better, together!
0

12mm LED pixels random flickering
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: 12mm LED pixels random flickering

by adafruit_support_carter on Mon Oct 26, 2020 3:01 pm

OK, now try increasing the numleds by 1 and re-running the code. See how far you can get before issues start appearing.
Code: Select all | TOGGLE FULL SIZE
numleds = 2

works?

Code: Select all | TOGGLE FULL SIZE
numleds = 3

works?

etc....

adafruit_support_carter
 
Posts: 18117
Joined: Tue Nov 29, 2016 2:45 pm

Re: 12mm LED pixels random flickering

by Twisteduser on Mon Oct 26, 2020 3:28 pm

At numleds = 22 the following happened:
led 0-19 changed color to pink...ish
and the led 20,21,22 went red.
Here is a picture:
Image

Twisteduser
 
Posts: 17
Joined: Mon Oct 26, 2020 1:02 pm

Re: 12mm LED pixels random flickering

by adafruit_support_carter on Mon Oct 26, 2020 4:51 pm

OK, now keep the number of leds at 25 and try changing the color to something that uses less power:
Code: Select all | TOGGLE FULL SIZE
leds.fill((16, 0, 0))

adafruit_support_carter
 
Posts: 18117
Joined: Tue Nov 29, 2016 2:45 pm

Re: 12mm LED pixels random flickering

by Twisteduser on Tue Oct 27, 2020 7:19 am

This happened when I run the code 2 times.
Code: Select all | TOGGLE FULL SIZE
import board
import adafruit_ws2801

odata = board.D5
oclock = board.D6
numleds = 25
bright = 1

leds = adafruit_ws2801.WS2801(oclock, odata, numleds, brightness=bright, auto_write=False)

leds.fill((16, 0, 0))
leds.show()
Attachments
kép_2020-10-27_120817.png
kép_2020-10-27_120817.png (327.64 KiB) Viewed 19 times

Twisteduser
 
Posts: 17
Joined: Mon Oct 26, 2020 1:02 pm

Re: 12mm LED pixels random flickering

by adafruit_support_carter on Tue Oct 27, 2020 11:48 am

Thanks for the photos. It may still be power related, but also could be a bad LED in the chain.

Run this and see what you get:
Code: Select all | TOGGLE FULL SIZE
import board
import adafruit_ws2801

odata = board.D5
oclock = board.D6
numleds = 25
bright = 1

leds = adafruit_ws2801.WS2801(oclock, odata, numleds, brightness=bright, auto_write=False)

leds[21] = (16, 0, 0)
leds.show()

adafruit_support_carter
 
Posts: 18117
Joined: Tue Nov 29, 2016 2:45 pm

Re: 12mm LED pixels random flickering

by Twisteduser on Tue Oct 27, 2020 2:31 pm

The 21th LED went red.
I think you might be right, and the power supply is the problem. I'll order a new one this week and give it a second try with this project.

Twisteduser
 
Posts: 17
Joined: Mon Oct 26, 2020 1:02 pm

Re: 12mm LED pixels random flickering

by adafruit_support_carter on Tue Oct 27, 2020 2:49 pm

Cool. Yes, at this point it does sound power related. Let's see what happens with a new supply.

Good info on power requirements here:
https://learn.adafruit.com/12mm-led-pixels/power

adafruit_support_carter
 
Posts: 18117
Joined: Tue Nov 29, 2016 2:45 pm

Re: 12mm LED pixels random flickering

by Twisteduser on Mon Nov 02, 2020 11:52 am

Hy again!
I've just connected the new power supply according to the "circuitpython-wiring-and-setup" and started debugging. (I'm using a 5v 10Amp LRS-50-5 MeanWell power supply).

I started testing (as you suggested earlier) with the first code, but again, at 2nd try the first 14 leds turned red, 15-24 green and the last led was red.
I'm really confused now.

Twisteduser
 
Posts: 17
Joined: Mon Oct 26, 2020 1:02 pm

Re: 12mm LED pixels random flickering

by adafruit_support_carter on Mon Nov 02, 2020 11:56 am

Are you still powering the strip through the Pi? Instead of directly connecting power to the strip as shown here?
https://learn.adafruit.com/12mm-led-pix ... -3045370-6

adafruit_support_carter
 
Posts: 18117
Joined: Tue Nov 29, 2016 2:45 pm

Re: 12mm LED pixels random flickering

by Twisteduser on Mon Nov 02, 2020 11:59 am

Directly, like on the site you've sent.

I'm wondering that maybe I should reinstall the whole raspberry and start my project again, or maybe something isn't good with my raspberry?

Twisteduser
 
Posts: 17
Joined: Mon Oct 26, 2020 1:02 pm

Re: 12mm LED pixels random flickering

by adafruit_support_carter on Mon Nov 02, 2020 12:55 pm

I guess try that just to see what happens.

Neopixels work in a chain. Data goes in one end and is passed down the line. Sometimes there can be a bad pixel that can corrupt the data being sent to all the other pixels downstream. But in your case, the issue does not seem be isolated to a single pixel. So doesn't seem like that is what is happening here.

Is the Raspberry Pi the only board you have? Do you have something like an Arduino UNO?

adafruit_support_carter
 
Posts: 18117
Joined: Tue Nov 29, 2016 2:45 pm

Re: 12mm LED pixels random flickering

by Twisteduser on Mon Nov 02, 2020 1:02 pm

Yes, I have an Arduino UNO.

Twisteduser
 
Posts: 17
Joined: Mon Oct 26, 2020 1:02 pm

Re: 12mm LED pixels random flickering

by adafruit_support_carter on Mon Nov 02, 2020 1:05 pm

Excellent. Please try driving the NeoPixels with the UNO and using Arduino. You can use the same guide, which shows wiring:
https://learn.adafruit.com/12mm-led-pixels/wiring
and has code:
https://learn.adafruit.com/12mm-led-pixels/arduino-code

adafruit_support_carter
 
Posts: 18117
Joined: Tue Nov 29, 2016 2:45 pm

Re: 12mm LED pixels random flickering

by Twisteduser on Mon Nov 02, 2020 3:33 pm

With arduino the led strip working correctly. I use the sample code.

Twisteduser
 
Posts: 17
Joined: Mon Oct 26, 2020 1:02 pm

Re: 12mm LED pixels random flickering

by adafruit_support_carter on Mon Nov 02, 2020 3:42 pm

OK, good test. Thanks for doing that. So we know the strip itself seems to be OK.

Now try going back to the Pi and try the hardware SPI wiring instead of pins 5/6:
https://learn.adafruit.com/12mm-led-pix ... ep-3045372
and note you'll need to change a few lines of code:
https://learn.adafruit.com/12mm-led-pix ... thon-usage
Code: Select all | TOGGLE FULL SIZE
    odata = board.MOSI
    oclock = board.SCK

and see if that helps.

adafruit_support_carter
 
Posts: 18117
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.