Pages: [1]   Go Down
Author Topic: How to go about making a light show that syncs to the music live?  (Read 4223 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay, let me start off with this: I am very new to Arduino, and also general electronics as a whole. I have always been more into software based stuff such as scripting. Anywhom, onto my main question...

The whole reason I am getting into electronics, and more specifically the Arduino, is because of lights. Lots of lights. Like having LED strips line the top of my walls lots. What I am trying to do currently is to try and get four strips of LEDs (that is just a starting point for now) lined up at the top of my walls to sync to music. These are the parts that I understand I need to have to set it up so far...

1. Arduino (duh). In this case, I am using an Arduino Mega 2560
2. MSGEQ7 https://www.sparkfun.com/products/10468? I am using this to split the music into seven frequencies as to get a better looking light show.
3. MOSFET I am actually unsure why I need this, someone just told me that they are needed. Clarification would be great smiley
4. LED strips. I am thinking I would rather go digital, as each LED would be programable. Any advice on a good LED strip would be nice.
5. Breadboard to connect everything up. I would solder, but I would prefer not to go through the hassle for now.

If there are any parts that you all think I could use, please, include them.

Now comes the fun stuff: connecting everything. This is where more problems come up. I have absolutely no clue what to wire and what not to wire. I am sure you veterans out there could take these supplies and turn it into an awesome looking light show easily, but for a newbie like me, it is like witchcraft. One more thing, though, is I am unsure of what code I would need to use for this either. So if someone could point me in the right direction, I would be eternally grateful.

I have a small setup at the moment, but it does not include the Arduino. All it is is a very simple circuit. It consists of a 12 volt battery, four three volt blue LEDs, one TIP31 transistor, and an audio jack. I'm sure most of you have seen this setup done online somewhere. The audio jack sends the music signal to the transistor, and completes the circuit. The LEDs then procede to switch on and off to the beat of the music. It is quite simple, and really only reacts to the low end of music. That is the main reason why I would like to try the Arduino setup.

Any help that is provided to me would be greatly appreciated. If anyone would like to draw up a basic (extremely basic) schematic for the type of circuit that I am trying to build, that would be so perfect. Please, help a newbie out smiley
« Last Edit: September 28, 2012, 01:47:24 am by Heli12345 » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

By the way, sorry if this is in the wrong subforum. I just though "LEDs and Multiplexing" would be the best place to put it.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What, no one loves lights as much as I do?
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 150
Posts: 5666
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What, no one loves lights as much as I do?

Sure we do, but this isn't a live chat board. You might have to wait a few hours for people to see things.

The list of parts seems OK but I think you need to start with smaller projects first. Make sure you understand what each thing does. Be prepared for this to be complicated and take quite a long time to get working.

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Offline Offline
Jr. Member
**
Karma: 0
Posts: 57
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, im a bit of a noob here myself, but considering how i understand how the arduino works, i would split this into two sections.

first: get the data into the arduino. youve spit into seven "frequencies". For the sake of conversation, lets reduce this to 5.
the arduino takes 5 analogue inputs, so feed each one into each of these.

second: THEN decide what you want to do with the data.

by applying various sketches to each feed, they could do different things.

you could write the data from each feed to a bank of LEDs, as in, "more input" more leds light up (like on an equaliser)

assume you do this for all feeds, you could arrange them in a star shape, so the feeds grow and decrease from the centre of the star, giving different patterns depending on the music (bass heavy would cause it to be weighted to one side or another perhaps?)

or you could influence the colours of some RGB leds based on the frequency?
the arduino could monitor a "beat" based on listening for a pulse (playing with thresholds?) and flash based on a specific beat at a specific frequency?

the possibilities are endless! but yeah, i would split it in two, Get the data in, then worry about what you are going to do with it.
Get some little LEDs going on a bread board, and then by adding transistors or relays, you could replace each output with whatever you wanted (flame throwers would be my suggestion)
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 150
Posts: 5666
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, im a bit of a noob here myself, but considering how i understand how the arduino works, i would split this into two sections.

first: get the data into the arduino.

second: THEN decide what you want to do with the data.

I'd do it the other way around. Create a simple light show first using imaginary data, then try to get the data.

If you do it your way you'll be doing two things at once and you won't know if the bugs are in the input or the output.

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Offline Offline
Jr. Member
**
Karma: 0
Posts: 57
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

also, the mega has a whole 15 Analogue ins, so ignore the bit about reducing it to 5.

or, you could put one single input in to start with, then try and make it do something simple.
the add inputs to it one by one.

the simplest one is going to be:

Read the analogue value coming in on A1

express the value as the brightness of a single LED.

In the arduino IDE click: File, Examples, Analog, Analog input.
all you would do is replace the Potentiometer with your audio input.

i presume you would need to be careful not to over cook the arduino (too much volume would cause too much voltage perhaps?)
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 150
Posts: 5666
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

also, the mega has a whole 15 Analogue ins, so ignore the bit about reducing it to 5.

The MSGEQ7 doesn't work that way.

It's an 8 pin chip which cycles through the seven equalizer bands one at a time when you send it a clock pulse. You only need one analog pin to use it (plus a couple of digital ones for chip select & clock...)

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Offline Offline
Faraday Member
**
Karma: 62
Posts: 3080
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The hard part might be interfacing to that chip then.  Implementing your own interface to it, when you don't have much experience,  would not be fun.

I'd agree with the suggestions to focus on the output side first.   Learn how to drive one LED.   The figure out how to drive strings of LED's.

The worry about the input.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I can't help myself but to reply to this thread. This is the very same reason I picked up an Arduino 3 years ago - to make pretty lights dance to the music all over my house. I'll list every major component you need to get this working. However, you'll have to do some googling, trial and error, and release a bit of magic smoke before you complete this project. That is part of the learning process so do not be put off apparent road blocks. It took me several tries to get what I wanted.

Ok, first- LED strips. You have 2 options here; individual control and single color at a time strips.  Individual control is going to cost you about 5 times a much but give a cool effect. For this I would recommend going with WS2801 strips and pixels. Keep in mind that this will also eat up a lot of memory and processor time on the Mega (at least you got the mega- regular Arduino328 would be limited to only one of these strips).

You can score 5 meter strips (with 32 LEDs per meter) from Ebay for less than $90 if you keep an eye out. This particular strip runs at 5 volts. Make sure you watch what voltage – you can get some that run at 12v. Here is an example of 5 volt strip on ebay:
http://www.ebay.com/itm/5m-ws2801-led-digital-strip-32pcs-IC-and-32pcs-5050-SMD-RGB-each-meter-/120984281064?pt=LH_DefaultDomain_0&hash=item1c2b399fe8
You can also mix and match with these WS2801 pixels. They are the same thing just in a strand format:
http://www.ebay.com/itm/50pc-12mm-Diffused-RGB-LED-Pixels-5V-WS2801-Drivers-Waterproof-Addressable-Color-/150889364507?pt=LH_DefaultDomain_0&hash=item2321b4fc1b
There is lots of information on these chips on the net – very cheap and popular.

You also have the option to do some accent lighting with cheaper RGB strips that don’t have individual control. Most of these strips run at 12 volts. This is because they are chains of 3 leds together (so you can cut it every 3 leds). You can splice this up into many sections and control them with MOSFETs from the PWM pins on your arduino. A good supplement to individually controlled strips:
http://www.amazon.com/Non-Waterproof-5050-SMD-Strip-Light/dp/B006LW2NJM/ref=sr_1_4?ie=UTF8&qid=1349185489&sr=8-4&keywords=RGB+5m+strip

And here is a guide on how you’ll need to wire up each segment:
http://www.ladyada.net/products/rgbledstrip/

I really like these strips- I currently have 5 setup in my house  I cut them to the length of my windows and then stuck them on the top facing up towards the ceiling. This gives a nice diffused effect on the ceiling. I found that pointing the strips right at people’s eyes is less than pleasant.

Audio:
Good choice with that MSQ chip. I won’t write much on that because there’s a wealth of information online.  Start by looking here http://www.bliptronics.com/item.aspx?ItemID=116

Power:
You’ll need high quality and strong power supplies. Wall warts won’t cut it for this kind of project. I would also not recommend cheaping out on these. Trust me.
I have had great experience with the RS series of power supplies from meanwell: http://www.trcelectronics.com/Meanwell/power-supply-rs.shtml
You can get these in a variety of voltage and amperage ratings to meet your needs.
When I first started I tried to run everything off of 1 old ATX power supply. This works but really is a pain running wires all over the place. Instead I settled with using multiple power supplies that were smaller and located close to what they were powering. This made my life quite a bit easier and performance was better. Remember to have a common ground if you do this.
If I recall, the 5v strips need about 3 amps per 5 meters and the 12v strips need about 2. However, you want to round up here.
For a single 12v 5m strip get a RS-25-12.  For a single 5v strip get a RS-25-5. If you want to run 2 or 3 5v strips for example you can simply get a single RS-50-5. Same for the 12v stuff. When you wire these you’ll have the power and ground go to the strip, and also the ground tied to the ground on the Arduino (not the power!).

Supplies:
If you have a nice soldering station you’ll have a great time. At the very least make sure you have thin solder and a good fresh tip. Also make sure to get some high quality wire to run to each of your strips. I preferred to use Cat6 Ethernet for this. Make sure you get stranded copper and not solid copper! Your life will be easier with the stranded stuff.
http://www.amazon.com/WHITE-100FT-ETHERNET-NETWORK-INTERNET/dp/B002HK8TE0/ref=pd_cp_pc_3
Let me know if you have any other questions – but remember that experimentation is the way you really learn how this stuff works. Make sure to keep us updated with your project! Lots of pictures plz smiley-razz
Cheers,
Brian
Logged

Pflugerville, Texas
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi guys,

here's another one who wanted to produce some cool looking lights... smiley-wink
Bought my Arduino a few weeks back and finally got my LED strips (WS2801, SMD5050, 32/m) yesterday.
I got the wiring for a test setup done and the WS2801 Adafruit Library is doing its job.

But I'm trying to figure out how to get some better effects going than the ones included in the library.
Ultimately I want to mount these strips on the roof line of our house. I was actually thinking about leaving them up year-long to use different themes for Christmas, Independence Day, Halloween, a Longhorns game and etc.

Do you have any useful code I could have a look at?
I'm not a programmer. But I did a lot of Autoit scripting. I can find my way around Arduino code, but won't be able to dig deep.


Thanks!
Ronny
Logged

Boston Suburbs
Offline Offline
God Member
*****
Karma: 16
Posts: 955
I am above your silly so-called "Laws", Mister Ohm.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

http://blurtime.blogspot.com/2010/11/arduino-realtime-audio-spectrum.html

realtime spectrum analyzer, direct audio input from microphone, and still enough oomph left in the lowly 328 to generate NTSC video.  I made this a couple of years ago now, but the libraries (FFT and Video) are the same as then... but you would want to skip the video and instead PWM on channels for lights.

You might consider doing the fourier transformation on the AVR.  It works quite well...
Logged

When the testing is complete there will be... cake.

Pages: [1]   Go Up
Jump to: