Post Top Ad

Monday, April 24, 2023

on video Automatic Water Tank Level Controller with Dry Pump Run Protection


 Automatic Water Tank Level Controller with Dry Pump Run Protection Using Arduino 

This instructable helps you to make an automatic water level controller using Arduino. I am using automatic water level controller in my home since 2016. There were some minor upgrades during this period and the latest version is completed using Arduino and is working since 2018. There were no major issues reported yet. I am not pretty good with documentation, but I will try my level best to put this together. You may feel free to comment any doubts after going through this article.


As I remember I have inititaly used instructables for realizing a line follower robot earlier in 2014 (The instructable by Midhun helped me to create this. He used an Atmega32 microcontroller whereas I used a PIC 16F877a.) I had to clear a lot of issues as the PIC microcontroller was not having sufficient resources and optimized compiler. The test video is available here and it helped me a lot in my life.


This automatic water level controller can be used in three ways


Automatic with dry run protection - One sensor line and one common line is required in the well/ground level tank, two sensor lines and one common line is required in the overhead tank and the motor should be connected to the water level controller.

Automatic - Same as above but sensor line and common line is not required in well/ground level tank.

Manual - This method needs only two sensor lines and one common line in the overhead tank.

Safety warning : This project deals with working on power lines which needs to be implemented with an experienced electrician. In case you are pumping water from a well, there are several hazards while putting sense lines in the well. Take all sorts of precautions while executing this instructable. If you don't have prior experience how to solder, you may try using a breadboard and don't use soldering iron unless you don't have prior experience.

This instructable needs following items


Arduino Nano (clone version will be sufficient).

Power adapter (12V/0.5A).

Relay (12VDC).

Transistor - BC547 (most of the NPN transistors will work fine).

Diode - 1N4148 (Free wheeling diode).

Bi colour LED - Green Red - three legged common cathode - 2 Nos.

Resistor - 220 ohms - LED current limiting resistor - 4 Nos.

If red is glowing brighter than green use a higher value such as 330 ohm (or series 270 ohms) for red.

Resistor - 10k - for transistor biasing/current limiting.

Resistor - 220k - for pulling up of sense lines (you may check 100k to 470k as required)

Capacitor - 0.01uF (103) - 4 Nos.

Pluggable connector/PCB solderable screw terminal - 5 way (minimum) - for connecting sense lines from tank/well

Barrel connector - for connecting 12 V from power adapter

PCB solderable screw terminal - 2 way - For connection from Barrel connector to common PCB and PCB to relay excitation - 2 Nos. (Optional)

Wires for line sensing and for motor contact.

Soldering iron and common PCB. You may also use a breadboard.

Step 1: Understanding the Requirements

Before starting any project understand the requirements so that it will be easier to realize it. This automatic water level controller is developed for meeting following requirements.


To show the status of the water level in the tank.

To switch ON the motor on the following conditions :-

When the water level of the overhead tank is lower than the lowest sense level.

The motor should not be switched ON when there is no sufficient water available in the well/ground level tank.

To switch OFF the motor on the following conditions

When the water level of the overhead tank reaches the highest sense level.

When the well/ground level tank water is drained while pumping.

When the motor ON time exceeds preset time(highest level sensor not working).

The motor should not be toggled continuously as it reaches the highest sense point OR lowest sense point (or due to ripples).

The failure of the controller should not affect the manual operation of the motor.

The above shown are the main requirements. There are few optional requirements which are good to have as illustrated below.


Provision to show the health/status of the system

Provision to show the motor status.

Provision to display errors (if found).

 An alert using a buzzer.

We are trying to realize these requirements with Arduino nano.


For powering the motor, one relay is used.

To show the status of water level in the tank one bi colour LED is used.

It will show Orange if the tank is full (water level greater than highest sense level).

It will show Green if the tank is having sufficient water (in between highest and lowest sense level).

It will show Red if the tank is not having sufficient water (lower than lowest sense level).

If it doesn't glow, there is some issue with the controller. Try turning OFF the system for 1 minute and then turn ON again.

The status of the lower tank/motor is shown using the second bi colour LED.

It won't glow in normal condition.

It will glow green when the motor is switched ON by the controller.

It will glow red when the well/ground level tank is not having sufficient water.

If it glows Orange, there is some issue with the controller. It means motor is ON even though the well/ground level tank is not having sufficient water. Try turning OFF the system for 1 minute and then turn ON again.

In order to avoid the ripples issue, two sensors are provided in the overhead tank for properly verifying the state of water level (during pumping the water and using (draining)).

The frequent ON and OFF of the motor is taken care in software by using a minimum time delay for normal operation. Large time delay is provided in case the motor gets stopped due to insufficient water in the well/ground level tank.

The manual operation of the motor is not disturbed as we are using non latching relay and we are connecting the relay in parallel to the motor's switch

In case the relay becomes short, after turning off the entire power, the connection to the relay can be removed and insulated properly for normal operation.

The additional requirement of health/error indication is provided using the arduino nano's inbuilt LED. It wasn't easy but I made a separate function for showing 'n' number of single bit status using that single LED which can be easily identified.

