ARDUINO-WATER TANK OVERFLOW ALARM | CONTROL PUMP
Water is life and no one can survive in the world without water. We can not live a moment without water. But there has been lack of water for fed decades. Lack of water is the bell of life's danger. and we are responsible for this ourselves. Because we are exploring nature for our lifestyle. The trees and plants are cutting, and installing factories, due to which polluting the environment and no matter how many reasons. If we attention the main problem of storage water can be solved. Like showtimes we get to see water overflow from the water tank in the roof of our homes or surrounding neighborhood houses. So today we will create a project to solve the problem of water overflow from the storage tank. In this article we are going to make a water level indicator alarm and control pump using Arduino. We will check the water level in the water tank with help of probes of the water level sensor and when predefined level will reach then starts beeping alarm and OFF the pump and when will go below water level to the probes of water level sensor. The alarm will stop and also pump ON.
WHAT IS WATER LEVEL SENSOR ?
Water level sensor is electronics sensor. This sensor checks the water level of any water tank and inform the water level of that water tank and control the pump by the water level sensor. The sensor is very easy to make. Some components are required to make like resistors' and transistors' and some conductive wire for make probes. This sensor needs 3V to 5V DC power supply to operate.
WATER LEVEL SENSOR WORKING PRINCIPLE
The working principle of water level sensor is very simple. Water level sensors work by using sensor probes to check water level in a water tank. Water level sensor probes can be increased or decreased depend on you how many water level you want to indicate in the water tank. When there is water contact from the probes. So probes are send signal to the control panel and control panel to triggered the alarm or indicator. And in the control panel can be programmed so that the pump automatically turn ON and OFF for again fill the water in the tank.
APPLICATION
There are many application of Water level Indicator sensor.
- Hotels
- Apartments
- Pools
- Factories
- Water level indicator for water tank etc
CIRCUIT DIAGRAM
It is a simple circuit diagram. And it entire circuit work 5v DC, so we have connected the 9v Battery to Arduino uno pin number Vin or you can also give power supply to jack pin of Arduino. But AC pump works 230v ,50hz AC power supply, so we have connected pump through the relay. When the water level sensor sends the signal to microcontroller then microcontroller sends signal to relay and relay turn ON and Turn OF the pump. AC power supply is very dangerous, so you have to pay attention while making the AC supply connection. Here Below probe connected with one end of 10k resistor terminal to A0 of Arduino pin and Half probe connected with one end of 10k resistor terminal to A1 of Arduino pin and also Full probe connected with one end of 10k resistor terminal to A2 of Arduino pin and all other end of 10k resistors terminal are connected to ground pin of Arduino.
And reference voltage 5V provided with probes. And relay IN pin connected to D5 pin of Arduino and pump is connected to relay. IF you don't have Knowledge about to relay that how can AC load connection through the relay. So click on this article and take information about the relay connection to any load.
WATER LEVEL SENSOR INTERFACE TO ARDUINO UNO
In this article we will use analogRead() predefined function to read data from the probes of water level sensor.
When the tank is full, so water will keep OFF and also alarm OFF.
When water level will down from the probes then the alarm will go ON and pump ON for water fill in the tank again. In this way this processes will continue to run.
Water Level Sensor - Arduino Uno
Probe1 - A0
Probe2 - A1
Probe3 - A2
Relay - Arduino Uno
VCC - 5V
GND - GND
IN - Digital pin(D5)
CODE
int water_level1 = A0;
int water_level2 = A1;
int water_level3 = A2;
int relay = 5;
float full_water;
float half_water;
float no_water;
void setup()
{
Serial.begin(9600);
pinMode(water_level1, INPUT);
pinMode(water_level2, INPUT);
pinMode(water_level3, INPUT);
pinMode(relay, OUTPUT);
digitalWrite(relay, HIGH);
}
void loop()
{
full_water = analogRead(water_level1);
half_water = analogRead(water_level2);
no_water = analogRead(water_level3);
Serial.print("Water level1=");
Serial.print(full_water);
Serial.print("=");
Serial.print("Water level2=");
Serial.print(half_water);
Serial.print("=");
Serial.print("Water level3=");
Serial.println(no_water);
if((full_water==0) & (half_water==0)& (no_water==0))
{
Serial.println("No Water");
digitalWrite(relay, LOW);
}
while(full_water > 0)
{
Serial.println("Water Is Full");
digitalWrite(relay, HIGH);
full_water = analogRead(water_level1);
}
if((half_water > full_water) & (half_water > no_water))
{
Serial.println("Water Is half");
digitalWrite(relay, LOW);
}
if((no_water > full_water) & (no_water > half_water))
{
Serial.println("No Water");
digitalWrite(relay, LOW);
}
delay(500);
}
0 Comments