«

»

Sep 17

EQ Pixels

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.

EQ Effects:

  • 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.

Build Info:

If you are interested in building a set of EQ Pixels for yourself here are the key materials you will need:

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).

SchematicFrom 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.

An RJ11 jack was attached to the opposite side of the aluminum angle bar to provide a connection back to the control box.

RJ11 JackThe completed strip installed behind the entertainment center. The strip is held in place with “L” brackets allowing for quick and easy removal if necessary.

Installed pixel stripCompleted circuit board mounted in case without Boarduino. The 3 sets of 2 pin male headers are used to connect the power, power switch and effect button.

Circuit BoardFront 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.

Boarduino Front viewAnother view from the rear.

Boarduino back viewInterior view of the case top showing the power jack, switch and button installed and window cutout for the IR receiver.

Case topFront view of assembled case showing the IR receiver window.

Case front

Rear view of assembled case showing audio input jack, RJ11 jack to pixels and power jack.

Case rear

Code:

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.

  1. Check the button to see if it was pressed and update eqmode
  2. Check the IR remote to see if a key was pressed and update eqmode
  3. Execute the current “effect” based on eqmode
    1. Read the value of the EQ if applicable
    2. Update the Pixel strip

Click here to download the entire Arduino sketch: EQ_Pixels_V17.zip

Additional Resources:

4 comments

1 ping

Skip to comment form

  1. Jroms

    Great Project! I am waiting for my AF pixels and have been playing with the G35 light set. Have you had any lucky using AF spectrum analyzer with GE g35 lights?

    1. willnue

      I built a project with the G-35 lights last year, you can read more about it by following the link to DIY Christmas in my original article. I also sent you an email with the code I used to build it.

      Also, check out Deep Darc’s site at http://www.deepdarc.com/2010/11/27/hacking-christmas-lights/ for the G-35 lights, he is the originator of the hack(s). I see in the comments there are a few links to new libraries that were built to drive the G-35 with an Arduino.

  2. Surf

    Biilt it with 1set of lights and everything works great except changing it with the remote. Enabled serial print and see the ir codes so it’s working. What brand remote or does it matter did you use. I’m using a Vizio (Sony off brand). By the love this using it as mood lighting.

    1. willnue

      Surf,
      You should be able to use it with your Vizio remote. Check out Ken Shirriff’s blog article about the remote library at http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html. There is some sample code in the “how to receive” section that you can run on your Arduino that will dump every remote press to the serial monitor. Just find the codes for the buttons you want to use on the Vizio remote then update my code on lines 22-23 with your codes:

      #define IRCode_UP 0xEFBE2D68 // FIOS remote green "D" Button
      #define IRCode_DN 0xFC67AFAE // FIOS remote red "C" Button

  1. Electronics-Lab.com Blog » Blog Archive » NueWire – 8 Foot LED Pixel bar powered by Arduino & MSGEQ7

    [...] – 8 Foot LED Pixel bar powered by Arduino & MSGEQ7 – [Link] Tags: Arduino, Led, MSGEQ7, NueWire Filed in Led | 8 views No Comments [...]

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>