Thongula
Posts: 8
Joined: Fri Aug 26, 2016 4:25 pm

Neopixel ring with Raspberry pi 3B flashing weirdly

Wed Oct 12, 2016 6:55 pm

I'm having trouble with 12-LED Neopixel rings and the Raspberry Pi 3B. I'm using the rpi_ws281x python library and the strandtest.py example that comes with the library to test some animations.

My Neopixel rings flash weirdly and LEDs 0-1 stay on instead of any animation. It worked briefly once and the rainbow and color wheel/wipe effects worked normally. Then I boot it up again and back to flashing. Anyone else have this problem?

I'm using GPIO 18, and either 5 or 3.3v both worked the one time it functioned normally.

The Neopixel rings work fine with Arduino

Thanks

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Neopixel ring with Raspberry pi 3B flashing weirdly

Wed Oct 12, 2016 8:30 pm

The ws281x really needs a 5v signal, a logic level shifter should help.

https://github.com/jgarff/rpi_ws281x
Doug.
Building Management Systems Engineer.

Thongula
Posts: 8
Joined: Fri Aug 26, 2016 4:25 pm

Re: Neopixel ring with Raspberry pi 3B flashing weirdly

Wed Oct 12, 2016 8:45 pm

Just curious, I have the parts on order, but...

Why would it work for about 4 continuous hours and then not again if that was the issue? Wouldn't it be more likely that it would work a bit and you'd wouldn't see such a consistent error?

Also, why are they so steady with Arduino vs RPi?

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Neopixel ring with Raspberry pi 3B flashing weirdly

Wed Oct 12, 2016 9:11 pm

Thongula wrote:Just curious, I have the parts on order, but...

Why would it work for about 4 continuous hours and then not again if that was the issue? Wouldn't it be more likely that it would work a bit and you'd wouldn't see such a consistent error?

Also, why are they so steady with Arduino vs RPi?
Arduino has a 5v output.

It could be a programming issue, does ./test work?
https://github.com/jgarff/rpi_ws281x
Type 'sudo ./test'.
That's it. You should see a moving rainbow scroll across the display.
(The adafruit tutorial has you install jgarff's library)
Doug.
Building Management Systems Engineer.

Thongula
Posts: 8
Joined: Fri Aug 26, 2016 4:25 pm

Re: Neopixel ring with Raspberry pi 3B flashing weirdly

Wed Oct 12, 2016 10:27 pm

New development, if I plug in power with no input connected, I get random LEDs and colors lit.

./test produces same result. Why is Arduino 5v different than RPi 5v?

User avatar
davidcoton
Posts: 3656
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Neopixel ring with Raspberry pi 3B flashing weirdly

Wed Oct 12, 2016 11:13 pm

Thongula wrote:Why is Arduino 5v different than RPi 5v?
It isn't. But the RPi GPIO is 3V3, not 5V.
Signature retired

Thongula
Posts: 8
Joined: Fri Aug 26, 2016 4:25 pm

Re: Neopixel ring with Raspberry pi 3B flashing weirdly

Mon Oct 17, 2016 12:16 am

I purchased the Adafruit 74AHCT125 quad level shifter and wired it according to this guide:

https://learn.adafruit.com/neopixels-on ... -pi/wiring

With the exception of the power is coming from the 5V and ground GPIO pins.

It still behaves the same with bizarre random flashing. I added a 330 ohm resistor between GPIO18 and the neopixel ring as described in some guides, but with no change.

Oddly, when I try running it at work it behaves like it is supposed to without the 74AHCT125 or resistor. What's going on? Is it the outlet? Everything else is the same. Power supply, RPi, pixel ring, all the same. I just ran it off of a battery pack and it still flashes wrong. It reliably works when I bring it to my office at work, but not at home off the wall or a battery pack.

beta-tester
Posts: 1221
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: Neopixel ring with Raspberry pi 3B flashing weirdly

Mon Oct 17, 2016 5:55 am

Thongula wrote:Everything else is the same. Power supply, RPi, pixel ring, all the same. I just ran it off of a battery pack and it still flashes wrong. It reliably works when I bring it to my office at work, but not at home off the wall or a battery pack.
noise on the powerline (e.g. funky switching power device, like a poor PC power supply, is close to the RPi/NeoPixle);
strong Radio/WLAN/GSM/LTE signal is catched by the device;
data lines too long/not terminated.
{ I only give negative feedback }
RPi Model B (rev1, 256MB) & B (rev2, 512MB) & B+, RPi2B (1GB), 64GB microSDXC1 class 10, HDMI 1920x1080, keyboard-mouse-combo (wireless), PiCamera, ethernet-cable, 5V/1.2A power supply, Wifi dongle (rt5370)

Thongula
Posts: 8
Joined: Fri Aug 26, 2016 4:25 pm

Re: Neopixel ring with Raspberry pi 3B flashing weirdly

Mon Oct 17, 2016 3:23 pm

What is entailed in terminating a data line?

beta-tester
Posts: 1221
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: Neopixel ring with Raspberry pi 3B flashing weirdly

Mon Oct 17, 2016 7:05 pm

Thongula wrote:What is entailed in terminating a data line?
it was only a general thought. a signal termination is a in the easiest case a resistor.
specially on long cable a non-terminated line can have reflection so the signal interferes itself or is picking up electrical noise.
electrical termination, signal reflection, impedance matching.
but i am not sure, if that is applicable to a Neopixle ring.
there should be something in the data specs/documents, if a termination is needed or if it is already integrated.

to me, it sounds like the data signal is distorted by something, when you say, that at your office the device and everything works well, but not at your home (with same device, same power supply, same wireing, same setup, same everything).
so i guess there are some interferences picked up from somewhere.
{ I only give negative feedback }
RPi Model B (rev1, 256MB) & B (rev2, 512MB) & B+, RPi2B (1GB), 64GB microSDXC1 class 10, HDMI 1920x1080, keyboard-mouse-combo (wireless), PiCamera, ethernet-cable, 5V/1.2A power supply, Wifi dongle (rt5370)

ali.soltani
Posts: 24
Joined: Sat Sep 02, 2017 10:33 pm

Re: Neopixel ring with Raspberry pi 3B flashing weirdly

Sat Sep 02, 2017 10:49 pm

sorry "about time and my english !"
I know it is late but..
I had same problem
because I have a low quality non original copy of adafrut 12 led rgb ring
after fixing it I found this page
is your problem fixed?
have you checked the frq. of output ?

I had 800000 HZ on all of test python files .
after a lot of testing i found out that for me it must be 600000 HZ

Return to “Troubleshooting”