The YF-S201 water flow sensor is a Hall-effect-based device designed to measure water flow rate and total liquid consumption in a variety of systems. This article will discuss the YF-S201 working principle, pinout, specifications, features, operation, applications, and more.

The YF-S201 Water Flow Measurement Sensor is a compact hall-effect flow sensor designed to measure the flow rate and total volume of water passing through a pipe. It is commonly used in DIY electronics, industrial control, irrigation systems, and smart water-monitoring applications due to its low cost and simple interface.
Inside the sensor, flowing water spins a small rotor embedded with a magnet. A built-in Hall sensor detects each rotation and outputs a digital pulse signal. The pulse frequency is directly proportional to the flow rate, allowing microcontrollers such as Arduino or ESP32 to easily calculate real-time flow and accumulated water usage. The YF-S201 typically operates from 5–18 V, supports flow rates of about 1–30 L/min, and features a standard ½-inch pipe connection, making it easy to integrate into existing systems.

| Wire Color | Pin Name | Description |
| Red | VCC (Power) | Supplies operating voltage to the sensor, typically 5 V DC (supports up to ~18 V depending on application). |
| Black | GND (Ground) | Common ground reference; must be connected to the system or microcontroller ground. |
| Yellow | Signal (Digital Output) | Outputs a pulse signal generated by the Hall-effect sensor; pulse frequency is proportional to the water flow rate. |
• REES52 1/2"
• SEN0216
• YF-G1
• YF-G21
• FS200A
| Parameter | Specification |
| Working Voltage | DC 4.5 V – 24 V |
| Normal Voltage | DC 5 V – 18 V |
| Max. Working Current | 15 mA (DC 5 V) |
| Load Capacity | ≤ 10 mA (DC 5 V) |
| Flow Rate Range | 1 – 30 L/min |
| Operating Temperature | ≤ 80 °C |
| Liquid Temperature | ≤ 120 °C |
| Operating Humidity | 35% – 90% RH |
| Allowable Pressure | ≤ 1.75 MPa |
| Storage Temperature | −25 °C to +80 °C |
| Storage Humidity | 25% – 95% RH |
| Electric Strength | 1250 V/min |
| Insulation Resistance | ≥ 100 MΩ |
| External Thread Size | 1/2 inch |
| Outer Diameter | 20 mm |
| Intake Diameter | 9 mm |
| Outlet Diameter | 12 mm |
The YF-S201 has a small, lightweight structure with a standard 1/2-inch threaded interface, allowing it to be easily mounted in tight spaces and existing pipelines. Its three-wire connection simplifies integration with controllers and monitoring systems.
The sensor is designed to provide reliable sealing that helps prevent leaks during operation. This feature ensures consistent performance in continuous water flow applications and supports operation under allowable pressure levels.
A precision Hall effect sensor detects the rotation of the internal impeller and converts it into digital pulses. This allows accurate measurement of flow rate and total water volume with good repeatability.
The YF-S201 supports a broad operating voltage range, making it compatible with various power supplies and control platforms. This flexibility simplifies system design and power management.
The sensor delivers a clean and stable digital signal that is easy to read using microcontroller interrupt pins. The pulse frequency is directly proportional to the flow rate, enabling reliable real-time monitoring.
Its robust plastic body is resistant to corrosion and wear caused by water flow. This improves durability and makes the sensor suitable for long-term use in water-based systems.
The YF-S201 operates with low current requirements, making it suitable for energy-efficient designs and battery-powered systems.
Compliance with RoHS standards ensures the sensor meets environmental and safety regulations by limiting hazardous substances, supporting eco-friendly and compliant product designs.

The YF-S201 water flow sensor is a practical solution for measuring liquid flow rate and total water usage. It is widely used with microcontrollers such as Arduino due to its simple working principle and reliable output. Inside the sensor, a Hall-effect mechanism detects the rotation of an internal turbine as water passes through, producing electrical pulses that directly reflect the flow speed.
Proper wiring is the first step to accurate measurement. The sensor uses three connections: a power line, a ground line, and a signal line. When powered with a 5 V supply, the signal wire outputs pulse signals that increase in frequency as the water flow increases. For best results, this signal is connected to an interrupt-capable digital pin, allowing the microcontroller to count pulses precisely even at higher flow rates.
On the software side, the system calculates flow rate and total volume by counting pulses over a defined time period and applying a calibration factor. These values can then be converted into liters per minute and cumulative liters consumed. The processed data may be displayed on an LCD, monitored through serial communication, or used to trigger automated actions such as valve control or water cutoff.

| Flow Rate (L/H) | Frequency (Hz) | Error Range |
| 120 | 16.0 | ±10% / ±5% |
| 240 | 32.5 | ±10% / ±5% |
| 360 | 49.3 | ±10% / ±5% |
| 480 | 65.5 | ±10% / ±5% |
| 600 | 82.0 | ±10% / ±5% |
| 720 | 90.2 | ±10% / ±5% |
• Water flow measurement in household plumbing systems
• DIY digital water flow meters
• Arduino and microcontroller-based projects
• Smart irrigation and automatic watering systems
• Water usage monitoring and conservation systems
• Industrial liquid flow monitoring (low-pressure lines)
• Beverage dispensing and vending machines
• Pump performance monitoring and control
• Automatic water shut-off and leak detection systems
To ensure safe and reliable operation of the YF-S201 water flow sensor, proper electrical and mechanical handling is essential. The sensor should always be powered within its rated voltage, typically 5 V DC, to prevent internal damage to the Hall-effect circuitry. Reversing the power polarity or applying higher voltage may permanently damage the sensor and cause inaccurate readings.
Mechanical installation also plays a critical role in safe operation. The sensor must be installed in the correct flow direction as indicated by the arrow on the housing. It should be securely mounted to avoid vibration, stress on the plastic body, or strain on the wiring. Excessive mechanical force, over-tightening of fittings, or exposure to sudden pressure surges can lead to cracks, leaks, or sensor failure.
The YF-S201 is designed for clean water and similar low-viscosity, non-corrosive liquids. Using it with dirty water, liquids containing debris, or corrosive chemicals can block the internal turbine, damage seals, and shorten the sensor’s lifespan. A simple inline filter is recommended to protect the sensor in long-term applications.
During operation, the signal wire should be connected to a stable, interrupt-capable digital input with proper grounding to reduce electrical noise. Regular inspection and periodic calibration help maintain measurement accuracy and ensure long-term, safe operation in both DIY and professional systems.