Raspberry Pi LED pixels

Posted on 9th January 2020


The final part of building a voice-activated Christmas tree light is the actual lights. Following the instructions in PiMag 88 I bought 2 meters of NeoPixels from Pimoroni and, erm, little else!

First step was to find my soldering iron and attempt to solder some connectors to the LED strip. This failed due to my iron being 20 years old and basically broken (I did not maintain my tip which was also far too large). A new soldering-iron later, and some thinner solder, and I had attached a test LED to some jumper leads.

Various attempts getting my Raspberry Pi Zero to do anything at all with the LED failed. But I did get it working with my Arduino. At this point I read

  • The uberguide: https://cdn-learn.adafruit.com/downloads/pdf/adafruit-neopixel-uberguide.pdf

Ah, I need a decent power supply. And a resistor and capacity etc. Order these. Some more soldering and cable management, and the Arduino at least can do some interesting things with the rest of the LED strip. Something for the future is to experiment with:

  • Better driving with Arduino: https://wp.josh.com/2014/05/13/ws2812-neopixels-are-not-so-finicky-once-you-get-to-know-them/

Returning to the Raspberry Pi, I borrowed my son's Pi3, installed a clean copy of Raspberian, and followed carefully the instructions here:

End result: it works perfectly! Back to the Raspberry Pi Zero, I trace the problem back to power-supply. The board itself seems to work flawlessly off any random USB power supply (e.g. running for hours when doing speech recognition testing). However, for driving LEDs, even with an external power supply, it seems I really do need a beefier USB power supply. Once I had this, the Pi Zero also worked flawlessly!

For next year, the plan is write some sort of Object Oriented library for performing animations with the LEDs, and also to integrate with speech recognition code.


Categories
Recent posts