This is the documentation for making Automatic water level monitoring and control system using Internet of Thimgs (IoT) which will help is to save water and removes the efforts to take care of watering u[ the tanks in homes and offices.
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Automatic water level monitoring and control system using IoT
1. Geo-Spatial Knowledge Contest-2016 (GKC 2016)
[Automatic Water Levelling Monitoring And Controlling System using Arduino (IoT)]
Automatic water levelling motoring system project explained here is going to measure the water level of a water tank
using ultrasonic sensor. The project will automate the water filling in a tank i.e when the water level reaches up to
the brim of the tank, the water pump will stop automatically and when the water level in the tank remains up to few
centimetres, the pump will start automatically to fill up the tank till the water reaches again up to the brim. We can
implement the project in following steps:
1. Hardware required:
a. Arduino UNO Board: This is a microcontroller board required for coding and it has input/output pins for
connecting other required accessories.
b. Ultrasonic Sensor HC-SR04: This is a sound based sensor for measuring thewater level in a tank.
c. LCD Display 16 x 2: This is required to display the values and other information for user.
Image Source: Arduino.org
Image Source: Arduino.org
2. d. Relay 6Volts: Relay 6V acts as an electromagnetic switch, it is the voltage that controls the voltage action.
e. Relay Driver ULN2003: ULN3000 provides a high current which a Arduino board cannot provide so it is used to
drive the relay.
f. IC 7806(Voltage regulator): It is a voltage regulator that maintains the constant voltage across the circuit towhich
it is connected. It provides +6V regulated power supply.
Image Source: robotistan.com
Image Source: miketrask.com
Image Source: aliexpress.com
Image Source: engineersgalllery.com
3. g. Buzzer: It will alarmwhen the tank goes empty or when the tank is filled completely by the water.
h. 12 Volt battery/12 Volt adaptor: Itwill provide 12V DC supply to the Arduino and other components.
i. Copper wire and connecting wires: Copper wirewill be required to connect water pump to 220V AC supply and
connecting wires will be required to connect the above components with Arduino.
2. Connect the above components using the below circuit diagram:
Image Source: modmypi.com
Image Source: circuitdigest.com
4. 3. Explanation of circuit diagram:
A 16x2LCD is connectedwithArduinoin4-bit mode. Control pinRS,RWandE are directly connected toArduino
pin 7, GND and 6. Ultrasonic sensor module’s “trigger” and “echo” pins are directly connected to pin 10 and 11 of
Arduino. A voltage regulator 7806 is also used for providing 6 Volt to relay and to remaining circuit. 6 Volt relay is also
connected at pin 8 of Arduino through ULN2003 for turning on or turning off thewater motor pump.
The ultrasonic sensor must be placed at the top of the tank facing the transmitter and receiver to the bottom of the
tank. The ultrasonic sensor will read the distance from the bottom of the tank to the sensor module using ultrasonic
wave by using the formula (distance = speed x time), the LCD in the meantime will display “Empty space in tank is
‘MEASURED_VALUE’ CM”. If the distance between the sensor module and water in the tank is 60CM or above, the relay
driver will drive the relay thus turning ON the pump tofill the tank. When the distance between the sensor module and
the water in the tank is 12cms, the buzzer will buzz and the pump will turn off automatically.
4. Programming the Arduino:
a. First, we will define all the pins that are attached with the components like buzzer, LCD etc.
b. Initialise all the device connected in the circuit:
#define trigger 10
#define echo 11
#define motor 8
#define buzzer 12
lcd.begin(16,2);
pinMode(trigger,OUTPUT);
pinMode(echo,INPUT);
pinMode(motor, OUTPUT);
pinMode(buzzer, OUTPUT);
lcd.print(" Water Level ");
lcd.setCursor(0,1);
lcd.print(" Indicator ");
delay(2000);
5. c. Initialise Ultrasonic sensor module and read time for sending and receiving waves the perform the calculation
for measuring the distance using formula Distance= Speed X Time.
d. Check the conditions and make it perform the actions accordingly:
digitalWrite(trigger,HIGH);
delayMicroseconds(10);
digitalWrite(trigger,LOW);
delayMicroseconds(2);
time=pulseIn(echo,HIGH);
distance=time*340/20000;
lcd.clear();
lcd.print("Empty space in ");
lcd.setCursor(0,1);
lcd.print("tank is: ");
lcd.print(distance);
lcd.print("Cm");
delay(2000);
if(distance<12 && temp==0)
{
digitalWrite(motor, LOW);
digitalWrite(buzzer, HIGH);
lcd.clear();
lcd.print("Water Tank Full ");
lcd.setCursor(0,1);
lcd.print("Motor Turned OFF");
delay(2000);
digitalWrite(buzzer, LOW);
delay(3000);
temp=1;
}
else if(distance<12 && temp==1)
{
digitalWrite(motor, LOW);
lcd.clear();
lcd.print("Water Tank Full ");
lcd.setCursor(0,1);
lcd.print("Motor Turned OFF");
delay(5000);
}
else if(distance>60)
{
digitalWrite(motor, HIGH);
lcd.clear();
lcd.print("Low Water Level");
lcd.setCursor(0,1);
lcd.print("Motor Turned ON");
delay(5000);
temp=0;
}
}
7. 6. Possible Applications:
a. It will automate the water levelling and controlling.
b. It can be used in homes
c. It can also be used in industries, hotels, offices.
d. It will greatly avoid water usage.
7. Conclusion:
Water is one of the necessities of life. Every government in every country is emphasizing on avoiding water wastage. It
will greatly reduce the water wastages if it will be implemented in especially govt offices and departments, private
industries, hotels and even in homes. SAVE WATER, SAVE LIFE.