Water Level Indicator using Arduino Nano, Ultrasonic Sensor & OLED Display | KitKraft DIY Project

Water Level Indicator using Arduino Nano, Ultrasonic Sensor & OLED Display | KitKraft DIY Project

Monitoring water levels is crucial for efficient water management in homes, industries, and agriculture. This DIY Water Level Indicator project using Arduino Nano, an Ultrasonic Sensor (HC-SR04), and an OLED Display provides a simple and effective way to measure water levels in real-time. This system helps prevent water overflow and ensures optimal water usage.


Components Required:

  • Arduino Nano

  • Ultrasonic Sensor (HC-SR04)

  • 0.96" OLED Display (SSD1306)

  • Jumper Wires

  • Breadboard (optional)

  • 5V Power Supply (USB or Battery)


How It Works:

The HC-SR04 Ultrasonic Sensor measures the distance between itself and the water surface using sound waves. The Arduino Nano processes this data and calculates the water level percentage. The result is displayed on the OLED screen in real-time.

Working Principle:

  1. The HC-SR04 emits ultrasonic waves that bounce off the water surface and return to the sensor.

  2. The time taken for the sound waves to return is measured.

  3. Using the formula:

    Distance = (Time × Speed of Sound) / 2

    the Arduino calculates the distance from the sensor to the water surface.

  4. The water level percentage is determined based on the tank height and displayed on the OLED screen.


Circuit Diagram & Connections:

Component Arduino Nano Pin
HC-SR04 VCC 5V
HC-SR04 GND GND
HC-SR04 Trigger D9
HC-SR04 Echo D10
OLED VCC 5V
OLED GND GND
OLED SDA A4
OLED SCL A5

Arduino Code & Schematic:

https://github.com/kitkraftin/Arduino_water_level_indicator.git



How to Test:

  1. Assemble the circuit as per the wiring diagram.

  2. Upload the code to your Arduino Nano.

  3. Power the circuit using a USB cable or a 5V battery.

  4. The OLED display should show the water level percentage.

  5. Move the sensor closer or farther from a water surface to see the percentage change.


Applications:

  • Water Tank Monitoring – Prevents overflow and ensures optimal usage.

  • Smart Agriculture – Helps in irrigation management.

  • Industrial Applications – Used in liquid level monitoring.

  • Smart Homes – Integrated into home automation systems.


Troubleshooting Tips:

  • OLED Not Displaying: Check I2C connections and address (0x3C or 0x3D).

  • Incorrect Readings: Ensure the tankHeight variable is set correctly.

  • No Response from Sensor: Check wiring and ensure proper power supply.

  • Fluctuating Readings: Try using an average filter to smoothen data.


Conclusion:

This Water Level Indicator using Arduino Nano, an Ultrasonic Sensor, and an OLED Display is a simple yet effective project for monitoring water levels. Whether for home automation or industrial use, this system can save water and prevent wastage. Get your components from KitKraft.in and start building today!


📌 Buy Components from KitKraft.in: https://www.kitkraft.in
📜 More DIY Projects: https://www.kitkraft.in/blogs/project
🎥 Watch Video Tutorial: https://youtube.com/shorts/lsu9XSYjotw

🔔 Follow us for more exciting projects!

#Arduino #DIY #WaterLevelIndicator #HomeAutomation #UltrasonicSensor #OLED #KitKraft #TechProjects #MakersGonnaMake #STEM #kitkraftindia