Waterflow meter

Calling all guys more clever than me,

purchased 2 of these flow sensors…

Looking for Python code to read them. it seems their “math” is a bit not clear, there is python code to read the normal hall effect, but you need to tell the Python how to intrepid the “clicks” it’s getting from sensor to L/min flow.

plan is to connect 2 of these onto a RPi zero located close to the 2 water tanks, going to measure water in from council and then water flowing out to booster pump into house.

Specification:
Product Model: B10 Product Name
Model YF-B10: Product Name
Rated voltage: DC=5V inspection standard
Appearance Product identification is clear, accurate and correct
Water pressure: resistance >1.75MPa
working voltage range: DC5 ~ 15V
insulation resistance: >100MΩ
Accuracy: [in 1~25LMIN]±5%
Flow pulse characteristics: (6*Q-8) Q=L/Min±5%
Output pulse high level: > DC 4.7V (input voltage DC 5V)
output pulse duty cycle: 50% ± 10%

(as per other thread, also adding a water level sensor, and then looking for solution still to do water pressure on lines).

G

I would guess that the easiest would be to use ESPhome.

would but I don’t use esphome, I use RPi’s with Python, MQTT and InfluxDB.
:wink:

G

Seems like a bit fo a waste having an RPI at the tank just to watch the flow meter.

Would be better to use Tasmota to flash a ESP8266 MCU which will pick up the data from the meter and post it to MQTT for you

You can get one for less than R100.
https://www.robotics.org.za/index.php?route=product/search&search=8266

… the single RPiZero W will be monitoring 2 tank levels ( HC-SR04) and 2 flow meters (1 Inch Water Flow Sensor Hall Sensor Switch Flow Meter DN25 Brass Wate – Reliable Store), and potentially the same RPi will be controlling a 2 way relay also that will be controlling 2 solenoid valves.

so no wastage planned.

G

Back to my question,

I’m having problems/figuring out how to intrepid the formula/math to be able to calculate the water flow/volume.

G

@georgelza did you get anywhere with this project?
I’m starting to look in to flow sensors and tank monitoring.

What I eventually want to achieve.

  • The levels of 2x Jojo tanks.
  • Flow sensor on the pipe running from the borehole.
  • Flow sensor on the pipe to the irrigation dam.
  • Then maybe also flow sensors on the pipes running to the 2 houses.

Eventually everything in to HA.

hi there

So… I got 2 water flow sensors… looking at them, haven’t looked to close (other than figuring out the math to figure out flow based on spin of impeller is not that simple), they seem to be analog, which implies they don’t work with Raspberry pi.s… Now I have a couple of NodeMCU’s (they can read analog values, you just need to make sure about the voltage), but they not my normal playing ground (being Tasmoto or Python on a Linux OS). so need to become familiar with that, you code/write/burn the app a bit different which I haven’t done before…

Similar applies to the water level, got a couple of ultrasonic sensors, and can access them in rpi…
but with them, going into the tank… these tanks sweat… which then destroy the sensor. so decided I rather want to get a I2C based pressure sensor, haven’t looked to hard yet.

in the end… break the solution up into 2 bits, get value/decode value and then push onto MQTT topic. once there then the world is your oyster, hehehe. easy peasy to then display in HA. I also drop mqtt values into a influxes which i can graph using Grafana.

G

Here is my water system. I still need to finish it but all is working fine.

2 Likes

Very nice project.

Have you kept the plastic flow meters? How have they kept up?
What is your municipal water pressure vs what the pump supplies?

Yes I still have the plastic flow meters in and they are holding up well after 6 years.

Here is the water pressure from the municipal feed.

I don’t have a sensor on the pump side as I know the pressure switch will switch on at 2 bar and off at 4 bar. As my tank is a buffer between the house and the feed I wanted to know if the pressure is gone as we then have to manage the water in the tank as the feed is gone.

what pressure sensor is that, what programs/board do you use to measure.
most sensors I’ve been able to find is analog, which imply i need a analog to digital converter also,

of course with council (3-4bar) and water tank pressure bing .2->.4 bar… it’s on the serious low side for most sensors I’ve been able to find.

G

… i’ve got the same ultrasonic connected to a RPi, most/all of my stuff is RPi’s with Python and onto HA via mqtt.

found that it does bounce around a bit, I normally do 10 readings, each 1 second apart, and then use the medium of the readings.

G