Documente Academic
Documente Profesional
Documente Cultură
Submitted by:-
Guided By:-
Amal Mishra
UE124004
Anirudh Kalla
UE124007
Assistant Professor
Page
TABLE OF CONTENTS
TITLE
PAGE NO
Certificate
------------------------------------------------------------------------------
Acknowledgment ------------------------------------------------------------------------------
List of figures
--------------------------------------------------------------------------------
1.1 Introduction
-------------------------------------------------
10
-------------------------------------------------
20
21
22
--------------------------------------------------------------
23-25
--------------------------------------------------------------
26
-------------------------------------------------
26
26-36
37-38
--------------------------------------------------
Page
11-18
39
TABLE OF CONTENTS
TITLE
PAGE NO
Chapter 4: Epilogue
--------------------------------------------------------------------------
40
----------------------------------------------------------------------------
41
42
43
44
45
4.1 Results
Page
REFERENCES
---------------------------------------------------------------------------------
46
CERTIFICATE
This is to certify that the following project report entitled GSM based plant care system submitted by Amal
Mishra (UE124004), Anirudh Kalla (UE124007), Avinash Mishra (UE124012) and Nitesh Hingonia (UE124041) in
partial fulfilment of the requirement for the award of the degree of Bachelor of Engineering in Electrical and
Electronics is an authentic record of work carried out under my supervision.
Page
ACKNOWLEDGMENT
We would like to express our deepest appreciation to all those who provided us the opportunity to complete this
report. We would like to express special gratitude to our mentor, Mrs Aditi Gupta, whose contribution in stimulating
suggestions and encouragement helped us to coordinate our project especially in writing this report.
Furthermore, we would also like to acknowledge with much appreciation the crucial role of staff of Electrical and
Electronics Engineering department, U.I.E.T., Panjab University, who gave the permission to use all required
equipment and the necessary materials to complete the minor project on GSM based plant care system. We have
to appreciate the guidance given by other supervisors as well as the panels especially in our project presentation that
has improved our project and presentation skills, thanks to their comment and advices.
Page
LIST OF FIGURES
Page
CHAPTER 1:
PROJECT
Page
OVERVIEW
1.1 Introduction
Most of us love gardening but one of the most challenging task is proper watering of the plants. Both over watering
and under watering of the plants is harmful, also the frequency of watering depends on the soil moisture and
ambient temperature. This project aims at solving this problem by monitoring the temperature, humidity and
moisture and automatically operating the pump as and when required with the help of an embedded system. It can
also solve the common problem faced by people when they go out on vacations, the plants most often die due to
lack of watering. The common solution is to trust the neighbours to take care of your plants which is not reliable for
many reasons. This project provides the solution to this problem by enabling monitoring and controlling of plants
from anywhere. By just sending a SMS you can get the status of your plants and by sending a SMS you can turn on
and off the pump remotely.
An embedded system is a special purpose computer system designed to perform a dedicated function. Since
the system is dedicated to specific task, design engineers can optimize it, reducing the size and cost of product.
Embedded system comprises of both hardware and software. It is a fast growing technology in various fields like
industrial automation, home appliances, automobiles, aeronautics etc. Embedded technology uses PC or a controller
to do the specified task and the programming is done using assembly language programming or embedded.
Many devices are used for monitoring the humidity and moisture conditions. In early days, all the system
were analog and the measured value was displayed using recorders and CRO's. This project is used to eliminate the
drawbacks in the existing system. Here the humidity is monitored by sensor that can be converted into digital by the
corresponding microcontroller and sent to the user by the use of GSM Module. The user can then take the necessary
action depending on the received values which is to switch on the pump for watering the plants or not.
Global system for mobile communication (GSM) is one of the most trustable wireless communication
system that can be accessed and used very easily. The price of trans- receiver module and subscription fee of its
services is very low so it is very cost effective. Embedded system interface with GSM module can widen the scope
of embedded design and enhance the application areas of controlling and monitoring system to a greater extent.
During the past decade network services have extended beyond speech communication to many other custom
specified embedded design application. This project implements an innovative GSM based remote controlled
embedded plant care system. The interface and communication between user and designed system is via SMS on
Page
GSM network.
Page
Page
10
Page
11
regulator may overheat and damage the board. The recommended range is 7 to 12 volts.
VIN: The input voltage to the Uno board when it's using an external power source (as opposed to 5 volts
from the USB connection or other regulated power source). You can supply voltage through this pin, or, if
supplying voltage via the power jack, access it through this pin.
2) 5V: This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with power
either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of the board (7-12V).
Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board.
3) 3V3: A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.
4) GND: Ground pins.
5) IOREF: This pin on the Uno board provides the voltage reference with which the microcontroller operates.
A properly configured shield can read the IOREF pin voltage and select the appropriate power source or
Page
12
Page
13
control) that can be either AT standard or AT-enhanced SIMCOM type. It takes 12 Volt DC Power Supply.
3. Moisture Sensor
Soil moisture sensors (Fig 5) measure the water content in soil. A soil moisture probe is made up of multiple soil
moisture sensors. Technologies commonly used in soil moisture sensors include:
Neutron moisture gauges, utilize the moderator properties of water for neutrons.
In this particular project, we will use the moisture sensors which can be inserted in the soil, in order to measure the
Page
14
Soil electrical conductivity is simply measured using two metal conductors spaced apart in the soil except that
dissolved salts greatly alter the water conductivity and can confound the measurements. An inexpensive fix is to
embed conductors in a porous gypsum block which releases calcium and sulphate ions to swamp the soil
background level of ions. The water absorbed by the block is correlated with soil water potential over the range -60
to -600 kpa providing a tertiary indicator for use in medium to heavy soils. Non-dissolving granular matrix sensors
are now available with a more exacting specification for the range 0 to -200 kpa and use internal calibration
methods to offset variations due to solutes and temperature. Methods for exploiting soil dielectric properties actually
measure proxy variables that more or less include a component due to the soil electrical conductivity and are thus
inherently sensitive to variations in soil salinity and temperature as well as water. Measurements are also affected by
soil bulk density and the proportion of bound and free water determined by the soil type. Nevertheless, good
accuracy and precision can be achieved under specific conditions and some sensor types have become widely
adopted for scientific work. In general, conversions from raw sensor readings to volumetric moisture content or
water potential using secondary or tertiary methods tend to be sensor or soil specific, affected or precluded at high
salinity levels and dependent on temperature. Research-grade instruments typically have laboratory measured
accuracy worse than +/- 4% when relying on factory settings or as good as +/- 1% when calibrated for the specific
soil. Sensors based on the TDR method seem to require least calibration but may be unsuitable for soils with very
high salinity or clay content. There are no comparable laboratory specifications for granular matrix sensors, possibly
because they are technically more difficult to calibrate, their response times are relatively slow and the output is
hysteretic for wetting and drying curves. Soil dielectric measurement is the method of choice for most research
studies where expertise is available for calibration, installation and interpretation, but scope for cost reduction
through sensor multiplexing is limited due to the possibility of stray capacitances. A lower manufacturing cost is
possible through development of application specific integrated circuits (ASICS), though this requires a high level
of investment. Multiple sensors are required to provide a depth profile and cover a representative area, but this cost
can be minimized through use of a computer model to extend the measurements in a predictive way. Thus, by using
the moisture sensors, the over-riding factor will be reliable, cost effective sensors and electronic systems for
accessing and interpreting the data.
Page
15
want multiple sensors, each one must have its own data pin. This sensor is more precise, more accurate and works in
a bigger range of temperature/humidity, but its larger and more expensive comes with a 4.7K - 10K resistor which
is use as a pull up from the data pin to VCC [2].
Low cost
5. Water Pump.
The water pump (Fig 7) 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
Page
16
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.
6.16x2 LCD
162 Liquid Crystal Display (Fig 8) which will display the 32 characters at a time in two rows (16 characters in one
row). Each character in the display are of size 57 pixel matrix. Although this matrix differs for different 162 LCD
modules if you take JHD162A this matrix goes to 58. This matrix will not be same for all the 162 LCD modules.
Steps for displaying a character or data
Page
17
Page
18
7. OTHER COMPONENTS.
12 V dc adapter
Connecting cable
Bread board
Soldering iron
Resistor 10K
Potentiometer 10K
LED bulbs
Chapter 2:
Page
19
Literature Overview
GSM based Automatic irrigation systems are used in farming, more extensively in developed nations due to the high
living standards and better network availability. Veena Divya K deals with the implementation of drip irrigation
system controlled through GSM [3].
Drip irrigation is artificial method of supplying water to the roots of the plant. It is also called micro
irrigation [4]. In past few years there is a rapid growth in this system. The user communicates with the centralized
unit through SMS. The centralized unit communicates with the system through SMS which will be received by the
GSM with the help of the SIM card. The GSM sends this data to ARM7 (Processor) which is also continuously
receives the data from sensors in some form of codes. After processing, this data is displayed on the LCD. Thus in
short whenever the system receives the activation command from the subscriber it checks all the field conditions
and gives a detailed feedback to the user and waits for another activation command to start the motor.
When the motor is started, a constant monitoring on soil moisture and water level is done & once the soil
moisture is reached to sufficient level the motor is automatically turned off & a massage is send to subscriber that
the motor is turned off. The water level indicator indicates three levels low, medium, high and also empty tank.
In 2007 a GSM-SMS remote measurement and control system for greenhouse based on PC-based database
system connected with base station was introduced. Base station is developed by using a microcontroller, GSM
module, sensors and actuators. In practical operation, the central station receives and sends messages through GSM
module. Criterion value of parameters to be measured in every base station is set by central station, and then in base
stations parameters including the air temperature, the air humidity.
The GSM based irrigation system may offer users the flexibility to regulate and control the operations of
their irrigation systems with little intervention to reduce runoff from over watering for improvement in crop yield.
This enables users to take advantage of the globally deployed GSM networks with its low SMS service cost to use
mobile phones and simple SMS commands to manage their irrigation system. It will be possible for users to use
SMS to monitor directly the conditions of their farmland, schedule the water needs of crops, automatically control
watering, and set control operational conditions in accordance with the water needs of crops. This will help
Page
20
Chapter 3:
Page
21
System Development
3.1
Project Management
The project was carried out in the Control and Instrumentation lab of UIET, Panjab University under the guidance of
Mrs Aditi Gupta. After review of the basic material already available on the internet in the form of research papers and
project studies done previously a project roadmap was developed. The project was carried out in following steps:
First step was to make list of the required components and obtain them from the vendors.
After that testing of each component like GSM, moisture sensor and temperature sensor was done by
preparing individual codes and checking the readings obtained.
The next step was making connections and assembling the components.
It was followed by preparation of final code by assembling the individual blocks of the program which we got
right after hours of testing and debugging.
Next came the testing and monitoring phase to validate the system performance in which we monitored the
variation of soil moisture for three days.
Page
22
DATE
TASK
Project Finalised
Page
23
services:
Information and configuration pertaining to mobile device or MODEM and SIM card.
SMS services.
MMS services.
Fax services.
2) +CMGF - This command is used to set the SMS mode. Either text or PDU mode can be selected by assigning
1 or 0 in the command.
SYNTAX:
AT+CMGF=<mode>
0: for PDU mode
1: for text mode
The text mode of SMS is easier to operate but it allows limited features of SMS. The PDU (protocol data
unit) allows more access to SMS services but the operator requires bit level knowledge of TPDUs. The headers and
body of SMS are accessed in hex format in PDU mode so it allows availing more features.
For example,
AT+CMGF=1
OK
As one types AT+CMGW and phone number, > sign appears on next line where one can type the message.
Multiple line messages can be typed in this case. This is why the message is terminated by providing a Ctrl+Z
Page
24
combination. As Ctrl+Z is pressed, the following information response is displayed on the screen.
As the command AT+CMGS and serial number of message are entered, SMS is sent to the particular SIM.
For example,
AT+CMGS=1
OK
5)
SYNTAX:
ATD<Phone number>;(Enter)
For example,
ATD123456789;
6) ATA - This command is used to answer a call. An incoming call is indicated by a message RING which is
repeated for every ring of the call. When the call ends NO CARRIER is displayed on the screen.
SYNTAX:
ATA(Enter)
As ATA followed by enter key is pressed, incoming call is answered .For example
RING
RING
ATA
LCD i.e. Liquid Crystal Display which is connected to the digital pin of ARDUINO which is used in the operation of
LCD and it can be used for displaying of message or information or for alert. Here the sensor DHT22 measures
humidity and temperature. Humidity sensor shows the presence of water in air which is harmful for crops and another
sensor is temperature which measure temperature of the atmosphere. This sensor is connected to the Digital pin of the
Page
25
ARDUINO. Moisture sensor is also used which measures the soils moisture and hence gives the indication about
water content. According to our project if any value is increased or decreased beyond a certain limit then it gives alert
to us in the form "alert" to our number through GSM modem [7].
Page
26
#define DHTPIN 6
Page
27
String message;
String receivedmessage;
char inByte;
float h,t,f,hif,hic;
boolean motor1=false,motor2=false;
int j=0;
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.setCursor(0, 0);
lcd.print("M1");
lcd.setCursor(4, 0);
lcd.print("M2");
lcd.setCursor(8, 0);
lcd.print("Hum");
lcd.setCursor(13, 0);
lcd.print("Tem");
mySerial.begin(9600);
dht.begin();
Serial.begin(9600);
mySerial.println("AT+CMGF=1");
delay(500);
mySerial.println("AT+CNMI=2,2,0,0,0");
delay(2000);
}
void loop()
Page
28
{
measure_Print();
if (mySerial.available())
receiveMessage();
if((MV1<Mthreshold1 || MV2< Mthreshold2)&&(j<1))
{ Serial.println("inside loop Done!! ");
message="Plant health Critical Take Action ";
plantStatus();
timemark=millis();
while( !(IsTime(&timemark,timeinterval))&&(j<1) )
{
Serial.println("Waiting!!!!");// Wait for response or for 15 minutes to elapse
if(mySerial.available())
{
receiveMessage();
if(find_string(receivedmessage,"On")|| find_string(receivedmessage,"on"))
{
j=1;
break;
}
}
}
Page
29
motor2Off();
}
Serial.println("Done!!");
void measure_Print()
{Serial.println("Entered print");
MV1=analogRead(A0);
MV2=analogRead(A1);
lcd.setCursor(0, 1);
lcd.print(MV1);
lcd.setCursor(4, 1);
lcd.print(MV2);
Page
30
// Check if any reads failed and exit early (to try again).
if (isnan(h) || isnan(t) || isnan(f))
{
mySerial.println("AT+CMGS=\"+919023123257\"\r");
delay(1000);
mySerial.println(TextSMS);
delay(1000);
mySerial.println((char)26);
delay(1000);
Page
31
return;
}
void plantStatus()
{ Serial.println("Entered plant status");
message+="Moisture value in plants 1 and 2 are ";
message+=MV1;
message+=" And ";
message+=MV2;
message+=" Humidity ";
message+=h;
message+=" And temperature ";
message+=t;
sendSMS(message);
message="";
return;
}
void receiveMessage()
{
if(mySerial.available())
{
String gsm_input="";
while(mySerial.available()) // read the data into a variable as long as the buffer is not empty
{
gsm_input += (char)mySerial.read();
delay(5);// Playaround with this timing if you have missing serial data / garbled Serial data coming from
the GSM modem
}
Page
32
receivedmessage=gsm_input;
Serial.println(gsm_input);
if(find_string(gsm_input,"Status") || find_string(gsm_input,"status"))
{
measure_Print();
plantStatus();
}
if(find_string(gsm_input,"On") || find_string(gsm_input,"on"))
{
if(MV1<M1max && MV2< M2max)
{
motor1On();
motor2On();
}
Page
33
sendSMS(message);
}
if(MV1<Mthreshold1 || MV2> Mthreshold2)
motor2Off();
}
return;
}
}
34
digitalWrite(7,HIGH);
Page
digitalWrite(8,LOW);
motor1=true;
return;
}
void motor2On()
{
digitalWrite(13,HIGH);
motor2=true;
return;
}
void motor1Off()
{
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
motor1=false;
return;
}
void motor2Off()
{
digitalWrite(13,LOW);
motor2=false;
return;
}
// A Function to locate a given search string in a given base string
boolean find_string(String base, String search)
Page
35
{
Serial.println("Function Find String!");
int len = search.length(); // find the length of the base string
for(int m = 0; m<((base.length()-len)+1);m++)// Iterate from the beginning of the base string till the end
minus length of the substring
{
}
return false; // if the above loop did not find any matches, control would come here and return a false value
}
void flush_buffer(void)
{
int num;
while(1)
{
num = mySerial.available();
if (num == 0)
{
break;
}
else
{
mySerial.read();
}
Page
36
}
}
Page
37
void setup
void loop
void_ Print
void_ SendSMS
void plantStatus
boolean IsTime
void motor1On
void motor2On
void motor1Off
void motor2Off
// Configuration of peripherals
// Use to perform repetitive tasks
// Measures all sensors values and display it on LCD
// For sending the SMS from GSM
// Describe the status of plants
// Used for timing operation
// Used for turning motor1 ON
// Used for turning motor2 ON
// Used for turning motor1OFF
// Used for turning motor2 OFF
38
Page
Page
39
We used ARDUINO Integrated Development environment (IDE) for both preparing and burning our code into
Arduino.
Chapter 4:
Page
40
Epilogue
4.1 Results
The program was burnt on the micro-controller and following results were obtained on the LCD
Page
41
After appropriate testing and error detection, the program ran effectively and it displayed the values of
moisture, humidity and temperature on LCD as above. It also informed user about low values of moisture
asking for attention. It was able to provide status to the user as and when requested by him/her.
4.2 Applications
Application of GSM based plant care system as follows:1. Home automation is the basic idea behind this project. It allows remote monitoring and care of plants by informing
user whenever plants need watering.
2. Helps in conservation of water when used with drip irrigation system.
3. Can be used for Irrigation system in farms where reliable GSM connection is present.
Page
42
4. Remote devices can also be controlled by adding relay and a little modification to the software.
4.3 Limitations
1. The system is network dependent. Hence, network congestion can reduce the reliability of the system.
2. User can make mistake while typing the message format.
3. Large area require large amount of sensors which can increase the cost.
Page
43
4. Moisture sensor used in this project is resistance based hence is not so accurate as compared to capacitive sensors.
Page
44
4) Bluetooth can be added to avoid SMS charges when user is within range.
4.5 Conclusion
Systems are needed to be designed to provide the ability of efficiently using wireless sensor networking, GSM,
SMS technology. These systems are all remotely controlled systems which propose a low cost information exchange
via SMS and GSM network. The soil moisture, humidity and various other environmental factors influencing growth
of plants are periodically sensed using high quality accurate sensor and those values are passed on to the
processor/controller to calculate required amount of water. The functionality of GSM increases the efficiency of the
automated irrigation system by giving it a more user friendly interface using SMS (Short Message Service).This can
further be expanded for farming with the support of reliable infrastructure. The result of the survey conducted has led
to a very positive approach on the impact of GSM technology in farm irrigation methods and techniques. The
approaches studied had various pros and cons in the time required for operations or complexity or feasibility and user
interactions. With technology advancing everyday new techniques have been implemented for further minimizing the
irrigation process like using prebuilt mobile phone or standalone application software for conduction the irrigation
Page
45
process.
REFERENCES
[1] https://www.arduino.cc/en/Reference/HomePage .
[2] https://learn.adafruit.com/dht .
[3] Veena Divya K, A Real time implementation of a GSM based Automated Irrigation Control
System using Drip Irrigation Methodology, International Journal of Scientific & Engineering Research,
Volume 4, Issue 5, May 2013.
[4]
Pavithra D. S, M. S .Srinath ,GSM based Automatic Irrigation Control System for Efficient Use of
Resources and Crop Planning by Using an Android Mobile, IOSR Journal of Mechanical and Civil Engineering
(IOSR-JMCE), Volume 11, Jul- Aug. 2014. .
[5] http://www.engineersgarage.com/articles/gsm-gprs-modu.les.
[6] http://www.engineersgarage.com/tutorials/at-commands.
Page
46
[7] http://www.circuitstoday.com/interface-gsm-module-with-arduino.