Arduino Frequency Counter: Technology Workshop Craft Home Food Play Outside Costumes

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5
At a glance
Powered by AI
The instructable describes how to build a simple and low-cost frequency counter using an Arduino board.

It uses a 74LS14 Schmitt trigger IC to convert input signals into square waves. The Arduino then measures the high and low times of the square waves to calculate the frequency.

The components required are an Arduino Uno board, a 16x2 LCD display, 74LS14 IC, and some jumper wires.

technology workshop craft home food play outside costumes

Arduino Frequency Counter


by Rajkumar2506 on November 17, 2016

Table of Contents

Arduino Frequency Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Intro: Arduino Frequency Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 1: Components Required . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 2: Operation of IC 74LS14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 3: Schematic diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Step 4: Program Code(if you use 3 pin interface Board for LCD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Step 5: Program code (if you use LCD without 3Pin interface Board) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 6: Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

http://www.instructables.com/id/Arduino-Frequency-Counter/
Author:Rajkumar2506
iam a person always having helpfull mind.I have interest to Know,Learn,and do something that would help others.

Intro: Arduino Frequency Counter


To find out the frequency of any signal we need to use CRO. We can also use frequency meter.But both of them are costly.Using Arduino Frequency Counter we can
easily measure the frequency of various signals.This Circuit can be easily made with very less cost when compare to CRO and Frequency Meter.

Step 1: Components Required


Arduino Uno.
3 Pin LCD Interface Board.
16 x 2 LCD
IC 74LS14

I have used 3 Pin LCD interface Board to Connect LCD easily with 3Pins. If you dont know to use 3pin LCD interface board. Click on the bellow link.

3 Pin LCD interface

Step 2: Operation of IC 74LS14


IC74LS14 is a schmitt trigger.In order to convert any signal into square wave schmitt trigger is used.

Advantages of Using this IC 74LS14

It is a 5volt IC
It's Output current is below 40mA
It converts any signal into square wave
The time period of output square wave is same as input signal,So the frequency of input signal to be measured does not change when converting it to square
wave.
Arduino Digital and Analog Pins only withstand 5Volt and 40mA current.Any thing out of this Range damage your Arduino. Since ic 74LS14 uses 5volt and gives
the output current less than 40mA.It is safe to use this IC74LS14.

http://www.instructables.com/id/Arduino-Frequency-Counter/
Step 3: Schematic diagram
You can use any Oscillator circuit to measure frequency.I have used CD4047 which is a oscillator used for demo in this Schematic.

Step 4: Program Code(if you use 3 pin interface Board for LCD)
#include <Wire.h>

#include <LiquidCrystal_SR.h>

LiquidCrystal_SR lcd(6, 5, 9);

const int pulsePin = 12; // Input signal connected to Pin 12 of Arduino

int pulseHigh; // Integer variable to capture High time of the incoming pulse

int pulseLow; // Integer variable to capture Low time of the incoming pulse

float pulseTotal; // Float variable to capture Total time of the incoming pulse

float frequency; // Calculated Frequency

void setup() {

pinMode(pulsePin, INPUT);

lcd.begin(16, 2);

http://www.instructables.com/id/Arduino-Frequency-Counter/
lcd.setCursor(0, 0);

lcd.print("Instructables");

lcd.setCursor(0, 1);

lcd.print(" Freq Counter ");

delay(5000);

void loop() {

lcd.setCursor(0, 0);

lcd.print("Frequency is ");

lcd.setCursor(0, 1);

lcd.print(" ");

pulseHigh = pulseIn(pulsePin, HIGH);

pulseLow = pulseIn(pulsePin, LOW);

pulseTotal = pulseHigh + pulseLow; // Time period of the pulse in microseconds

frequency = 1000000 / pulseTotal; // Frequency in Hertz (Hz)

lcd.setCursor(0, 1);

lcd.print(frequency);

lcd.print(" Hz");

delay(500);

Step 5: Program code (if you use LCD without 3Pin interface Board)
#include <LiquidCrystal.h>

LiquidCrystal lcd(11, 7, 5, 4, 3, 2);

const int pulsePin = 12; // Input signal connected to Pin 12 of Arduino

int pulseHigh; // Integer variable to capture High time of the incoming pulse

int pulseLow; // Integer variable to capture Low time of the incoming pulse

float pulseTotal; // Float variable to capture Total time of the incoming pulse

float frequency; // Calculated Frequency

void setup() {

pinMode(pulsePin, INPUT);

lcd.begin(16, 2);

lcd.setCursor(0, 0);

lcd.print("Instructables");

lcd.setCursor(0, 1);

lcd.print(" Freq Counter ");

delay(5000);

void loop() {

lcd.setCursor(0, 0);

lcd.print("Frequency is ");

lcd.setCursor(0, 1);

lcd.print(" ");

pulseHigh = pulseIn(pulsePin, HIGH);


pulseLow = pulseIn(pulsePin, LOW);

pulseTotal = pulseHigh + pulseLow; // Time period of the pulse in microseconds


frequency = 1000000/ pulseTotal; // Frequency in Hertz (Hz)
http://www.instructables.com/id/Arduino-Frequency-Counter/
lcd.setCursor(0, 1);
lcd.print(frequency);

lcd.print(" Hz");

delay(500);

Step 6: Video

Related Instructables

How to use
Arduino Mega
2560 as Arduino Arduino UNO Arduino Basic How to program Arduino Basics Program
isp by tsillen talk with Tutorial by Arduino Pro by Akhil ch Arduino Pro
Arduino UNO by TahmidZubayer Mini using Mini Using
masteruan Arduino Uno Arduino Uno by
and ArduShield vigneshraja
- without the
cables by
AwesomePCB

Advertisements

Comments

http://www.instructables.com/id/Arduino-Frequency-Counter/

You might also like