Frequency Counter using Arduino Timers

preview_player
Показать описание
ATmega328 Timer 1 & Timer 2 are programmed to count rising edge pulses of input rectangular waveform within a period of 1000 ms. The total count represents the frequency of the input signal.

Link to code:

Contents:
0:00 Introduction
0:19 Theory of Frequency Counting
1:15 Block Diagram
1:39 Software Flowchart
2:53 C++ Sketch
5:56 Demonstration
Рекомендации по теме
Комментарии
Автор

This is a great project and will run on an Arduino Nano or even a pro mini. The code is well written and commented and available for download. I recommend this project for beginners as it is a good example of how to write and comment your code. I ran this code to compare to something similar I did using the 32768Hz output from a DS3231 RTC. Well presented Anas.

postiemania
Автор

This is so well presented and useful! Thanks very much!

ericgorder
Автор

Anas very good, of the continuity to the videos of Websocket.

marcosgiovanni
Автор

why do you put setup code into the loop()? That's where setup() is made for. And the loop() repeats itself, so no need for the loop inside. That would be a simple if().

minastaros
Автор

What is the max frequency it can measure, and what is the resolution of the frequency measurement?

samshurp
Автор

Thanks for the video great project but I have a question.What is the error rate of the counter?

mertyasinaycicek
Автор

I need to input a sign wave to display RPM. Will this design trigger accurately with a sign wave?

sdgreen
Автор

Thanks for the video! i'm using an additional frequency source but i having a hard time to track both frequency Inputs! Could you give me a hint how to attach an additional clock/timer/measurement for the secound frequency source?

verarschn
Автор

Sir i need to write a code for arduino that calculates the frequency of a vpulse with timer 1 using counter mode only on pin2 of the arduino without resorting the interrupt service. Can you help me with such a code..

ViruteVentura
Автор

bro what is the max frequency that it can count please answer 🙏🙏

michaeljoshuamanallo
Автор

Why it does not count frequency higher than 7 MHz ??? Do you have any notion what is the reason? Theoretically there's no reason, signal, fx of 9MHz is OK, Timer1overflowCounts is less then 200, so what?

incxxxx