Go Down

Topic: Measuring water flow (Read 1 time) previous topic - next topic

sta

I have a solenoid valve in a watering system, opened and closed by an Arduino board, through a relay. Now I would like to measure the amount of water flowing through the valve as well, but I have no idea about how this is done. I imagine some kind of tube with a propel, where the throughput is calculated based on number of turns of the propel, but I might be totally wrong here.

Is there any standard, affordable products for measuring water throughput, that can be easily hooked up to a MCU, on the market?

jcgalvezv

this one could work for you. Even if it has not been identified I guess you could to some tinkering and find out how it works.

mem

#2
Jul 22, 2008, 05:47 pm Last Edit: Jul 22, 2008, 05:48 pm by mem Reason: 1
I can see what looks like a paddle wheel in the picture in jcgalvezv's link.  I would guess the  IR photodetector provides pulses proportional to the rotation of  the wheel. Your Arduino sketch would count the pulses which you can calibrate by measuring how many pulses it takes to fill a known volume of water. For $3.50 I suggest you go for it!

sta

Thank your for bringing me closer to a solution.

I have now got my hands on a flow meeter from SwissFlow which looks like just what I need. The meeter output 6000 pulses per liter of water passing through.

My next qyestion is; How do I count those pulses with the Arduino? Do I have to add some extra hardware or can I connect the pulse output directly to the Arduino board?

BigMike

#4
Jul 24, 2008, 03:16 pm Last Edit: Jul 24, 2008, 03:24 pm by BigMike Reason: 1
Quote
My next qyestion is; How do I count those pulses with the Arduino? Do I have to add some extra hardware or can I connect the pulse output directly to the Arduino board?


That depends on the details of the output circuit of the flowmeter.

Often these things will have an open collector to ground - all you will need is a pull-up resistor to the Arduino supply (or use the internal pull-up resistor on the input pin).

Can you point us to a datasheet of the flowmeter you are using?

edit . . .

Is this the flowmeter:

http://www.swissflow.com/en/SF800/Flow_Meter_Specifications

If so, there is no mention of output circuirty - I think it reasonable to expect 5V pulses if you power it with 5V, no extra circuitry needed.


Mike



mem

Also, have a look at attachInterrupt http://www.arduino.cc/en/Reference/AttachInterrupt for an easy place to increment a counter on each pulse

sta

Quote
Is this the flowmeter:

http://www.swissflow.com/en/SF800/Flow_Meter_Specifications

If so, there is no mention of output circuirty - I think it reasonable to expect 5V pulses if you power it with 5V, no extra circuitry needed.


Thats the one yes.

I think you are right that it output 5V pulses, but I will check this to be sure. Does this mean that I simply hook the output pulse wire to one of the digital input pins on the Arduino and use attachInterrupt as a method for counting the pulses? Sounds too easy to be true  :)

Another question; I see from the flow meeter spec that it output the pulse at a rate of up to 2000Hz. Is the Arduino capable of reading state changes on the digital input pins at such rate?

mem

#7
Jul 24, 2008, 04:03 pm Last Edit: Jul 24, 2008, 04:03 pm by mem Reason: 1
If your flow rate is towards the lower end then you could count pulses in the interrupt handler (see the link above).

For the higher rates, if the flow rate is changing relatively slowing (with respect to the time between pulses) you could also use pulseIn  to calculate flow rate as the flow rate is proportional to the period between pulses.

But if you are expecting pulse rates of 2000hz  and you need ultra-accurate readings then you may want to look at using  the hardware counting capability of timer1 and sample the count at regular intervals to get the exact flow rate.

yunkee

Quote
Quote
Is this the flowmeter:

http://www.swissflow.com/en/SF800/Flow_Meter_Specifications

If so, there is no mention of output circuirty - I think it reasonable to expect 5V pulses if you power it with 5V, no extra circuitry needed.


Thats the one yes.

I think you are right that it output 5V pulses, but I will check this to be sure. Does this mean that I simply hook the output pulse wire to one of the digital input pins on the Arduino and use attachInterrupt as a method for counting the pulses? Sounds too easy to be true  :)

Another question; I see from the flow meeter spec that it output the pulse at a rate of up to 2000Hz. Is the Arduino capable of reading state changes on the digital input pins at such rate?


Hey sta,
Did you get to test out attaching the output pulse to an interrupt pin and counting the pulses? If you did, it would be great to know how it turned out because I'll be working on something similar.

sta

I haven't had the time to look into this yet, but I think I will do it later this week. I will keep you posted.

I'm not sure what approach to take though. I want to accomplish two things:

(1) Measure the current amount of water flowing through
(2) Keep track of the total amount of water that have gone through the meter

The plan is to send the results, through an XBee module, to a remote host, that put the values into a database that is accessible from the internet.

My plan so far is to use attachInterrupt to execute a pulseIn, once a second. Based on the pulseIn value I can estimate the amount of water currently parsing through in a second. The value is send to the remote host, which take care of aggregating and storing it.

Any comments about this? Is it doable, and will it be accurate enough?

wisof

Sorry to revive this old thread, but I am wondering about the same thing.  How much did the flowmeter from SwissFlow cost?  Did this ever work?


Go Up