Arduino Guitar Tuner

A while ago I wrote an article on Reliable Frequency Detection Using DSP Techniques.

I mentioned at the time that this is an ideal basis for designing your own Arduino based guitar tuner. In real life, musical intruments can have strong harmonic contents, and you want to detect the fundamental frequency. Time based techniques that measure the time between periods don’t do that very well. The advantage of using an autocorrelation based frequency detection method is robustenss against noise and the overall harmonic content  of the signal.

So, having got a few questions about how you’d make a guitar tuner. I’ve published a tutorial on that here:


4 Replies to “Arduino Guitar Tuner”

  1. Hi!

    I Just came across this highly interresting tutorial, but i have a question about the schematic.

    Is it possible to replace the 470nf capacitor with another value (For example 47nf, or 100nf ?) What would be the difference?

    1. You can replace the 470nF capacitor with 47nF. That will change the high-pass filter corner frequency from 1Hz to 10Hz. It should be OK.

  2. I’m trying to get this to work – but get a lot of higher frequency numbers rather than detection of a very low frequency which I’m testing for on A0. Inbetween these numbers the serial monitor states “inf”
    My analog circuit heavily filters everything above 40Hz, but I get large dc offsets which I wonder might be upsetting the calculations?

    1. The rawData[k]-128 removes the DC from the autocorrelation calculation. I use a fixed number because the DC value is well known from the op-amp circuit. If you are unsure of the DC value then it would be best to subtract the mean value of the data collected.

Leave a Reply

Your email address will not be published. Required fields are marked *