Arduino Water Level Indicator or Controller
In this project we will be building a water level indicator using Arduino & water sensor with three levels that consist of inside a tank with the help of 3 LED, LCD Display to show water level and a buzzer to indicate that the tank is full.
The water level indicator circuits are used in factories, chemical plants, and electrical substations and in other liquid storage systems. There are many possible uses for this simple system, examples include monitoring a sump pit (to control pump activation), rainfall detection, and leakage detection. Electronic water level circuits have the capability of alerting if there is a water leak somewhere in the factory. When the water level is too high or too low or exceeds the higher limit, it can detect the water level easily by hearing an alarm sound or from different colors of a light bulb. We can also measure the fuel level in motor vehicles and the liquid level containers which are huge in the companies.
Methodology
The circuit is designed to indicate three levels of water stored in the tank: low but not empty, half and full but not overflowing. When there is no water in the tank, Red LED will blink as an indication that the tank is completely empty. When water level increases and touches the sensor, the Red LED will glow indicating that there is water within the tank and on LCD shows LOW level. As the water level continues to rise and reaches half the tank, Yellow LED will glow and LCD shows medium level. When the water in the tank rises to full an alarm is made by the buzzer as an indication that the tank is full with Green LED glow and LCD display shows Full.
Water Sensor
A water sensor is a device used in the detection of the water level for various applications. Water sensors can come in several variations that include ultrasonic sensors, pressure transducers, bubblers, and float sensors.
How Does a Water Level Sensor Work?
The operation of the water level sensor is fairly simple. The power and sense traces form a variable resistor (much like a potentiometer) whose resistance varies based on how much they are exposed to water.
This resistance varies inversely with the depth of immersion of the sensor in water:
- The more water the sensor is immersed in, the better the conductivity and the lower the resistance.
- The less water the sensor is immersed in, the poorer the conductivity and the higher the resistance.
The sensor generates an output voltage proportional to the resistance; by measuring this voltage, the water level can be determined.
Watch the video:-
Parts List :-
1. Arduino Uno :- https://amzn.to/3VVxP5q
2. LCD Display:- https://amzn.to/3Qpu4E2
3. Water Sensor:- https://amzn.to/3XrDgKs
4. 10K potentiometer:- https://amzn.to/3QsFG9p
5. Breadboard + Jumper wires:- https://amzn.to/3k4KZ2N
6. LEDs pack:- https://amzn.to/3ICsehg
7. Buzzer:- https://amzn.to/3IEp0tB
Arduino Code :-
// https://www.youtube.com/channel/UCaXI2PcsTlH5g0et67kdD6g //
// Water Level Indicator //
// MOHD SOHAIL //
#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 9, 10, 11, 12, 13);
int sensorval = 0; // holds the value
int sensorpin = A0; // sensor pin used
int red = 2; // red led to nano pin 2
int yellow = 3; // yellow led to nano pin 3
int green = 4; // green led to nano pin 4
int buzzer = 5; // buzzer to nano pin 5
void setup() {
Serial.begin(9600);
lcd.begin(16, 2);
lcd.setCursor(0, 0);
lcd.print(" Water Level ");
lcd.setCursor(0, 1);
lcd.print("Indicator - EIF ");
delay(2000);
lcd.clear();
pinMode(red, OUTPUT);
pinMode(yellow, OUTPUT);
pinMode(green, OUTPUT);
pinMode(buzzer, OUTPUT);
pinMode(sensorpin, INPUT);
}
void loop() {
sensorval = analogRead(sensorpin);
if (sensorval<=100)
{
lcdempty();
redblink();
Serial.println("Water Level: Empty");
digitalWrite(buzzer, HIGH);
digitalWrite(green, LOW);
digitalWrite(yellow, LOW);
}
else if (sensorval>=100 && sensorval<=600)
{
lcdlow();
Serial.println("Water Level: Low");
digitalWrite(buzzer, LOW);
digitalWrite(red, HIGH);
digitalWrite(green, LOW);
digitalWrite(yellow, LOW);
}
else if (sensorval>=601 && sensorval<=625)
{
lcdmedium();
Serial.println("Water Level: Medium");
digitalWrite(buzzer, LOW);
digitalWrite(red, LOW);
digitalWrite(green, LOW);
digitalWrite(yellow, HIGH);
}
else if (sensorval>630)
{
lcdhigh();
Serial.println("Water Level: High");
digitalWrite(buzzer, LOW);
digitalWrite(red, LOW);
digitalWrite(green, HIGH);
digitalWrite(yellow, LOW);
}
}
void lcdempty()
{
lcd.setCursor(0, 0);
lcd.print(" Tank is Empty ");
lcd.setCursor(0, 1);
lcd.print("Alert-Fill Water ");
delay(3000);
lcd.clear();
}
void redblink()
{
digitalWrite(red, HIGH);
delay(500);
digitalWrite(red, LOW);
delay(5);
}
void lcdlow()
{
lcd.setCursor(0, 0);
lcd.print(" Water Level in ");
lcd.setCursor(0, 1);
lcd.print(" Tank is Low ");
delay(3000);
lcd.clear();
}
void lcdmedium()
{
lcd.setCursor(0, 0);
lcd.print(" Water Level in ");
lcd.setCursor(0, 1);
lcd.print(" Tank is Medium ");
delay(3000);
lcd.clear();
}
void lcdhigh()
{
lcd.setCursor(0, 0);
lcd.print(" Water Level in ");
lcd.setCursor(0, 1);
lcd.print(" Tank is HIGH ");
delay(3000);
lcd.clear();
}
Instagram Page : eif.08
0 Comments