Introduction
The Water Flow Sensor measures the rate of water flow through a pipe. It is commonly used in irrigation systems, water dispensers, and liquid flow monitoring. The sensor outputs a pulse signal proportional to the flow rate.
Features
- Measures water flow rates from 1 to 30 liters per minute (L/min).
- Output: Digital pulse signal proportional to flow rate.
- Compact and durable design.
- Operates at 5V DC.
Pinout
| Pin | Description |
|---|---|
| Red | Power Supply (5V) |
| Black | Ground |
| Yellow | Pulse Output Signal |
Working Principle
The Water Flow Sensor consists of a turbine wheel, a hall effect sensor, and a housing. When water flows through the sensor, the turbine wheel rotates. The hall effect sensor detects the rotation and outputs a pulse signal proportional to the flow rate. By counting the number of pulses, the flow rate and total volume can be calculated.
Arduino Example Code
const int flowPin = 2; // Pin connected to the sensor's yellow wire
volatile int pulseCount = 0;
void setup() {
Serial.begin(9600);
pinMode(flowPin, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(flowPin), countPulses, FALLING);
Serial.println("Water Flow Sensor Initialized");
}
void loop() {
pulseCount = 0; // Reset pulse count
delay(1000); // 1-second interval
float flowRate = pulseCount / 7.5; // Convert pulses to liters/min
Serial.print("Flow Rate: ");
Serial.print(flowRate);
Serial.println(" L/min");
}
void countPulses() {
pulseCount++;
}
Sensor Image