|
In this project we are building a basic and low cost frequency counter circuit . It can measure from 16Hz to 100Hz signals with a maximum amplitude of 15V. The sensitivity is high, the resolution is 0.01 Hz. The input signal can be a sine, a square or a triangle waveform.
The counter can be used in many applications. For instance, to observe an oscillator’s accuracy, to measure the mains frequency or to find out the rpm of a motor that is connected to an encoder.
The CCP (Capture/Compare/PWM) module of the PIC microcontroller counts
the input signal. Only the capture function is used. To learn more
about the CCP module of the PIC please visit www.microchip.com.
Before measuring the frequency of the input signal, the signal must be
converted to the square waveform. So an optical isolator circuitry with
4N25 optocoupler is used for this purpose. So the input signal
is safely isolated from the microcontroller circuit and converted to
square wave. The signal amplitude must not exceed 15V. If this happens,
1k resistor may burn. If you want to measure the mains frequency, you
should use a 220V/9V transformer first.
|