• Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Need circuit help? Post them in the comments! I've answered over 50,000!

Blog | Categories | About | Contact | Calculators-online
You are here: Home / Arduino Projects / Arduino Frequency Meter Using 16×2 Display

Arduino Frequency Meter Using 16×2 Display

Last Updated on December 5, 2024 by Swagatam 4 Comments

In this article I will show how to construct a digital frequency meter using Arduino whose readings will be showcased on a 16x2 LCD display and will have a measuring range from 35 Hz to 1MHz.

Introduction

Being electronics enthusiast, we all would have come across a point where we need to measure frequency in our projects.

At that point we would have realized that an oscilloscope is such a useful tool for measuring frequency. But, we all know that an oscilloscope is an expensive tool not all hobbyists can afford one and oscilloscope might be an overkill tool for beginners.

To overcome the issue of measuring frequency, hobbyist don’t need an expensive oscilloscope, we just need a frequency meter which can measure frequency with reasonable accuracy.

In this article we are going to make a frequency meter, which is simple to construct and beginner friendly, even noob in Arduino can accomplish with ease.

Before going into constructional details, let’s explore what is frequency and how it can be measured.

What is Frequency? (For noobs)

We are familiar with the term frequency, but what really it means?

Well, frequency is defined as number of oscillations or cycles per second. What does this definition mean?

It means the number of times the amplitude of “something” goes up and down in ONE second. For example frequency of AC power at our residence: The amplitude of “voltage” (‘something’ is replaced by ‘voltage’) goes up (+) and down (-) in one second, which is 50 times in most countries.

One cycle or one oscillation comprises of up and down. So one cycle/oscillation is the amplitude goes from zero to positive peak and come back to zero and goes negative peak and return to zero.

“Time period” is also a term used while dealing with frequency. The time period is the time taken to complete “one cycle”. It is also the inverse value of frequency. For example 50 Hz has 20 ms time period.

1/50 = 0.02 second or 20 millisecond  

By now you would have some idea about frequency and its related terms.

How frequency is measured?

We know that one cycle is combination of high and low signal. To measure the duration of high and low signals, we use “pulseIn” in arduino. pulseIn(pin, HIGH) measure duration of high signals and pulseIn(pin, LOW) measure duration of low signals. The pulse duration of both is added which give time period of one cycle.

The determined time period is then calculated for one second. This is done by following formula:

  Freq =  1000000/time period in microseconds

The time period from arduino is obtained in microseconds. The arduino don’t sample the input frequency for entire second, but it predict the frequency accurately by analysing just one cycle’s time period.

Now you know how the arduino measures and calculates the frequency.

The circuit: 

The circuit consists of arduino which is the brain of the project, 16x2 LCD display, IC 7404 inverter and one potentiometer for adjusting contrast of LCD display.

The proposed setup can measure ranging from 35Hz to 1 MHz.

Arduino display connection:

 

arduino2Bdisplay2Bconnection 1

The above diagram is self-explanatory, the wiring connection between arduino and display is standard and we can find similar connections on other arduino and LCD based projects.

Arduino Frequency Meter Using 16x2 Display

The above diagram consists of inverter IC 7404. The role of IC 7404 is to eliminate noise from the input, so that the noise won’t propagate to arduino which might give false readings and IC 7404 can tolerate short spike voltage which will not pass to arduino pins. IC 7404 only outputs rectangular waves where arduino can measure easily compare to analogue waves.

NOTE: The maximum peak to peak input should not exceed 5V.

Program:

//-----Program Developed by R.Girish-----//
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int X;
int Y;
float Time;
float frequency;
const int input = A0;
const int test = 9;
void setup()
{
pinMode(input,INPUT);
pinMode(test, OUTPUT);
lcd.begin(16, 2);
analogWrite(test,127);
}
void loop()
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Frequency Meter");
X=pulseIn(input,HIGH);
Y=pulseIn(input,LOW);
Time = X+Y;
frequency=1000000/Time;
if(frequency<=0)
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Frequency Meter");
lcd.setCursor(0,1);
lcd.print("0.00 Hz");
}
else
{
lcd.setCursor(0,1);
lcd.print(frequency);
lcd.print(" Hz");
}
delay(1000);
}
//-----Program Developed by R.Girish-----//

 

Testing the frequency meter:

Once you successfully constructed the project, it is necessary to check whether everything is working fine. We have to use a known frequency to confirm the readings. To accomplish this we are using arduino’s inbuilt PWM functionality which has frequency of 490Hz.

 

freq2Bmeter2Binput2Btest 1

In the program pin #9 is enabled to give 490Hz at 50% duty cycle, the user can grab the input wire of the frequency meter and insert in pin #9 of arduino as shown in figure, we can see 490 Hz on the LCD display (with some tolerance), if the mentioned procedure was successful, you frequency meter is ready to serve you experiments.

Author’s prototype:

author2Bproto 2
Arduino Frequency Meter Prototype Image

