You are on page 1of 50

Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

CHAPTER 1
INTRODUCTION

Dept. of Computer Science and Engg, Nidasoshi Page 1


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

Developing plants has turned out to be innovative test in light of the fact that the field and
strength of the plants are vital parameter now a day either for cash crops or food crops. One of
the significant issues in the present agriculture is the less learning of the agriculture parameters,
and less information about the developing innovations.
In the past agribusiness structure our people of old avoid the use of a specific development for
specific plant growth, they rather used regular marvel for all plants. The technological change in
the agriculture can develop plants under uncommon normal natural conditions, also this develops
specific plants under specific condition which in turn help to get more yield and less compost.
Presently the advancement of precision agriculture in green house, for plant development has
turned out to be prominent on account of less cost innovations for the agriculturists to re-arrive
yield. The greenhouse is a house like a structure covered with a transparent material, which can
keep up controlled temperature, required moistness level, light infiltration and so on, for the
healthy plant growth.
The precised agriculture framework going towards its improvement, in light of the innovative
progression in Wireless Sensor Networks (WSN) that is nothing but an IoT. The irregular
climate conditions for the plants in greenhouse will influence the development of the plants, and
less yield toward the end of the cultivation. So, that it is necessary to control and monitor the
greenhouse parameters, for example, CO2, soil moisture, temperature, light and so on.
This issue can be solved by adapting an IoT innovation in precision agriculture, which
incorporates the précised application for particular greenhouse parameters, for instance
controlled temperature range, water flow control, light radiation and so on for the good plant
growth.
1.1 PROBLEM DEFINITION
Greenhouses in India are being deployed in the high-altitude regions where the subzero
temperature up to -40° C makes any kind of plantation almost impossible so we are developing
this project. Complexity involved in monitoring climatic parameters like humidity, soil moisture,
temperature, etc. which directly or indirectly govern the plant growth. Investment in the
automation process are high, as today’s greenhouse control systems are designed for only one
parameter monitoring to control more than one parameter simultaneously there will be a need to
buy more than one system. High maintenance and need for skilled technical labor. The modern
proposed systems use the mobile technology as the communication schemes and wireless data

Dept. of Computer Science and Engg, Nidasoshi Page 2


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

acquisition systems, providing global access to the information about one’s farms. But it suffers
from various limitations like design complexity, inconvenient repairing and high price. Also the
reliability of the system is relatively low, and when there are malfunctions in local devices, all
local and tale data will be lost and hence the whole system collapses. Moreover farmers in India
do not work under such sophisticated environment and find no necessity of such an advanced
system, and cannot afford the same. Keeping these issues in view, an IOT based monitoring and
control system is designed to find implementation in the near future that will help Indian farmers.
1.2 PROJECT OVERVIEW
The precision agriculture is a framework which incorporates detecting, measuring, and
responding. It is a technique for recognizing greenhouse climate, at that point identified data is
sent to the cloud and afterward required action taken by the agriculturist in view of the received
data. This can be expert by the present advancement called Internet of Things (IoT), it is the
innovation which is interface with everything or every contraption by techniques for web.
The precised agriculture framework going towards its improvement, in light of the innovative
progression in Wireless Sensor Networks (WSN) that is nothing but an IoT. The irregular
climate conditions for the plants in greenhouse will influence the development of the plants, and
less yield toward the end of the cultivation. So, that it is necessary to control and monitor the
greenhouse parameters, for example, CO2, soil moisture, temperature, light and so on.
This issue can be solved by adapting an IoT innovation in precision agriculture, which
incorporates the precised application for particular greenhouse parameters, for instance
controlled temperature range, water flow control, light radiation and so on for the good plant
growth.

Dept. of Computer Science and Engg, Nidasoshi Page 3


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

1.3 HARDWARE REQUIREMENTS


• GSM Module
• Arduino UNO
• Sensors
• Relay
• Transistor
• Transformer
• LCD Display
1.4 SOFTWARE REQUIREMENTS
• Arduino IDE
• Cloud Account
• Windows OS

Dept. of Computer Science and Engg, Nidasoshi Page 4


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

CHAPTER 2
LITERATURE SURVEY

Dept. of Computer Science and Engg, Nidasoshi Page 5


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

2.1 EXISTING SYSTEM


In the past agribusiness structure our people of old avoid the use of a specific
development for specific plant growth, they rather used regular marvel for all plants. The
technological change in the agriculture can develop plants under uncommon normal natural
conditions, also this develops specific plants under specific condition which in turn help to get
more yield and less compost.
The precised agriculture framework going towards its improvement, in light of the
innovative progression in Wireless Sensor Networks (WSN) that is nothing but an IoT. The
irregular climate conditions for the plants in greenhouse will influence the development of the
plants, and less yield toward the end of the cultivation. So, that it is necessary to control and
monitor the greenhouse parameters, for example, CO2, soil moisture, temperature, light and so
on.
Disadvantages:
The existing set-ups primarily are:
MANUAL SET-UP: This set-up involves visual inspection of the plant growth, manual
irrigation of plants, turning ON and OFF the temperature controllers, manual spraying of the
fertilizers and pesticides. It is time consuming, vulnerable to human error and hence less accurate
and unreliable.
PARTIALLY AUTOMATED SET-UP: This set-up is a combination of manual supervision
and partial automation and is similar to manual set-up in most respects but it reduces the labor
involved in terms of irrigating the set-up.
FULLY- AUTOMATED: This is a sophisticated set-up which is well equipped to react to most
of the climatic changes occurring inside the greenhouse. It works on a feedback system which
helps it to respond to the external stimulation efficiently. Although this set-up overcomes the
problems caused due to human errors it is not completely automated and expensive.

