The STEM Makers

How to Build a Water Level Indicator using Arduino

A water level indicator using Arduino monitors water levels in tanks and displays real-time status through LEDs, buzzers, or LCD screens. This project helps prevent overflow or dry running of pumps, conserving water and electricity. It’s a practical, cost-effective solution for homes and industries using simple sensors and Arduino control. 

 Main Components Required 

  • Arduino Uno or Nano 
  • Ultrasonic Sensor (HC-SR04) or Float Sensors 
  • LEDs (3-5 for level indicators) 
  • Buzzer 
  • Resistors (220Ω) 
  • Breadboard and jumper wires 
  • Power supply (5V) 

 How Does the System Work? 

The ultrasonic sensor (or float sensors) detects the distance between the water surface and the sensor position. Arduino processes this data and turns ON LEDs based on predefined water levels. A buzzer can alert when the tank is full or empty. Optional LCD displays the current water level in percentage. 

 Step-by-Step Setup Guide 

  • Place the Sensor: Fix the ultrasonic sensor at the top of the water tank facing downward.
  • Connect Components:
    VCC → 5V, GND → GND
    Trig → Pin 9, Echo → Pin 10
    LEDs to pins 2-6 with resistors, buzzer to pin 7
  • Upload Code: Write and upload Arduino code using the Arduino IDE.
  • Test the System: Adjust the distance range for empty and full tank levels in the code.
  • Run and Monitor: Observe LED indicators and buzzer alerts as water level changes. 

 Sample Arduino Code 

#define trigPin 9
#define echoPin 10
#define buzzer 7

long duration;
int distance;

void setup() {
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
  pinMode(buzzer, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);

  duration = pulseIn(echoPin, HIGH);
  distance = duration * 0.034 / 2;

  Serial.print(“Distance: “);
  Serial.println(distance);

  if (distance < 10) {
    digitalWrite(buzzer, HIGH);
  } else {
    digitalWrite(buzzer, LOW);
  }
  delay(1000);
}
 

What is a Water Level Indicator? 

A water level indicator is an electronic system that measures and displays the level of water in a tank or container. It helps in automating water management by preventing overflow and dry running of pumps, making it useful for households, industries, and agriculture. 

 Advantages of Arduino in This Project 

  • Low Cost: Affordable and easy to integrate. 
  • Customizable: Can add LCD, Wi-Fi, or GSM notifications. 
  • Scalable: Works for small tanks or large industrial systems. 
  • Open-Source: Plenty of libraries and community support. 

 Enhancements You Can Add 

  • LCD Display: Show water level percentage. 
  • Wi-Fi Module (ESP8266): Send alerts to a mobile app. 
  • Relay Control: Automatically switch water pumps ON/OFF. 
  • Solar Power: Make the system eco-friendly. 

StemMakers Capability in Arduino projects 

We at The StemMakers based out of Vijayawada near DV Manor Hotel have successfully worked on 20+ custom Arduino-based student science projects, delivering innovative and practical solutions for various science fairs and competitions

Contact us at StemMakers.com for custom projects and guidance!

Contact us for kits, training, and project guidance: 
📧 asha@thestemmakers.com | 🌐 www.thestemmakers.com

Discover additional Arduino projects by The STEM Makers through the links below.

Know More about Arduino Consulting at The STEM Makers

How to build a water level indicator Arduino
How to Build a Smart Dustbin using Arduino
How to Build a Smart Home Automation using Arduino
How to Build a Traffic Light System using Arduino
How to Build a Temperature & Humidity Monitor using Arduino
How to build an Obstacle Avoiding Robot using Arduino
How to build an Automatic Plant Watering System using Arduino 

Scroll to Top