bandeko
Posts: 3
Joined: Mon Jan 01, 2018 1:21 pm

Issues with WS2812B and PWM

Mon Jan 01, 2018 1:38 pm

Hi,

I just recently got back into RPi and was testing some simple things but I'm having a lot of issues with using neopixel library. (https://learn.adafruit.com/neopixels-on ... i/software) It does say that it does not work with RPi 2 but there were lot of commits even for newest Pis so I guess that warning is outdated?

Anyway, I tried pretty much everything I could to try to make it work with PWM and I could not get any output on PWM, disabling sound, disabling/tweaking HDMI, and there was absolutely no output on PIN18 or PIN12. After that I tried with SPI, and that is giving some signal output on PIN10 but the LED strip is not working.

However the LED strip has external PSU so it's not because of not enough juice, I checked different points of strip and it's showing correct voltage. The first LED seems to be working, I tried connecting to other DI skipping 1st LED and didn't help. The strip lights up for split second when connecting PSU and after that nothing. SOMEHOW, once it started working out of the blue, I interrupted the program, wanting to restart it and after that nothing, I can't get it to work anymore.

Any thoughts on this?

bandeko
Posts: 3
Joined: Mon Jan 01, 2018 1:21 pm

Re: Issues with WS2812B and PWM

Wed Jan 03, 2018 8:23 pm

Since I'm still getting nowhere maybe this output might help, so using SPI on PIN10, strandtest.py gives this signal
Attachments
SPI output.png
SPI output.png (10.21 KiB) Viewed 178 times

bandeko
Posts: 3
Joined: Mon Jan 01, 2018 1:21 pm

Re: Issues with WS2812B and PWM

Wed Jan 03, 2018 8:50 pm

My mistake, so SPI works correct, figured out why PWM was not working, I had some script run on boot that was using both PIN18 and PIN12 and I couldn't use them until I removed that program for starting with RPi.

Second thing, DI voltage was too low, 3.3 and it needs 4.7, so I added 2N2222 with 5V and now it works.

But now, 1st and last LED do not work, I have to "bypass" first LED and last does not work. I think it's voltage drop because there are resistors on 1st and last LED? When I power it on both of them (1st and last) light up for split second so they must be working. So should I up the voltage on DI or can I remove those resistors or something else?

mattmiller
Posts: 1777
Joined: Thu Feb 05, 2015 11:25 pm

Re: Issues with WS2812B and PWM

Wed Jan 03, 2018 11:17 pm

I always use the Pimoroni UnicornHAT software/library to drive Neopixels as they keep it up-to-date and you can guarantee that it will work

https://github.com/pimoroni/unicorn-hat

The only issue is that you have to translate from 8x8 pixel addressing to linear but its a small price to pay for reliability :)

I run 4 different neopixels strips via 4 PiZeroW at home using this method

Physical pin12 direct to data connection on the strips

Return to “Troubleshooting”

Who is online

Users browsing this forum: Lob0426 and 6 guests