The same method used for displaying health/error status is used for buzzer notification.


 Automatic Water Tank Level Controller with Dry Pump Run Protection Using Arduino 

This instructable helps you to make an automatic water level controller using Arduino. I am using automatic water level controller in my home since 2016. There were some minor upgrades during this period and the latest version is completed using Arduino and is working since 2018. There were no major issues reported yet. I am not pretty good with documentation, but I will try my level best to put this together. You may feel free to comment any doubts after going through this article.


As I remember I have inititaly used instructables for realizing a line follower robot earlier in 2014 (The instructable by Midhun helped me to create this. He used an Atmega32 microcontroller whereas I used a PIC 16F877a.) I had to clear a lot of issues as the PIC microcontroller was not having sufficient resources and optimized compiler. The test video is available here and it helped me a lot in my life.


This automatic water level controller can be used in three ways


Automatic with dry run protection - One sensor line and one common line is required in the well/ground level tank, two sensor lines and one common line is required in the overhead tank and the motor should be connected to the water level controller.

Automatic - Same as above but sensor line and common line is not required in well/ground level tank.

Manual - This method needs only two sensor lines and one common line in the overhead tank.

Safety warning : This project deals with working on power lines which needs to be implemented with an experienced electrician. In case you are pumping water from a well, there are several hazards while putting sense lines in the well. Take all sorts of precautions while executing this instructable. If you don't have prior experience how to solder, you may try using a breadboard and don't use soldering iron unless you don't have prior experience.

This instructable needs following items


Arduino Nano (clone version will be sufficient).

Power adapter (12V/0.5A).

Relay (12VDC).

Transistor - BC547 (most of the NPN transistors will work fine).

Diode - 1N4148 (Free wheeling diode).

Bi colour LED - Green Red - three legged common cathode - 2 Nos.

Resistor - 220 ohms - LED current limiting resistor - 4 Nos.

If red is glowing brighter than green use a higher value such as 330 ohm (or series 270 ohms) for red.

Resistor - 10k - for transistor biasing/current limiting.

Resistor - 220k - for pulling up of sense lines (you may check 100k to 470k as required)

Capacitor - 0.01uF (103) - 4 Nos.

Pluggable connector/PCB solderable screw terminal - 5 way (minimum) - for connecting sense lines from tank/well

Barrel connector - for connecting 12 V from power adapter

PCB solderable screw terminal - 2 way - For connection from Barrel connector to common PCB and PCB to relay excitation - 2 Nos. (Optional)

Wires for line sensing and for motor contact.

Soldering iron and common PCB. You may also use a breadboard.

Step 1: Understanding the Requirements

Before starting any project understand the requirements so that it will be easier to realize it. This automatic water level controller is developed for meeting following requirements.


To show the status of the water level in the tank.

To switch ON the motor on the following conditions :-

When the water level of the overhead tank is lower than the lowest sense level.

The motor should not be switched ON when there is no sufficient water available in the well/ground level tank.

To switch OFF the motor on the following conditions

When the water level of the overhead tank reaches the highest sense level.

When the well/ground level tank water is drained while pumping.

When the motor ON time exceeds preset time(highest level sensor not working).

The motor should not be toggled continuously as it reaches the highest sense point OR lowest sense point (or due to ripples).

The failure of the controller should not affect the manual operation of the motor.

The above shown are the main requirements. There are few optional requirements which are good to have as illustrated below.


Provision to show the health/status of the system

Provision to show the motor status.

Provision to display errors (if found).

 An alert using a buzzer.

We are trying to realize these requirements with Arduino nano.


For powering the motor, one relay is used.

To show the status of water level in the tank one bi colour LED is used.

It will show Orange if the tank is full (water level greater than highest sense level).

It will show Green if the tank is having sufficient water (in between highest and lowest sense level).

It will show Red if the tank is not having sufficient water (lower than lowest sense level).

If it doesn't glow, there is some issue with the controller. Try turning OFF the system for 1 minute and then turn ON again.

The status of the lower tank/motor is shown using the second bi colour LED.

It won't glow in normal condition.

It will glow green when the motor is switched ON by the controller.

It will glow red when the well/ground level tank is not having sufficient water.

If it glows Orange, there is some issue with the controller. It means motor is ON even though the well/ground level tank is not having sufficient water. Try turning OFF the system for 1 minute and then turn ON again.

In order to avoid the ripples issue, two sensors are provided in the overhead tank for properly verifying the state of water level (during pumping the water and using (draining)).

The frequent ON and OFF of the motor is taken care in software by using a minimum time delay for normal operation. Large time delay is provided in case the motor gets stopped due to insufficient water in the well/ground level tank.

The manual operation of the motor is not disturbed as we are using non latching relay and we are connecting the relay in parallel to the motor's switch

In case the relay becomes short, after turning off the entire power, the connection to the relay can be removed and insulated properly for normal operation.

The additional requirement of health/error indication is provided using the arduino nano's inbuilt LED. It wasn't easy but I made a separate function for showing 'n' number of single bit status using that single LED which can be easily identified.

The same method used for displaying health/error status is used for buzzer notification.

No comments:

Post a Comment

Post Top Ad

Pages