First a little background… Last year I built a color organ type project using the hackable GE RGB LED Christmas lights and the MSGEQ7 Graphic Equalizer Display Filter. The project changed the lights based on the audio signal presented to the MSGEQ7. I wrote several effects for the lights and changed them based on pressing a button.
Upon seeing the GE lights in all their glory a friend of mine thought it would be cool to have something similar for his entertainment center. I happened to have another set of GE lights, so I said sure no problem. Fast forward 6 months of both of us forgetting about it and me thinking up another use for the extra set of GE lights I had, so now I needed to source a new set of lights. After looking around at several options I decided on the 20mm Clear Digital RGB LED Pixels from Bliptronics/Adafruit. The LED Pixels are very bright and with the available Arduino library they are easy to control. In addition to a button to change effects in my old design I also added an IR receiver and mapped a few unused buttons on the standard FIOS remote, so now you can switch effects without ever leaving the couch!
While working on the new hardware I also came up with a few new effects, some of which are based on the audio running through the EQ and some of which are not. The EQ effects are mainly driven by 3 channels from the MSGEQ7 (Low, Mid, High). Each of the channels corresponds to a Red, Green or Blue LED in a pixel and the value of the channel as determined by the MSGEQ7 sets the intensity of the colors. This basic mapping makes for a great visualization of the music and theoretically the same song will always produce the same effect.
Take a look at the video to see how it looks:
For the curious, here is a brief description of all the effects:
Light Effects (not driven by audio):
- Slow Wheel – Transitions through 96 colors over 45 minutes. (default effect)
- Fireflies – Random pixels are lit for random lengths – like fireflies at night.
- Strobe – Typical strobe light – all white.
- Split Follow – Splits the pixel strip in half and sends out new beats from the middle.
- Full Follow – Sends out new beats out from one side down the strip.
- Color Bar – Every pixel in the strip is updated on each beat.
- Mono Shuffle – Maps RGB values to just blue LEDs.
- XMAS – Red & green lights mapped from half to full brightness based on music.
If you are interested in building a set of EQ Pixels for yourself here are the key materials you will need:
- LED Pixels – 20mm Clear Digital RGB LED Pixels
- Arduino – DC Boarduino (Arduino Clone) Kit (w/ATmega328)
- Clean Power Supply – 5V 2A (2000mA) switching power supply
- EQ Chip – Graphic Equalizer Display Filter – MSGEQ7
- Audio jack & Breakout – Audio Jack 3.5mm & Audio Jack Breakout
- IR Receiver – IR Receiver Diode
- Angle Bar – 1 in. x 96 in. Aluminum 1/20 in. Thick Angle Bar
You will also need various resistors, capacitors, buttons etc… most of which should be readily available at Radio Shack etc…
Since this project is fairly in depth I have chosen not show step by step instructions, but rather a few key photos along with a schematic and the sketch for running on the Arduino. Keep in mind you could also use this hardware to build an LED sign, ambilight etc… just change up the code on the Arduino.
Let’s start off by looking at the schematic (click for larger view).
From the schematic you can see the major components and how they are connected logically. The left and right audio channels are joined together then sent into the input pin of the MSGEQ7, which then analyzes the audio and sends it’s output to the Arduino on an analog pin as a voltage range. The Arduino reads the information from the MSGEQ7 and alters the appearance of the LED Pixels according to the currently playing effect. The large capacitor on the input voltage helps smooth out the output of the 5V power supply since the on board regulator etc… is not being used. There is also a button and IR sensor connected to the Arduino to allow for switching effects. Now let’s take a look at some pictures of the physical build to see how it all comes together.
Two sets of 20 LED pixel strips were joined together and then shortened to produce a single strip of 32 pixels. The LED pixels were then hot glued to the 8 foot aluminum angle bar with the connection wires hanging from one end. Tip: Make sure to rough up the aluminum to give something for the hot glue to stick to.
Front view of circuit board with Boarduino now in place. Note: the regulator and power jack on the Boarduino are not being used since +5V is being fed to the Arduino on the 5V pin. These power regulation items on the Boarduino etc… could be omitted, I just happened to use a Boarduino I already had built.
Rear view of assembled case showing audio input jack, RJ11 jack to pixels and power jack.
The Arduino sketch is a mashup of the LED Pixels samples code with my effects and some additional handling for the IR and button presses added. The current effect to play is handled by the eqmode variable the value of which is changed by either button or remote key presses. It’s fairly straightforward, the main loop performs the following basic operations on each pass and hands off to functions where necessary.
- Check the button to see if it was pressed and update eqmode
- Check the IR remote to see if a key was pressed and update eqmode
- Execute the current “effect” based on eqmode
- Read the value of the EQ if applicable
- Update the Pixel strip
Click here to download the entire Arduino sketch: EQ_Pixels_V17.zip
- Bliptronics Example and library
- Adafruit RGB Pixels tutorial and Arduino library
- J Skoba’s MSGEQ7 Code (my Archive)
- Ken Shirriff’s IR receiver library
- For more info on the hackable GE RGB LED Christmas light project you can read the mega 459 post thread over at DIY Christmas.
- Pictures of my MSGEQ7 build are in message #372.