Wire up a string of RGB LEDs (Ws281x) to your Raspberry Pi and write a short Python code to control the LEDs. Uses Adafruit Circuit-Python library and neopixel libraries.
Very good video. One question: is the data from the RP 5v or 3.5v? Another video said that you need a voltage converter to get 5 volts on the light string data line. Thanks, Norm
@@TeCoEd I looked at the RP specs and GPIO is 3.5v (on) or 0 (off). That being said, your configuration works on your video. Possibly could become a problem addressing a large number of lights. However, thanks again, your video is one of the best I have seen.
@@normhapp8629 I see. Yes you can power the LEDs with the 5v pin however it is not a constant and you may get full LEDs. Suitable for small LEDs though.
Thanks. The LEDs are powered by a 5v power supply and you can run about 300 and then they start to fade out. But just add another 5v supply half way and then you can add another 300. So you can run as many as you like to from the Pi.
Great Video! Question, are you also using a level shifter? From what I have read the Raspberry Pi GPIO pins output @ 3.3v and the NeoPixels need 5v for the data and thats where the level shifter apparently comes in. I have tried your exact setup pretty much and so far I can't get it to power up any of the leds. I am guessing its because I don't have a level shifter and was just verifying if you were using one. Thanks!
Hi. No level shifter. The LEDs are powered by a separate 5v power supply. Some LEDs require 12v so you may need a different powder supply. Check the LED model and the recommended power supply.
@@TeCoEd Thanks as this was another idea I had also to what my problem is. I have another power supply arriving tomorrow that is a 5v 60a so it should good. My current was 5v 4a, which I thought was similar to yours but it doesn't seem to light any leds up. Once I get this all figured out my goal is to retro fit a 1981 Nevco Score Board from a local HS gym with Led lights that I can control a bit to just set a fake time and score. Will be just for decoration in the shop =) Thanks for your advice. Have a great 2021!
Well good news.... I solved my own issue. Apparently I missed this part: sudo nano /etc/modprobe.d/snd-blacklist.conf blacklist snd_bcm2835 Once I created that file with that line everything works now!
I'm going to running the same setup, just a slightly different program to light the LEDs. Anyway, do I have to use the 2 wires hanging off to the side? Could I use the positive red wire on the connector instead and run it to the positive terminal on the power supply? And could I also just attach two ground wires to the negative terminal and route one of them to the ground on the pi, and then one of them back to the LED strip? (I'd prefer to do it this way, it's just more convenient and saves a bit of space in my setup. Please let me know if this works. Thank you).
The connector is used to join the red and white wires to the power supply, you don't have to use it. As long as there is a separate power supply and only the data and ground run from the Pi pins then it will work.
@@TeCoEd Forgot to ask, but does this work with the WS2812B LED strip? Thanks. I have that one lying around as well that I might want to go ahead and test
Great video, Would a 5v 3A usb to dc work instead of a plug ? I'm building a cabinet but limited in socket space although i have usb ports in the wall sockets or even usb port on raspberry pi4 8gb!
Yes this would work as long as you have the correct ends. The plug power is great for longer lengths of LEDs as they begin to lose the brightness at the end of the length. Over 100 and they start to fade, so the power plug keeps them bright and the correct colour.
I am confused about what to do when the arrow goes up. Does that mean that I have to use the male end to connect the green and white wires to the raspberry pi and white and red to the adapter?
The arrow is the direction the data flows in, it indicates which end to attach the data cable from your Pi to. If the arrow is pointing up then go to the bottom other end of the LEDs and attach the wires from that end.
Great video! My string of LEDs came with a male connector that is supposed to plug the LEDs into the controller pins (rasberry pi pico in this case) the connector has a power wire. Should I remove the power wire before plugging it into my pi?
I can only get one light to come up on for some reason and it seems to be the first light. My lights show the data arrow pointing up on every light where I noticed that yours point down. Could this be the problem?
Thanks for this! Got it working great with a pi Zero with one hitch- the animations work, but there's some glitchy flickering. I've changed the /boot/config.txt, added the recommended hdmi settings. Still some strange random-color flickering. Any ideas? Thanks again!
@@TeCoEd Yes, I'm using a 5V/5A external power supply. I read elsewhere that it could be the power/ground/data connections, I'm using some thin prototyping leads. Going to solder some heavier-gauge wire in and use JST connectors, see if that helps.
@@dswersky It may be the power supply. I had 300 LEDs chained together and had to use a 12v supply to the colour fading by the end of the chain. Different LEDs also use different voltage.
The sudo pip3 install returns the error “this environment is externally managed…” I have pi 4 and just installed 64bit OS. I’ve tried the .venv route with no luck. Any ideas?
@@jannikthyzen1407 the 5v pin provides 5v output only. If you input 5v you risk damaging the Pi. You can get add on board such as the Pixel Pi that only require 1 power source.
I had to program the lights to go with he music. I could not find a sounds activated code. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-tikqi6JMaOo.html.
You can't, it requires you to run the code with sudo. But, if you open Python in the terminal with 'sudo Python', then you can run the code from Python IDE.
Hi TeCoEd, thanks for your video. I've been following yours steps but when i put "sudo pip3 install adafruit-circuitpython-neopixel" it appears one error. "Python setup.py egg_info" failed with error code 1 in /tmp/pip-build-kqjsi4hc/sysv-ipc/ I've seen that someone had the same problem but no solution
@@TeCoEd New error "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-xTd60y/adafruit-circuitpython-neopixel/ ( I'm a noob at this :,) )
Hello! Whenever I run "sudo pip3 install adafruit-circuitpython-neopixel" I end up with this message: 'Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-51ng5rn6/adafruit-circuitpython-neopixel/', and when I run the test .py in the terminal, it reports there is no module named board or neopixel. How can I fix this? Thank you!
@@TeCoEd Thanks for the speedy reply. I tried what you suggested, and and it didn't work. I am pretty much new to raspberry pi projects, so maybe there could be something flying over my head?
Adapter plug here www.amazon.co.uk/inShareplus-100-240V-Adapter-Voltage-Transformer/dp/B088WBTNRV/ref=mp_s_a_1_9?dchild=1&keywords=led+adapter+for+lights&qid=1616882800&sprefix=LED+adapter+&sr=8-9
Yes you can join as many as you want. You just need to use additional power supplies. I had 100 and they were fine. Then 200 news another power supply.
I did some more research and understand it a bit more now. It depends on the watts the lights use so you might be able to get away with one power supply depending on the lights. This was the first and clearest video that didn’t use some breadboard. Thanks!