Extreme Color Organ





Introduction: Extreme Color Organ

Hi All! I have wanted to do something fun with my bedroom for a while now and the Make it  Glow challenge provided me with a reason to do so. A few months ago I acquired a strand of GE-35 Color Effects lights and owing to the inherent dangers of controlling wall voltages, the strand provided me with an alternate and safe way to light up my room and be able to control it with my arduino. As I researched the hacks for the RGB strand I was taken with the idea of having the lights move with my music. I ordered a MSGEQ7 from Sparkfun and started my room's renovation when it arrived in the mail.

Step 1: Materials Needed

1x Arduino 328
1x GE- 35 Color Effects Light Strand- I used a 50 count strand
1x 10nf Cap
2x 100nf Cap
1x 200K resistor
1x Wire
1x Breadboard - I used a Proto Shield
1x LED - I used a red LED
1x PIR Sensor - Radio Shack
1x 3" Servo Extender
1x Male to Male Audio Cable- Cut in half and each end terminated in a pin Header
1x Stereo Audio Splitter
1x Music Device
1x Pliers- For pesky staples
1x Mono Plug
Staple Gun
Hot Glue Gun
Soldering Iron
Optional- Knife
Optional- Drill
Optional- Hammer
Optional- Scroll Saw
Optional- Book-  One you don't mind ruining forever

Step 2: Hacking the GE- 35 Lights

The first thing to do is to modify your lights so that they will work with the arduino. I chose to follow austinlightguy's instructions on his website which worked well for me. You of course can do whatever you want, but make sure that the stock light controllers data line is not connected when your arduino is to the lights or you may end up frying something or getting interference between the two.

Step 3: Stapling Up the Strand

My bed overhangs the base all the way around and so I ended up just stapling the strand underneath my bed on that lip. I then took it and ran it up the side of my bed, along the top, down the other side, and along the headboard to completely encircle my bed frame. This will probably not apply to you so survey your room and try out different arrangements to find out what looks best for your layout. I ended up removing the diffuser bulb so that the strand had less of a profile above and below the bed. The bulb pops off with just a little force and twisting.

Step 4: Wiring Up the MSGEQ7 Chip

Pretty simple circuit, just follow these instructions to connect it up to the arduino. I used custom cut lengths of wire to  keep everything neat on the breadboard but whatever works for you. Pins used are the same as in the schematic below. I forgot to take a photo here so I am using one from later on so ignore everything else on the breadboard. Also I apologize for the 90° rotation, my computer is wigging out and won't let me rotate it.

Step 5: Attach PIR Sensor

Again, very straight forward. Just 5v, ground and the data pin to pin 6 on the arduino. I also added the red LED on pin 13 and a button on pin 5 here. The LED is simply cut down so the leads are ~1/2" and plugged in between pin 13 and the convenient ground right next to it. I am using the internal resistors in the Arduino so the button just needs to be connected to pin 5 and ground.

Step 6: Optional- Secret Book Compartment

I decided to hide the ugly tangle of wires inside a book and also to protect the wiring so that nothing gets unplugged. I cut off the cover of the book and used a scroll saw to cut out compartments for the Arduino, PIR sensor, and music device. I used a knife to cut out the slots for wires to pass through so the book lays flat. Its kind of hard to see but the servo extension is routed through the middle of the pages. I also cut out a slot from the bottom half of the book to accommodate the programming cable that doubles as a power source. The PIR sensor is simply hot glued into place. I also wired up the two modified audio cables here, one for my hacked strand and one to the MSGEQ7 chip. I attached the audio cable from the MSGEQ7 chip to a splitter and used the other port for my speakers. I added a bit of double stick tape on the cover over where the switch is so that the switch is depressed when I push on the book. I also drilled a small hole over where the LED is so I can see it through the cover.

Step 7: Programming

