Tutorial: Reading Water Flow rate with Water Flow Sensor

Grove is a modulated, ready-to-use tool set.
Much like Lego, it takes a building block approach to assembling electronics.

Moderators: lily.li, violet, salmanfarisvp, jeremy882, crail.lyu969

jim85133
Pre-kindergarten
Pre-kindergarten
Posts: 1
Joined: Fri Jul 31, 2015 11:55 am

Re: Tutorial: Reading Water Flow rate with Water Flow Sensor

Post by jim85133 » Fri Jul 31, 2015 12:00 pm

What distance can you send the signal from the flowmeter? How do you determine this? If the yellow signal wire to the seeeduino is 50 yards, would it still read properly on pin 2?

ari4
Pre-kindergarten
Pre-kindergarten
Posts: 5
Joined: Wed Jun 04, 2014 5:50 pm

Re: Tutorial: Reading Water Flow rate with Water Flow Sensor

Post by ari4 » Sun Sep 13, 2015 3:22 pm

Hello,
I have a flow meter and have everything wired up to an arduino uno. the signal is coming in at digital port 4. my problem is that when i power the arduino and upload the code, without having the pump on i get values like 520, 512 etc. I am testing the system with a small fish tank pump and when i turn it on, i now get values like 240, 304, 248 etc.

Three questions,
1)why am i getting 520 when there is no water flowing through the meter? I would expect this to be zero not a value like 520
2)Why do values vary so much on every sample? i can see 224, 280, 356, 404, 232,288 etc when the pump is just pumping the same amount more or less.
3)In the sample code the equation is

Calc = (NbTopsFan * 60 / 4.5); // (Pulse frequency x 60) / 4.5Q, = flow rate in L/hour

but in the comments above, it seems that the 4.5 suppose to be 7.5. Which one is correct?

Thanks

piyush17395
Pre-kindergarten
Pre-kindergarten
Posts: 1
Joined: Sat Mar 05, 2016 12:24 pm

Re: Tutorial: Reading Water Flow rate with Water Flow Sensor

Post by piyush17395 » Sat Mar 05, 2016 12:26 pm

I'm trying to interface the sensor with Arm7.
Can you tell me what pin2 corresponds to so that i can interface it with ARM7.

areej.594
Pre-kindergarten
Pre-kindergarten
Posts: 2
Joined: Wed Apr 24, 2019 1:50 am

Re: Tutorial: Reading Water Flow rate with Water Flow Sensor

Post by areej.594 » Wed Apr 24, 2019 1:54 am

brakke562 wrote:
Fri Feb 18, 2011 9:36 pm
eltoddo: Yes, it will be off 1.5cl in the worst case. If, and only if, the accuracy is constant for a certain device, it can be configured. Lets say you have constant -1% error in measured vs. real value, (aka. 50cl measured, 50.5cl real) you pull 1.01 as multiplier into the code. In +1%, you use 0.99 as multiplier. (Yes, it is a bit wrong, but I'm just making it simple enough.) Experiment and change the multiplier value to compensate. If the error was constant, that is.

Nashblackcat: If the sensor works with 1 to 30 liters per minute(LPM) range, 50cl is gained with 6LPM in 5 seconds. Take that as 10cl in 1 sec, and if going down to 2LPM speed, it is ~3.33cl in one sec. Hard to say what the safe margin is, but I would NOT try filling 4cl vodka shot. 8cl maybe.

LeeLinkoff: In the formula NbTopsFan * 60 / 7.5 , the NbTopsFan is the amount of rising pulse edges detected by the controller in a set delay time. Here it was 1 second. So we have here our pulses per second and the *60 multiplies this value by 60, so we get pulses per minute. The 7.5 is a constant set in the datasheet of the sensor that tells us the relation between flowrate and pulses per minute the sensor is sending. I would add here a correction value *0.97 to *1.03 if the measurement error is constant to a certain device.

nikoumouk: I agree, the comment and code is wrong and real output is in LPM. Add *60 or change original *60 to *3600 to get liters per hour.
How appropriate would this sensor be for measuring small amounts of liquid, like cups of beverage from a beverage dispenser? I would ideally like to achieve centiliter accuracy, if I pour a 50 centiliter cup of liquid (half a liter), is this sensor going to be resolute enough? ...Do I risk being off by 1.5 cl or so per beverage? Or better yet, can it be calibrated?

alina06
Pre-kindergarten
Pre-kindergarten
Posts: 3
Joined: Thu Apr 11, 2019 3:34 am

Re: Tutorial: Reading Water Flow rate with Water Flow Sensor

Post by alina06 » Wed Apr 24, 2019 3:25 am

brakke562 wrote:
Fri Feb 18, 2011 9:36 pm
eltoddo: Yes, it will be off 1.5cl in the worst case. If, and only if, the accuracy is constant for a certain device, it can be configured. Lets say you have constant -1% error in measured vs. real value, (aka. 50cl measured, 50.5cl real) you pull 1.01 as multiplier into the code. In +1%, you use 0.99 as multiplier. (Yes, it is a bit wrong, but I'm just making it simple enough.) Experiment and change the multiplier value to compensate. If the error was constant, that is.

Nashblackcat: If the sensor works with 1 to Vidmate iTunes Notepad++
30 liters per minute(LPM) range, 50cl is gained with 6LPM in 5 seconds. Take that as 10cl in 1 sec, and if going down to 2LPM speed, it is ~3.33cl in one sec. Hard to say what the safe margin is, but I would NOT try filling 4cl vodka shot. 8cl maybe.

LeeLinkoff: In the formula NbTopsFan * 60 / 7.5 , the NbTopsFan is the amount of rising pulse edges detected by the controller in a set delay time. Here it was 1 second. So we have here our pulses per second and the *60 multiplies this value by 60, so we get pulses per minute. The 7.5 is a constant set in the datasheet of the sensor that tells us the relation between flowrate and pulses per minute the sensor is sending. I would add here a correction value *0.97 to *1.03 if the measurement error is constant to a certain device.

nikoumouk: I agree, the comment and code is wrong and real output is in LPM. Add *60 or change original *60 to *3600 to get liters per hour.
This is very interesting! Thanks for posting. I have a question around a practical example I'm thinking about putting together around this. I see the the "accurate within 3%" note and I get a bit nervous...

Post Reply