Dept. of Computer Science and Engg, Nidasoshi Page 6


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

2.2 PROPOSED SYSTEM


The proposed system, interested to help the farmer by introducing IoT based precision
agriculture system for greenhouse. Our focus is to provide field information that is remotely
controlled greenhouse agriculture parameters such as CO2, temperature, and light, to the farmers
from long distance. This avoids the farmers from physical visit to the fields. For this we used a
IoT kit with internet connection. The IoT kit consists of different sensors, and electronic devices.
The components used are IoT kit, Sensors, Internet connection, DC motor driver circuit, Relay
logic circuit, Cloud account, End user.

Fig.2. Block Diagram

Advantages of the proposed system


The proposed system is going to play an important role in future of agriculture system and
hopefully it would going to help in boosting the efficiency of growth and production of
agriculture industry. Apart from that some of the important advantages of the proposed system
are listed below.
• Easy to use
• Easy to implement
• More accurate results
• Increase Fertility
• Better Productivity

Dept. of Computer Science and Engg, Nidasoshi Page 7


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

CHAPTER 3
SYSTEM ANALYSIS AND DESIGN

Dept. of Computer Science and Engg, Nidasoshi Page 8


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

3.1 REQUIREMENT SPECIFICATION


3.1.1 FUNCTIONAL REQUIREMENTS:
A functional requirement defines the functionality of a system or one of its subsystems. It also
dependences upon the type of system where the software is used.
Functional Requirements specification:
1. Sensor should sense the temperature in the given environment of greenhouse system.
2. The correct detail of the sensors should be fetched by the server.
3. The server should response quickly.
4. Immediate output on the display screen.

3.1.2 NON-FUNCTIONAL REQUIREMENTS:


The non functional requirements tell you how the system will run or work properly.
1. Performance Requirements
• Data retrieving speed: The speed of retrieving data from sensor should be faster as
possible .more delay may cause the wrong solution.
• Giving Notification: Notification time should be normal, that farmer can get the
whole situation and fix the problem.
• Display timing: After completing all the processes, farmer should know that what
crop he has to choose next, if display not works properly then the farmer not get
the information.
2. Safety Requirements
• Use case: The use case is used to prevent the circuit of the system from external
circumstances, the circuit includes Arduino, Wi-Fi module, sensors wires, etc.
they all should be protected from external affairs. Maintenance of the core Circuit
is done by use case.
• Database: Database must be secure, because it contains all the information related
to farmer, farm manager, crop details and much more. It should prevent from
external users, otherwise a small change in database may leads dangerous failure
of the system.

Dept. of Computer Science and Engg, Nidasoshi Page 9


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

3. Security Requirements
• Availability
• Flexibility
• Reliability
• Maintainability
• Correctness

3.1.3 HARDWARE SPECIFICATION


ARDUINO UNO

Fig.3a. Arduino UNO board


Arduino is an open source computer hardware and software company, project, and user
community that designs and manufactures single-board microcontrollers and microcontroller kits
for building digital devices and interactive objects that can sense and control objects in the
physical and digital world. The project's products are distributed as open-source
hardware and software, which are licensed under the GNU Lesser General Public
License (LGPL) or the GNU General Public License (GPL), permitting the manufacture of
Arduino boards and software distribution by anyone. Arduino boards are available commercially
in preassembled form, or as do-it-yourself (DIY) kits.
Arduino board designs use a variety of microprocessors and controllers. The boards are equipped
with sets of digital and analog input/output (I/O) pins that may be interfaced to various

Dept. of Computer Science and Engg, Nidasoshi Page 10


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

expansion boards or Breadboards (shields) and other circuits. The boards feature serial
communications interfaces, including Universal Serial Bus (USB) on some models, which are
also used for loading programs from personal computers. The microcontrollers are typically
programmed using a dialect of features from the programming languages C and C++. In addition
to using traditional compiler tool chains, the Arduino project provides an integrated development
environment (IDE) based on the Processing language project.
GSM MODULE

Fig.3b. GSM (Global System Monitoring)


