Audio Spectrum Analyzer
From Ece
Contents |
Team Underclock
- Tyler Smith
- Chris Harper
- Matthew Crymble
FFT Theory
Fast Fourier Transformm Theory on Wikipedia.org.
Phase 1
Objective
To create an audio frequency spectrum analyzer.
Introduction
This project will use an A/D converter to read an audio signal and convert it to a digital format. The digital data will then be run through a fast Fourier transform and be output in a visual form to a VGA monitor.
Concept
We will sample an audio frequency input using the A/D module from Digilent (PMOD-AD1(DataSheet) $21.95). A fast Fourier transform algorithm will run continuously, performing a frequency analysis on the sampled data. A VGA module will display this information in human-readable form as a bode plot (Freq Vs. Amplitude).
Proposed Work
The hardware needed for this project will include:
- Digilent Spartan -3e Basys board
- PModAD1 A/D Converter (DataSheet)
- Audio out cable to connect to 6 pin header
This peripheral module is available from Digilent and is only available in one package for 21.95. Delivery date should be within 1 week of the order.
Expected Deliverables
For the demonstration of this project, a laptop headset output will be input to the AD converter. The VGA monitor will be connected to the Basys board for output. When music is played from the laptop, the monitor should display the spectral frequency components of the audio.
Phase 2
Objective
To create an audio frequency spectrum analyzer.
Introduction
This project will use an A/D converter to read an audio signal and convert it to a digital format. The digital data will then be run through a fast Fourier transform and be output in a visual form to a VGA monitor.
Concept
We will sample an audio frequency input using the A/D module from Digilent (PMOD-AD1(DataSheet) $21.95). A fast Fourier transform algorithm will run continuously, performing a frequency analysis on the sampled data. A VGA module will display this information in human-readable form as a bode plot (Freq Vs. Amplitude).
Proposed Work
The hardware needed for this project will include:
- Digilent Spartan -3e Basys board
- PModAD1 A/D Converter (DataSheet)
- Audio out cable to connect to 6 pin header
This peripheral module is available from Digilent and is only available in one package for 21.95. This module has been ordered and should arrive on April 14th or 15th.
Required Modules
- FFT Module
- Description: The FFT module will be the main workhorse module. This module will accept Digital input signals and perform fast fourier transforms on 1024 samples and output frequency component values to the Draw VGA Module.
- Input: Digital signal from A/D.
- Output: Numerical frequency component output to Draw VGA Module used to graph results.
- Draw VGA Module
- Description: The Draw VGA module will accept results from the FFT module and dynamically display the frequency components of the input audio signal.
- Input: Frequency component output from FFT module, pixel row, pixel column, and clock signal.
- Output: Graphical representation of audio signal in red, green, blue values.
- VGA sync module
- Description: Sets horizontal and vertical sync for output to VGA monitor.
- input: clock signal.
- output: pixel row, pixel column, and sync signals.
Required Parts
- Digilent Spartan -3e Basys board
- PModAD1 A/D Converter (DataSheet)
- Audio out cable to connect to 6 pin header
Expected Deliverables
For the demonstration of this project, a laptop headset output will be input to the AD converter. The VGA monitor will be connected to the Basys board for output. When music is played from the laptop, the monitor should display the spectral frequency components of the audio.
Phase 3
Review of Proposed Work
- FFT module will be implemented by and Chris Harper.
- Draw VGA module will be implemented by Matthew Crymble.
- A/D module will be implemented by Tyler Smith.
Module Descriptions
FFT Module
The FFT module will be the main workhorse module. This module will accept Digital input signals and perform fast fourier transforms on 512 samples and output values to the Draw VGA Module. Input: Digital signal from A/D. Output: Numerical frequency component output to Draw VGA Module used to graph results.
Components:
- FFT Core from Xilinx
- Dual Port Ram
- Glue Logic
Problems Encountered:
- The Xilinx coregen module as originally intended had difficulty fitting on the FPGA. After fitting, it did not behave as expected. For example, the "busy" and "done" signals were high after reset; yet the done signal is only supposed to go high for a single clock cycle.
Solution:
- The FFT core was redesigned without use of the Xilinx coregen module. To get the functionality of a fourier transform, the approach taken by an analog spectrum analyzer was employed. A target frequency is generated and compared to the original signal. In this implementation, the signal at each frequency is fed into a FIR filter for smoothing, then passed on to the VGA module.
Draw VGA Module
- Description: The Draw VGA module will accept results from the FFT module and dynamically display the frequency components of the input audio signal.
- Input: Frequency component output from FFT module, pixel row, pixel column, and clock signal.
- Output: Graphical representation of audio signal in red, green, blue values.
- VGA sync module
- Description: Sets horizontal and vertical sync for output to VGA monitor.
- input: clock signal.
- output: pixel row, pixel column, and sync signals.
A/D Module
- Description: Gathers and de-serializes the analog data at a rate of 100kHz.
Expected Deliverables
For the demonstration of this project, a laptop headset output will be input to the AD converter. The VGA monitor will be connected to the Basys board for output. When music is played from the laptop, the monitor should display the spectral frequency components of the audio.
Phase 4
Review of Proposed Work
We created an ADC module, an FFT module, and a display module to visualize the frequency spectrum.
Schematic
Figure 1 - Top Level Schematic
Snapshots
Sample execution when fed by random number generators.
Verification Plan
Ideally, we would be able to input a frequency sweep from 20Hz to 22kHz and see a single bar move across the screen. When an audio signal is applied, it will display the audio's frequency components in real time.
Project Changes
As highlighted under the FFT module, the original FFT implementation failed and was replaced with an inferior, but effective implementation.




