Blog Home

Arduino Realtime Audio Spectrum Analyzer with Video out! Arduino Realtime Audio Spectrum Analyzer with Video out! Arduino Realtime Audio Spectrum Analyzer with Video out!

Davide GombaNovember 16th, 2010

[Paul Bishop] shared code & pics about his project mixing a 8 bit FFT library found on the forum (in C) and the TvOut library.
The first piece- data collection- is fairly standard.  I use an electret microphone (which alone only produces a few mV output, far too low for our Arduino to use directly) with a transistor amplifier as the signal source, which is then sampled via the ADC on the Analog 0 pin of the Arduino.
To do spectrum analysis however, you need to capture signal over time, then process that data with what is known as a Fourier Transformation.  This magical process takes a signal and breaks it down into buckets  based upon frequencies found within the sample.  This produces a remarkably good picture of the signal.. and if displayed, functions as a visual spectrum analyzer if looped over and over.
This post contains a library which performs both the sampling and the Fast Fourier Transformation completely in C in 8 bits, amazing fast considering that fact, and uses a few tricks to be really stingy on memory, which is at a premium on Arduino- especially with the TVout data space eating up quite a bit.  Since the Atmega 328 only has 2k of RAM, every byte counts.  Matrix math done like this is nothing short of awesome.  Best of all, it’s usable as a library.  Cut and paste the .cpp and .h into a new folder named “FFT” in the Libraries directory.  My Arduino project code is adapted from the original code from the forum-posted Arduino program.
via [Blurtime]

 

[Paul Bishop] shared code & pics about his project mixing a 8 bit FFT library found on the forum (in C) and the TvOut library.
The first piece- data collection- is fairly standard. I use an electret microphone (which alone only produces a few mV output, far too low for our Arduino to use directly) with a transistor amplifier as the signal source, which is then sampled via the ADC on the Analog 0 pin of the Arduino.
To do spectrum analysis however, you need to capture signal over time, then process that data with what is known as a Fourier Transformation. This magical process takes a signal and breaks it down into buckets based upon frequencies found within the sample. This produces a remarkably good picture of the signal.. and if displayed, functions as a visual spectrum analyzer if looped over and over.
This post contains a library which performs both the sampling and the Fast Fourier Transformation completely in C in 8 bits, amazing fast considering that fact, and uses a few tricks to be really stingy on memory, which is at a premium on Arduino- especially with the TVout data space eating up quite a bit. Since the Atmega 328 only has 2k of RAM, every byte counts. Matrix math done like this is nothing short of awesome. Best of all, it’s usable as a library. Cut and paste the .cpp and .h into a new folder named “FFT” in the Libraries directory. My Arduino project code is adapted from the original code from the forum-posted Arduino program.
via [Blurtime]

[Paul Bishop] shared code & pics about his project mixing a 8 bit FFT library found on the forum (in C) and the TvOut library.
The first piece- data collection- is fairly standard. I use an electret microphone (which alone only produces a few mV output, far too low for our Arduino to use directly) with a transistor amplifier as the signal source, which is then sampled via the ADC on the Analog 0 pin of the Arduino.
To do spectrum analysis however, you need to capture signal over time, then process that data with what is known as a Fourier Transformation. This magical process takes a signal and breaks it down into buckets based upon frequencies found within the sample. This produces a remarkably good picture of the signal.. and if displayed, functions as a visual spectrum analyzer if looped over and over.
This post contains a library which performs both the sampling and the Fast Fourier Transformation completely in C in 8 bits, amazing fast considering that fact, and uses a few tricks to be really stingy on memory, which is at a premium on Arduino- especially with the TVout data space eating up quite a bit. Since the Atmega 328 only has 2k of RAM, every byte counts. Matrix math done like this is nothing short of awesome. Best of all, it’s usable as a library. Cut and paste the .cpp and .h into a new folder named “FFT” in the Libraries directory. My Arduino project code is adapted from the original code from the forum-posted Arduino program.
via [Blurtime]