Dark Light
, , , ,

Yf-s201 Arduino Water Flow Sensor Water Measurement Sensor In Pakistan



This YF-S201 sensor sits in line with your water line and contains a pinwheel sensor to measure how much liquid has moved through it. There’s an integrated magnetic hall effect sensor that outputs an electrical pulse with every revolution. The hall effect sensor is sealed from the water pipe and allows the sensor to stay safe and dry.

The sensor comes with three wires: red (5-24VDC power), black (ground) and yellow (Hall effect pulse output). By counting the pulses from the output of the sensor, you can easily calculate water flow. Each pulse is approximately 2.25 milliliters. Note this isn’t a precision sensor, and the pulse rate does vary a bit depending on the flow rate, fluid pressure and sensor orientation. It will need careful calibration if better than 10% precision is required. However, YF-S201 is great for basic measurement tasks!

We have as example Arduino sketch that can be used to quickly test the sensor, it will calculate the approximate flow of water in liters/hour. The pulse signal is a simple square wave so its quite easy to log and convert into liters per minute using the following formula. Pulse frequency (Hz) / 7.5 = flow rate in L/min.


  1. Model: YF-S201
  2. Sensor Type: Hall effect
  3. Working Voltage: 5 to 18V DC (min tested working voltage 4.5V)
  4. Max current draw: 15mA @ 5V
  5. Output Type: 5V TTL
  6. Working Flow Rate: 1 to 30 Liters/Minute
  7. Working Temperature range: -25 to +80℃
  8. Working Humidity Range: 35%-80% RH
  9. Accuracy: ±10%
  10. Maximum water pressure: 2.0 MPa
  11. Output duty cycle: 50% +-10%
  12. Output rise time: 0.04us
  13. Output fall time: 0.18us
  14. Flow rate pulse characteristics: Frequency (Hz) = 7.5 * Flow rate (L/min)
  15. Pulses per Liter: 450
  16. Durability: minimum 300,000 cycles
  17. Cable length: 15cm
  18. 1/2″ nominal pipe connections, 0.78″ outer diameter, 1/2″ of thread
  19. Size: 2.5″ x 1.4″ x 1.4″

Connection details:

  1. Red wire : +5V
  2. Black wire : GND
  3. Yellow wire : PWM output.


  1. YF-S201 Datasheet
  2. Example Code

Based on 0 reviews

0.0 overall

Only logged in customers who have purchased this product may leave a review.

There are no reviews yet.