Introduction and Ingredients

Author Gravatar Image SCOTT DRISCOLL
A Spectrum Analyzer shows the loudness of different frequency bands (low, mid, high) in real-time, letting you visualize music. Using a RasPi, RGB LED Strip and some wire, make yourself a dynamic display and media player. This project is based on some great python xmas light code from the LightShowPi project, and advanced users can even configure it for song voting via SMS!

The project runs in Python, even including the audio processing. It's just able to play and analyze mp3s in realtime as long as your Pi isn't doing anything else.
Hardware
  • RasPi -- this guide is built on one running wheezy, Raspbian, ver 3.10.19
  • 15ft (1m) RGB LED strip, (~160 leds) controllable via SPI, built in PWM control. This guides shows using one strip wrapped around to form 5 columns, and writing to different segments of the strip. Only three wires connected to the Pi: ground, SPI Clock and SPI Data.
  • 10A 5V power supply to drive the LEDs
  • Miscellaneous:
    • USB WiFi adapter (RTL8188CUS chipset drivers are built in to wheezy OS!) if you don't want to use Ethernet. I used these instructions to get it working.
    • SD card 4GB or larger
    • USB Power speakers
    • Powered USB Hub to plug in keyboard, mouse, wifi,
    • Some cell phone charger to power the Pi via it's USB power connector
    • USB keyboard, mouse, HDMI monitor
    • wire, some female to female jumpers or some JST connectors if you don't want to solder to the RGB strip.
Software:
  • This project is mostly based on the Pi-based xmas lights controller code from Chris Usey,Todd Giles and Ryan Jennings. It's a full command center for orchestrating xmas lights to audio (wav, mp3, etc). Their code and hardware lets you setup playlists and turn on and off 120VAC power based on frequency bands. You can even vote on songs through SMS messages! We're going to control an RGB strip instead of output pins on the Pi. Grab the attached synchronized_lights_LED_strip.py file.
  • Python control of LPD8806 RGB LED strip via SPI.
  • This isn't specific to this project, but I used the Geany IDE for coding right on the Pi.

If you have any questions, you can use the feedback link on the left or contact me through my google + page: plus.google.com/+ScottDriscoll or try the LightShowPi community
Last updated on 2014-04-05 at 07.22.31 PM Published on 2014-01-13 at 05.08.29 PM