Hello there,
1- I want to something ask. I want to measure the frequency with the incoming pulse.
2- Can I measure frequency directly from an inside ?
I using microprocessor dsPIC33EP256MC502. I using crystal 16mhz with clock 120mhz. _________________ Es
gaugeguy
Joined: 05 Apr 2011 Posts: 303
Posted: Wed Jun 26, 2019 8:30 am
What is the frequency range of the signal you want to measure?
Will the signal be conditioned to a square wave input 0-VDD?
ertansuluagac
Joined: 13 Jul 2017 Posts: 135 Location: IZMIR
Posted: Wed Jun 26, 2019 8:34 am
I do not know that. It is flow meter. I will calculate according to the incoming pulse. I only get a pulse from a Vout. This is constantly changing. So I can't say anything clear. _________________ Es
'Flow meters' tend to be low frequency devices though the mfr of it will have charts/data of flow rate vs frequency (PPS). Even the cheap ones from China have data on the website. There will be a relationship of volume of water to pulse (1 revolution) so you could create an ISR to count pulses and calculate both flow and volume.
Jay
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
Posted: Wed Jun 26, 2019 3:58 pm
Have a look at your input pulse with a 'scope. If it's not close to being a 0 to Vdd square wave then you will need to process it.
There are two general ways of measuring frequency:-
1) Count the No. of pulses in a fixed time (say 1s).
2) Measure the period of one (or several) pulse(s) and convert.
For a flow meter you will probably use the 2nd method.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum