Water Flow Sensor

I'm working on a new project using a seeedstudio water flow sensor Seeed Studio Bazaar, The IoT Hardware enabler..
and using the code from Tutorial: Reading Water Flow rate with Water Flow Sensor - #2 by ESP - Grove - Seeed Forum

If I presume my flow meter is working correctly, the pulses only occur when the rate of flow changes. I'm trying to implement a project where flow will be started and stopped every few seconds and I need to calculate the rate of flow (mL/sec). However, when flow is triggered the meter reads the first pulse and does not read while flow is continuing. I've tried changing the interrupts (RISING,FALLING,CHANGE,LOW) adding delays, etc. to no avail.

I was wondering if the flow meter was powered off a digital pin, that one would be able to power down the flow meter at the end of the loop, restart in 1 second increments and get pulses for every one second of flow. I've tried this also but I believe my newbie skills are holding me back. The power down and up causes interrupts to trip, even if I detact them. I would appreciate any advice, sample sketches, etc.

Try this...

volatile unsigned NbTopsFan; //measuring the rising edges of the signal
const int hallsensor = 2;    //The pin location of the sensor

void rpm ()
{
  NbTopsFan++;
}

void setup()
{
  pinMode(hallsensor, INPUT);
  Serial.begin(9600);
  attachInterrupt(0, rpm, RISING); //and the interrupt is attached
}

void loop ()   
{
  unsigned temp;
  long Calc;                               

  delay (1000);
  noInterrupts();
  temp = NbTopsFan;
  NbTopsFan = 0;
  interrupts();

  Serial.print (temp, DEC);
  Serial.print (" ticks");
  Serial.write( '\t' );

  Calc = (((temp * 60) / 7) / 2);
  Serial.print (Calc, DEC);
  Serial.print (" L/hour");

  Serial.println();
}

Don't bother switching the flow sensor on and off, it uses very little current.

I've used the example sketch with a flow rate approaching 300l/h, you could hear the sensor whizzing away.

The example sketch above works well.

Try this code GitHub - adafruit/Adafruit-Flow-Meter: Example code for the Adafruit liquid flow meters

Thanks guys.

Both sketches work well. My flow was too low to produce continous readings! It would only read the first pulse. I need a low-flow water sensor, something that will produce measurements down to 1 mL per second. The seeedstudio water flow meter is only rated from 1-30 L/min (16.6 -500 mL/sec) Does anyone have any recommendations that won't break the bank?

buffalobear:
Thanks guys.

Both sketches work well. My flow was too low to produce continous readings! It would only read the first pulse. I need a low-flow water sensor, something that will produce measurements down to 1 mL per second. The seeedstudio water flow meter is only rated from 1-30 L/min (16.6 -500 mL/sec) Does anyone have any recommendations that won't break the bank?

Perhaps a very small water wheel?

Lefty

Jaycar here in Oz have some that go down that low.

The specs on the SeeedStudio sensor must be pretty conservative!

buffalobear:
My flow was too low to produce continous readings!

If you're on the limit of what the sensor can pick up, you might find that small changes in the arrangement make the difference between success and failure. For example, internal friction might change depending on the orientation of the sensor - perhaps with the the turbine axis vertical and water flowing up through it you'll be able to get a reading with less flow than with the turbine axis horizontal, if you see what I mean. If you can get at it, you might be able to increase the sensitivity by restricting the flow so that it only impinges on one side of the turbine rather than being evenly distributed across it (doubling the speed gives you four times the dynamic pressure) - the cost would be reducing the maximum flow rate and perhaps reducing the accuracy/consistency at higher flow rates.

Thanks,

For the application I'm considering, the flow sensor will be mostly horizontal. I'll try necking down the flow and see if it helps. I have not been able to find any low-flow sensors that are priced reasonable.

buffalobear:
Thanks,

For the application I'm considering, the flow sensor will be mostly horizontal. I'll try necking down the flow and see if it helps. I have not been able to find any low-flow sensors that are priced reasonable.

Did you ever find anything that would work for a "low flow" on and off type system without breaking the bank? If so, could you share what you found? if not, what did you do to make it work?
thanks,

Andy

For low flow rates a positive displacement sensor is required normally.

Water co meters will accurately measure the rate of a bath being filled, they will also accurately measure a dripping tap.

Unfortunatley they are not cheap compared to turbine meters.

Using one of these "backwards" with a rotary sensor may work but i suspect only for relatively high pressure as they are rather "torquey"

BTW this thread is 2 years old better to start a new one.

Can the liquid be exposed to the air?
If so, make a water wheel using a super low friction bearing such as the ones used for balancing model propellor blades.

Here's a concept I've had on my bucket list for a long time, and I still hope to try it sometime. Suppose my water pipe contains a plastic section, at each end of which is a conductive collar. I put a voltage across this, and electrons flow. I can measure the current, and of course, it's not hard to measure very small currents. If the water is moving, won't I get a change in current?

Now current flow will be affected by temperature and water chemistry, so I also have an identical sensor but with stationary water to measure the current under no-flow conditions. Of course, there's a need here to analyze the physics well enough to use the differential current between the static and flow pipes to actually quantify flow. I'll get around to this sometime.