Reciprocal Counter Measures High and Low Frequencies
Reciprocal frequency counter measures inputs from .2 Hz to 2 MHz.
As Wilko Lunenburg explains in his High Resolution Frequency Counter writeup, “The old school way to measure the frequency of a signal is to use a logic AND gate, feed the signal to be measured into one port and a signal with an exactly 1 second high time to the other port and count the output.” If you’re measuring a few kHz or GHz, this works well, but if you want to measure something much slower, like the mains frequency—generally 50 Hz or 60 Hz, depending on where you reside—you won’t get very good resolution. In other words, you might see 49 to 51 displayed, but a 50.002 Hz reading is out of the question unless you’d like to increase your measurement time significantly.
For lower frequencies, one can measure the period of the signal, but this works poorly when you’re measuring in the kHz or GHz range. Lunenburg's solution, that works at both frequency ranges is to use a D flip-flop that measures the pulses of the frequency to be measured, and the pulses of the reference itself. This gives a much greater measured precision, though does tend to break down when approaching your frequency reference.
His counter uses an ATtiny2313 chip, along with a MAX7291 8-digit 7-segment display for feedback. A 10 MHz crystal oscillator keeps the chip running at the proper speed. Impressively, the device has been used to measure frequencies from .2 Hz to 2 MHz with excellent results, though higher than that it starts to loose interrupts, affecting precision.
Check out the project write-up for more specific details on the build, and you can see a short demo of it in action below.