An automatic water level controller saves water and saves you from watching a tank fill. Two simple level sensors tell an Arduino when the tank is low and when it is full, and the Arduino switches the pump through a relay — no manual switch, no overflow.
How It Works
One sensor sits near the bottom of the tank and one near the top. When the water drops below the low sensor, the Arduino turns the pump on through the relay. When the water reaches the high sensor, the Arduino turns the pump off again. Between those two points the pump keeps its last state, so it does not flicker on and off.
Components Required
- Arduino Uno or Nano board
- Two water level sensor probes or float switches
- Single-channel relay module
- Small water pump (match its voltage to your supply)
- Power supply suitable for the Arduino and the pump
- Jumper wires, breadboard and a small enclosure
Circuit Connections
- Low level sensor to Arduino digital pin 7, high level sensor to digital pin 8, with grounds connected.
- Relay module signal input to Arduino digital pin 9, VCC to 5V, GND to GND.
- Pump connected through the relay output contacts, following the relay module's own wiring guide.
- Keep the low-voltage Arduino wiring separate from any mains wiring.
Safety Note
If your pump runs on mains voltage, treat that part of the build with extra care: keep mains connections inside a closed enclosure, never work on them while powered, and ask an experienced person to check the wiring before first use. If you are unsure, use a low-voltage pump instead.
Build Steps
- Mount the two sensors in the tank at the low and high levels you want.
- Wire the sensors and relay as listed and test the relay switching with the pump disconnected first.
- Load a program that turns the relay on at the low level and off at the high level.
- Reconnect the pump, fill and drain the tank slowly, and confirm it starts and stops at the right levels.
Troubleshooting
- Pump never starts: check the low sensor wiring and confirm the relay clicks when the level drops.
- Pump never stops: check the high sensor wiring and make sure the sensor is not stuck or shorted.
- Relay chatter: keep the low and high levels well apart and add a short delay between sensor checks.
Going Further
Once the basic controller works, try adding an LED that shows when the pump is running, a buzzer for a low-water warning, or a display that shows the tank state.
Would you fit this controller to a home tank, a garden tank, or a rainwater store? Tell us in the comments.

0 comments:
Post a Comment