This is the most time consuming part of the whole build. I admittedly didn't write all of the code but most of it is mine. I stole parts of the example code on this site as well as some of the example code from austinlightguy's website and the doityourselfchristmas website (I couldn't find the thread as the site is down right now). The rest of the code is 100% me and as such may be a bit convoluted. If you have any questions feel free to ask me. It currently has an auto off feature so the lights turn off after 15 minutes of no movement and a "reset" feature so if there is no movement detected for 20 minutes the function will change to white so when I walk in the room, I will be able to see. It has three functions, cycled through with the button, All white, All off, and color organ mode. Right now the color organ is simply blue but feel free to change it to be more interesting. When the PIR detects motion the red LED lights until the motion stops, I used it mostly for debugging but it is still a nice feature to have.

-Updated Code-
I got rid of the straight blue music visualizer in favor of mapping each channel to a different color (r g b) on the top of my bed and the bottom of my bed. Basically the "treble" frequencies are on the top of my bed and the "base" frequencies on the bottom. I also added a color changing visualizer for just one frequency on the top half of my bed. I will work on implementing the bottom here soon. I also added just a straight color cycling function that fades through almost all the possible colors.  Finally I worked out some timing issues with the auto off functions.

-Updated Code 12-1-2012
More improvements in the coding and functions. Designed and etched a custom board for the lights and stuffed it all into a radio shack box. There are provisions for two buttons in the code but I have yet to implement functions for the second button. I also took out the PIR functions but the custom board has a place for a PIR sensor and it wasn't too hard to add that functionality. BRD and SCH files to come soon.

Step 8: Completed V1 Project

Here is the completed project as it stands now. I may decide to add a few more features as I begin to use it more, maybe a photo sensor on my window to inhibit it from turning on when it is too bright outside? Anyway, I hope you enjoyed this instructable and feel free to post any questions you may have, I will be happy to answer them.

Step 9: V1.2 Project

I had some time over summer so I went ahead and made a board for my circuit and made it a little nicer than the jumble of wires on top of the protoshield. I added the 4066 chip in the schematic so that I could interface with a cheap push button iPod controller but I never got around to actually implementing that part. My eagle design skills at the point that I made this board were somewhat lacking but the circuit does work, just make sure to use a steady 5v power supply with the controller. All of the connectors are headers in the schematic as I was mounting it in a box and wasn't sure where I was going to put things so I just soldered wires to the audio jack and buttons and such and then hot glued it all into the case. Its not pretty but as I said before it does work. There is some code for the board below. If you have any questions about this version, feel free to ask.

Step 10: V2 Project

Currently I am working on a project for a DJ friend of mine which will consist of 3 boxes. Unfortunantly we could not afford individually addressable LEDs and so each box will only be able to be one color at a time. They will be individually controlled by an MSGEQ7 and an integrated Atmega328 with the arduino boot-loader sending out PWM to N-channel Mosfets.  I am using an RGB LED strip ordered from China, cut into 3 parts, one for each box. There will be a central controller with 4 wires going to each box, one for common power and 3 for Red, Green, and Blue control. Basically, to turn on a color, that colors wire is grounded which completes the circuit and turns on the LED.See http://learn.adafruit.com/rgb-led-strips for more information on how the strips work. More info to come as this project progresses into its final stages.



    • Creative Misuse Contest

      Creative Misuse Contest
    • Clocks Contest

      Clocks Contest
    • Oil Contest

      Oil Contest

    28 Discussions

    Can you power the lights and the arduino from the same five volt supply?

    2 replies

    You might be able to get away with it. The reason that I didn't was that the power supply for the lights puts out 5.6v according to -this site- which is a bit high for the arduino so I just used two different supplies. Another problem you might run into is that having the arduino and the lights on the same power could create a lot of electrical interference and cause the arduino to perform strangely but I'm not positive about that. A possible solution would be to use some fairly significant power filtering capacitors to smooth out the voltage. As far as getting the voltage low enough a simple solution would be to use a diode in series which has around a .7v drop. A more complicated one would be to use a 5v LDO regulator. Best of luck, let me know if I can help!

    Thanks so much for responding so quickly. I was going to use a diode for the .7V drop ... my GE lights have a supply labeled as 6V , but I haven't actually measured. I may just opt for two supplies. I think some others have used computer power supplies pulled from old equipment, which have a clean 5V, to power both the lights and the arduino. PC supplies often have more than enough current for a couple strings of GE-35s.

    Hi - first thanks for this tutorial, I built one of these in a suitcase and it's downright awesome. I wanted to build another, but the G35 lights are pretty expensive, so I was looking at other options and found Adafruit Neopixels.

    So question: do you think this set-up would work with Neopixels and a Trinket? Neopixels say they are individually addressable, I'm just not sure if the Trinket has enough pins/the right pins to support your design.

    4 replies

    The Neopixels only require one digital pin to control and work much like the G35 lights. I don't think you would have enough pins to use the MSGEQ7 as two of the trinket pins are used for usb. You might be able to get around that but I think the better course of action would be to implement a Fourier Transform on the audio. This article from Adafruit would be a good starting point I think for you.

    Thanks for the suggestion. I got around to buying the Neopixels and the Trinket, and I think they'll work (I built the little color organ in that link, but it's not that impressive with an LED strip, more like a VU meter), but I'm having some trouble getting your code to work with the fourier transform.

    I'm using the fft library in this instructable, but I'm not sure how to interface with it your visualizer (specifically the rainbow one, which I quite enjoy).  I think his data_avgs[] roughly corresponds to your spectrumValue, but I'm not much for the Arduino language, so if you wouldn't mind explaining how that visualizer works, or offering some tips that would be awesome.

    Thanks again!

    I am not exactly sure how FFT works but from looking over his code I think you are right about the data_avgs[] being simillar to my spectrumValue[7]. I'm fairly sure that you can use his code up until where he maps the data. That particular map() function call you are going to have to change to something like the one in my mapAudio function so that it maps the data correctly. It will probably depend though more on the neopixels and what values they take for inputs. Let me know if that doesn't make sense of if you have any more questions. Good luck!

    I'm not really very familiar with the Arduino language, so I can't quite tell what that map() function is doing.

    The Neopixels seem to be fairly straightforward to work with. You set the color with strip.setPixelColor(n, r, g, b) where n is the pixel number and rgb is the color. Unfortunately, it looks like the only way to set multiple pixels is by using a for loop, but I think I can figure that out. You can set brightness with a simple function: strip.setBrightness(0-255).

    So aside from the mapping thing, I just need an idea of how the spectrumValue, color, and brightness interplay in your visualizer. I think after that I might be able to code some rough approximation for the NeoPixels.

    Thanks again for helping out.

    Hey thanks for putting this up. Its pretty sweet. We are trying to adapt your setup for an infinity mirror using this arduino board and these LED lights. 

    Looking at the board we are going to buy, is this board missing anything we need to follow your design? We're purchasing everything else according to your specs except for the PIR stuff.

    Thanks again!

    1 reply

    Well first off you are going to have to modify the code for the project because you are buying an RGB strip and not the GE-35 christmas lights which are individually addressable. You are probably going to need a couple of FETs, basically large transistors, to control each color separately. Check out step 10 for some more information. If you wish, I can upload the circuit board that I designed for it to get you started. It should work for you, though you might need higher amperage FETs than I used depending on the length of led strip in your infinity mirror. Other than that the leonardo will suit your needs well and as long as you have the MSGEQ7 and the minimal supporting circuitry for that chip in addition to the above suggestions, you should be all set to go.

    Well, I already had the Arduino, Protoshield and random components for it so it only cost $5 for the MSGEQ7 chip. The final board that I etched was $10-15 total for the etchant, copper clad board and supporting components.

    V E R Y NICE !
    Awesome work ...thanks for sharing with us!

    Sorry about the broken link, its fixed now.

    Got a lot of random colors on color organ and red when in motion detect? any ideas?

    The data line from the lights is connected to digital pin 4 on the Arduino. If that doesn't work, make sure you have everything wired up correctly. Sometimes breadboards don't make good contact with wires so try "wiggling things around" and see if that works.

    Found it in the code after I asked. Thanks for the reply.