The basic idea was to create color organ / spectrum analyzer on arduino board, trying to minimize quantity of external components, like analog filters, LED display drivers, etc.
Spend a lot of time in search on internet I was able to find only two ! project , which implemented FFT in order to solve a problem. One of them is:
in a few days it will celebrate 6-th anniversary. The obstacle, at least for me, was to compile / adapt his software for Arduino IDE platform, as it written in assembly and C. So, I’ve moved on, and was lucky to discover an excellent chunk of code dated back to 1989! They didn’t have floating point co-processor or “blue deep” around at that time, so mathematical skills were in high demand.
D = 1 / (14.6 * 10^-3) = ~ 70 Hz.
So, the value of fx is amplitude DC offset up to 35 Hz;
fx is amplitude in a range 35 <—> 105 Hz;
fx is amplitude in a range 105 <—> 175 Hz;
fx is amplitude in a range 175 <—> 245 Hz;
fx is amplitude in a range 245 <—> 315 Hz;
fx 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 was considering two way to build display, using PWM or BarGraph. In my opinion, PWM is not quite suited with LED, due nonlinearity in their current-brightness response. Probably, PWM approach would be O’K with incandescent lights.
BarGraph design gives better impression, when higher sound volume highlighted bigger area. Just imagine, how beautiful Fireworks are!
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 is 12 Leds ( 4 – red, 4 – green and 4 blue ) and 12 resistors, connect led+resistor between output of arduino board and ground.