Need Help

Status
Not open for further replies.

cena

New Member
Hi everyone,

I’m a new in programming by assembly language and I have a problem that I couldn’t solve it.

I have three water flow sensors and every sensor gives pluses as output proportional to the water flow rate. I connected these three sensors to a multiplexer and then connected to microcontroller 8051.

I want to take the reading from sensor (1) then sensor (2) and compare between them to give error percentage.
The sensor (3) is standby if any sensor will break.

I don't know if I should count or measure these pluses

Thanks
 
cena said:
I want to take the reading from sensor (1) then sensor (2) and compare between them to give error percentage.

I don't know if I should count or measure these pluses

There is no definitive answer but usually one method is better than the other depends on real life situation. You just choose the method that give you better accuracy.

It depends on how frequent you want the error percentage to refresh and the number of pulses coming in from these sensors during each refresh cycle.

For example, say you want the error percentage to update every second and you have a few hundred pulses coming in per econd, then you can count them. If there are only la few pulses coming in for one second period, you then measure the pulse period and calculate the flow rate. You might also want to average the calculated result over several pulses before displaying it.
 
As suggested, it depends entirely on your application, how accurate you need to be, and how fast the readings need to be. For slow pulses it's usual to measure the time between them, or the width of the pulses - this gives high accuracy and the fastest possible readings. With frequency counting you need MUCH longer reading times to get decent accuracy, if you check on frequency counters, it's common to have a 100 second counting range!.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…