Electronic – Very high precision zero crossing detection

comparatorprecisionzero crossing

I have a setup that is equivalent to a guitar string with pickup, with signals of similar frequency range. I have a simple zero crossing detector with a comparator and then just count the interval between low-to-high transitions using a microcontroller. I got to wondering how accurately I could measure the frequency. If I wanted to measure it to several decimal places with certainty, what changes should I make? Is there a good resource on high precision zero crossing?

The output voltage from the coil is low (~3mV pp), so should I choose a comparator with lower input voltage offset? Or would it make more sense to add a preamp stage? How about propagation delay – if a comparator has delay of x for one transition, will it be x for every transition?

Best Answer

You'll likely want to measure the total of many zero crossings (and divide by 'many' before taking the reciprocal).. or average many measurements.. otherwise noise in the signal will unduly affect your measurement, and you don't need the answer that quickly.

You can measure easily to a couple hundred nanoseconds with a typical 8-bit micro (so 200ns in a 5kHz note would give you 3 digits) but that doesn't translate necessarily into results anywhere near that stable or accurate.