Audio Spectrum Analyzer
- Mark Stratis
Description: For my project I chose to do a spectrum analyzer for an audio signal. I used a fast fourier transform library for the arduino to analyze the sound coming from a 3.5 mm audio cable which is plugged in on one end to a computer, iPod, radio, etc. and on the other end is plugged into a 3.5 mm audio female breakout jack. For this project, I am just analyzing the left audio signal (the mono signal) to simplify it and also it is bad for the sound card of the audio device if the two outputs are driving each other. To show a visual of this analysis, I hooked the arduino up to an 8 x 8 matrix of LEDs (which can easily be implemented with the LED dance floor which also has a panel with an 8 x 8 matrix of pixels). Each Column represents a range of frequencies so 8 different frequency ranges are being displayed at a time. As the audio changes, the amplitude of each of these columns changes based upon the amplitude of the frequency while the fourier transform occurs. There are 4 LED drivers for this project, 1 controls two different columns of LEDs. I also implemented touch sensing with this project through the use of an IR diode, a photosensor, and an analog to digital converter. When a touch has been detected, it changes the way in which the frequency is visualized. If there is no touch, it displays all of the LEDs up to and inluduing the top LED in a column based upon the audio. When a touch has been detected, it only displays the top most LED corresponding the the peak amplitude of each spectrum at any given time.
~ MAX 6969 - LED driver (4)
~ TLC1543C - 10 bit analog to digital converter with 11 analog inputs (1)
~ 3.5 mm female audio breakout jack
~ 3.55 mm audio cable
~ 64 blue LEDs
~ 1.5 kilo ohm (4, 1 for each of of the LED drivers that goes into the SET pin)
~ 47 ohm (1 for the IR diode)
~ 1.0 mega ohm (1 for the photosensor)
~ 4.5-5 V power supply
This is a project that I have been wanting to work on since the summer of 2010. Unfortunately, I did not know how to do it at the time but using the knowledge that I accumulated over the course of ECE 387, I was able to complete this.
April 24th, 2011 - Gathered all necessary components and wired the breadboard
April 27th, 2011 - Completed basic code to interface the arduino with the LED drivers.
April 28th, 2011 - Started to work with the FFT library
April 29th, 2011 - Completed the work with the FFT and needed to find another chip to interface with
May 2nd, 2011 - Started and completed code to interface with touch sensing, project complete
Arduino Code: Spectrum_Analyzer_Touch.pde
FFT Code: ffft.h ffft.S