# Flow sensor 0.3-6l/min, YF-S401, 120 degrees

> YF-S401 flow sensor for liquids, measures flow rate between 0.3 and 6 l/min, using a stainless steel ball rotor and Hall sensor, PWM signal output on the yellow wire. Supply voltage 6V, maximum current 15mA at 5V, supported pressure

- Page: https://sigmanortec.ro/en/flow-sensor-03-6l-min-yf-s401-120-degrees
- Price: 26.80 RON
- Availability: In stock; 1-2 zile
- Reference: 9076 · EAN: 5945936570706
- Category: Electronic components > Electrical valves and Debitmeters
- Package (shipping data): 0.03 kg
- Updated: 2026-09-14
- Shop: [Sigmanortec.ro](https://sigmanortec.ro/en/llms.txt)
- Prices: RON, VAT included; prices and stock as of 2026-10-22 04:49 (Europe/Bucharest)

## Description

The YF-S401 flowmeter measures liquid flow between 0.3 and 6 l/min, using a stainless steel ball rotor and Hall sensor, providing easy-to-read PWM output with Arduino or other controllers. It operates at 6V, has low consumption and supports pressures up to 0.8 MPa, making it suitable for automation, dosing and flow monitoring in compact installations.
Liquid flowmeter sensor with stainless steel ball inside, with flow measurement by Hall element.
The pump is installed vertically, without exceeding a maximum inclination of 5 degrees, for correct operation.
The pump is resistant to liquids with a maximum temperature of 120 degrees C.
The sensor transmits a signal in the form of PWM (Pulse with Modulation) on the yellow wire, generated by the Hall sensor that is activated by the rotation of the rotor. Depending on its rotation speed, a variable pulse width will be obtained.
Specifications:
Supply voltage: 6V
Output signal: PWM
Measured flow: 0.3 - 6L/min
Pressure: <0.8MPa
Maximum current: 15mA at 5V
Operating temperature: <80 degrees C
Humidity: 35 - 90%
Dimensions mm: 58 x 34 x 27mm
Outer tube diameter: 7mm
Inner tube diameter: 3mm
Login:
Red: 6VDC
Black: GND
Yellow: PWM signal
Use:
To be used together with Arduino, connect the power (Red wire) to 5V , the Black wire to GND , the Yellow wire to digital pin 2 . A 10K PullUp resistor will be added between pin 2 and 5V to prevent the float effect on digital pin 2 and implicitly block the returned value.
Open the Arduino IDE and compile the following code (which you can also find in text form in the Download section:
__________________________________________________
int flowPin = 2; //Input pin
double flowRate; //Value to be calculated
volatile int count;
void setup() {
// put your setup code here, to run once:
pinMode(flowPin, INPUT); //Set pin as Input
attachInterrupt(0, Flow, RISING); //Setup interrupt 0 on pin 2 for the Flow function
Serial.begin(9600); //Start Serial
}
void loop() {
// put your main code here, to run repeatedly:
count = 0; // Reset counter
break(); //Enable interrupted
delay(1000);
noInterrupted(); //Disable interrupted
//Start the math
flowRate = (count * 2.25); //calculate the flow rate
flowRate = flowRate * 60; //convert seconds to minutes
flowRate = flowRate / 1000; //convert ml to L
Serial.println(flowRate);
}
void Flow()
{
count++; //increment count by 1
}
__________________________________________________________
