The schematic is fairly simple and straightforward and uses a PIC16F628A microcontroller for measuring frequency and a high speed comparator for signal amplification and conditioning. Timer0 is used to count the input signal at pinRA4. In order to achieve the maximum possible resolution, the input signal is probed for 0.125 seconds and the prescaler value is computed accordingly. The input of the schematic is feed through a high speed comparator.
The two inputs of the comparator are set at about 1/2 of power supply voltage with 15-25mV difference between them so any AC signal with higher voltage will start switching the comparator. The input is protected with 1k resistor and two diodes limiting the voltage to ±0.7 V. The input impedance for low frequenciesis equal to R1 – 47k. For VHF range maybe it is good idea to replace it with 50Ohm value. The schematic have fairly low power consumption – with no input signal the supply current is 7-8mA and goes up to 20mA with 200+MHz input signal.
Frequency is very important parameter of any signal. No matter if you are generating or synthesizing signals, you most likely need to measure its frequency. When signal frequency is bellow 40kHz and amplitude is near 5V then you can build frequency counter on Arduino with standard LCD screen. If measure signal is 5V (or 3.3V) level then you can feed it directly in to Arduino input. In other cases you need to use limiting circuit like amplifier or voltage divider. But this small project assumes that voltage is fed directly to microcontroller input.
In this example signal comes to digital pin 12 where function pulseIn() counts number of pulses during specified time. Program itself is only few lines of code, and hardware is straight forward so putting it to work condition is only a matter of minutes.
This frequency counter is practically classic example of MCU based device. It captures frequency pulses directly to MCY pin without any special prescalling circuitry or even protection. So it is capable to accept 3.3V CMOS level signals. But it is designed as module which can be integrated in to end device if needed. The counting workload is done by MSP430G2202 microcontroller which is capable to count up to 10MHz signals.
The display is connected to microcontroller using transistor based column selector decoded by 74HC238 and rows driven by MCU pins. One interesting feature included in this project is that counter can be calibrated to achieve +-10Hz error at 10MHz.
What does it take to measure frequency up to 100MHz. The answer is FPGA. Mike wanted to make pretty accurate frequency counter so grabbed Papilio FPGA board, attached TM1638 display board from DE and referenced frequency with GPS module. It works without GPS module but looses accuracy since these modules may give 1PPS with accuracy down to 20ns.