MuTech RoboticsLearning Hub
Kids OK with adultArduino NanoLevel 2/3

Water Tank That Refills Itself

An ultrasonic sensor on the lid watches the water level. Below 30% the pump starts, at 60% it stops, and the OLED shows it all.

Sign in to save
Water Tank That Refills Itself
Kids OK, with an adult

DIY project. Children must build this only with an adult (16+ years) beside them at all times. Not suitable for children under 8 years.

Keep the electronics above and away from the water, and use a 12 V adapter, never mains, for the pump. Put a diode across the pump and join the 12 V ground to the Nano ground.

Strictly follow the description given with this video.

Video

How it works

  1. The ultrasonic sensor looks down and measures the gap to the water surface.
  2. The Nano turns that gap into a level from 0 to 100%.
  3. Below 30% the MOSFET driver switches the 12 V pump on; at 60% it switches it off. The gap between the two stops it clicking on and off.
  4. The OLED shows the level and whether the pump is running. With no reading, the pump stays off.

Parts you need

  • Arduino NanoArduino Nano₹345× 1Buy
  • Ultrasonic distance sensor (HC-SR04)Ultrasonic distance sensor (HC-SR04)₹80× 1Buy
  • 0.96" OLED display (I2C)0.96" OLED display (I2C)₹218× 1Buy
  • MOSFET driver moduleMOSFET driver module× 1Buy
  • 12 V DC water pump× 1
  • Diode (1N4007)Diode (1N4007)₹17.2× 1Buy
  • 12 V 2 A adapter12 V 2 A adapter× 1Buy
  • Jumper wiresJumper wires₹80× 1Buy

Wiring

SensorVCCTRIGECHONano5VD12D13A4 / A53.3VD6OLEDSDA / SCLVCCDriverSIGinputoutput12 V adapterPumpCommon GNDAll grounds
PowerGroundSignal
#FromConnect to
1 PowerSensor VCCNano 5V
2 SignalSensor TRIGNano D12
3 SignalSensor ECHONano D13
4 SignalOLED SDA / SCLNano A4 / A5
5 PowerOLED VCCNano 3.3V
6 SignalDriver SIGNano D6
7 Power12 V adapterDriver input
8 PowerDriver outputPump (diode across it)
9 GroundAll groundsCommon GND

3D print files

This project has no 3D-printed parts.

Code

Get the code