✨ Use RCAPP and get 5% off 👇
Skip to content
Free Delivery on Orders Above Rs 999/- Pan-India
Cash on Delivery Available for Orders above Rs.500/- and Upto Rs 3000/-
SAVE more when you BUY more. Upto 30% Off on BULK PURCHASE
GST Invoices for Your Business
Dedicated Technical Support Team
Safely Delivering Genuine Products PAN INDIA

Water Level Indicator Using Arduino – Sensor Interfacing Guide

Water Level Indicator Using Arduino – Sensor Interfacing Guide
D
Written By Daniel D'Souza
📅 Updated on 17 Jun 2026
Summarize with AI
✅ Prompt copied

Summary

Discover the world of water level sensing with our comprehensive blog! Learn about the fundamental aspects of water level sensors and the necessary components for your project. We'll guide you through the crucial process of calibrating the water level sensor to ensure precise readings. Get hands-on with the step-by-step tutorial on interfacing the sensor with Arduino, demystifying the water level indicator output. Uncover practical applications of this versatile tool in various scenarios. Start your water level sensing journey today and elevate your DIY projects to new heights! Don't miss out - dive into our exciting blog now!

Introduction

Welcome to our comprehensive guide on "Water Level Indicator: Interfacing Water Level Sensor With Arduino." In this step-by-step tutorial, we will walk you through the process of building a water level indicator using an Arduino board and a water level sensor. With this project, you will gain valuable insights into water management and conservation, making a positive impact on the ongoing water crisis.

Water is a precious resource, and with the increasing population and rapid urbanization, proper water management has become a pressing issue in India. The nation is facing a water crisis, where the demand for water is surpassing the available supply. This has led to water scarcity in many regions, impacting agriculture, industries, and daily life.

Introducing the Water Level Indicator Project with Arduino

To address the water crisis and promote water conservation at an individual level, the water level indicator project using Arduino comes to the rescue. This mini water management system allows you to monitor the water level in your water tank effectively. By interfacing the water level sensor with the Arduino UNO, you can build a simple yet efficient water level indicator that provides real-time information about the water level in the tank. This empowers you to make informed decisions about water usage and avoid unnecessary wastage.

 

read our blog explaining interfacing temperature sensor with arduino, which provides a detailed guide on interfacing the LM35 temperature sensor with an Arduino board.

Components and Supplies

