A project to demonstrate frequency spectrum visualization from real time audio via time domain to frequency domain conversion on Atmega32 microcontroller.
This repo contains an Atmel Studio project with software codes to simulate a real time audio to frequency spectrum transformation on Atmega32 Microcontroller using Discrete Fourier Transform (DFT).
This project was a hardware project of Microprocessors and Microcontrollers Sessional course (CSE-316) of Department of CSE, BUET in Level-3, Term-1
Project Requirements:
- Hardware:
- Electret Microphone Breakout (https://www.sparkfun.com/products/12758)
- Audio Jack (to feed audio input directly from phone)
- OP-AMP LM358
- Atmega32
- Bi-color Dot Matrix of shape 8x8 (x2)
- LCD (used for debug purpose only)
- Breadboard
- 5v Power Source
- Software:
- Atmel Studio
- AVR-GCC Compiler
- Extreme Burner
Input:
- Input Frequency: 200-4kHz
- Sampling Frequency: 8kHz
- DFT mode: 32-Point DFT
- PIN spec of Atmega32:
- ADC0 - Mic input
- ADC1 - Audio Jack input
Output:
Amplitude plotted on two Dot Matrices consist of uniformly distributed 16 frequency bins over 0-4kHz.
Each bin has amplitude height of 8. Lower amplitude frequencies cause dot matrix to have green bars on corresponding bin columns while red is for the higher amplitudes.
Project Contributors:
Project Supervisors:
- Dr. A.B.M Alim Al Islam
Associate Professor, Department of CSE, BUET - Abdus Salam Azad
Assistant Professor, Department of CSE, BUET - Ahamed Al Nahian
Lecturer, Department of CSE, BUET
Demonstration Video: YouTube or Local
Credits & References:
- Audio Used: https://www.youtube.com/watch?v=qNf9nzvnd1k
- 32-Point Integer DFT: https://blog.vinu.co.in/2012/05/implementing-discrete-fourier-transform.html
- Mathematical Background for Sampling Rate Selection:
More related codes/design on this repo.