Water level sensor


Level sensors are used to detect the level of substances that can flow. Such substances include liquids, granular material and can also be used to measure powdered substances.

Level sensors are widely used industrially, as level acts as an important monitoring parameter. This is a low cost easy to use sensor. The water level sensor module has a series of parallel exposed traces to measure droplets/water volume in order to determine the water level. Very Easy to monitor water level as the output to an analog signal is directly proportional to the water level.

This is a probe type water level sensor. Point Probe sensors are mostly Capacitive type or Resistive. It measures change in the value of capacitance when the sensor is dipped into the liquid. The change corresponds to Level variation.

The same code can be used for a rain drop sensor as well, as the principle is similar.

If the board has water or another fluid covering all the wire, then it will output a maximum analog value reading. Since analog values read by an Arduino range from 0 (lowest reading) to 1023 (highest reading), a board completely submerged with a liquid will have a reading of 1023 by an Arduino And if its not submerged into liquid, then a near 0 reading is obtained.

Documentation for the water level sensor is available here.

Connecting to Arduino

There are only three pins on the water level sensor:

Water level Sensor Pins Arduino Pins
+ 3.3V or 5V
S A0

Code example

 * Water level sensor tester
 * measuring the capacitance of water and hence the water level.
int sensorPin = A0; 
int sensorValue = 0;
void setup() {
void loop() {
 sensorValue = analogRead(sensorPin); 
 Serial.print("Sensor = " ); 

The raw source of the sketch example is visible here.