Syncing LEDs with Music Tracks

Hey Everyone!

I'm new to the forum and new to using Arduino. I'm a quick learner and know how to code a bit of Objective C (ios mainly, which might be helpful). With that said, I have a project that I really want to make possible.

My goal so to have a hollow sculptural piece, where I can place LEDs inside (They'll shine through the eyes). I'll also have a small bluetooth speaker in the piece (Veho Brand) playing around 8 tracks in a row, in an infinite loop. I want to program the LEDs to fade into a specific color for each track.

When I think about it I picture the speaker connected to my ios device which will provide the audio source, and I was thinking of linking an arduino with LED's, via bluetooth to the speaker. What do you guys think? In fact, I don't know where to start really. Which arduino would you recommend, and is there any recycled code that might do this exact thing? Is there a better way of doing it? The colors that I want are yellow, orange, red, pink, purple, blue, green, and white. Thank you so much!!!!

XD

Best,
VAlexander

I think you should consider looking up what a "low-pass filter" is. Basically it filters out different frequencies and then you could use does as inputs and write some code to it. I think thats a good step to start with. Consider "high-pass filter" a well.

Tutorial:

Hello Mixania!

Thanks for your reply but I'm not really trying to show any frequencies or anything. In fact it's much more simple. I just want to make the LEDs glow a certain color (yellow when track 1 is playing, orange when track 2 is playing, red when track 3 is playing, etc.) My main question is more about where to start, in terms of which arduino to get, and how to set it all up in terms of connecting it together (bluetooth? etc). Thanks though! : )

I'm not entirely sure why you want to use bluetooth, but you'll have a hard time sending audio data using an arduino, and getting bluetooth setup. What you can do is use an mp3 shield to play the audio.

Then get yourself a couple of rgb LEDs.

You'll also need resistors for you LEDs to limit their current draw. You can use this to calculate the appropriate resistor value.
http://led.linear1.org/1led.wiz
Note that you'll need different resistance values for each color.

Hello laadams85,

Thanks for the help. The non-bluetooth approach makes so much sense now. However which Arduino board would you recommend? Also one LED for each eye would make logical sense right? Last but not least, how would I power the whole piece?

I'm planning on having the LEDs connect to the Arduino board which will look at what track is playing from the microSD on the mp3 shield, and then change the RGB values to a certain number. The mp3 shield will be connected to my small veho speaker (using an aux cable) to emit sound. How would I power my Arduino board though? Thank you and sorry, I'm just new to all this.

XD :slight_smile:

An arduino Uno should work fine for your application.

How would I power my Arduino board though?

About a billion ways. First decide if you can power it through a cord or if you need to power it with a battery.
http://arduino.cc/en/Main/arduinoBoardUno about half way down is a section on power.

What is the voltage for your speaker? Is it battery powered or powered using a power cord. Depending on the setup you may be able to use a single power source for both but that may need other more complicated circuitry to make sure that the voltage is correct for the arduino. Not terribly difficult but will need work on your part and advice from more experienced folks (not me).

For playing the files and changing the colors the basic work flow will work something like this.

Arduino->mp3 shield (Start playing track)
Arduino->LED (set Color)
Arduino->Loop (wait for track to finish then start again)

I've never used bluetooth, but I've done a couple of sound-activated projects.

Which arduino would you recommend?

The Uno should be fine.

In fact, I don't know where to start really.

Take it one step at a time...

I'd start by wiring-up a couple of RGB LEDs and programming them to change color.

Then you can work on sensing audio. And, you need some way of sensing the start of your song sequence, so the timing doesn't drift-out after several runs. (I'm assuming the thing will loop over-and-over?) Probably just a longer pause between #8 & starting-over with #1 would do the trick.

You need to protect the Arduino's analog input from the audio signal's negative swing. You can bias the input to 2.5V (a capacitor and two equal-value resistors), or use a resistor and a couple of [u]protection diodes[/u], or use a [u]peak detector[/u]. (In your applcation where you just need to sense the presense of an audio signal, I'd use the protection diode method.)

Last, I'd work on the bluetooth communication.