Detecting liquid flow

I'm working on a project in which the Arduino will controll a few water pumps. I need to detect the start and stop of flow to verify actual flow. Since I'm trying to do this an a small budget I haven't found a flow sensor that is affordable or will work with smaller volumes.

So I have an idea I wanted to run by people. I was going to take two needles and insert them into the tubing about 1/2" a part, attaching 5V to one needle and have the Arduino look for the 5V rise/fall on the other needle. Make sense? Is there any reason why I cant do this? I've testing it in the sink and seems to work great with an Ohm meter.

Thanks, Bryan

So you're not really interested in rate of flow, just in the presence or absence of water?

Then your approach makes sense. Someone recently asked about doing something similar with fingers (detect if someone is holding on to two electrodes) and I drew this up:

http://ruggedcircuits.com/html/circuit__18.html

What resistance did you measure? The closer you put the electrodes the less resistance and the fewer headaches you'll have with noise.

--
The Quick Shield: breakout all 28 pins to quick-connect terminals

Correct, I'm more worried about presence of flow than how much flow. I will calibrate flow rate via a timed dispense later on a regular basis (ie every power-up). I tried the "probes" (needles) closer together but on a 1/4" line drops of water would keep the probes in the closed state. With a slow flow rate I was seeing anywhere from 800kOhm to 2Mohm. Once I have it with a pumped water flow I'll have to check the resistance again. The higher flow of water seems to decrease resistance from what I was observing. So maybe I could even determine rate of flow....... mmmh.

So I set up a really basic test application that has a simple serial print line that returns the raw data from the analog read every 100 ms. For hardware I have two needles going into the 1/4” tube. One connected to the 5V on the Arduino, and one connected to a 1Kohm resistor (just to be safe) then to one of the analog IOs. I'm using a salty (to ensure conductivity) tap water solution for fluid testing.

At 1/2" separation I see a raw value peak of ~990. At 1/4" I see a peak at ~1004. Not a big difference. The"off" voltage raw data is anywhere from 200 to 600. The "on" seems to trigger perfect but the "off" isn't so great because of the gravity suck back (its pumping up hill). To be the actual start of flow is more important anyways. For stability I think this technique will need to sample rather quickly (5ms-10ms) and only have a software trip "on"/”off” when it has three consecutive readings within a 100. It looks like with the suck back you get 3 -7 readings (with a 100ms sampling) before getting another trip for “on”.

As for the sensors that were mentioned. The flow sensor was 1lt+/min and I'm needing to dispense at several ounces a minutes.