This is a GSM/GPRS-compatible Quad-band cell phone, which works on a frequency of
850/900/1800/1900MHz and which can be used not only to access the Internet, but also for oral
communication (provided that it is connected to a microphone and a small loud speaker) and for
SMSs. Externally, it looks like a big package (0.94 inches x 0.94 inches x 0.12 inches) with L-
shaped contacts on four sides so that they can be soldered both on the side and at the bottom.
Internally, the module is managed by an AMR926EJ-S processor, which controls phone
communication, data communication (through an integrated TCP/IP stack), and (through an
UART and a TTL serial interface) the communication with the circuit interfaced with the cell
phone itself.
Subsequently, the 3GPP developed third-generation (3G) UMTS standards, followed by fourth-
generation (4G) LTE Advanced standards, which do not form part of the ETSI GSM standard.

Dept. of Computer Science and Engg, Nidasoshi Page 11


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

Wi-Fi Module (ESP8266)

Fig.3c. Wi-Fi module


It connects the sensor and Arduino UNO with the internet to mobile application. It updates the
whether information on the both side updates the thinkspeak server and the also update
information in database. We are using ESP8266 to connect our Arduino UNO server.
SENSORS
• SOIL MOISTURE SENSOR

Fig.3d. Soil Moisture Sensor


This Moisture Sensor can be used to detect the moisture of soil or judge if there is water around
the sensor, let the plants in your garden reach out for human help. They can be very easy to use,
just insert it into the soil and then read it. With the help of this sensor, it will be realizable to
make the plant remind you.
Soil moisture plays a key role in the life of the plant. Nutrients in the soil solution provide the
plant with the food it needs to grow. Water is also essential for regulating plant temperature
through the process of transpiration. Plant root systems are better developed when growing in

Dept. of Computer Science and Engg, Nidasoshi Page 12


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

moist soil. Excessive levels of soil moisture, however, can lead to anaerobic conditions that can
promote the growth of plant and soil pathogens.
• LIGHT SENSOR (LDR)

Fig.3e. LDR sensor


A Light Dependent Resistor (LDR) or a photo resistor is a device whose resistivity is a function
of the incident electromagnetic radiation. Hence, they are light sensitive devices. They are also
called as photo conductors, photo conductive cells or simply photocells.
When light falls i.e. when the photons fall on the device, the electrons in the valence band of the
semiconductor material are excited to the conduction band. These photons in the incident light
should have energy greater than the band gap of the semiconductor material to make the
electrons jump from the valence band to the conduction band.
Hence when light having enough energy strikes on the device, more and more electrons are
excited to the conduction band which results in large number of charge carriers. The result of this
process is more and more current starts flowing through the device when the circuit is closed and
hence it is said that the resistance of the device has been decreased. This is the most
common working principle of LDR.
• TEMPERATURE SENSORS (DHT11)

Fig.3f. DHT11 Sensor


The DHT11 is a basic, ultra low-cost digital temperature and humidity sensor. It uses a
capacitive humidity sensor and a thermistor to measure the surrounding air, and spits out a

Dept. of Computer Science and Engg, Nidasoshi Page 13


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

digital signal on the data pin (no analog input pins needed). Its fairly simple to use, but
requires careful timing to grab data. The only real downside of this sensor is you can only get
new data from it once every 2 seconds, so when using our library, sensor readings can be up
to 2 seconds old.

• SMOKE SENSOR(CO)

Fig.3g. CO Sensor
A carbon monoxide detector for the Arduino-based DIY security system. The carbon monoxide
detector is a semiconductor gas sensor tuned to detect carbon monoxide. It is in the same family
of devices as the smoke detector sensor, measuring the change in surface conductivity of tin
dioxide in the presence of carbon monoxide. This sensor has a high sensitivity and fast response
time. The sensor's output is an analog resistance.
LCD DISPLAY

Fig.3h. 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

Dept. of Computer Science and Engg, Nidasoshi Page 14


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

devices and circuits. These modules are preferred over seven segments and other multi
segment LEDs.
The reasons being: LCDs are economical; easily programmable; have no limitation of displaying
special & even custom characters (unlike in seven segments), animations and so on.
A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this LCD
each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely, Command
and Data.
The command register stores the command instructions given to the LCD. A command is an
instruction given to LCD to do a predefined task like initializing it, clearing its screen, setting the
cursor position, controlling display etc. The data register stores the data to be displayed on the
LCD. The data is the ASCII value of the character to be displayed on the LCD. Click to learn
more about internal structure of a LCD.
RELAY

Fig.3i. Relay
The relay logic circuit commonly used to control output devices with respect to input signals. It
is a low powered electrical network with required input and output. The input to the relay logic
circuit may be control relay or a switch. Here, in our proposed scheme it is used to control DC
motor direction in clockwise
se and anticlockwise direction.
TRANSFORMER

Fig.3j. Transformer

Dept. of Computer Science and Engg, Nidasoshi Page 15


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

One of the main reasons that we use alternating AC voltages and currents in our homes and
workplace’s is that AC supplies can be easily generated at a convenient voltage, transformed
(hence the name transformer) into much higher voltages and then distributed. The reason for
transforming the voltage to a much higher level is that higher distribution voltages implies lower
currents for the same power and therefore lower I2R losses along the networked grid of cables.
These higher AC transmission voltages and currents can then be reduced to a much lower, safer
and usable voltage level where it can be used to supply electrical equipment in our homes and
workplaces, and all this is possible thanks to the basic Voltage Transformer.

