Description
What it is
The YF-S201C water flow sensor is a useful device for monitoring and measuring water flow in pipes. This sensor can be easily integrated into DIY projects such as water counters or hydraulic alarm systems.
Features
- Connector Type: G1/2 DN15
- Power Supply Variables: 3.5-24VDC
- Flow Measurement Range: 1-30L/min
What it is for
The YF-S201C sensor is ideal for applications requiring precise water flow monitoring. It can be used in Arduino or ESP32 projects to send email notifications when the flow exceeds a certain threshold.
Tutorial: How to Use Water Flow Sensor YF-S201C
The YF-S201C water flow sensor is a useful device for monitoring the amount of water passing through a pipe. It is ideal for DIY projects such as water counters or hydraulic alarm systems.
What you need
- Arduino Uno
- Jumper Connections
- USB Cable
- Arduino IDE Software
Steps
- Connect the sensor pins to the microcontroller: GND to ground, VCC to power supply (3.5-24VDC), OUT to the Arduino’s digital interface.
- Open Arduino IDE and create a new sketch.
- Insert the provided code to read data from the sensor.
- Upload the sketch to the microcontroller.
- Optimize sensor settings by checking the power supply voltage and measurement range (1-30L/Min).
- Monitor water flow using Serial Monitor to view real-time data.
- If necessary, add an LCD or OLED display for a more intuitive data visualization.
- Test the sensor with various flow conditions to ensure its accuracy.
Example code
void setup() {
Serial.begin(9600);
}
void loop() {
int val = digitalRead(pinOUT); // Verifica sul datasheet il pin corretto
if(val == HIGH) {
Serial.println("Acqua in movimento");
} else {
Serial.println("Acqua fermo");
}
}
Mini project
Create a water flow monitoring system that sends email notifications when the flow exceeds a certain threshold.
Common mistakes
- Connect the sensor to the wrong electrical voltage.
- Do not verify the correct pin OUT configuration.
- Omit testing the sensor with different flow conditions.
- Enter invalid data in the code.
Recommended accessories
- LCD Display
- ESP8266 Wi-Fi Module
- LiPo Battery
- Relay Control
Frequently asked questions
What is the minimum operating voltage for the YF-S201C sensor?
The minimum operating voltage is 3.5VDC, check the datasheet.
Can the sensor measure flows below 1L/min?
The sensor has a measurement range of 1-30L/Min, so it cannot detect values below 1L/min.
How can I integrate the sensor with a Wi-Fi network?
Use an ESP8266 module to send the water flow data to the cloud server.













Reviews
There are no reviews yet.