The my basic idea was to create color organ / spectrum analyzer on arduino board, trying to minimize using external components, like analog filter, LED display drivers, etc.
edited:
Tweaking around web-camera for couple days, I was able to film a "video" for project. And I find out it's not easy to get it right. There are two minor problem still exist:
- delay between sound track and film;
- color temperature of CMOS sensor in the camera is not correct.
Enjoy the showVideo on youtube:
For guys, who not interested in hardware part of the project and 'd like to use the software part only in different application ( interactivity/processing ), they can just pull data over serial link, as it was done for debugging purposes, with "f" command.
After FFT-processing input data array x, generated output array fx with 32 elements, "bins", each representing a range of frequencies. The width of a bin equals:
D = 1 / T, where T is input array sampling timing, in our case T = 14.6 millisecond.
D = 1 / (14.6 * 10^-3) = ~ 70 Hz.
So, the value of fx[0] is amplitude DC offset up to 35 Hz;
fx[1] is amplitude in a range 35 <---> 105 Hz;
fx[2] is amplitude in a range 105 <---> 175 Hz;
fx[3] is amplitude in a range 175 <---> 245 Hz;
fx[4] is amplitude in a range 245 <---> 315 Hz;
.................................................................
fx[31] is amplitude in a range 2135 <---> 2170 Hz;
Upper limits could be extended up to 76 KHz.(*)
Sum up first 10 fx bins, I'm getting 35 <---> 735 Hz frequency range for red LED's, from 11-th to 20-th consequently provides me 735 <---> 1435 Hz for green LED's, and from 21-st to 31-st 1435 <---> 2170 Hz range for blue LED's.
Now hardware part.
I've used Christmas LEDs, that left over since last holiday
This is why I put 3 of them in each string, and have to use ULN2003 with 12V power source. Basically, all you need 12 LED's ( 4 - red, 4 - green and 4 blue ) and 12 resistors,
connect led + resistor between output of arduino board and ground.
For sound input I used a kit MK136 ( mic + IC NE5532 ), powered up from arduino board +5V,
No DC blocking capacitor on the output, resistor 47 k Ohm changed to 220 k Ohm in order increase sensitivity. And it has 3.5 mm jack audio connector.
Sparkfun's breakout board for electret microphone will works as well:
"SparkFun Electret Microphone Breakout - BOB-12758 - SparkFun Electronics"
I was not able to post code on this page as it above the limits (15000), plz. check on :
http://fftarduino.blogspot.com/2011_02_01_archive.html
That it for now, will come back to answer your questions if you have any.