Frequency and Duty Cycle Measurement Using Arduino

Arduino is used to measure frequency and duty cycle of pulses and display them on LCD.

Aug 31, 2019

95262 views

17 respects

Components and supplies

1

Arduino UNO

1

Alphanumeric LCD, 20 x 4

Tools and machines

1

Breadboard, 270 Pin

Apps and platforms

1

Arduino IDE

Project description

Code

program to measure frequency and duty cycle and display it on LCD

c_cpp

measure frequency and duty cycle and display it on LCD

program to measure frequency and duty cycle and display it on LCD

c_cpp

measure frequency and duty cycle and display it on LCD

Downloadable files

frequency and duty cycle measurement using Arduino circuit

the circuit measures frequency and duty cycle of pulse using Arduino

frequency and duty cycle measurement using Arduino circuit

Comments

Only logged in users can leave comments

Anonymous user

2 years ago

Interesting project. Thanks.

Anonymous user

2 years ago

...This is not how to measure frequency. This is how to measure frequency if it is 50% duty. You are assuming all signals being used are at 50% duty. This is usually not the case for any kind of sensor unless you connect through a D Flip-flop first or implement it in code. Most sensors output short pulses in either polarity and what you really want to measure is time from going high to going high. Measuring the pulse width as above may be useful for measuring PWM type of information signals.

alexmullersouza

2 years ago

It works. Thats why count offtime and ontine. The duty is honest close to real

Anonymous user

2 years ago

Can you show me about components of your IC 555 based pulse generator please?

Anonymous user

2 years ago

It works much better with timeout on pulseIn, note that return is unsigned long, but your using float. The result may be negative, and the calculation show bad things. If you pass 40000 in time out, delay 500 and cast do float only on division it improves a lot.

alexmullersouza

2 years ago

It works much better with timeout on pulseIn, note that return is unsigned long, but your using float. The result may be negative, and the calculation show bad things. If you pass 40000 in time out, delay 500 and cast do float only on division it improves a lot.

Anonymous user

3 years ago

...This is not how to measure frequency. This is how to measure frequency if it is 50% duty. You are assuming all signals being used are at 50% duty. This is usually not the case for any kind of sensor unless you connect through a D Flip-flop first or implement it in code. Most sensors output short pulses in either polarity and what you really want to measure is time from going high to going high. Measuring the pulse width as above may be useful for measuring PWM type of information signals.

Anonymous user

2 years ago

It works. Thats why count offtime and ontine. The duty is honest close to real

callecuatro1976

3 years ago

Hay manera de hacer lo mismo con los timer?

Anonymous user

4 years ago

Interesting project. Thanks.

gagvavp

5 years ago

Can you show me about components of your IC 555 based pulse generator please?