The user may also test this Arduino frequency meter circuit prototype by using external frequency generator which is shown in above image.

You'll also like:

  • 1.  GSM Fire SMS Alert Project
  • 2.  Real MPPT Solar Charger Circuit Using Arduino, LCD, and Manual/Auto Switch
  • 3.  GSM Car Ignition and Central Lock Circuit Using Arduino
  • 4.  RTD Temperature Meter Circuit
  • 5.  How to Make a Digital Voltmeter, Ammeter Module Circuits
  • 6.  How to Drive High Watt LEDs with Arduino

About Swagatam

I am an electronics engineer with over 15 years of hands-on experience. I am passionate about inventing, designing electronic circuits and PCBs, and helping hobbyists bring their projects to life. That is why I founded homemade-circuits.com, a website where I share innovative circuit ideas and tutorials. Have a circuit related question? Leave a comment.... I guarantee a reply!

Previous Post: « Arduino Pure Sine Wave Inverter Circuit with Full Program Code
Next Post: Making a Single Channel Oscilloscope using Arduino »

Reader Interactions

Comments

  1. rajesh says

    September 17, 2017 at 9:12 am

    can we cheq motherboard 32mhz crystal frequency with this curcuit

    Reply
    • Swagatam says

      September 17, 2017 at 9:18 am

      Mr. GR will answer your question soon….

      Reply
    • GR says

      September 17, 2017 at 9:29 am

      Hi Rajesh,

      If you are connecting the crystal terminals directly to the input of frequency counter, then NO.
      Also this frequency counter can only read under 1 MHz, that’s my assumption.

      Regards

      Reply
      • GR says

        September 17, 2017 at 9:32 am

        * not just assumption but, the maximum limit of the circuit.

        Reply

Need Help? Please Leave a Comment! We value your input—Kindly keep it relevant to the above topic! Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Subscribe to New Circuit Ideas

Categories

  • Arduino Projects (87)
  • Audio and Amplifier Projects (132)
  • Automation Projects (17)
  • Automobile Electronics (101)
  • Battery Charger Circuits (82)
  • Datasheets and Components (102)
  • Electronics Theory (143)
  • Free Energy (37)
  • Games and Sports Projects (11)
  • Grid and 3-Phase (19)
  • Health related Projects (25)
  • Home Electrical Circuits (12)
  • Indicator Circuits (14)
  • Inverter Circuits (87)
  • Lamps and Lights (142)
  • Meters and Testers (69)
  • Mini Projects (46)
  • Motor Controller (64)
  • Oscillator Circuits (27)
  • Pets and Pests (15)
  • Power Supply Circuits (108)
  • Remote Control Circuits (50)
  • Security and Alarm (64)
  • Sensors and Detectors (100)
  • Solar Controller Circuits (59)
  • Temperature Controllers (42)
  • Timer and Delay Relay (49)
  • Transmitter Circuits (29)
  • Voltage Control and Protection (37)
  • Water Controller (36)

Calculators

  • Battery Back up Time Calculator
  • Capacitance Reactance Calculator
  • IC 555 Astable Calculator
  • IC 555 Monostable Calculator
  • Inductance Calculator
  • LC Resonance Calculator
  • LM317, LM338, LM396 Calculator
  • Ohm’s Law Calculator
  • Phase Angle Phase Shift Calculator
  • Power Factor (PF) Calculator
  • Reactance Calculator
  • Transistor Astable Calculator
  • Transistor base Resistor Calculator
  • Voltage Divider Calculator
  • Wire Current Calculator
  • Zener Diode Calculator
  • Filter Capacitor Calculator
  • Buck Converter Calculator
  • Boost Converter Calculator
  • Solar Panel, Inverter, Battery Calculator
  • Wire Current Calculator
  • SMPS Transformer Calculator
  • IC SG3525, SG3524 Calculator
  • Inverter LC Filter Calculator

People Also Search

555 Circuits | 741 Circuits | LM324 Circuits | LM338 Circuits | 4017 Circuits | Ultrasonic Projects | SMPS Projects | Christmas Projects | MOSFETs | Radio Circuits | Laser Circuits | PIR Projects |

Recent Comments

  • Swagatam on Simple Delay Timer Circuits Explained
  • Swagatam on The Role of Inductor Coil in SMPS
  • Swagatam on 7 Modified Sine Wave Inverter Circuits Explored – 100W to 3kVA
  • Swagatam on 7 Modified Sine Wave Inverter Circuits Explored – 100W to 3kVA
  • Victor on 7 Modified Sine Wave Inverter Circuits Explored – 100W to 3kVA

Company

  • Privacy Policy
  • Cookie Policy
  • About Me
  • Contact
  • Disclaimer
  • Copyright
  • Videos
  • Sitemap

Social Profiles

  • Twitter
  • YouTube
  • Instagram
  • Pinterest
  • My Facebook-Page
  • Quora
  • Stack Exchange
  • Linkedin
  • © 2025 · Swagatam Innovations