Arduino-Compatible Water Level / Rain Sensor Module

A simple and versatile analog sensor for detecting the presence, depth, or volume of water. Ideal for rain detection, overflow alerts, liquid leakage monitoring, and water level sensing in tanks or reservoirs.

Specifications

ParameterDetails
Operating VoltageDC 3.3V – 5V
Operating Current< 20mA
Output TypeAnalog
Detection Area40 × 16mm
PCB MaterialFR4 double-sided HASL
Operating Temperature10°C – 30°C
Operating Humidity10% – 90% (non-condensing)
Dimensions62 × 20 × 8mm
Weight~3.5g

Pin Descriptions

PinDescription
VCCPower supply (3.3V–5V)
GNDGround
S (Signal)Analog output — voltage increases with water level

How It Works

The sensor uses a series of exposed parallel traces on the PCB. When water bridges these traces, it creates a resistive path — the more submerged the sensor, the lower the resistance and the higher the analog output voltage. This value can be read by any microcontroller with an analog input pin.


Arduino Example Sketch

cpp
// Water Level Sensor - Basic Arduino Example
// Connections: VCC -> 5V, GND -> GND, S -> A0

const int sensorPin = A0;   // Analog input pin
const int threshold  = 500; // Adjust to suit your setup (0–1023)

void setup() {
  Serial.begin(9600);
  Serial.println("Water Level Sensor Ready");
}

void loop() {
  int sensorValue = analogRead(sensorPin);

  Serial.print("Water Level: ");
  Serial.println(sensorValue);

  if (sensorValue > threshold) {
    Serial.println(">> Water detected!");
  } else {
    Serial.println(">> Dry");
  }

  delay(500);
}

Tip: Open the Serial Monitor at 9600 baud to view readings. A value of 0 indicates dry; higher values indicate increasing water contact. Adjust the threshold value to suit your application.

Common Applications

What's Included