E155 Final Project Portfolio

Abstract

This project implements a near-real-time audio pitch detection system utilizing an electret microphone, amplifier circuits, microcontroller (MCU), FPGA, and a LCD display. The system is designed to capture audio signals and display the dominant pitch of the input. The audio signal is captured by the electret microphone, and amplified to a range suitable for the MCU’s Analog-to-Digital Converter (ADC) peripheral. This digital data is stored by the MCU’s DMA peripheral in a dual buffer system. Once a buffer fills, the signal is processed through a Fast Fourier Transform (FFT) to detect the dominant frequency. The MCU communicates the frequency data to the FPGA through Serial Peripheral Interface (SPI). The FPGA converts the frequency to scientific pitch notation and drives an LCD display along a 10-line parallel interface. Finally, the LCD displays the pitch to the reader in scientific pitch notation (note-octave format).

Video Demonstration

See a short demonstration of our full system below! Check out our full documentation page for a video demonstrating the full musical range of our device, as well as to see other images of our final device.

Block Diagram

Our block diagram may be seen below. See our full documentation page for a more in depth exploration of our system and its implementation.

Project Motivation

Not everyone has perfect pitch. That is to say, not everyone can hear a musical tone and tell which one is playing. Is that C3? B4? We have no clue! We want to be able to analyze the sound coming from a piano, a phone, a singer, or a MicroPs speaker. We want our system to be able to track the note in near real time, reading out to the user the note they’re currently hearing or singing. We hope that by doing so, we can improve our own sense of pitch while helping future MicroPs students troubleshoot their digital audio creations in Lab 4.

Further, this project gave us practice with understanding and enabling key peripherals on the MCU – the DMA and ADC. Both of these are very common systems in embedded systems and digital design, enabling key functionalities within an MCU that are nearly irreplaceable. Additionally, Fourier Transforms are similarly essential to many audio or RF based projects. We wanted to put our systems engineering knowledge to use while learning more about how these theoretical algorithms get implemented into real hardware.