Water Meter

Hi All

I just added a water meter to my flukso on port 3 as a pulse input. The meter gives a pulse from a reed relay at 1 pulse equals 10 litres, so I set the constant to 10.

The graph on the flukso dash looks ok but when the water stops flowing the graph line does not go to zero it just sits at its last pulse reading. I guess water works differently to other sampling as a valve can fully close very quickly taking you from max flow to no flow so there is no gradual change in pulses to get you down to zero as there is with power for example.

Do i need to look at a pull up/down resistor to zero the reading or do I need to drive a schmitt trigger with the reed relay pulse to produce something more akin to an S0 pulse output whcih the flukso seems to have no trouble with (like my pulse kwhr meters)?

Fluc's picture

I hade the same problem like you.
Then i used a chip in between, the CD4538, it act on rising and falling pulses and give every time a short pulse. In the configuration, i just have to divide the 1 litre to make it 0,5 litre.
Now the graph looks ok:
https://www.dropbox.com/s/y9j10umqaahufxw/water%20graph.png?dl=0

Give me a ring if you want to see the board and wiring.

venno's picture

Hi Fluc

Thanks for that, I would like to replicate what you have done, I am not sure how to contact you via the forum though. eg. PM, email

Wizzopa's picture

Hi Fluc
I would also like to use this piece of electronics for my water meter.

gebhardm's picture

Why do you react on rising and falling edge (on switch close and open) and then have to divide by 2 on getting two pulses for a single event? A one-shot on falling edge (reed switch of water meter closed makes input go to ground) would be enough?!
For all others: Fluc's trick is not leaving the reed switch in worst case closed, but get a well-defined single impulse to detect just when the switch is closing respectively opening again - for the circuit search for "monostable multivibrator on falling edge" - this can be achieved also with a good old 555.
You may output the trigger pulse to an LED and use this in series with an optocoupler. This way you isolate the FLM from any external power source that you will need to run the multivibrator.

gebhardm's picture

Yes, indeed. Very nice drawing. t should be in the range of 10 to 30 milliseconds; that is a „usual“ value of other pulse outputs. This is not critical. So are R and C then with what you easily get, e.g C with say 10 to 100 nF. Get the units right and you have your R-value ;-)

gebhardm's picture

R2 is a pull up, 1 to 10k, t = 1.1 R C, so 1 uF with 1k is 1.1 ms. Mind the units provided in the spec. They might not be full Farads...

venno's picture

Built the circuit and connected between flukso and reed switch. The data still comes in same as before and after switching off the water the flukso graph hangs at last reported non-zero value :(

venno's picture

Could the issue be that my flukso pulse inputs don't have the internal pullup resistors functioning properly?

gebhardm's picture

Hm. The pull-ups are microcontroller internal; I doubt that they don't work. You may test with a volt meter, if you "see" 3.3V at the pulse port.
I have neither a water nor a gas meter, so I can just speculate. You may check the code what the expected behavior should be - but this would be a longer debugging session.
Do you have a "mqtt log"? See what is transferred as sensor message on the water meter.
What is your FLM's software version? In any case update to the latest.

venno's picture

Ok, I think I have it sorted and its not what I would have thought.

I removed the opto circuit so back to normal reed switch and let the unit run. Was at work and decided to check results and it all looks good. At home I use a modified high security Firefox browser at work its just normal google and this works fine, so looks like may be a browser issue with how things are displayed from the Flukso site.

There is one caveat though. the flukso graphing on the web page leaves the graph hanging at the last reported non-zero value but when the next run of the valve occurs the space inbetween is zeroed and the graph is corrected as the new flow data is submitted.

Fluc's picture

Saw the reactions a bit late ;-). I do not not received any warning emails from this forum anymore ...
@gebhardm, i do it on the rising and falling edge because it is was possible with the chip i used. So in can detect also a smaller quantity of water usage.
info: On my watermeter is a disk that rotates 360° per liter, half of is is shiny metal, the other half is red plastic. So it was easily to do both : a little higher resolution and eliminating the problem of a always high input.