← All Projects

Water Level Indicator with LED Bar

154 viewsMarch 4, 2026
ArduinoWater LevelLEDSensorBeginner

A visual water level monitoring system using simple wire probes at different heights in a tank. Four LEDs indicate the water level from empty to full. Includes a buzzer alarm when the tank overflows.

Components & Supplies

×1Arduino Uno R3
×1Green LED (5mm)
×1Yellow LED (5mm)
×1Orange LED (5mm)
×1Red LED (5mm)
×1Active Buzzer
×5Copper Wire Probes

How It Works

This project uses the conductivity of water to detect levels. Four wire probes are placed at 25%, 50%, 75%, and 100% heights inside a water tank. A common ground wire sits at the bottom. When water reaches a probe, current flows and the Arduino reads it as HIGH.

Each level lights up a corresponding LED (green, yellow, orange, red). When the tank is full (100%), a buzzer sounds to warn of potential overflow.

arduinoWater Level Sketch
const int probe25 = 2;
const int probe50 = 3;
const int probe75 = 4;
const int probe100 = 5;

const int led25 = 8;
const int led50 = 9;
const int led75 = 10;
const int led100 = 11;
const int buzzer = 7;

void setup() {
  Serial.begin(9600);
  for (int p = 2; p <= 5; p++) pinMode(p, INPUT);
  for (int l = 8; l <= 11; l++) pinMode(l, OUTPUT);
  pinMode(buzzer, OUTPUT);
}

void loop() {
  bool l25 = digitalRead(probe25);
  bool l50 = digitalRead(probe50);
  bool l75 = digitalRead(probe75);
  bool l100 = digitalRead(probe100);

  digitalWrite(led25, l25 ? HIGH : LOW);
  digitalWrite(led50, l50 ? HIGH : LOW);
  digitalWrite(led75, l75 ? HIGH : LOW);
  digitalWrite(led100, l100 ? HIGH : LOW);

  if (l100) {
    digitalWrite(buzzer, HIGH);
    Serial.println("TANK FULL!");
  } else {
    digitalWrite(buzzer, LOW);
  }

  int level = l100 ? 100 : l75 ? 75 : l50 ? 50 : l25 ? 25 : 0;
  Serial.print("Water Level: ");
  Serial.print(level);
  Serial.println("%");

  delay(500);
}