Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Guitar tuner circuit

  1. Jun 28, 2009 #1
    I'm trying to improve on my engineer skill so I'm building a guitar tuner circuit. I'm trying to build this circuit

    http://www.vuitservices.com/elec/Figure_01.gif [Broken]

    This circuit is from http://electronicdesign.com/Articles/ArticleID/6264/6264.html [Broken].

    So far I have done this much. I used a breadboard and wired the following circuit.
    http://www.vuitservices.com/elec/schem.gif [Broken]

    The problem that I'm having is that the circuit doesn't respond well to the sound of the first string or "E" string on a guitar. I scoped the pin 6 (output) of the op amp while striking string 1 on my guitar and it looks really erratic. The peaks are small and erratic. I can't tell the frequency by looking at the scope. The frequency of the 1 string on a guitar is around 400hz (I don't remember exactly).

    On the other hand, the circuit responds well to the other 5 guitar strings. The amplitude is good and the signal is clear on the scope. I can see the peaks (fundamental frequency) and I could determine the frequency of the strings by measuring the period of the waveform.
    Last edited by a moderator: May 4, 2017
  2. jcsd
  3. Jun 28, 2009 #2


    User Avatar
    Science Advisor

    Looks like your C1 value is too high by a factor of 1000. It's .01 uF in the original schematic but it's 10 uF in your Eagle schematic.
  4. Jun 28, 2009 #3
    The major problem is that R3 and R4 are connected to ground. R3 should be connected to a capacitor which is connected to ground. R4 should be connected to 2.5 V. Only the positive halves of the waveform are getting through the opamp.
  5. Jun 28, 2009 #4
    I know about the differences between my circuit and the circuit above. Besides C1, I don't think changing R3 and R4 to match the original circuit will help my problem. In fact I tried that configuration and it had the same problem.

    for C1, I tried to use .01 uF but I got the same problem so I tried 10uF. It seems to help a little but not too much. The original circuit was designed for a bass guitar so I have to change something to make it work with a regular guitar.
  6. Jun 28, 2009 #5


    User Avatar
    Science Advisor

    It looks like you have the biassing wrong.

    The 1 Meg resistor should go to a point that is half the supply voltage. You could put two 1 K ressitors in series across the power supply and bypass the lower one to ground. Then bring the 1 M and the bottom of R3 to this centre point.

    The output with no signal should be about half the supply voltage.

    The capacitor C1 being bigger will only give you a better bass response, but it should be a tantalum type to get low leakage in such a high impedance circuit.

    You can get more gain by making R3 smaller. Gain = R6 / R3 approx.
    Last edited: Jun 28, 2009
  7. Jun 29, 2009 #6
    Here is an article on your circuit:
    http://electronicdesign.com/Articles/ArticleID/6264/6264.html [Broken]
    Last edited by a moderator: May 4, 2017
  8. Jun 29, 2009 #7


    User Avatar
    Science Advisor
    Gold Member

    I agree with the biasing problem. You should also look at your microphone to see if it's frequency responce doesn't drop off too much at 400 Hz. Probably won't make any difference here though. Just a thought.
  9. Jun 30, 2009 #8
    Thanks. Adding the 2.5V and the .01uF between the 100k made it work. The output from the mic now has a 2.5V DC offset. I was wrong about not needing the 2.5V and the .01 uF. I guess that's what learning is all about.

    Is there a special name for the non invertering amplifier circuit in the schematic since it has a capacitor?
  10. Jul 2, 2009 #9


    User Avatar
    Science Advisor

    Is there a special name for the non inverting amplifier circuit in the schematic since it has a capacitor?

    You would just call this stage an audio amplifier or maybe a preamp.
    It uses an Op amp but its real function is to raise the level of the audio from the guitar.
  11. Jul 5, 2009 #10
    The standard frequency for the 'A' note is 440Hz. C would be 440*(2)1.5
  12. Jul 5, 2009 #11


    User Avatar
    Science Advisor

    No that's not correct. Since C is 3 semitones above A it would be 3/12 of an octave higher and therefore have a frequency of [tex]440 * 2^{1.25}[/tex]

    That would be C one octave above middle-C btw. All but one of the open strings on a standard six string guitar are actually below middle-C.

    The fundemental frequencies of a standard 6 string guitar, from lowest to highest, are :

    [E, A, D, G, B, E] = [82.4, 110.0, 146.8, 196.0, 246.9, 329.6] Hz

    PS. The matlab code to generate the above was : 110 * 2.^([-5, 0, 5, 10, 14, 19]/12)
  13. Jul 6, 2009 #12
    Sorry, yes, you're right. It slipped my mind that it was the 12th root...
  14. Jul 6, 2009 #13


    User Avatar
    Science Advisor

    BTW, this stuff was fresh in my mind because I recently wrote a guitar tuner program. :)

    It samples the sound and does an FFT reporting the loudest note found and whether it's sharp or flat, measured as a percent of a semitone. The program works great and is really accurate (as compared with several commercial tuners) but the user interface leaves quite a bit to be desired. Maybe I'll fix it up one day.
  15. Oct 15, 2009 #14
    I'm trying to find the transfer function of the comparator but I don't think I did it right. Could somebody please check my work? Thanks. I'm tyring to get a better understanding of the circuit.

    please go here.
    http://www.vuitservices.com/cl/f1.htm [Broken]

    When find the transfer function of an opamp circuit, what are some tricks some simplify the equations so that the final transfer equation is clean and easy to understand?
    Last edited by a moderator: May 4, 2017
  16. Nov 10, 2009 #15
    Why is it that the amplitude of string E (82hz) is bigger than string E (330hz)? I pluck the two strings with the same force and they seem to have the same loudness but yet my oscilloscope shows that the amplitude are significantly different.

    Keep in mind that I probed the output of op amp A in the circuit above.
  17. Nov 11, 2009 #16
    If you pluck the two strings with the same force (are the two strings the same diameter?) the displacement of the 82 Hz will be larger (if their length is the same). The velocity of the displacement on a guitar string is equal to sqrt(tension/mass per unit length), so lower frequencies mean lower tension.
    Bob S
  18. Nov 12, 2009 #17
    Thanks for the help Bob. I'm lacking the area of sound physics :)

    http://www.coastalguitarworks.com/images/Guitar_strings.jpg [Broken]

    The two strings that I'm talking about are the far left and far right string in the picture above.

    The far right is the thinest and produces the highest frequency. The far left string is the opposite.

    When you say velocity of displacement, you mean the speed of the sound traveling thru air? If so, then the low frequency string should produces a higher amplitude because the sound wave hits the mic harder.
    Last edited by a moderator: May 4, 2017
  19. Nov 12, 2009 #18


    User Avatar
    Science Advisor

    You could easily check the output of the microphone to see if the sound levels are very different there as well.

    Just put the Oscilloscope probe across the microphone and increase the oscilloscope sensitivity until you get a good deflection.
  20. Nov 12, 2009 #19
    I did that and the output is different. The low frequency string has a higher amplitude than the high frequency string. I'm wondering why that is.
  21. Nov 12, 2009 #20
    The fundamental frequency of the string is

    f = π/L sqrt(T/ρ) where L = length of string, T = tension. and ρ is mass per unit length.

    Bob S
    Last edited by a moderator: May 4, 2017
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook