Sie sind auf Seite 1von 21

Arduino Based Automatic Irrigation with Message Alert

Submitted in partial fulfillment of the requirements


of the degree of

Bachelor of Science
By
Md. Jasim Rahman- EEE1702011010
Atikur Rahman- EEE1702011108
Md. Mojahidul Islam- EEE1702011037
Md.Ismail Hossain Patwary- EEE1702011086
Mohammed mainul Hassan- EEE1702011101

Supervisor
Jannatul Nazrana
Lecturer & Department of EEE
Sonargaon University

Department of Electrical & Electronics Engineering

Sonargaon University
Certificate of Approval

This is to certify that the project titled “ARDUINO BASED AUTOMATIC PLANT
IRRIGATION SYSTEM WITH MESSAGE ALERT” carried out by

Name Roll No
Md. Jasim Rahman EEE1702011010
Atikur Rahman EEE1702011108
Md. Mojahidul Islam EEE1702011037
Md.Ismail Hossain EEE1702011086
Patwary
Mohammed EEE1702011101
mainul Hassan

For the partial fulfillment of the requirements for Bachelor of Science in Electrical & Electronics
Engineering from Sonargaon University Dhaka Bangladesh absolutely based on our own work
under the supervision of Jannatul Nazrana, the contents of this thesis, in full or in parts, have
not been submitted to any other Institute or University.

.........................................................

Jannatul Nazrana
Lecturer & Department of EEE
Sonargaon University
DECLARATION

“We Do hereby declare that this submission is our own work conformed to the norms
and guidelines given in the Ethical Code of Conduct of the Institute and that, to the best
of our knowledge and belief, it contains no material previously written by another
neither person nor material (data, theoretical analysis, figures, and text) which has been
accepted for the award of any other degree or diploma of the university or other
institute of higher learning, except where due acknowledgement has been made in the
text.”

.......................................................... ..........................................................

Md. Jasim Rahman Atikur Rahman


EEE1702011010 EEE1702011108

.......................................................... ..........................................................

Md. Mojahidul Islam Md.Ismail Hossain Patwary


EEE1702011037 EEE1702011086

..........................................................

Mohammed mainul Hassan


EEE1702011101
ABSTRACT

Designing an Embedded System Which Can Completely Help A Farmer to Supply


Water to The Crops by Sending Messages in Irrigation Field. Bangladesh is the
agricultural based country. Our ancient people completely depended on the
agricultural harvesting. Agriculture is a source of livelihood of majority
Bangladesh and has great impact on the economy of the country. In dry areas or in
case of inadequate rainfall, irrigation becomes difficult. So, it needs to be
automated for proper yield and handled remotely for farmer safety. Increasing
energy costs and decreasing water supplies point out the need for better water
management. Irrigation management is a complex decision making process to
determine when and how much water to apply to a growing crop to meet specific
management objectives. If the farmer is far from the agricultural land he will not
be noticed of current conditions. So, efficient water management plays an
important role in the irrigated agricultural cropping systems.

 This Project Deals with Irrigation Application.


 Physical Effort and Inconvenience
 Loss/ Frequent Damage of Irrigation Equipment
 Wastage of Water and Electricity
CONTENTS
COMPONENTS REQUIRED

ITEM SPECIFICATION QUANTITY


Arduino Uno

GSM Module

Transistor
Connecting wires

LCD

Power supply
Relay

Water pump

Soil Moisture Sensor


Terminal connector

Resistors

LIST OF ABBREVIATION

GSM- Global System for Mobile


Communications
TTL- Transistor Transistor Logic
CDMA- Code Division Multiple Access
SIM- Subscriber Identity Module
LCD- Liquid Crystal Display
BLOCK DIAGRAM
Introduction

Whenever we go out of town for few days, we always used to worry about our plants as they
need water on regular basis. So here we are making Automatic Plant Irrigation System using
Arduino, which automatically provides water to your plants and keep you updated by sending
message to your cell phone. In This Plant Watering System, Soil Moisture Sensor checks the
moisture level in the soil and if moisture level is low then Arduino switches on a water pump to
provide water to the plant. Water pump gets automatically off when system finds enough
moisture in the soil. Whenever system switched On or off the pump, a message is sent to the
user via GSM module, updating the status of water pump and soil moisture. This system is very
useful in Farms, gardens, home etc. This system is completely automated and there is no need
for any human intervention. The main concept behind the project is receiving the sent SMS and
Processing it further as required to perform several operations. The type of the operation to be
performed depends on the nature of the SMS sent.

Working Principle

