Automatic Water Level Controller Using Arduino UNO.
Automatic Water Level Controller Using Arduino UNO.
Automatic Water Level Controller Using Arduino UNO.
PROJECT DONE BY
RAJSREE
&
SAKSHI KAUSHAL
GUIDANCE BY
DR. USHA TIWARI MAM
CONTENTS
Problem statement
Introduction
Components list
Short description
Circuit diagram
Working
Picture of the project
coding
Uses
Advantages
Cost Analysis
Conclusion
PROBLEM STATEMENT
1. Arduino Uno
2. LCD & 12C Module
3. Ultrasonic sensor
4. Relay module
5. ON/OFF Switch
6. Mini push button
7. Jumper wire
8. Bread board
ARDUINO UNO
• I2C Module has a inbuilt PCF8574 I2C chip that converts I2C serial data to parallel data for the LCD display.
• These modules are currently supplied with a default I2C address of either 0x27 or 0x3F. To determine which
version you have check the black I2C adaptor board on the underside of the module. If there a 3 sets of pads
labelled A0, A1, & A2 then the default address will be 0x3F. If there are no pads the default address will be
0x27.
• The module has a contrast adjustment pot on the underside of the display. This may require adjusting for the
screen to display text correctly.
ULTRASONIC SENSOR
The ultrasonic sensor uses sonar to determine the distance to an object. Here’s what happens:
1.The transmitter (trig pin) sends a signal: a high-frequency sound.
2.When the signal finds an object, it is reflected and…
3… the transmitter (echo pin) receives it.
RELAY MODULE
Relay has three high voltage terminals (NC, C, and NO) which connect
to the device you want to control. The other side has three low
voltage pins (Ground, Vcc, and Signal) which connect to the Arduino.
ON/OFF SWITCH
a switch or button (on an electrical appliance, etc) which has an 'on' position and an 'off'
position.
MINI PUSH BUTTON
The mini pushbutton is a small and cheap single pole single through switch (SPST) that can
be soldered on a PCB
JUMPER WIRE
Jumper wires are simply wires that have connector pins at each end, allowing them to be used to connect
two points to each other without soldering. Jumper wires are typically used with breadboards and other
prototyping tools in order to make it easy to change a circuit as needed.
BREAD BOARD
• A thin plastic board used to hold electronic components (transistors, resistors, chips, etc.) that are wired
together. Used to develop prototypes of electronic circuits, breadboards can be reused for future jobs.
They can be used to create one-of-a-kind systems but rarely become commercial products.
• The breadboard contains spring clip contacts typically arranged in matrices with certain blocks of clips
already wired together. The components and jump wires (assorted wire lengths with pins at both ends)
are plugged into the clips to create the circuit patterns. The boards also typically include metal strips
along the side that are used for common power rails and signal buses.
CIRCUIT DIAGRAM
WORKING
• Working of this project is very simple I have used Ultrasonic sensor module which sends the sound
waves in the water tank and detects reflection of sound waves that is ECHO. First of all I need to trigger
the ultrasonic sensor module to transmit signal by using Arduino and then wait to receive ECHO. Arduino
reads the time between triggering and received ECHO. We know that speed of sound is around 340 m/s.
so we can calculate distance by using given formula:
• Distance= (travel time/2) * speed of sound
• Where speed of sound is approximately 340m per second.
• By using this methods we get distance from sensor to water surface. After it we need to calculate water
level.
• Now we need to calculate the total length of water tank. As we know the length of water tank then we
can calculate the water level by subtracting resulting distance coming from ultrasonic from total length
of tank. And we will get the water level distance. Now we can convert this water level in to the percent of
water, and can display it on LCD.
PICTURES OF OUR PROJECT
CODING
#include <LiquidCrystal.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27,16,2);
#define trigger 10 #define echo 11 #define motor 8 #define buzzer 12 //LiquidCrystal
lcd(7,6,5,4,3,2); const int numRows = 2; const int numCols = 16; float time=0,distance=0; int
temp=0; void setup() { lcd.init(); lcd.backlight(); lcd.begin(16,2); lcd.begin(numCols, numRows);
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); } void
loop() { lcd.clear(); digitalWrite(trigger,LOW); delayMicroseconds(2);
digitalWrite(trigger,HIGH); delayMicroseconds(10); digitalWrite(trigger,LOW);
delayMicroseconds(2); time=pulseIn(echo,HIGH); distance=time*340/20000; lcd.clear();
lcd.print("Water 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>30) {
digitalWrite(motor, HIGH); lcd.clear(); lcd.print("LOW Water Level"); lcd.setCursor(0,1);
lcd.print("Motor Turned ON"); delay(5000); temp=0; } }
USES
• Can be used in factories, commercial complexes, apartments,
home.
• Fuel tank level gauging.
• Automatically turn ON/OFF pumps .
• Irrigation control .
ADVANTAGES
• Power saver
• Save money by using less electricity and water
• Sends an alert to let you know water is too high or too low
• Automatically adjusts water levels
COSTING OF COMPONENT:
Components Price
1. Arduino UNO 970
2. LCD &12 C Module 190
3. Ultrasonic sensor 110
4. Relay module 89
5. ON/OFF Switch 75
6. Mini push button 89
7. Jumper wire 115
8. Bread board 91
TOTAL 1,729
CONCLUSION