Here’s a circuit you might find useful. I created this with some help from various sources online. Unfortunately I can’t find the original schematic or I’d post the link. It accepts an audio input at one end (amplitudes like 100 or 200mV) and spits out a square wave from 0 to 5V of the frequency.
Keep in mind that audio signals aren’t just super simple to get a square wave out of. If you’re playing a guitar and pluck a string you’re going to get other harmonics that need to be filtered out. If you leave them in you’re likely to get something like twice the actual frequency if you just use a single value for a comparator. You need to watch the peaks, but somehow need to know where the peaks are going to be at.
So here’s the circuit:
Stage one is simply a gain/offset stage. It gets you higher amplitude and centers the signal up at 2.5 volts. You can probably get away without this offset (as long as you get rid of it in both places), but I decided to keep it since I don’t like negative voltages.
The next stage is a low pass Butterworth Filter. This filter is designed to kill (or diminish) the extra harmonics in the signal. I didn’t test this fully, but it appears to have a cutoff frequency of around 400Hz, which may be a little low.
The next stage creates an envelope of the signal. It’s not complicated and just charges up C15 so you get a voltage that follows the peaks of the filter output. That value is then compared with the filtered signal (the last stage is just a comparator) and you get a 0 to 5V output wave. You can then drop that output into a microcontroller of your choosing and write yourself a little guitar tuner.
Here’s the simulation of that circuit, as proof that it works. I also tested this circuit in the lab and found that it basically worked. I didn’t spend too much time on it, but the output was strangely hovering from around 1.5 V to 5V.

Enjoy!

[...] Detector Circuit For anyone who might be interested in the sort of thing: Frequency Detector « Broken Remote I wish I had the original schematic that I used to create this. [...]
Pingback by Frequency Detector Circuit - Electronic Circuits Projects Diagrams Free — November 10, 2008 @ 2:28 pm