Introduction: Automatic Over Head Watertank Filling System Using Arduino

Problem / Introduction:

My grandma lives in a big house, she has walking difficulty due to age. Most of the time she switches on the electric pump and goes for other household chores, since it takes one and half hours to refill the full tank. When the tank is full it over flows and goes to the drain. On hearing the overflow sound my grandma starts walking to the pump control switch and switches off the takes approximately 10-12 minutes for this. This wastes lots of precious ground water and expensive electricity. So, I was thinking how to help her in stop wasting precious resources and saving money. Then I got the idea of Arduino based automation.

CAUTION/WARNING: This project involves dangerously lethal high voltage of 220 Volts AC while connecting to the electric water pump. If no proper care taken, it can kill you. Please take help from an adult Electrical Experts /adult technician who knows about electric wiring & its safe operation.


Bill of materials

1.) Arduino nano

2.) old unused 5volts USB mobile charger

3.) 5 volts Arduino relay shield

4.) Plastic enclosure

5.) Long wires to connect tank and Arduino (old internet/Ethernet cable will work)

Step 1: How It Works

Here we leverage the natural electrical conductivity property of water to be used as sensing mechanism. Also, we will limit the current to very minimal so that its absolutely safe for humans & animals. We will leverage the built-in pull-up resistor in Arduino. The basic principal is to implement the SR (Set-Rest) Flip Flop.

So, when the water level in the tank goes low, we will start the Motor (Set to True) and when the upper level is reached, we will stop the Motor (Reset to True). To achieve it we just need 3 wires, one is placed physically at the required lowest level, the second one at the top level & one more wire for reference at the lower most level which will be connected to the ground in Arduino.

Step 2: Arduino Code

void setup()



pinMode(13, OUTPUT);


void loop()


int STARTPB = digitalRead(2);

int STOPPB = digitalRead(4); if (STARTPB == 1)

delay(1000); // Wait for 1000 millisecond(s)

digitalWrite(13, HIGH);


if (STOPPB == 0) {

digitalWrite(13, LOW);



Step 3: Prototype Testing Images

All best! Please try it & let me know if it helps you.

Arduino Contest 2020

Participated in the
Arduino Contest 2020