In This Plant Watering System, Soil Moisture Sensor checks the moisture level in the soil and if
moisture level is low then Arduino switches on a water pump to provide water to the plant.
Water pump gets automatically off when system finds enough moisture in the soil. Whenever
system switched On or off the pump, a message is sent to the user via GSM module, updating
the status of water pump and soil moisture. This system is very useful in Farms, gardens, home
etc. This system is completely automated and there is no need for any human intervention.
Working of this Automatic Plant Irrigation System is quite simple. First of all, it is
a Completely Automated System and there is no need of manpower to control the system.
Arduino is used for controlling the whole process and GSM module is used for sending alert
messages to user on his Cellphone. If moisture is present in soil then there is conduction
between the two probes of Soil Moisture sensor and due to this conduction, transistor Q2
remains in triggered/on state and Arduino Pin D7 remains Low. When Arduino reads LOW
signal at D7, then it sends SMS to user about “Soil Moisture is Normal. Motor turned OFF” and
water pump remains in Off state. Now if there is no Moisture in soil then Transistor Q2
becomes Off and Pin D7 becomes High. Then Arduino reads the Pin D7 and turns on the water
motor and also sends message to user about “Low Soil Moisture detected. Motor turned ON”.
Motor will automatically turn off when there is sufficient moisture in the soil.

Circuit explanation

In this Plant Irrigation System, we have used a Homemade Soil Moisture Sensor Probe to
sense the soil moisture level. To make probe, we have cut silver plate according to the Picture
shown below. One side of the probe is directly connected to Vcc and another probe terminal
goes to the base of BC547 transistor. A potentiometer is connected to the base of the transistor
to adjust the sensitivity of the sensor. Arduino is used for controlling whole the process of
this Automatic Plant Watering System. The output of soil sensor circuit is directly. connected
to digital pin D7 of Arduino. A LED is used at the sensor circuit, this LED’s ON state indicates
the presence of moisture in the soil and OFF state indicates the absence of moisture in the soil.
GSM module is used for sending SMS to the user. Here we have used TTL SIM800 GSM
module, which gives and takes TTL logic directly (user may use any GSM module).  voltage
rating and it is recommended to read its datasheet before use. Its operating voltage rating is 3.8v
to 4.2v (please prefer 3.8v to operate it).we use a lithium battery. If user wants to use SIM900
TTL Module then he should use 5V and if the user wants to use SIM900 Module then apply
12v in the DC Jack slot of the board. A 5V Relay is used to control the 12V DC small water
pump. The relay is driven by a BC547 Transistor which is further connected to digital pin 11 of
Arduino. An optional LCD is also used for displaying status and messages. Control pins of
LCD, RS and EN are connected to pin 14 and 15 of Arduino and data pins of LCD D4-D7 are
directly connected at pin 16, 17, 18 and 19 of Arduino. LCD is used in 4-bit mode and driven
by Arduino’s inbuilt LCD library.
Arduino code

#include<SoftwareSerial.h>
SoftwareSerial Serial1(2,3);

#include<LiquidCrystal.h>
LiquidCrystal lcd(14,15,16,17,18,19);
int led=13;
int flag=0;
String str="";

#define motor 11
#define sensor 7

void setup()
{
lcd.begin(16,2);
Serial1.begin(9600);
Serial.begin(9600);
pinMode(led, OUTPUT);
pinMode(motor, OUTPUT);
pinMode(sensor, INPUT_PULLUP);
lcd.print("Water Irrigaton");
lcd.setCursor(4,1);
delay(2000);
lcd.clear();
lcd.print("Circuit Digest");
lcd.setCursor(0,1);
lcd.print("Welcomes You");
delay(2000);
gsmInit();
lcd.clear();
lcd.print("System Ready");
}

void loop()
{
lcd.setCursor(0,0);
lcd.print("Automatic Mode ");
if(digitalRead(sensor)==1 && flag==0)
{
delay(1000);
if(digitalRead(sensor)==1)
{
digitalWrite(led, HIGH);
sendSMS("Low Soil Moisture detected. Motor turned ON");
lcd.begin(16,2);
lcd.setCursor(0,1);
lcd.print("Motor ON ");
digitalWrite(motor, HIGH);
delay(2000);
flag=1;
}
}

else if(digitalRead(sensor)==0 && flag==1)


{
delay(1000);
if(digitalRead(sensor)==0)
{
digitalWrite(led, LOW);
sendSMS("Soil Moisture is Normal. Motor turned OFF");
digitalWrite(motor, LOW);
lcd.begin(16,2);
lcd.print("Motor OFF");
lcd.setCursor(0,1);
lcd.print("Motor OFF");
delay(2000);
flag=0;
}
}
}

void sendSMS(String msg)


