I am trying to figure out how I could split an audio signal into five separate frequency bands so that I could then light some LEDs based on the amplitudes of the different frequency bands using only an Arduino.
I know I could do this using a laptop running MaxMSP connected to an Arduino but I would really like to take the computer out of the equation. I could also use external filtering but I feel like this must be possible using just a microcontroller.
This weekend I saw T-shirts that have responsive bar type equalizers on them such as the one seen here: http://bit.ly/4kLhih and they definitely aren't using any computers.
I have done some DSP stuff in the past but don't really feel like getting into that much complicated math right now. Does anyone have nay ideas for how I could realize my vision with an Arduino alone?
Some good news and some bad news. The good news: there is a way to do what you want with software. It's called a Discrete Fourier Transform, and the specific algorithm you'll want is called a Fast Fourier Transform. A little googling will tell you more than you want to know about it.
The bad news: If you don't want to get into the math, you're not going to be happy with the FFT.
I actually love doing this kind of math but was looking for a quick fix as it has bee a few years since I did any serious calculations. I guess I will probably have to dig out my old school notes.
I'm no expert, and Goertzel algorithm does seem interesting. But it seems pretty similar to the correlation method in DFT, which also can be effective for a small number of frequency bands. Analysis, Calculating the DFT I don't know which method is better though. For more bands FFT is far more efficient anyways.
This is a very good book on DSP and FFT btw (you can even downloads all chapters for free!): "The Scientist and Engineer's Guide to Digital Signal Processing" http://www.dspguide.com/