Original Arduino Uno R3 microcontroller board with ATmega328P and USB port - Arduino Uno Board -RobocrazeOriginal Arduino Uno R3 microcontroller board with ATmega328P and USB port - Arduino Uno Board -Robocraze

    Arduino Uno R3 Original

    Arduino UNO R3 Original The Arduino Uno R3 is a microcontroller board based on the ATmega328P chip and is widely recognized as the best original Arduino Uno board for beginners and projects. This board has 14 digital I/O pins (6 support PWM), 6 analog...
    Rs 2,499/-
    Rs 2,499/-
    Rs 2,649/-
    Save Rs 150/-
    High Sensitivity Water Level Sensor – Water sensor for liquid detection in smart projects.-Water Sensor -RobocrazeHigh Sensitivity Water Level Sensor – Water sensor for liquid detection in smart projects.-Water Sensor -Robocraze

      High Sensitivity Water Level Sensor compatible with Arduino

      High Sensitivity Water Level Sensor compatible with Arduino Are you tired of inaccurate water level measurements in your Arduino projects? Say hello to the Water Level Depth Detection Sensor for Arduino – your ultimate solution for precise and reliable water level detection. With an...
      Rs 21/-
      Rs 21/-
      Rs 29/-
      Save Rs 8/-
      Arduino Uno R3 Board compatibleArduino Uno R3 Board compatible

        Arduino Uno R3 Board compatible

        Arduino Uno R3 Compatible Board  The Arduino Uno R3 CH340G ATMEGA328P Development Board is more than just a microcontroller board; it's a gateway to endless possibilities in the world of electronics and programming. For hobbyists, students, and makers, it stands out as the best Arduino...
        Rs 429/-
        Rs 429/-
        Rs 699/-
        Save Rs 270/-
        GL12 840 Points Solderless Breadboard for Large Prototyping - Electronic Components -RobocrazeGL12 840 Points Solderless Breadboard for Large Prototyping - Electronic Components -Robocraze

          GL12 840 Points Solderless Breadboard

          GL12 MB102 840 Points Solderless Breadboard Introducing the GL12 840 Points Breadboard at Robocraze! This solderless breadboard is an essential tool for any electronics engineer or hobbyist. It allows you to make temporary prototypes for your electronics projects, making it perfect for experimenting with...
          Rs 70/-
          Rs 70/-
          Rs 90/-
          Save Rs 20/-
          Jumper Wire Set - M2M, M2F, F2F (40 pcs each) – Ideal for Arduino & prototyping. Electronic Components - RobocrazeJumper Wire Set - M2M, M2F, F2F (40 pcs each) – Ideal for Arduino & prototyping. Electronic Components - Robocraze

            Jumper Wire Set - M2M, M2F, F2F (40 pcs each)

            Jumper Wire Set - M2M, M2F, F2F (40 pcs each) These DuPont jumper wires for electronics is a premium quality wire manufactured by using quality assured material and advanced techniques, which make them up to the standard in this highly challenging field. This 120pcs...
            Rs 135/-
            Rs 135/-
            Rs 169/-
            Save Rs 34/-
            Resistor Box (150PC, 30 Values) – Comprehensive resistor kit. -Basic Components -RobocrazeResistor Box (150PC, 30 Values) – Comprehensive resistor kit. -Basic Components -Robocraze

              Resistor Box (150 Resistors and 30 Values)

              Resistor Box (150 Resistors and 30 Values) If you're an electronics enthusiast or hobbyist, the Resistor Box is an essential addition to your toolkit. This comprehensive kit includes 150 high-quality resistors with 30 unique values, ranging from 1E to 1M ohms. These versatile components...
              Rs 45/-
              Rs 45/-
              Rs 84/-
              Save Rs 39/-
              5mm Round Red Diffused LED (Pack of 10) – Soft-glow LED for circuits & lighting - Electronic Components - Robocraze5mm Round Red Diffused LED (Pack of 10) – Soft-glow LED for circuits & lighting - Electronic Components - Robocraze

                5mm Round Red Diffused Led (Pack of 10)

                5mm Red Led (Pack of 10) A Red light-emitting diode (LED) is a semiconductor light source. LED's are used as indicator lamps in many devices and are increasingly used for other lighting. It looks like a white led and illuminate's blue light. When a...
                Rs 13/-
                Rs 13/-
                Rs 14/-
                Save Rs 1/-
                5mm White Green LED (Pack of 10) – Reliable LED for DIY lighting & electronics - Electronic Components - Robocraze5mm White Green LED (Pack of 10) – Reliable LED for DIY lighting & electronics - Electronic Components - Robocraze

                  5mm White Green LED(Pack of 10)

                  5mm White Green LED (Pack of 10) A white Green light-emitting diode (LED) is a semiconductor light source. LED's are used as indicator lamps in many devices and are increasingly used for other lighting. It looks like a white led and illuminate's blue light....
                  Rs 15/-
                  Rs 15/-
                  Rs 27/-
                  Save Rs 12/-
                  3mm Yellow LED (Pack of 10) – Low-power LED for DIY electronics - Electronic Components - Robocraze3mm Yellow LED (Pack of 10) – Low-power LED for DIY electronics - Electronic Components - Robocraze

                    3 mm Yellow LED (Pack of 10)

                    3 mm Yellow LED (Pack of 10) A Yellow light-emitting diode (LED) is a semiconductor light source. LED's are used as indicator lamps in many devices and are increasingly used for other lighting. It looks like a white led and illuminate's blue light. When...
                    Rs 19/-
                    Rs 19/-
                    Rs 32/-
                    Save Rs 13/-

                    Understanding the Water Level Sensor

                    Overview of the Water Level Sensor

                     

                     

                    The water level sensor is a critical component of the water level indicator project. It is designed to detect water levels and provide an output based on the resistance of the water present in the tank. The sensor consists of a series of parallel exposed conductors, acting as a variable resistor. When submerged in water, the sensor's resistance changes, allowing it to indicate different water levels.

                    Hardware Outline of the Water Level Sensor

                    The water level sensor comprises ten exposed copper traces, with alternate copper and sense traces. These traces form a bridge when immersed in water, affecting the conductivity and, subsequently, the resistance. The sensor also includes an onboard power LED for power indication.

                    Working Principle of the Water Level Sensor

                    The sensor operates based on the principle of variable resistance. As more water is present in the tank and the sensor is submerged, the conductivity increases, leading to lower resistance. Conversely, less water results in higher resistance. The sensor's analog output is proportional to the resistance, allowing you to determine the water level.

                     

                    read more : How to connect ZMPT101B to Arduino

                    Pin Description of the Water Level Sensor

                     

                    The water level sensor has three pins:

                    • S (signal pin): An analog output connected to the Arduino's analog pin.
                    • +VCC: The power pin, accepting input voltage from 3.3V to 5V.
                    • -GND: The ground pin.

                     

                    Components Required for the Project

                    List of Components for Building the Water Level Indicator

                    To build the water level indicator, you will need the following components:

                    read more : IR Sensor Interfacing with Arduino

                    Understanding the Role of Each Component

                    Each component plays a vital role in the functionality of the water level indicator. The water level sensor detects water levels, the Arduino Uno processes the sensor data, and the LEDs provide visual indications. Jumper wires, resistors, and the breadboard ensure proper connections and circuit stability.

                     

                    Calibrating the Water Level Sensor

                    The Importance of Calibrating the Water Level Sensor

                    Calibrating the water level sensor is crucial to ensure accurate readings and reliable performance. It involves determining the sensor outputs for different water levels, such as completely dry, partially submerged, and fully submerged.

                    Step-by-Step Guide for Calibrating the Sensor

                    Calibrating the water level sensor may require some trial and error. Start by noting the readings for different water levels and adjust the threshold values in the Arduino code accordingly. Once properly calibrated, the sensor will provide precise data for effective water level monitoring.

                     

                    read more : Interfacing MPU-9250 9-DOF Sensor with Arduino

                     

                    Interfacing the Water Level Sensor with Arduino

                    Interfacing Diagram for Connecting the Sensor with Arduino

                    To interface the water level sensor with the Arduino Uno, follow the provided diagram. Connect the sensor's signal pin to the Arduino's A0 pin, VCC to Digital pin 7, and GND to the Ground.

                     

                    Code

                    After completing your circuit, upload the provided code to your Arduino software. The code uses two variables, Upper Threshold & Lower Threshold, to represent the threshold levels. When the water level is below the lower threshold, the red LED will turn on. When the water level is above the upper threshold, the green LED will turn on. If the water level is between these two levels, the yellow LED will turn on.

                    
                    /* Change these values based on your calibration values */
                    int lowerThreshold = 420;
                    int upperThreshold = 520;
                    
                    // Sensor pins
                    #define sensorPower 7
                    #define sensorPin A0
                    
                    // Value for storing water level
                    int val = 0;
                    
                    // Declare pins to which LEDs are connected
                    int redLED = 2;
                    int yellowLED = 3;
                    int greenLED = 4;
                    
                    void setup() {
                    	Serial.begin(9600);
                    	pinMode(sensorPower, OUTPUT);
                    	digitalWrite(sensorPower, LOW);
                    	
                    	// Set LED pins as an OUTPUT
                    	pinMode(redLED, OUTPUT);
                    	pinMode(yellowLED, OUTPUT);
                    	pinMode(greenLED, OUTPUT);
                    
                    	// Initially turn off all LEDs
                    	digitalWrite(redLED, LOW);
                    	digitalWrite(yellowLED, LOW);
                    	digitalWrite(greenLED, LOW);
                    }
                    
                    void loop() {
                    	int level = readSensor();
                    
                    	if (level == 0) {
                    		Serial.println("Water Level: Empty");
                    		digitalWrite(redLED, LOW);
                    		digitalWrite(yellowLED, LOW);
                    		digitalWrite(greenLED, LOW);
                    	}
                    	else if (level > 0 && level <= lowerThreshold) {
                    		Serial.println("Water Level: Low");
                    		digitalWrite(redLED, HIGH);
                    		digitalWrite(yellowLED, LOW);
                    		digitalWrite(greenLED, LOW);
                    	}
                    	else if (level > lowerThreshold && level <= upperThreshold) {
                    		Serial.println("Water Level: Medium");
                    		digitalWrite(redLED, LOW);
                    		digitalWrite(yellowLED, HIGH);
                    		digitalWrite(greenLED, LOW);
                    	}
                    	else if (level > upperThreshold) {
                    		Serial.println("Water Level: High");
                    		digitalWrite(redLED, LOW);
                    		digitalWrite(yellowLED, LOW);
                    		digitalWrite(greenLED, HIGH);
                    	}
                    	delay(1000);
                    }
                    
                    //This is a function used to get the reading
                    int readSensor() {
                    	digitalWrite(sensorPower, HIGH);
                    	delay(10);
                    	val = analogRead(sensorPin);
                    	digitalWrite(sensorPower, LOW);
                    	return val;
                    }
                    

                    Code Explanation for Arduino to Interface with the Sensor

                    Upload the provided code to your Arduino software. The code uses threshold values to determine the water level and controls the LEDs accordingly. Red LED indicates low water, green LED indicates high water, and yellow LED indicates medium water level.

                     

                    read more : Arduino Interfacing with Ultrasonic Sensor

                     

                    Understanding the Water Level Indicator Output

                    Explanation of the Water Level Indicator Output

                    The water level indicator output is in the form of LED indications. Based on the water level, the corresponding LED will light up, providing a visual representation of the tank's status.

                    Understanding the LED Indications for Different Water Levels

                    When the water level is below the lower threshold, the red LED will turn on, indicating low water. If the water level is between the lower and upper thresholds, the yellow LED will be on, indicating medium water level. When the water level is above the upper threshold, the green LED will light up, indicating high water.

                     

                    Practical Applications of the Water Level Indicator

                    Implementing the Water Level Indicator in Various Scenarios

                    The water level indicator finds applications in domestic and commercial water storage systems, ensuring timely refilling or pumping as needed.

                    Potential Uses and Benefits in Different Environments

                    The water level indicator can be used in residential buildings, industries, agriculture, and even in water tanks of remote areas where water supply is scarce. 

                     

                    read more : HOME AUTOMATION USING ARDUINO AND BLUETOOTH

                    Conclusion

                    The water level indicator project with Arduino offers a simple yet effective solution to tackle the water crisis at an individual level. By understanding the water level sensor, calibrating it, and interfacing it with Arduino, users can monitor their water usage and promote water conservation.

                    Implementing the water level indicator project not only benefits the individual but also contributes to the broader goal of water conservation and sustainability. By taking the first step towards efficient water management, readers can play a part in addressing the water crisis and creating a more sustainable future for all.

                    Excerpt

                    Learn how to build a water level indicator using Arduino and a water level sensor. Step-by-step sensor interfacing, calibration, and LED indication explained.

                    Frequently Asked Questions

                    1. What is the ideal calibration range for the water level sensor?

                    The ideal calibration range for the water level sensor may vary based on the type of water being used. Users should calibrate the sensor by noting output values when it is dry, partially submerged, and completely submerged. These values will help set the threshold levels for the water level indicator.

                    2. Can I use the water level indicator for other liquids besides water?

                    The water level indicator is designed for detecting water levels and may not work accurately with other liquids. It is essential to calibrate the sensor specifically for the type of liquid being monitored to obtain reliable readings.

                    3. How long does the water level sensor last before requiring replacement?

                    The longevity of the water level sensor depends on various factors, such as usage conditions and maintenance. With proper care and regular maintenance, the sensor can last for an extended period. However, users should monitor its performance over time and replace it if necessary.

                    4. How does a water level sensor work?

                    A water level sensor operates by detecting the presence of water through various methods, such as resistive, capacitive, or ultrasonic. When water comes into contact with the sensor, it triggers a change in electrical signals, indicating the water level. These sensors can help automate systems like pumps and alarms, ensuring efficiency and safety in water management.

                    5. How to connect the sensor with Arduino?

                    To connect a water level sensor to an Arduino, use jumper wires to connect the sensor’s output pin to any digital input pin on the Arduino. Power the sensor by connecting its VCC pin to the Arduino’s 5V pin and the GND pin to the Arduino’s ground. This simple setup allows your Arduino to read water levels effectively.

                    6. What code is used for level indication?

                    To indicate water levels, you can use a simple Arduino sketch that reads the sensor’s output. Use the `digitalRead()` function to check the sensor pin status. Based on the reading, you can display messages or control other components. Sample code includes initializing the sensor pin and using an `if` statement to indicate high or low water levels.

                    7. How to use LEDs to show water levels?

                    To use LEDs for water level indication, connect LEDs to digital pins on your Arduino. Assign one LED for low level, one for medium, and another for high level. In your code, use `digitalWrite()` to turn on the corresponding LED based on the sensor’s signal. This visual indicator helps quickly assess water levels at a glance.

                    8. Can this system automate water pumps?

                    Yes, a water level sensor system can automate water pumps. By connecting the sensor to the Arduino, you can program it to turn the pump on or off based on detected water levels. This automation helps maintain optimal water conditions in tanks and prevents overflow or dry running of the pump.

                    9. What power supply is needed?

                    A typical water level sensor operates on a low voltage of around 5V, which can be supplied directly from an Arduino board. If using multiple sensors or additional components, consider a dedicated power supply that matches the voltage requirements and can handle the total current demand of your setup.

                    10. How to calibrate water levels?

                    To calibrate water levels, place the sensor at the desired height in the tank. Run a test to obtain readings when the tank is empty and full. Adjust your code or thresholds accordingly to accurately reflect the actual water levels, ensuring reliable operation and event triggers based on these readings.

                    11. Is it waterproof?

                    Most standard water level sensors are designed to be water-resistant but may not be fully waterproof. Check the specifications of your specific model to ensure it is suitable for your application. For prolonged submerged use, consider using sensors specifically rated for underwater environments to prevent damage.

                    12. What components are required?

                    The essential components for a water level sensor system include a water level sensor (ultrasonic or resistive), an Arduino board, connecting wires, an LED or LCD display (optional), and a relay module for pump automation. Depending on your project, you might also need resistors, a power supply, and a breadboard for prototyping.

                    13. How to display water level on LCD?

                    To display water levels on an LCD, connect the LCD to the Arduino using I2C or direct pin connections. Use the `LiquidCrystal` library to initialize and control the display. In your code, read the sensor value and use `lcd.print()` to show the water level in numerical or status format, making monitoring easy and intuitive.

                    Prev Post
                    Next Post

                    Leave a comment

                    Please note, comments need to be approved before they are published.

                    Thanks for subscribing!

                    This email has been registered!

                    Shop the look

                    Choose Options

                    Edit Option
                    Back In Stock Notification
                    Compare
                    Product SKU Description Collection Availability Product Type Other Details

                    Choose Options

                    this is just a warning
                    Login
                    Shopping Cart
                    0 items
                    FREE SHIPPING!
                    ₹100 OFF
                    ₹200 OFF
                    ₹999
                    ₹2500
                    ₹4900
                    WhatsApp Chat Chat