An intelligent water meter that can be used to control multiple functions (valves, detectors, warnings, logging...).
An RPi experiment using the YF-S201 flow meter. Good for measuring and controlling water flows - home watering use, irrigation water use tracking, livestock water tanks, etc.
Line 37: print('Time (min & clock) ', minutes, '\t', time.asctime(time.localtime(time.time())),'\n')
The sensor is inline and uses an impeller with an embedded magnet. The magnet triggers a Hall effect switch sending a pulse at each revolution.
There are 3 wires, red (power, 2-24 volts, but I've gotten it to work at 3 volts), black (ground) and yellow (Hall effect output).
From the spec sheet:
16 Hz = 2 L/min = 120 L/hr
32.5 Hz = 4 L/min = 240 L/hr
49.3 Hz = 6 L/min = 360 L/hr
65.5 Hz = 8 L/min = 480 L/hr
82 Hz = 10 L/min = 600 L/hr
etc. Max 30 L/min
Frequency (Hz) = 7.5 * Flow rate (L/min)
Pulses per Liter: 450
Sensor Type: Hall effect
Working Voltage: 3.5 to 24V DC (min tested voltage 3.3V)
Max current draw: 15mA @ 5volts
Output Type: 5volt TTL
Working Flow Rate: 1 to 30 Liters/Minute
Maximum water pressure: 2.0 MPa
Operating Temperature: ≤80℃
Liquid Temperature: ≤120℃
Output duty cycle: 50% ±10%
Output rise time: 0.04us
Output fall time: 0.18us
Min Durability: 300,000 cycles
Cable length: 15cm
1/2" nominal pipe connections, 0.78" outer diameter, 1/2" of thread
Size: 2.5" x 1.4" x 1.4"
Notes: I found that when the impeller stops with the Hall effect switch triggered, it keeps sending pules to the RPi. Seems to be a Pi triggering issue per the internet.
YOU NEED A VOLTAGE DIVIDER WHEN OPERATING ABOVE 3.3 VOLTS!!!
- Raspberry Pi (and Pi power supply)
- YF-S201 Water meter / sensor
WARNING: Warning: mis-wiring or mis-programming your Pi or miswiring of accessories can ruin the Pi and accessories.
Information/drawings offered as is. Use at your own risk. If you don't know, learn first.
Post your reply!
Join 41,949 of us and get our 173 Must Read Homemade Tools eBook free.
There are currently 1 users browsing this thread. (0 members and 1 guests)