We constructed an analog-to-digital guitar that captures an input signal and uses the waveform zero-crossings to determine whether the note is at the correct frequency.
The hope was that this frequency tuner could be used in a home setting where each of us can tune our own guitars.� While a great number of students are musically gifted individuals, very few have �perfect pitch�, the ability to accurately pinpoint a note if it is slightly off.� Since neither of us have this amazing ability, we figured that we could make a device to help us in that department.�
Originally, we tapped the 476 Project Ideas web site as a source of inspiration.� We noticed that a big fraction of the class were creating projects that either used the TV, or a video game controller, and we decided to make something that would be different from others.� Both of us were guitar players, who have to either tune our guitars by ear, or from some web site that puts out sounds at predetermined frequencies.� Both ways are very annoying.� We figured that we could make a guitar tuner in class and also be able to use it for our own independent purposes.�
In order for a guitar to be in-tune, the fundamental frequency of each string must be exactly matching its corresponding note. Below is a table of the strings on a guitar and their corresponding fundamental frequencies
There were several main stages needed for the guitar tuner: amplification, analog-to-digital conversion, low-pass filtering, and comparison.� (FIGURE)When a waveform leaves the guitar, it has a mean voltage of zero volts and a peak-peak of 400-600mV.� Amplification boosts this signal so that it has a mean voltage of 2.5V and a peak-peak of 5V.� This waveform can then be fed into the ADC, which converts the analog waveform into a stream of numbers, varying from 0 to 255.� Assuming that the zero-crossing point is around 128 in that number span, the time elapsed for one full period of the waveform can be measured.� This period is then compared against the known period in so that a set of LED�s can light up, indicating whether or not the waveform input matches what is expected for that certain string.�
For the signal processing, we used the Atmel MEGA32 chip that has been used in lab all semester. �Since lectures taught the functionality of this chip, we did not have to learn very many new ideas. �Both embedded C and Assembly were taught in lecture, but we figured that we could use C because of its simplicity. �We were not in a pressing need for extra cycles. �
As done in lecture and in one of the labs this semester, the best way to implement the ADC with the guitar waveform was to create an analog amplifier and DC Bias. �Since the ADC has a VRef of 5V, it made sense that the guitar waveform should also have a max of 5V. �This meant that the waveform�s mean would sit at around 2.5V so that it would have enough room to vibrate in the positive and negative direction.
For more detail: Digital Guitar Tuner
Digital Guitar Tuner