When I last looked at my musical instrument tuner, I was having difficulty with real-world waveforms from the instrument : all the harmonics meant that zero-crossing analysis wasn't accurate for capturing the fundamental frequency.
This post describes my approach to solving that problem in the analogue domain - so that I don't need to worry about fast A to D conversion (although that would be an interesting problem in itself).
The standard approach is to implement a low-pass filter, with the stop frequency tuned around the desired fundamental, to get rid of those troublesome harmonics. A passive filter would only achieve 6dB/octave roll-off, which is unlikely to be enough. And you can't sensibly cascade passive filters to improve that. Time to roll out the op-amps, and implement active filters, which are easily cascadable, and in the simplest form, are usually 2nd order so 12dB/octave. Cascading two of those together should give 24dB/octave, which should be plenty of attenuation.
Continue reading "Instrument Tuner - Programmable Filter"