Actually building Arduino Audio Spectrum Analyzer Better Than What We Did Before in Our Project Arduino Simple Music Analyzer VU Meter From Stereo Input Demands Slight Higher Knowledge. For Building Better Audio Spectrum Analyzer, We Need Some Theoretical Idea Around FFT, I²S, FFT Library and Know How I²S Hardware Works. Better in the sense – not just 3-5 channel spectrum analyzer with 5-8 LED for each channel – that is/was common in Hi-Fi audio systems once and still common at least on car stereo. Those circuits are IC based, not programmable microcontroller based. When we use any programmable microcontroller or microprocessor, the spectrum analyzer becomes of higher end like spectrum analyzers we used to see on our Android Smartphones, iPhone, PC, Mac, Raspberry Pi etc. As for Arduino, limitations made us to discuss about Arduino Spectrum Analyzer With MSGEQ7 IC.
If you want just one 8×8 dot matrix display to work as Audio Spectrum Analyzer, then you can actually use 64 LED and MAX 7219 IC. That is probably easiest and cheap way of building better audio spectrum analyzer. Obviously, you can use TFT Touch screens. Coding in later case becomes slightly lengthy (that matters for Arduino UNO). In either case, we need to know something about FFT, I²S and create easier projects before trying to work with building complex system.
Arduino Audio Spectrum Analyzer : The Fast Fourier Transform (FFT)
Fast Fourier Transform (FFT) is an algorithm which samples a signal over unit of time and divides it into frequency components. The FFT has numerous applications in the fields of engineering , natural sciences and applied mathematics. It is also used in mobile technologies such as UMTS and LTE and in wireless data transmission, such as WLAN wireless technology. The FFT belongs to the divide-and-conquer method, so that – in contrast to the direct calculation – previously calculated intermediate results can be reused and thus arithmetic operations can be saved. The best-known method is attributed to James Cooley and John W. Tukey, who published it in 1965. Specifically, one form of the algorithm was already designed in 1805 by Carl Friedrich Gauss, who used it to calculate the trajectories of the asteroids. For knowing in-depth about Fast Fourier Transform (FFT), we will suggest to find websites which provides free to read theories around these matters. It will take around one day to consume the theory.
As for Arduino Library (which you’ll practically use), we can point towards this resource :
I²S : Inter-IC Sound
Although it is sounding like I²C, it is basically a serial bus interface standard developed by Phillips and used for connecting digital audio devices, it is not bidirectional. This protocol outlines specific type of PCM digital audio.
The bus consists of at least these lines:
SCK (continuous serial clock) or BCLK (bit clock) : Bit clock line
LRCLK (left-right clock) : Word clock line, 0 is for Left channel, 1 is for Right channel
FS (Frame Sync) : multiplexed data line
SDATA, SDIN, SDOUT, DACDAT, ADCDAT : serial data (SD)
at least these lines as other lines may be present. It is not exactly some standard like UART.
Bit clock pulses once for each bit of data on the data lines. Bit clock frequency is the product of the (1) sample rate (2) number of bits per channel (3) number of channels. Audio with a sample frequency of 44.1 kHz, with 16 bits precision and 2 channels has a bit clock frequency of 44.1 kHz × 16 × 2 = 1.4112 MHz.
Arduino SAMD21 based boards has own library supporting I²S :
Arduino Due also has I2S interface. Arduino UNO doesn’t have. Here is references :
We can kick an I²S module working with Arduino UNO but speed will not be faster.
All Arduino boards support FFT library.
Arduino UNO like boards do not support I²S modules, hardware whereas Arduino Due, Arduino Zero etc boards support.Tagged With arduino fft spectrum analyzer , arduino audio spectrum analyzer , HOw to use fft in arduino , arduino dot matrix spectrum analyzer , dot matrix display spectrum meter , arduino denoising fft , audio spectrum ic , arduino audio fft , i2s fft , arduino spectrum analyzer 256 channel