Frequency Measurement using Arduino


Frequency is the number of complete cycles per second in alternating current direction. The standard unit of frequency is the hertz, abbreviated Hz.

Frequency Measurement

                Frequency Measurement is carried out by measuring the number of cycles in one second, this method requires time of one second. Other method is to measure time period of one cycle F = 1 / T.

In this example time from first rise to the second rise is measured using interrupt on Pin 2 (INT0). It is set to detect rising pulse and at every 100mSec measured frequency is displayed on serial monitor.

Circuit Diagram of Frequency measurement

It does not require any external components; you may connect pull down resistor of 100k on Pin 2 to avoid noise measurement when there is no input. Measurement is carried out on interrupt 0, Use only Pin 2 of Arduino.

Arduino Frequency Measurement Circuit
Arduino Frequency Measurement Circuit

Arduino Frequency Measurement Code

Frequency Measurement Result

Open Serial monitor and give some frequency input to Pin2 of Arduino and Observer the result.

For testing this circuit just take Pin2 wire near AC Supply cable, it will show line frequency.

Frequency Measurement Result
Frequency Measurement Result

Leave a Reply