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.




12 comments:

  1. how do u determine the value of resistors for each frequency of the strings?? is this circuit working?

    ReplyDelete
  2. Linda, I have not tested this circuit. In case you want to implement digital guitar metronome, it will be lot easier to implement using Mic+signal conditioner+microcontroller. I was trying to implement using a 555 timer, part of contest. Let me know if you need more information.

    ReplyDelete
  3. what contest? i actually looking for such as circuit that can determine the tuning of guitar by strumming. you get what i mean? hehe btw.. frankly speaking i use your circuit for my project. is that ok for u?

    ReplyDelete
  4. There was contest(http://www.555contest.com/) to design new circuits using only 555 timer IC. The link doesn't work anymore. Yes, the idea of above circuit was to indicate when the strummed frequency matches the tuning note(Metronome). Feel free to use the circuit, you can improve the circuit by using microcontroller instead of 555 timer. Let me know if you need help for the same.

    ReplyDelete
  5. Hi, I need to assemble a guitar tuner for my project. I've been looking at your figure for the tuner and would like to ask 4 questions:
    1. The output from the 555 chip that goes to "analog meter", how can I implement it?
    2. How can I know that the input signal (for example 330 Hz) has the required frequency? is it has anything to do with 50% duty-cycle?
    3. what do the 3 inverters use for? how do they amplify the signal?
    4. How can I set a certain deviation so that when the input signal is for example 331 Hz and the required signal is 330 Hz it would still seem like the guitar is tuned?
    Thank you!

    ReplyDelete
    Replies
    1. Hi amlat.. this is a simulated circuit and circuit was designed for a contest.. I strongly recommend to use a low cost microcontroller instead of 555 timer ic.. if you need any help I can guide you with implementation.

      Delete
    2. to answer your questions
      1. The output from the 555 chip that goes to "analog meter", how can I implement it?
      you can use a simple voltmeter. If you use microcontroller you can use a LCD or LED to display the information.
      2. How can I know that the input signal (for example 330 Hz) has the required frequency? is it has anything to do with 50% duty-cycle?
      At tuning frequency you you will have constant high at o/p.
      3. what do the 3 inverters use for? how do they amplify the signal?
      if you bias a inverter at midpoint input/output characteristics curve, you get a amplifier. this is achieved by connecting input to output using a 1Mohms resistor. 1st inverter is amplifier. 2nd and 3rd inverter combination act as a edge detector.
      4. How can I set a certain deviation so that when the input signal is for example 331 Hz and the required signal is 330 Hz it would still seem like the guitar is tuned?
      when the frequency is out of tune, you will see an average output voltage less than 5V. Output voltage will tell how far you are from tuning frequency.

      Delete
    3. Thanks for your help. we are still working on the project and we have another unsolved question: how to convert pwm (let say 50% duty cycle) to dc voltage?

      Delete
    4. Use a low pass filter. Simple RC should work if the driver strength is good else use opamp to implement a active filter. Low pass filter only pass the DC+frequency till the cutoff.

      Delete
    5. Hi, I just found this interesting idea, thx for sharing. However, as far as I understand, the output of the 555 will be 5VDC continuous in case of a frequency match and below that (pulsed) for a mismatch, but there's no way to determine whether the input frequency is below or above the reference frequency, right?

      Delete
  6. hey my friend i got a little question:
    if will put 1/2 of the value of your resistors in the 555 switches after averaging the output should i see 1/2 vcc if have the frequency as expected?

    thx at advance

    ReplyDelete
    Replies
    1. Sorry for my late reply. I didnt quite follow your question. At a time only one of the resistor path is active as rotary switch is used..

      Delete