Arduino Frequency Counter
Arduino Frequency Counter
By Rajkumar2506
Twitter
More by
Follow
the author:
About: iam a B.E Electronics and Communication Engineer. I have great interest on electronics.I
love my college life.Even though there are many sadness in my life.I find joy in making
instructables. More About Rajkumar2506 »
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 don't have 3 pin interface board you can easily make
it.Click on the bellow link to know how to make 3 pin interface board.
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.
You can use any Oscillator circuit to measure frequency.I have used
CD4047 which is a oscillator used for demo in this Schematic.
where
Where
microseconds(us)=10^-6
pulseTotal=Ton+Toff
#include <LiquidCrystal_SR.h>
void setup() {
pinMode(pulsePin, INPUT);
lcd.begin(16, 2);
lcd.setCursor(0, 0);
lcd.print("Instructables");
lcd.setCursor(0, 1);
delay(5000);
void loop() {
lcd.setCursor(0, 0);
lcd.print("Frequency is ");
lcd.setCursor(0, 1);
lcd.print(" ");
lcd.setCursor(0, 1);
lcd.print(frequency);
lcd.print(" Hz");
delay(500);
void setup() {
pinMode(pulsePin, INPUT);
lcd.begin(16, 2);
lcd.setCursor(0, 0);
lcd.print("Instructables");
lcd.setCursor(0, 1);
delay(5000);
void loop() {
lcd.setCursor(0, 0);
lcd.print("Frequency is ");
lcd.setCursor(0, 1);
lcd.print(" ");
lcd.setCursor(0, 1);
lcd.print(frequency);
lcd.print(" Hz");
delay(500);
Step 7: Video
Arduino Frequency Counter
14 Comments
Hi
In the code you update the text "Frequency is" in void loop.
If it was placed at the end of the code in void setup it would still be displayed
on the LCD, with the advantage of allow the arduino to spend more time
polling the input pin.
What is the accuracy of this counter .... if it differs dependent of the frequency,
what is the accuracy around 60 Hz ??
Hi
What are the value of the capacitor and pot-meter in the demo frequency
conter?
hello;
I get some error while loading code.Please help. Thanks
Error message;
Arduino:1.8.1 (Windows 7), Kart:"Arduino/Genuino Uno"
C:\Program Files (x86)\Arduino\libraries\LiquidCrystal\I2CIO.cpp:35:26: fatal
error: ../Wire/Wire.h: No such file or directory
#include <../Wire/Wire.h>
^
compilation terminated.
exit status 1
Error compiling for board Arduino/Genuino Uno.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
You can read lower that 1 Hz. You are using floats in this example
which can give you a fraction of a Hz. This is less than 1 but still
greater than 0. The frequency .01 Hz has a period of 100 seconds.
Post Comment