Загрузка страницы

RPi 20 - YF-S201 Hall Effect Water Flow Meter / Sensor

An RPi experiment using the YF-S201 flow meter. Good demo of 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')
NOTE: The pi is not a real time computer (for example like the Arduino) and its ability to react to polling or interrupts is dependent on other code being executed. As a result, at higher input rates, the pi will begin to miss inputs and the results will be less and less accurate. You can put in factors based on assumptions (as in this example) to get reasonable approximations.
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

Model: YF-S201
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
Accuracy: ±10%
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!!!

MATERIALS
- Raspberry Pi (and Pi power supply)
- Breadboard
- YF-S201 Water meter / sensor
- Jumpers

WARNING: Warning: mis-wiring or mis-programming your Pi or miswiring of accessories can ruin the Pi and accessories. Data is from the manufacturer. Information/drawings offered as is. Use at your own risk. If you don't know, learn first.

Видео RPi 20 - YF-S201 Hall Effect Water Flow Meter / Sensor канала tsbrownie
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
18 июля 2017 г. 6:26:51
00:09:16
Яндекс.Метрика