pomtom44
Posts: 11
Joined: Fri Jul 14, 2017 3:11 am

LED Strip - Pi Zero

Sat May 18, 2019 6:40 am

Hi all

Have a interesting problem

I have a WS2811 led strip, which I am controlling from a raspberry pi zero.
I have connected it up to an external 12v power supply, and have shared the grounds
However
during testing on a short strip, i was having zero problems, but when I move to my longer strip, i start having odd issues.
I wrote a small test script to try figure out what was going on, and whenever I run the test, the middle value never lights up. the lights always turn off

It doesnt matter what values I put in the range, its always the middle show that fails.
Any ideas? and do I make sense?
Script attached below

Code: Select all

import time
import board
import neopixel

pixel_pin = board.D18
num_pixels = 80
ORDER = neopixel.GRB
bright = 1
pixels = neopixel.NeoPixel(pixel_pin, num_pixels, brightness=bright, auto_write=False, pixel_order=ORDER)
pixels.fill((0,0,0))
pixels.show()
time.sleep(2)

for i in range(0,80):
    pixels[i] = (0,255,0)
pixels.show()
print("red")
time.sleep(2)

for i in range(0,80):
    pixels[i] = (255,0,0)
pixels.show()
print("Blue")
time.sleep(2)

for i in range(0,80):
    pixels[i] = (0,0,255)
pixels.show()
print("green")

B.Goode
Posts: 7730
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: LED Strip - Pi Zero

Sat May 18, 2019 8:12 am

Disclaimer: I have never used a WS2811 led strip, so this is only general advice...


What happens if you swap around the order in which you test the three saturated colours? Is it always the 'middle' test, or always the (255,0,0) test?

What happens if you lower the intensity of the pixels to, say, 127? (Maybe your PSU can't deliver enough current to drive all the Blues at full power?)

pomtom44
Posts: 11
Joined: Fri Jul 14, 2017 3:11 am

Re: LED Strip - Pi Zero

Sat May 18, 2019 7:34 pm

if I swap the colors in the code, its always the middle one.
Red Blue Green - Blue doesnt turn on
Green REd Blue - REd doesnt turn on.

Also if I do one color at a time they all work fine.
Its only when running that cycle that they dont for some reason.

i may test on a short sectino of the strip to see if its a data limit im hitting

pomtom44
Posts: 11
Joined: Fri Jul 14, 2017 3:11 am

Re: LED Strip - Pi Zero

Sat May 18, 2019 11:57 pm

pomtom44 wrote:
Sat May 18, 2019 7:34 pm
if I swap the colors in the code, its always the middle one.
Red Blue Green - Blue doesnt turn on
Green REd Blue - REd doesnt turn on.

Also if I do one color at a time they all work fine.
Its only when running that cycle that they dont for some reason.

i may test on a short sectino of the strip to see if its a data limit im hitting
Ok so testing, 17 leds works fine, 18 throws an issue
wondering if its bitshift now?
The tutorial I found says you can run them on the 3.3v pi output, but other people are saying no, you have to run it on 5v for the data line.
So might track down a converter and see if that fixes my issues

Return to “Troubleshooting”