3.1.4 SOFTWARE SPECIFICATION


• Windows OS
• Cloud account
• Arduino IDE
Arduino IDE
The Arduino integrated development environment (IDE) is a cross-platform application (for
Windows, macOS, Linux) that is written in the programming language Java. It originated from
the IDE for the languages Processing and Wiring. It includes a code editor with features such as
text cutting and pasting, searching and replacing text, automatic indenting, brace matching, and
syntax highlighting, and provides simple one-click mechanisms to compile and upload programs
to an Arduino board. It also contains a message area, a text console, a toolbar with buttons for
common functions and a hierarchy of operation menus. The source code for the IDE is released
under the GNU General Public License, version 2.
The Arduino IDE supports the languages C and C++ using special rules of code structuring. The
Arduino IDE supplies a software library from the Wiring project, which provides many common
input and output procedures. User-written code only requires two basic functions, for starting the
sketch and the main program loop, that are compiled and linked with a program stub main() into
an executable cyclic executive program with the GNU tool chain, also included with the IDE
distribution. The Arduino IDE employs the program argued to convert the executable code into a
text file in hexadecimal encoding that is loaded into the Arduino board by a loader program in
the board's firmware.

Dept. of Computer Science and Engg, Nidasoshi Page 16


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

3.2 DATAFLOW DIAGRAM


A data flow diagram (DFD) maps out the flow of information for any process or system. It uses
defined symbols like rectangles, circles and arrows, plus short text labels, to show data inputs,
outputs, storage points and the routes between each destination. Data flowcharts can range from
simple, even hand-drawn process overviews, to in-depth, multi-level DFDs that dig progressively
deeper into how the data is handled. They can be used to analyze an existing system or model a
new one. Like all the best diagrams and charts, a DFD can often visually “say” things that would
be hard to explain in words.

Temperature Smoke
Sensor Sensor

Soil Light
Moisture Sensor
Sensor

Sensors
Actuators Control
Sense
Green Uses
House Arduino

Send Uploaded
LCD Display
Information
SMS Thingspeak

Fig.3k. DFD

Dept. of Computer Science and Engg, Nidasoshi Page 17


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

3.3 Design and Test steps


• Design

Fig.3l. Design of Project

• Test Steps
1. Usability:
• We need to make sure the usability of each of the device used here.
• The equipment should be smart enough to push not only the notifications but also the
error messages, warnings etc.
• The system should have an option to log all the events to provide clarity to the end users.
If it is not capable of doing that, the system should push those as well to a database to
store it.
• The notifications should be shown and handling of the display should be done properly in
the devices [computers/mobile devices].
• Usability in terms of displaying data, processing data, pushing job tasks from the devices
should be tested thoroughly.

Dept. of Computer Science and Engg, Nidasoshi Page 18


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

2. Connectivity:
• The system has to be available all the time and should have seamless connectivity with
the stakeholders.
• As per connectivity, two things are very important to test;
• Connectivity, transfer of data, receiving job tasks from the devices should be seamless
when the connection is UP and running.
• The other condition is the connection down scenario. Doesn’t matter how robust is the
system and the network, there are chances that the system will go offline.
3. Performance:
• Need to make sure the system performs the same even though the added data is
propagated.
• We should also test the monitoring utility to display the system usage, power usage, etc.
4. Security:
• It is important to validate user via authentication, have data privacy controls as parts of
security testing

Dept. of Computer Science and Engg, Nidasoshi Page 19


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

3.4 Algorithms and Pseudo Code


Nomenclature: CO2=400 to 600ppm, Temperature=20 to26°C, Light=650 to 750cd, Soil
moisture= 100 to -3 volt.
3.4.1 Algorithms:
Main program
Begin
Step1: Initialize CO, soil moisture, temperature and light Sensor;
Step2: Compare threshold value received with initial values;
Step3: If the readings are low compared to threshold value call Algorithm 2;
Step4: Further refreshes time is reset;
Step5: The refresher time is 4 hours interval set for bell Pepper;
End
Automatic directional buzzer high/low
Begin
Step1: Initialize IoT port reader;
Step2: read soil moisture, temperature, light, and CO values;
Step3: The buzzer high or low is decided upon time of reading;
Step4: The buzzer is high/low;
Step5: The motor is stopped after doing the stop signal;
Step 6: return;
End

Dept. of Computer Science and Engg, Nidasoshi Page 20


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

3.4.2 Pseudo Code:


#include<LiquidCrystal.h>

LiquidCrystal lcd(2, 3, 4, 5, 6, 7 );

#include <SoftwareSerial.h>

SoftwareSerial espSerial = SoftwareSerial(A1,A0);

String apiKey = "20JJRNZBG8POVWM9"; // replace with your channel's thingspeak WRITE


API key

