Tuesday, March 1, 2011

Guitar tuning circuit using 555 timer.

Guitar tuner
How often have you noticed the guitarists in live concerts tuning their guitar before the show. Though this tuning is inevitable for best music output, at times it can be very annoying to the audience if it takes long time to tune the guitar. Moreover, since guitarists depend on the sound generated by guitar as feedback while tuning it, the process could be difficult in a noisy environment. For an in-experienced guitarist tuning of guitar could be a nightmare. A 555 timer based circuit is built to guide this tuning. It gives precise indication of whether the guitar strings are producing the expected frequency.

Block diagram for tuning circuit


You will able to find the final circuit at the end of this article.

Microphone: This is an analog microphone with preamp. This is primary interface to capture the Guitar string frequency. Since this microphone has internal preamp, we can set the initial gain in the microphone. Waveform from the analog mic is shown below. The Mic o/p has a DC bias of 2.5V.
 
Low pass filter (LPF): This is a first order low pass filter implemented using a simple RC. The cutoff frequency is kept within 1 Khz. As the fundamental tuning frequency doesn't exceed 329.63 Hz, we shall eliminate all the frequencies above 1 Khz using 1st order filter.

High Gain Amp: This is very high gain amplifier to drive the filtered O/P of Microphone to saturation. O/P of the Amplifier is very close to square wave but has finite slew rate. CMOS inverter is used to implement a high gain amplifier.
 
Edge Detector: this block is used to detect a positive edge from o/p of high gain amp. This block will generate a finite period low going pulse on every rising edge. This shall be used as trigger for re-triggerable monoshot vibrator. O/P from this circuit is show below.


Re-triggerable monoshot circuit: This circuit shall be implemented using a 555 timer. The circuit generates a 5V o/p for every trigger pulse. The circuit shall re-trigger i.e restart the timer period every time when trigger pin is pulled low. The monoshot period is selected based on switch settings.

Working principle of guitar tuning:

Guitar has 6 string notated by alphabets e’, B, G, D, A, E arranged in order of increasing frequency. Below is the table showing the fundamental frequencies of different strings.

String
Note
Frequency
Scientific pitch notation
1
e'
329.63 Hz
E4
2
b
246.94 Hz
B3
3
g
196.00 Hz
G3
4
d
146.83 Hz
D3
5
A
110.00 Hz
A2
6
E
 82.41 Hz
E2

Strings on guitar produces fundamental frequencies ranging from 82.4 Hz to 329.6 Hz. While tuning the guitar, each string is checked if it is generating appropriate fundamental frequency. If not, then the string is tightened or loosened, till it generates the required frequency. The strings are checked one at a time. The ‘chord switch’ is set to expected frequency of the string being tuned. Sound from guitar is captured by a microphone with built in amplifier which is passed through a low pass filter. The filter removes all the frequencies above 1 Khz as the maximum fundamental frequency generated by guitar string is 329.6 Hz. This fundamental frequency is passed through high gain amplifier to generate a square wave from the sine wave. This square wave is further passed through an edge detector which allows only the rising edges through it. These raising edges trigger a 555 timer based re-triggerable monostable multivibrator (monoshot). Based on the frequency from guitar, the duty cycle of monoshot varies. Output of monoshot is connected to an analog meter which acts as an averaging circuit as well. The analog meter indicates the average voltage of monoshot which in turn indicates how frequent the rising pulses have been generated. Please refer below for the circuit.