System design for semi-autonomous guitar tuner


I led this project for the course 'System Design II' in Department of Mechanical Engineering, Pohang University of Science and Technology (POSTECH)


Motivation

June is an amatuer guitarist. Whenever he collaborates with other performers (e.g., drummers, pianists, and vocalists), he felt a bit of frustration because all the people in the room had to wait for him to tune the guitar. Thus, my team decided to develop a device that can automatically tune the guitar, which we named "TuneTunee". When the user plucks the guitar string, TuneTunee recognizes the frequency of the string and rotates the peg for tuning.

Methodology

A. Hardware

A circuit diagram of TuneTunee

We designed the circuit for TuneTunee as shown in the figure above. The most important component of our system is undoubtably the microphone. We tested various microphones and chose one that has shown the best performance for our application. Additionally, we used piezo vibration sensor and activated the device only when the piezo sensor detected vibration. In this way, we could prevent our device from working because of external noises. For a main processor, we used Arduino Nano so that we can make the tuner in a compact size. We also used LEDs to indicate whether the string has been tuned or not. Finally, we designed the box using Solidworks and 3D printed the model. The final output of our hardware is presented in the figure below.

The hardware of TuneTunee.

B. Software

For detecting the frequency of guitar strings, we used a Fast Fourier Transform (FFT) algorithm to convert the sound signal from time domain to frequency domain. We used Arduino Library to apply the algorithm, where they had three main functions: Windowing(), Compute(), and ComplextoMagnitude(). In order to control the servo motor that rotates the peg to tune the guitar, we used a closed-loop control algorithm that computes the difference between the desired and current frequencies to command the motor accordingly.

Conclusion

TuneTunee tunes the guitar with the accuracy of ± 1Hz for E, A, G and ± 2.5Hz for D, A, E string. The time it takes to tune a pitch is 11.5 seconds in average. Throughout the project, our team members learned various signal processing techonologies like FFT, YIN, and auto-correlation. In addition, we explored many electrical components including OP Amp, ADC, and microphones, comparing the specification of each component from multiple companies. Also, we gained the experience of designing CAD models and using 3D printers.

Demo Videos

  • Korean Version Demo