String ssid="project"; // Wifi network SSID

String password ="password123"; // Wifi network password

boolean DEBUG=true;

#include "DHT.h" //include DHT library

#define DHTPIN 10 //define as DHTPIN the Pin 3 used to connect the Sensor

#define DHTTYPE DHT11 //define the sensor used(DHT11)

DHT dht(DHTPIN, DHTTYPE); //create an instance of DHT

float t=0;

float h=0;

int bzr= 12;

int r1 = 8;

int r2 = 9;

int r3 = 11;

int count=0;

int smok = A2;

Dept. of Computer Science and Engg, Nidasoshi Page 21


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

int soil2 = A3;

int thur2 = A4;

int ldr2 = A5;

int smoke=0;

int soil=0;

int thur=0;

int ldr=0;

int web=0;

int a1 =0;

int b1 =0;

int c1 =0;

int d1 =0;

int e1 =0;

int f1 =0;

int sol=0;

int smk=0;

int light=0;

void setup()

dht.begin();

lcd.begin(16,2);

Dept. of Computer Science and Engg, Nidasoshi Page 22


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

lcd.setCursor(0,0);

lcd.print("GREEN HOUSE");

Serial.begin(9600);

pinMode(r1, OUTPUT);

pinMode(r2, OUTPUT);

pinMode(r3, OUTPUT);

pinMode(bzr, OUTPUT);

digitalWrite(r1,LOW);

digitalWrite(r2, LOW);

digitalWrite(r3, LOW);

lcd.print("CONNECTING WIFI");

espSerial.begin(9600);

espSerial.println("AT+CWMODE=1"); // set esp8266 as client

showResponse(3000);

espSerial.println("AT+CWJAP=\""+ssid+"\",\""+password+"\""); // set your home router SSID


and password

showResponse(8000);

lcd.clear();

lcd.setCursor(0, 0);

lcd.print("WI-FI CONNECTED");

Dept. of Computer Science and Engg, Nidasoshi Page 23


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

delay(3000);

if (DEBUG) Serial.println("Setup completed");

lcd.clear();

void showResponse(int waitTime)

long t=millis();

char c;

while (t+waitTime>millis())

if (espSerial.available())

c=espSerial.read();

if (DEBUG) Serial.print(c);

boolean thingSpeakWrite(int value1,int value2, int value3, float value4)

Serial.println("Inside Thingspeak write");

String cmd = "AT+CIPSTART=\"TCP\",\""; // TCP connection

Dept. of Computer Science and Engg, Nidasoshi Page 24


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

cmd += "184.106.153.149"; // api.thingspeak.com

cmd += "\",80";

espSerial.println(cmd);

if (DEBUG) Serial.println(cmd);

if(espSerial.find("Error"))

if (DEBUG) Serial.println("AT+CIPSTART error");

return false;

String getStr = "GET /update?api_key="; // prepare GET string

getStr += apiKey;

getStr +="&field1=";

getStr += String(value1);

getStr +="&field2=";

getStr += String(value2);

getStr +="&field3=";

getStr += String(value3);

getStr +="&field4=";

getStr += String(value4);

getStr += "\r\n\r\n";

// send data length

Dept. of Computer Science and Engg, Nidasoshi Page 25


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

cmd = "AT+CIPSEND=";

cmd += String(getStr.length());

espSerial.println(cmd);

if (DEBUG) Serial.println(cmd);

delay(100);

