In this project, we’ll see how to display and calculate the filling percentage of your water tank. This can be very useful if you have a tank for collecting rainwater or if you have a submerged tank and cannot see the water level.
Now, here are the materials needed for the project:
An Arduino Uno board
A 16×2 Liquid Crystal LCD screen
A water pump
A distance sensor
A potentiometer
A relay
A 220-ohm resistor
An external power supply (9V battery)
Jumper wires (around fifteen!)
There are two parts to this project:
Detecting the filling level of the tank
Watering with water from the tank
For detecting the filling level, we use a distance sensor aimed at the bottom of the tank. The water at the bottom reflects the signal sent by the sensor back, which returns a distance measurement. We then display the filling percentage based on the tank’s original size.
To water your garden, we use a water pump. It runs on 9V, so we need an external power supply because the Arduino board can only provide up to 5V. We use a relay to control the water pump from the Arduino board.
Additionally, we added a switch to turn off the pump when you finish watering. This switch controls only the pump, allowing you to keep monitoring the filling level even when the pump is off.