Skip to content

filipamator/vu_meter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vu_meter

This is a simple FPGA-based FFT audio signal analyzer. The project was made using Intel-Altera Quartus Prime 16.1 and implemented on DE2-115 board from Terasic.

I used an IP Core generated by Spiral Project, Carnegie Mellon University (http://www.spiral.net/hardware/dftgen.html). The project is mostly written in VHDL with small exceptions (SystemVerilog for ILI9341 TFT display, Verilog for I2S audio chip).

What does it do?

  • An audio sample (1024 16-bit words from the left channel) is acquired using on-board I2S chip with 48 kHz (50 kHz in fact) sampling rate and 24 bits of vertical resolution. Only MSB 16 bits are used for calculations.
  • A Hanning window function is applied to the samples stored in the on-chip memory. Integer samples are converted into the IEE-754 format, multiplied with a proper coefficient and then converted again into a integer format.
  • Spectrum is calculated using DFT IP Core from Spiral project with a spectral resolution around 25kHz/511 = 48.9 Hz per point/bin.
  • A log10 is calculated for every spectral point after conversion to IEE-754 floating point format; here values are scaled to fit into TFT display: a full-scale sine wave from ADC will be plotted as 240-pixel vertical line at 320x240 TFT display.
  • A proper bitmap is generated and stored in the frame buffer.

Comments on hardware:

  • The input audio signal is echoed to headphone output
  • KEY(0) is a global reset signal. Use it after uploading a compiled design.
  • SW(1) selects log or linear scale.
  • Pressing KEY(1) will dump data over on-board UART

IMAGE ALT TEXT HERE

About

FPGA-based FFT audio spectrum analyzer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published