DIY

Build a Simple Water Level Indicator Using Arduino

Ali Raza
July 24, 2025
5 min read

Learn how to build a basic water level indicator using Arduino and metal probes. Ideal for science fair projects or home automation.

Build a Simple Water Level Indicator Using Arduino

Never worry about an overflowing or empty water tank again! In this project, we’ll build a simple yet effective Arduino water level indicator using a water-level sensor and indicator LEDs (plus an optional buzzer). It’s perfect for science fairs, MakerBox challenges, and real-world home use.

Materials Needed Part Purpose Arduino Uno (or compatible) Processing data Water level sensor (analog, three-pin) Detect water level 3× LEDs (red/yellow/green) Visual level indicators 3× 220 Ω resistors Limit LED current Buzzer (optional) Overflow alarm Breadboard & jumper wires For circuit setup 5V power source Arduino and sensor power

Wiring Diagram Here's how to wire the sensor and LEDs: • Sensor VCC → 5 V, GND → GND, Signal → A0 • LEDs: Red → D2, Yellow → D3, Green → D4 (all cathodes to GND via resistor) • Optional Buzzer on D5 In this setup, each LED lights up as water rises: green (low), yellow (medium), red (high/full).

Arduino Code

// Pin definitions const int sensorPin = A0; const int ledLow = 2, ledMid = 3, ledHigh = 4; const int buzzer = 5;

void setup() { Serial.begin(9600); pinMode(ledLow, OUTPUT); pinMode(ledMid, OUTPUT); pinMode(ledHigh, OUTPUT); pinMode(buzzer, OUTPUT); }

void loop() { int value = analogRead(sensorPin); Serial.print("Level: "); Serial.println(value);

digitalWrite(ledLow, value > 300); digitalWrite(ledMid, value > 500); digitalWrite(ledHigh, value > 700);

digitalWrite(buzzer, value > 700); delay(500); }

How It Works • Sensor Operation: Water bridges sensor traces; the more submerged, the higher the analog voltage . • Arduino Reads Voltage: analogRead() gives a 0–1023 value (0–5 V) that correlates with water immersion. • Threshold Logic: If value crosses set thresholds, relevant LEDs light up and buzzer may sound.

Safety Considerations • Use 5 V supply only to avoid shocks • Insulate probes and wires to prevent corrosion and short circuits. • For pumps or mains use, always use isolated relays with Arduino control.

Calibration Tips • Dry sensor read might be ~0; fully submerged may be ~800–1000 — run AnalogReadSerial to test • Set thresholds dynamically based on your water and tank depth.

Next Steps & Upgrades • Connect a relay and pump to automate filling (like advanced tutorials on circuitdigest.com) • Add LCD or OLED display for live numeric readings. • Add IoT notifications with ESP32 or Ethernet shield.

arduino
sensors
water-level
beginner
electronics
Build a Simple Water Level Indicator Using Arduino | Circuit Press