{
lcd.clear();
lcd.print("Sending SMS");
Serial1.println("AT+CMGF=1");
delay(500);
Serial1.print("AT+CMGS=");
Serial1.print('"');
Serial1.print("+919610126059"); // number
Serial1.print('"');
Serial1.println();
delay(500);
Serial1.println(msg);
delay(500);
Serial1.write(26);
delay(1000);
lcd.clear();
lcd.print("SMS Sent");
delay(1000);
lcd.begin(16,2);
}

void gsmInit()
{
lcd.clear();
lcd.print("Finding Module..");
boolean at_flag=1;
while(at_flag)
{
Serial1.println("AT");
while(Serial1.available()>0)
{
if(Serial1.find("OK"))
at_flag=0;
}
delay(1000);
}
Serial1.println("ATE0");
lcd.clear();
lcd.print("Finding Network..");
boolean net_flag=1;
while(net_flag)
{
Serial1.println("AT+CPIN?");
while(Serial1.available()>0)
{
if(Serial1.find("READY"))
net_flag=0;
break;
}
delay(1000);
}
Serial1.println("AT+CNMI=2,2,0,0,0");
delay(1000);
Serial1.println("AT+CMGF=1");
delay(1000);
Serial1.println("AT+CSMP=17,167,0,0");
lcd.clear();
Serial1.flush();
}
Arduino

Arduino is a popular open-source development board for engineers and makers


to develop electronics projects in an easy way. Here have analog and digital
pins. It consists of both a physical programmable development board (based
on AVR series of microcontrollers) and a piece of software or IDE which runs
on your computer and used to write and upload the code to the microcontroller
board.
Gsm module

Here we have used TTL SIM800 GSM module. The SIM800 is a complete Quad-band


GSM/GPRS Module which can be embedded easily by customer or hobbyist. SIM900 GSM
Module provides an industry-standard interface; the SIM800 delivers GSM/GPRS
850/900/1800/1900MHz performance for voice, SMS, Data with low power consumption. The
design of this SIM800 GSM Module is slim and compact. It is easily available in the market or
online from techshop.Quad - band GSM/GPRS module in small size.

Transistor BC547

BC547 is an NPN bi-polar junction transistor. A transistor, stands for transfer of resistance, is
commonly used to amplify current. A small current at its base controls a larger current at
collector & emitter terminals. Its collector terminal connect with diode. BC547 is mainly used
for amplification and switching purposes.
Lcd Display

LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of applications. A
16x2 LCD display is very basic module and is very commonly used in various devices and circuits. Here we
connected 2&15 no. pin in vcc and 1,3,5,16 no. pin connect in ground. A 16x2 LCD means it can display 16
characters per line and there are 2 such lines.
Power Supply

A power supply is an electrical device that supplies electric power to an electrical


load. The primary function of a power supply is to convert electric current from a
source to the correct voltage, current, and frequency to power the load. As a result,
power supplies are sometimes referred to as electric power converters. Some
power supplies are separate standalone pieces of equipment, while others are built
into the load appliances that they power. we also connected a USB data cable.
Examples of the latter include power supplies found in desktop computers and
consumer electronics devices. Other functions that power supplies may perform
include limiting the current drawn by the load to safe levels, shutting off the
current in the event of an electrical fault, power conditioning to prevent electronic
noise or voltage surges on the input from reaching the load, power-factor
correction, and storing energy so it can continue to power the load in the event of a
temporary interruption in the source power (uninterruptible power supply).
Water Pump

The water pump is used to artificially supply water for a particular task. It can be
electronically controlled by interfacing it to a microcontroller. It can be triggered
ON/OFF by sending signals as required. The process of artificially supplying water
is known as pumping. There are many varieties of water pumps used. This project
employs the use of a small water pump which is connected to a H-Bridge.The
pumping of water is a basic and practical technique, far more practical than
scooping it up with one's hands or lifting it in a hand-held bucket. This is true
whether the water is drawn from a fresh source, moved to a needed location,
purified, or used for irrigation, washing, or sewage treatment, or for evacuating
water from an undesirable location. Regardless of the outcome, the energy required
to pump water is an extremely demanding component of water consumption. All
other processes depend or benefit either from water descending from a higher
elevation or some pressurized plumbing system.
Soil Moisture Sensor

In this Plant Irrigation System, we have used a Homemade Soil Moisture Sensor
Probe to sense the soil moisture level. To make probe, we have cut and etched a
Copper clad Board according to the Picture shown below. One side of the probe is
directly connected to Vcc and other probe terminal goes to the vero board which is
connected with arduino. It works like not gate. A potentiometer is connected to the
base of the transistor to adjust the sensitivity of the sensor.

Das könnte Ihnen auch gefallen