tom-2015 / rpi-ws2812-server

Raspberry Pi WS2812 (web) server tool
172 stars 39 forks source link

First LED is constantly white #65

Closed MarkusOsterBEC closed 2 years ago

MarkusOsterBEC commented 2 years ago

Hi, if I just use a fill with a constant colour the first led is a constant white. Am I doing something wrong with the configuration? How can I suppress this behaviour?

tom-2015 commented 2 years ago

Probably has something to do with initialization command. What if you tell the setup command there is 1 more LED, does this solve the problem? So if you have 100 leds, call setup 1,101,...

MarkusOsterBEC commented 2 years ago

I just did a test with a smaller setup (12 LEDs) and the first two were behaving strangely. I used

setup 1,11,3,0,100,18; init; fill 1,FF0000; render;

It did not get rid of the first white LED. Then I increased the count of the LEDs up to 12,13 and 14. In some cases the first and second LED where white (at a higher brightness than the rest) and after using a second render command the second LED blinkt between the right colour and white.

Could it be a hardware problem with bad signal quality, even though the wire between the Raspberry PI and the first LED is only around 10cm long? And how would you go about testing this?

PS: I am using the ws2812 server as a service and then telnet to send the commands to the PI. And I did the test with different LED strips (one with 60 LED per meter and one with 144 LED per meter)

Bigdeath commented 2 years ago

Try to use the same ground for pi and led. Otherwise put a 100Ohm resistor to the Signal cable.

tom-2015 commented 2 years ago

What voltage are using for the LEDs? The signal coming from the Pi is 3.3V, if you power LEDs with 5V you may need a level converter to bring the 3.3V output signal from the Pi to 5V https://www.adafruit.com/product/1787.

MarkusOsterBEC commented 2 years ago

@Bigdeath They already had the same ground.

@tom-2015 Yes it was the wrong signal voltage, I now have a logic level shifter between the PI and the first LED and it works perfectly. Thank you for your help.

Sorry it took so long, I had to wait for the parts to test this. I think this thread can now be closed.