YF-S201 Water Flow Sensor
Measures liquid flow rate for smart water meters and irrigation systems.
The YF-S201 is a Hall-effect water flow sensor built around a small plastic turbine: as water flows through the housing, the internal rotor spins and a Hall sensor generates a pulse train whose frequency is proportional to the flow rate. It's the standard low-cost sensor for DIY water meters, irrigation controllers, and smart plumbing projects, letting a microcontroller calculate liters-per-minute simply by counting pulses per second.
Specifications
| Sensor type | Hall-effect turbine flow sensor |
| Operating voltage | 5V–24V DC (5V is standard for microcontroller projects) |
| Operating current | ~15 mA |
| Flow rate range | 1–30 liters per minute |
| Output | Digital pulse train, frequency proportional to flow rate |
| Pulse-to-flow formula | Frequency (Hz) ≈ 7.5 × flow rate (L/min), per manufacturer datasheet |
| Max working pressure | ~1.75 MPa |
| Pipe fitting | 1/2 inch (G1/2) threaded connections, inline installation |
| Interface | Single digital pin, read via pulse counting or an interrupt |
Pinout
| Pin | Name | Description |
|---|---|---|
| 1 | Red (VCC) | Power, 5–24V DC |
| 2 | Black (GND) | Ground |
| 3 | Yellow (Signal) | Pulse output — connect to a digital input pin, ideally interrupt-capable |
Attach the signal wire to an interrupt-capable pin and count pulses over a fixed time window (e.g. 1 second) to compute flow rate using the ~7.5 pulses-per-liter-per-minute constant from the datasheet; because the sensor is a mechanical turbine, always install it with the flow direction arrow molded into the housing matching the actual water flow direction.
Variants
The YF-S201 is the right default for most hobbyist water-metering and irrigation projects using standard 1/2-inch fittings. Step up to the FS300A only if the pipe diameter or expected flow rate is significantly larger than a typical household tap line.
| Variant | Temp range | Hum range | Accuracy | Protocol | Price |
|---|---|---|---|---|---|
| YF-S201 (1/2 inch) | ~$3-6 | ||||
| YF-S401 (smaller bore) | ~$3-5 | ||||
| FS300A (1 inch) | ~$5-9 |