Adults onlyArduino NanoLevel 1/3
Water Tank Auto Pump
An ultrasonic sensor on the tank lid starts the pump at LOW and stops it at FULL. No more overflow.

Adults only
A real house pump runs on 230V mains.
Not for children. Build at your own risk.
The demo uses a safe 5V mini pump. A real 230V pump must be switched through a suitable contactor fitted by a qualified electrician.
Strictly follow the description given with this video.
Video
The video link will be added here soon.
How it works
- The HC-SR04 looks down at the water and measures the gap.
- The Nano turns that into % full, using the tank depth set in the code.
- At LOW the relay switches the pump on.
- At FULL the relay switches it off.
Parts you need
- Arduino Nano× 1Buy
- HC-SR04 ultrasonic sensor (on the tank lid)× 1Buy
- 1-channel 5V relay module× 1Buy
- 5V mini pump (demo)× 1Buy
- Breadboard, jumper wires, USB 5V adapter× 1Buy
Kit for this projectPrice on request
Get the kitWiring

PowerGroundSignal
| # | From | Connect to |
|---|---|---|
| 1 Signal | HC-SR04 TRIG | Nano D3 |
| 2 Signal | HC-SR04 ECHO | Nano D2 |
| 3 Power | HC-SR04 VCC | Nano 5V |
| 4 Ground | HC-SR04 GND | Nano GND |
| 5 Signal | Relay S | Nano D7 |
| 6 Power | Relay + | Nano 5V |
| 7 Ground | Relay − | Nano GND |
| 8 Signal | Relay COM | 5V |
| 9 Signal | Relay NO | Pump + |
| 10 Ground | Pump − | GND |
3D print files
This project has no 3D-printed parts.
Code
The tested Arduino / ESP32 code for this project will be posted here, ready to copy.