ECE 5725 Final Project: RPi Autonomous Guitar Tuner

Cynthia Zelga (cnz5) & Sizhe Zhang (sz592)
December 13, 2019
Introduction Design & Testing Results Conclusions Future Work Budget References Code Appendix »

Meet the Team!

team photo

Sizhe Zhang - M.Eng, Electrical & Computer Engineering

Cynthia Zelga - Senior ('20), Electrical & Computer Engineering


We wanted to come up with a final project idea that would allow us to apply concepts we had learned throughout the semester, such as writing Python scripts that utilize the piTFT touchscreen and GPIO input/output pins, as well as require mechanical components and relate to a common interest of ours: music. We wanted our project to challenge us in terms of the independent software and hardware components, and moreso, when interfacing the two. Ultimately, we decided to utilize the Raspberry Pi (RPi) to create an autonomous guitar tuner. Tuning a guitar manually and by ear is not an easy task, so we thought it would be useful to create a device that would not only identify how far off the current frequency of each guitar string is from being in-tune, but also turn the tuning pegs on the guitar accordingly on behalf of the user.


To create an autonomous guitar tuner, we first had to make a plan for the audio processing portion of the project. We had to first figure out how to acquire the audio signal from a strum of a guitar string, feed it to the RPi, and use an algorithm to determine its frequency. Our hardware needed to include a microphone for recording the audio and we were aware of existing Python libraries for audio processing that we could use to analyze the input signal. Additionally, we knew we could use an algorithm such as the Fast Fourier Transform (FFT), which identifies the various frequency components of an audio signal and their respective amplitudes.

For the mechanical portion of this project, we needed to brainstorm what type of mechanism we could use to turn a tuning peg, as well as interface with the RPi to know how much to turn the peg and in which direction. We decided to design a custom 3D-printed part that would fit over a tuning peg and be rotated by a servo motor programmed by the RPi. We knew this would be the most challenging component of our project, as we were going to attempt to emulate the control and motion of a human hand turning a peg with a mechanical system.

Lastly, we planned to create a user-friendly and aesthetically-pleasing interface which would feature two possible screen displays. One screen would allow the user to select which of the 6 guitar strings - E4, B3, G3, D3, A2, E2 - they would like to tune. The second screen would be the “tuning” screen, which would display after the user had selected a string, and would display the target frequency of the string and the current frequency that the device was detecting. This screen should also display this information in a way that easily shows, through visual means, whether the current frequency is too low or too high.

Demo Video

Watch a demonstration of our finished project below!

Work Distribution