Intermediate Automation Project

Build an Automatic Water Tank Controller

An automatic water tank controller monitors the water level in a storage tank and controls a water pump without manual intervention. It helps prevent tank overflow, protects pumps from running dry and ensures a reliable water supply for homes, farms and commercial buildings. This project demonstrates how to build an intelligent water controller using an Arduino or ESP32 together with water level sensors and relay modules.

Automatic Water Tank Controller

Project Overview

Water level sensors continuously monitor the amount of water in the storage tank.

When the level falls below a preset minimum, the controller starts the water pump automatically. Once the tank reaches the full level, the controller switches the pump off.

Advanced systems can also monitor the source tank, detect dry-running, measure water usage and send smartphone notifications.

Project Difficulty

ItemValue
Difficulty⭐⭐⭐ Intermediate
Build Time4–8 Hours
Supply Voltage5 V or 12 V DC
ControllerESP32 or Arduino
Pump ControlRelay or Contactor

Main Sections

Section Function
Microcontroller Controls the complete system.
Water Level Sensors Detect the water level.
Relay Module Controls the water pump.
Pump Protection Circuit Prevents dry running.
Status Indicators Display pump and tank status.
Wi-Fi Module (Optional) Provides remote monitoring.

Water Level Detection Methods

Sensor Type Advantages
Float Switch Simple, reliable and inexpensive.
Conductive Probes Low cost and easy to install.
Ultrasonic Sensor Non-contact measurement.
Pressure Sensor Suitable for deep tanks.
Capacitive Sensor No direct contact with water.

Typical Components

QuantityComponent
1ESP32 or Arduino Nano
2–5Water Level Sensors or Float Switches
1Relay Module or Contactor Driver
1Buzzer (Optional)
3–5Status LEDs
15 V Power Supply
1Manual Override Switch
1Waterproof Enclosure

How the System Works

The controller continuously checks the water level inside the storage tank.

If the level falls below the minimum sensor, the controller energises the relay, starting the water pump.

As the tank fills, higher-level sensors are activated. When the upper sensor detects a full tank, the controller switches the pump off automatically.

Optional dry-run protection prevents the pump from operating if the source tank or well has insufficient water.

Typical Features

Feature Description
Automatic Pump Control Starts and stops the pump automatically.
Overflow Protection Stops pumping when the tank is full.
Dry-Run Protection Prevents pump damage.
Manual Override Allows manual operation.
Tank Level Display Shows current water level.
Wi-Fi Monitoring Remote status and notifications.

Applications

  • Domestic water tanks.
  • Apartment buildings.
  • Rainwater harvesting systems.
  • Agricultural irrigation.
  • Industrial water storage.
  • Swimming pools.
  • Hotels and hospitals.
  • Remote pumping stations.

Testing

  1. Verify all sensor connections.
  2. Power the controller.
  3. Simulate a low-water condition.
  4. Verify that the pump starts.
  5. Simulate a full tank.
  6. Verify that the pump stops automatically.
  7. Test dry-run protection.
  8. Confirm manual override operation.

Troubleshooting

Problem Possible Cause
Pump does not start Faulty relay, sensor or controller wiring.
Pump runs continuously Upper level sensor not detecting water.
False level readings Dirty probes or electrical interference.
Dry-run protection activates unexpectedly Incorrect sensor placement or faulty source-level sensor.
Wi-Fi unavailable Network configuration problem.

Project Improvements

  • Display the water level on an OLED screen.
  • Send alerts via Wi-Fi or MQTT.
  • Measure daily water consumption.
  • Add automatic leak detection.
  • Integrate with Home Assistant.
  • Monitor multiple tanks simultaneously.
  • Record operating history on a MicroSD card.
  • Add battery backup for power failures.

Skills Learned

  • Water level sensing.
  • Relay control.
  • Pump automation.
  • ESP32 programming.
  • Industrial control principles.
  • IoT monitoring.

Safety Notes

  • Disconnect mains power before wiring pumps or contactors.
  • Use relay modules or contactors rated for the motor current.
  • Install suitable overload and short-circuit protection.
  • Keep low-voltage electronics isolated from mains wiring.
  • Use waterproof enclosures and corrosion-resistant sensors.

Key Points

  • An automatic water controller maintains the tank level without manual intervention.
  • Dry-run protection helps prevent pump damage.
  • ESP32-based systems allow remote monitoring and control.
  • Automatic water management saves water, electricity and maintenance costs.
  • Water tank controllers are widely used in homes, farms and industrial facilities.

Next Project

Continue by building a Smart Irrigation System, which uses soil moisture sensors, weather data and Wi-Fi connectivity to water plants automatically while minimising water consumption.

Next Project → Smart Irrigation System