Water Flow Sensor 1/8 inch

The water flow sensor measures the rate of a liquid flowing through it. The YF-S401 water flow sensor consists of a plastic valve body, flow rotor and hall effect sensor. It is usually used at the inlet end to detect the amount of flow. When liquid flows through the sensor, a magnetic rotor will rotate and the rate of rotation will vary with the rate of flow. The hall effect sensor will then output a pulse width signal. Connect it to a microcontroller and you can monitor multiple devices such as your coffee maker, sprinkler or anything else, and control the water flow rate to suit your needs!

Quick Spec

  • Inner Diameter: 4 mm
  • Outside diameter: 7 mm
  • Proof Water Pressure: <0.8 MPa
  • Water Flow Range: 0.3-6 L/min
  • Voltage Range: 5~12 V
  • Operating Current: 15 mA (DC 5V)
  • Insulation Resistance: >100 MΩ
  • Accuracy: ±5% (0.3-3L/min)
  • The Output Pulse High Level: >4.5 VDC (DC input voltage 5 V)
  • The Output Pulse Low Level: <0.5 VDC (DC input voltage 5 V)
  • Output Pulse Duty Ratio: 50% ± 10%
  • Water-flow Formula: 1L = 5880 square waves
  • Working Humidity Range: 35% ~ 90% RH (no frost)
  • Dimension: 58 x 35 x 26 mm
  • Weight: 30g

Wiring Diagram



  • Red: Power In
  • Black: Ground
  • Yellow: Signal Output

Sample Code

 This example reads Water flow sensor Sensor.

 Created 2016-3-13
 By berinie Chen 

 GNU Lesser General Public License.
 See  for details.
 All above must be included in any redistribution

/***********Notice and Trouble shooting***************
 1.Connection and Diagram can be found here  http://www.dfrobot.com/wiki/index.php?title=Water_Flow_Sensor_-_1/8%22_SKU:_SEN0216
 2.This code is tested on Arduino Uno.
volatile double waterFlow;
void setup() {
  Serial.begin(9600);  //baudrate
  waterFlow = 0;
  attachInterrupt(0, pulse, RISING);  //DIGITAL Pin 2: Interrupt 0
void loop() {
  Serial.println("   L");

void pulse()   //measure the quantity of square wave
  waterFlow += 1.0 / 5880.0;


Shipping List

  • 1 x Water Flow Sensor 1/8 inch

YF-S401 Flow Meter

  • Brand: Generic
  • Product Code: YF-S401
  • Stock

    Warehouse Stock Status Location
    Centurion In Stock A5
    Stellenbosch In Stock C0020
  • R135.00 (Inc Tax: R155.25)

Related Products

Liquid Flow Meter - Plastic 1/2" NPT Threaded

Liquid Flow Meter - Plastic 1/2" NPT Threaded

Liquid Flow Meter - Plastic 1/2" NPT Threaded Measure liquid/water flow for your solar, computer cooling, or gardening project using this handy basic flow meter. This sensor sit in line with your w..

R98.00 (Inc Tax: R112.70)

Liquid Pump - 750 GPH (12V)

Liquid Pump - 750 GPH (12V)

Liquid Pump - 750 GPH (12V) Do you have some liquids that you need to move? This fluid pump will move 750 gallons per hour! The SEAFLO mini water pump has a heavy duty 12V, 1.5Amp motor and a tough t..

R299.00 (Inc Tax: R343.85)

A3144 Hall effect sensor

A3144 Hall effect sensor

A3144 Hall effect sensor The A3144E(US1881) is an integrated Hall effect latched sensor. This makes for a robust presence sensor. A reed sensor also works nicely, but can be limited by the glass en..

R10.00 (Inc Tax: R11.50)

Tags: yf-s401, flow, meter, water flow, sensor, rate, sen0216