if(espSerial.find(">")){

espSerial.print(getStr);

if (DEBUG) Serial.print(getStr);

else

espSerial.println("AT+CIPCLOSE");

// alert user

if (DEBUG) Serial.println("AT+CIPCLOSE");

return false;

return true;

void data()

if (DEBUG) Serial.println("S1="+String(t)+"");

Dept. of Computer Science and Engg, Nidasoshi Page 26


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

if (DEBUG) Serial.println("S2="+String(sol)+"");

if (DEBUG) Serial.println("S3="+String(smk)+"");

if (DEBUG) Serial.println("S4="+String(light)+"");

thingSpeakWrite(t,sol,smk,light); // Write values to thingspeak

// thingspeak needs 15 sec delay between updates,

delay(10000);

void loop()

h = dht.readHumidity(); // reading Humidity

t = dht.readTemperature(); // read Temperature as Celsius (the default)

smoke = analogRead(smok);

soil = analogRead(soil2);

thur = analogRead(thur2);

ldr = analogRead(ldr2);

// Serial.println(smoke);

lcd.setCursor(0,0); lcd.print("T:"); lcd.setCursor(2,0); lcd.print(t);

lcd.setCursor(5,0); lcd.print("H:"); lcd.setCursor(7,0); lcd.print(h);

//lcd.setCursor(10,0); lcd.print("F:");lcd.setCursor(12,0); lcd.print(thur);

lcd.setCursor(0,1); lcd.print("So:"); lcd.setCursor(3,1); lcd.print(soil);

// lcd.setCursor(8,1); lcd.print("RA:"); lcd.setCursor(12,1); lcd.print(rain);

Dept. of Computer Science and Engg, Nidasoshi Page 27


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

if(t>=40)

digitalWrite(r1, HIGH);

if(a1==0)

Serial.print("AT\r");

delay(200);

Serial.print("AT+CMGF=1\r");

delay(200);

Serial.print("AT+CNMI=2,2,0,0,0\r");

delay(200);

Serial.print("AT+CMGS=");

delay(200);

Serial.print('"');

delay(200);

Serial.print("9860080676");

delay(200);

Serial.print('"');

delay(200);

Serial.write(0x0D);

delay(200);

Dept. of Computer Science and Engg, Nidasoshi Page 28


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

Serial.println("TEMPRATURE IS HIGH");

delay(200);

Serial.write(0x1A);

delay(200);

a1=1;

else

a1=0;

digitalWrite(r1, LOW);

if(soil>=500)

sol=1000;

digitalWrite(r2, HIGH);

lcd.setCursor(0,1); lcd.print("SOIL DRY");

delay(1000);

lcd.clear();

if( b1 == 0 )

Dept. of Computer Science and Engg, Nidasoshi Page 29


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

Serial.print("AT\r");

delay(200);

Serial.print("AT+CMGF=1\r");

delay(200);

Serial.print("AT+CNMI=2,2,0,0,0\r");

delay(200);

Serial.print("AT+CMGS=");

delay(200);

Serial.print('"');

delay(200);

Serial.print("9860080676");

delay(200);

Serial.print('"');

delay(200);

Serial.write(0x0D);

delay(200);

Serial.println("SOIL DRY");

delay(200);

Serial.write(0x1A);

delay(200);

b1=1;

Dept. of Computer Science and Engg, Nidasoshi Page 30


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

else

b1=0;

sol=0;

digitalWrite(r2, LOW);

lcd.setCursor(0,1); lcd.print("SOIL WET");

delay(1000);

lcd.clear();

if(smoke>=150)

smk=1000;

digitalWrite(bzr, HIGH);

if( c1 == 0 )

Serial.print("AT\r");

delay(200);

Serial.print("AT+CMGF=1\r");

delay(200);

Dept. of Computer Science and Engg, Nidasoshi Page 31


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

Serial.print("AT+CNMI=2,2,0,0,0\r");

delay(200);

Serial.print("AT+CMGS=");

delay(200);

Serial.print('"');

delay(200);

Serial.print("9860080676");

delay(200);

Serial.print('"');

delay(200);

Serial.write(0x0D);

delay(200);

Serial.println("SMOKE DETECTED");

delay(200);

Serial.write(0x1A);

delay(200);

c1=1;

else

Dept. of Computer Science and Engg, Nidasoshi Page 32


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

c1=0;

smk=0;

digitalWrite(bzr, LOW);

if(ldr>=700 && ldr<=1023)

light=0;

f1=0;

digitalWrite(r3, HIGH);

lcd.setCursor(0,1); lcd.print("LIGHT INT--LOW--");

delay(1000);

lcd.clear();

if( d1 == 0 )

Serial.print("AT\r");

delay(200);

Serial.print("AT+CMGF=1\r");

delay(200);

Serial.print("AT+CNMI=2,2,0,0,0\r");

delay(200);

Serial.print("AT+CMGS=");

Dept. of Computer Science and Engg, Nidasoshi Page 33


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

delay(200);

Serial.print('"');

delay(200);

Serial.print("9860080676");

delay(200);

Serial.print('"');

delay(200);

Serial.write(0x0D);

delay(200);

Serial.println("LIGHT INTENSITY LOW");

delay(200);

Serial.write(0x1A);

delay(200);

d1=1;

else

if(ldr>=400 && ldr<=700)

d1=0;

lcd.setCursor(0,1); lcd.print("LIGHT INT MEDIUM");

Dept. of Computer Science and Engg, Nidasoshi Page 34


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

delay(1000);

lcd.clear();

if( e1 == 0)

Serial.print("AT\r");

delay(200);

Serial.print("AT+CMGF=1\r");

delay(200);

Serial.print("AT+CNMI=2,2,0,0,0\r");

delay(200);

Serial.print("AT+CMGS=");

delay(200);

Serial.print('"');

delay(200);

Serial.print("9860080676");

delay(200);

Serial.print('"');

delay(200);

Serial.write(0x0D);

delay(200);

Serial.println("LIGHT INTENSITY MEDIUM");

Dept. of Computer Science and Engg, Nidasoshi Page 35


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

delay(200);

Serial.write(0x1A);

delay(200);

e1=1;

else

e1=0;

light=1000;

digitalWrite(r3, LOW);

lcd.setCursor(0,1); lcd.print("LIGHT INT--HIGH--");

delay(1000);

lcd.clear();

if( f1 == 0 )

Serial.print("AT\r");

delay(200);

Serial.print("AT+CMGF=1\r");

delay(200);

Serial.print("AT+CNMI=2,2,0,0,0\r");

Dept. of Computer Science and Engg, Nidasoshi Page 36


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

delay(200);

Serial.print("AT+CMGS=");

delay(200);

Serial.print('"');

delay(200);

Serial.print("9860080676");

delay(200);

Serial.print('"');

delay(200);

Serial.write(0x0D);

delay(200);

Serial.println("LIGHT INTENSITY HIGH");

delay(200);

Serial.write(0x1A);

delay(200);

f1=1;

if(web>20)

lcd.clear();

Dept. of Computer Science and Engg, Nidasoshi Page 37


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

lcd.setCursor(0,0);

lcd.print("Uploading.....");

data();

web=0;

lcd.clear();

web++;

Dept. of Computer Science and Engg, Nidasoshi Page 38


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

3.5 Testing Process


Software testing is the process of evaluation a software item to detect differences between given
input and expected output. Also to assess the feature of A software item. Testing assesses the
quality of the product. Software testing is a process that should be done during the development
process.
Goals of Testing
• To demonstrate to developer and customer that software meats all its functional and
nonfunctional requirements.
• To expose as a many failures and possible and rectifying before delivering the code to the
end users.
• Evaluate properties of software reliability, performance, memory usage, security
usability.
• Ultimate goal of software testing is quality assurance.
Different Types of Testing
• Unit testing.
• Integration testing.
• System testing.
• Acceptance testing.

Fig.3m.Types of testing

Dept. of Computer Science and Engg, Nidasoshi Page 39


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

UNIT TEST:
Unit testing is a software development process in which the smallest testable parts of an
application, called units, are individually and independently scrutinized for proper operation.
Unit testing can be done manually but is often automatically
Working of Sensors
Sensors should sens the greenhouse environment and send the data to Arduino
Test Steps
1. Connect all the sensors to Arduino board.
2. Embedded programmed with same pin we have used to connect to the Arduino board.
3. Provide power supply to the Arduino board.
4. Use serial monitor to see the output.
Expected Result: Everyone of the sensor should sens the information and get the greenhouse
condition and give it to the Arduino board.
Actual Result: Everyone of the sensor should sens the information and get the greenhouse
condition and give it to the Arduino board.

INTEGRATION TESTING:
Integration testing is a level of software testing where individual units are combined and tested
as a group. The purpose of this level of testing is to expose faults in the interaction between
integrated units.
Integration of Sensors
Sensors should sens the greenhouse environment and send the data to thinkspeak.
Test Steps
1. Connect all the sensors to Arduino board.
2. Remove the connection for Tx and Rx to the Arduino board.
3. Embedded programmed with same pin we have used to connect to the Arduino board.
4. Connect the Tx and Rx again to the Arduino board.
5. Provide power supply to Arduino board.
6. Login to the thinkspeak to check the working.
Expected Result: Data sensed by the sensor is getting update on the thinkspeak server.
Actual Result: Data sensed by the sensor should be update on the thinkspeak server.

Dept. of Computer Science and Engg, Nidasoshi Page 40


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

Fig.3n. Output of Integration of sensors

SYSTEM TESTING
System testing is a level of software testing where a complete and integrated software is tested.
The purpose of this test is to evaluate the system’s compliance with the specified requirements.

ACCEPTANCE TESTING
Acceptance testing is a level of software testing where a system is tested for acceptability. The
purpose of this test is to evaluate the system’s compliance with the business requirements and
assess whether it is acceptable for delivery.

Dept. of Computer Science and Engg, Nidasoshi Page 41


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

CHAPTER 4
RESULTS

Dept. of Computer Science and Engg, Nidasoshi Page 42


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

4.1 Snapshots:

Fig. 4a. PCB board

Fig.4b. Model design


In the proposed conspire, there is an analyzation for the execution parameters of greenhouse, for
example, CO, soil moisture, temperature, and light for bell pepper plant with practical outcomes
by utilizing IoT kit.
Dept. of Computer Science and Engg, Nidasoshi Page 43
Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

Fig. 4c. Output Results


The plant photosynthesis process required a most extreme measure of CO concentration level
and water around evening time contrasting with day time; with the assistance of these two
energies the photosynthesis procedure keeps the plant cool and aides in quick development of the
plants.
After conducting a experiment for the CO concentration level in green house, maintained a CO
level maximum at night time because from day time the greenhouse start to consume CO level
till night time. So, the CO level at day time is less.
Water content in the soil is important factor because for the plant, excess of water can produce a
fungal infection at the same time plants with less water becomes dry or sometimes they may get
damage.
So, the required level of water to the plant is very much essential. At, night time plants require a
more water with CO2 for photosynthesis process. In IoT kit the soil moisture sensor gives a
negative value it means the full of water is covered by the plants at that time the greenhouse
windows/doors will be closed automatically with the help of DC motor. The positive value
indicates the dryness of the soil. So need to re-wet the soil.
The temperature is also a one of the important parameter in greenhouse; the temperature should
be maintained maximum. Because, the temperature helps in flowering, fruits, photosynthesis,
seed germination, etc.

Dept. of Computer Science and Engg, Nidasoshi Page 44


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

Therefore in greenhouse maintained a maximum amount of temperature range, compared to


outside greenhouse environment temperature range.
The different colors of sun light are useful in photosynthesis process, which is present in the
green part of the plants used for plant growth, flowering, and shape of the plant.
Thus, maintained a sustainable amount of light penetration inside the greenhouse, compared to
normal light penetration outside of the greenhouse.

Fig.4d. GSM Messages

Dept. of Computer Science and Engg, Nidasoshi Page 45


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

CONCLUSION

Dept. of Computer Science and Engg, Nidasoshi Page 46


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

IoT is widely used in connecting devices and used to gather information. The system is designed
to remotely monitor the greenhouse parameters such as CO2, soil moisture, temperature, and
light, this information can be collected by the farmers with the help of cloud account and internet
connection. There is also controlling action taken automatically that is greenhouse windows/
doors roll on/off based on the soil moisture levels. Thus, the system will help the farmers to
avoid physical visit to the field, and increase the yield with the maintenance of précised
parameters such as CO2, soil moisture, temperature, and light in the greenhouse with the help of
IoT. The project is carried out with the help of IoT kit and internet connection.
The results are analyzed for the greenhouse parameters such as CO2, soil moisture, temperature,
and light for bell pepper plant with the help of graphical representation based on the practical
values taken by the IoT kit. The comparative result shows the effectiveness of the proposed
work.

Dept. of Computer Science and Engg, Nidasoshi Page 47


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

REFERENCES

Dept. of Computer Science and Engg, Nidasoshi Page 48


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

[1] Karuna Chandraul, Archana Singh,”An agriculture application research on cloud


computing”, International Journal of Current Engineering and Technology, volume 3, No.5, pp.
2084-2087, October 2010.
[2] Ronald Haley, Riley Wortman, Yiannis Ampatzidis, Matthew Whiting, “An Integrated cloud-
based platform for labor monitoring and data analysis in precision agriculture”, IEEE 14th
International Conference on Information Reuse and Integration, pp. 349-356, August 2013.
[3] Mistsuyoshi Hori, Eiji Kawashima, Tomihiro Yamazaki,” Application of cloud Computing to
agriculture and prospects in other fields”, FUJITSU Sci. Tech. J., volume 46, No. 4, October
2010.
[4] B. K. Jha, S. K. Jha, R. Mukaharjee, D. Basak, “Development of guided SMS solution in
local language for Demand-driven Access of agriculture information”, 7th International
Conference on Communication Systems and Networks (COMSNETS), pp. 1-5, January 2015.
[5] D. D. Chaudhary, S. P. Nayse, L. M. Waghmare, “Application of wireless sensor network for
greenhouse parameter control in precision agriculture”, International Journal of Wireless and
Mobile Networks (IJWMN), volume 3, No.1, 2011.
[6] O. T. Denmead and R. H. Shaw, “Availability of soil water to plants as affected by soil
moisture content and meteorological conditions”, Agronomy journal, 1962.
[7] Ahmad Nizar Harun, Mohamed Rawidean Mohd Kassim, Ibrahim Mat, Siti Sarah Ramli,
“Precision Irrigation using Wireless Sensor Network”, International Conference on Smart
Sensors and Application (ICSSA), 2015.
[8] Narayut Putjaika, Sasimanee Phusae, Anupong Chen-lm, Dr. Phond Phunchongharm, and Dr.
Khajonpong Akkarajitsakul, “A Control System in an Intelligent Farming by using Arduino
Technology”, Fifth ICT international Student Project Conference (ICT-ISPC), 2016.
[9] ZOU Cheng-jun,”Research and Implementation of Agricultural Environment Monitoring
based on Internet of Things”, Fifth International Conference on Intelligent Systems Design and
Engineering Applications, 2014.
[10] Meonghun Lee, Jeonghwan Hwang, and Hyun Yoe, ”Agriculture Production System based
on IoT” , IEEE 16th International Conference on Computational Science and Engineering, 2013.
[11] FuBing, “Research on the Agriculture Intelligent system Based on IoT”, International
conference on Image Analysis and Signal Processing (IASP), page 1-4, 2012.

Dept. of Computer Science and Engg, Nidasoshi Page 49


Remote Sensing and controlling of greenhouse agriculture parameters based on IOT 2018-19

BIBLIOGRAPHY
Name of project guide:
1. Name: Prof. A. A. Daptardar
Email id: arunadaptardar.cse@hsit.ac.in
Contact No:+919620851002

Name of Team Members:


1. Name: Miss. Anuja R. Patil
Email id: anujap200@gmail.com
Contact No: +919538393190

2. Name: Mr. Patil Yuvaraj R.


Email id: yuvarajpatil79@gmail.com
Contact No: 9860080676

3. Name: Mr. Somnath R. Naik Koli


Email id: somunaik1750@gmail.com
Contact No: 9880621750

Dept. of Computer Science and Engg, Nidasoshi Page 50

You might also like