0% found this document useful (0 votes)
184 views

Smart Irrigation System Using Iot: Submitted in Partial Fulfillment of The Requirements For The Award of The Degree of

This document is a project report submitted for the degree of Bachelor of Technology in Information Technology. It discusses the development of a smart irrigation system using IoT. The system aims to automate irrigation by monitoring soil moisture levels and controlling water pumps remotely. It was created by 4 students under the guidance of an assistant professor to fulfill their degree requirements.

Uploaded by

saikiran velidi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
184 views

Smart Irrigation System Using Iot: Submitted in Partial Fulfillment of The Requirements For The Award of The Degree of

This document is a project report submitted for the degree of Bachelor of Technology in Information Technology. It discusses the development of a smart irrigation system using IoT. The system aims to automate irrigation by monitoring soil moisture levels and controlling water pumps remotely. It was created by 4 students under the guidance of an assistant professor to fulfill their degree requirements.

Uploaded by

saikiran velidi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 44

A Project Report on

SMART IRRIGATION SYSTEM USING IOT

Submitted in partial fulfillment of the requirements for the award of the degree of

BACHELOR OF TECHNOLOGY
IN
INFORMATION TECHNOLOGY

Submitted by

CH.MAHEESHA(16A51A1214) J.RAMYA (16A51A1220)


G.SAICHAITANYA(16A51A1219) M.SURESH (16A51A1222)

Under the esteemed Guidance of


Sri.V.A.G.Raju, M.Tech,
Assitant Professor

Department of Information Technology


ADITYA INSTITUTE OF TECHNOLOGYAND MANAGEMENT,
TEKKALI
(An Autonomous Institution)
(Affiliated to JNTUK, Kakinada, Approved by AICTE, Accredited by NBA &
NAAC, New Delhi)

2016-2020
Approved by AICTE, New Delhi
Affiliated to JNTU Kakinada
Accredited by NBA (UG: CSE,ECE,EEE,ME ,CE & IT)
Accredited by NAAC(UGC) with A+ Grade
Recognised by UGC Under Section 2(f) & 12(B)
TEQIP Participated College
ADIT Recognised by Scientific & Industrial Research Organisation(SIRO)

CERTIFICATE

This is to certify that the work embodied in this project entitled “SMART

IRRIGATION SYSTEM USING IOT” being submitted by J.Ramya (16A51A1220),

CH.Maneesha (16A5A1214), D.Suresh (16A51A1216), G.SaiChaitanya (16A51A1219) in

partial fulfillment for the award of the degree of Bachelor of Technology in Information

Technology carried out by them under my supervision.

The results embodied in this project report have not been submitted to any other

University or Institute for the award of any Degree or Diploma.

GUIDE HEAD OF THE DEPARTMENT


Sri. V.A.G.RAJU Dr. B.V.Ramanna
Asst. Professor Professor & HOD,
Department of IT
DECLARATION

We do hereby declare that the work embodied in this project entitled “SMART

IRRIGATION SYSTEM USING IOT” is the outcome of research work carried out by

us under the direct supervision of Sri.V.A.G.Raju,Professor, Department of Information

Technology, Aditya Institute of Technology and Management, Tekkali, affiliated to

JNTUK, Kakinada, for the award of the degree of Bachelor of Technology in Information

Technology during the period 2016-20. The work is original and has not been submitted

elsewhere for award of any other degree or diploma.

Project Associates

J.Ramya(16A51A1220)
CH.Maneesha (16A51A1214)
D.Suresh (16A51A1216)
G. Sai chaitanya (16A51A1219)

ACKNOWLEDGEMENTS
This project was impossible without the people who supported us and believed us.

We would like to express our sincere heartfelt gratitude to our honorable, esteemed
supervisor Dr. B. V. Ramana, Professor and Head, Department of Information Technology
(IT), Aditya Institute of Technology and Management (AITAM), Tekkali, affiliated to
JNTUK, Kakinada, for his kind and valuable guidance for the completion of the project
work. His consistent support and intellectual guidance inspired us to innovate new ideas. I
am glad to work under his supervision.

We are grateful to Sri. Nibedan Panda, Professor, Department of Information


Technology, Aditya Institute of Technology and Management, Tekkali, affiliated to
JNTUK, Kakinada, for his excellent support during our work. We are also thankful to Mr.
#### and Mr. ####, Asst. Professor, Department of IT, AITAM, Tekkali, for providing us
support and advice in preparing our project work.

We thank all our friends and classmates for their love and support. Last, but not least we
would like to thank our parents for supporting us to complete our bachelor’s degree in all
ways.

Project Associates
J.Ramya (16A51A1220)
CH.Maneesha (16A51A1214)
D.Suresh (16A51A1216)
G.Sai Chaitanya(16A51A1219)
Vision of the Department

Create high-quality engineering professionals through research, innovation and teamwork


for Information Technology services with outstanding faculty, facilities and education.

Mission of the Department

M1: Information Technology program dedicates itself to provide students with a set of
skills, knowledge and attitude that will permit its graduates to succeed and thrive as
successful information technologists.
M2: Enhance overall personality development which includes innovative thinking, team
work, entrepreneur skills, communication skills, employability skills and ethical conduct.
M3: Ensuring effective teaching–learning process to provide in-depth knowledge of
interdisciplinary areas.
M4: Providing industry interactions through consultancy and sponsored research for the
societal needs.

Program Educational Objectives (PEOs)

PEO1: Acquire the ability of technical competence in analyzing, designing and


developing to create novel products in their field.

PEO2: Attain skills in pursuing higher education, doing research or resuming


entrepreneurial strivings.

PEO3: Possess leadership qualities, nourish ethical responsibilities and cherish with
communication skills.

PEO4: Enrich lifelong learning with technical savvy and promote the progressive
societal needs
PROGRAM OUTCOMES (POs)

Engineering Graduates will be able to


PO1. ENGINEERING KNOWLEDGE: Apply the knowledge of mathematics, science,
engineering fundamentals, and an engineering specialization to the solution of complex
engineering problems.
PO2. PROBLEM ANALYSIS: Identify, formulate, review research literature, and analyze
complex engineering problems reaching substantiated conclusions using first principles of
mathematics, natural sciences, and engineering sciences.
PO3. DESIGN/DEVELOPMENT OF SOLUTIONS: Design solutions for complex
engineering problems and design system components or processes that meet the specified needs
with appropriate consideration for the public health and safety, and the cultural, societal, and
environmental considerations.
PO4. CONDUCT INVESTIGATIONS OF COMPLEX PROBLEMS: Use research-based
knowledge and research methods including design of experiments, analysis and interpretation of
data, and synthesis of the information to provide valid conclusions.
PO5. MODERN TOOL USAGE: Create, select, and apply appropriate techniques, resources,
and modern engineering and IT tools including prediction and modeling to complex engineering
activities with an understanding of the limitations.
PO6. THE ENGINEER AND SOCIETY: Apply reasoning informed by the contextual
knowledge to assess societal, health, safety, legal and cultural issues and the consequent
responsibilities relevant to the professional engineering practice.
PO7. ENVIRONMENT AND SUSTAINABILITY: Understand the impact of the
professional engineering solutions in societal and environmental contexts, and demonstrate the
knowledge of, and need for sustainable development.
PO8. ETHICS: Apply ethical principles and commit to professional ethics and responsibilities
and norms of the engineering practice.
PO9. INDIVIDUAL AND TEAM WORK: Function effectively as an individual, and as a
member or leader in diverse teams, and in multidisciplinary settings.
PO10. COMMUNICATION: Communicate effectively on complex engineering activities
with the engineering community and with society at large, such as, being able to comprehend
and write effective reports and design documentation, make effective presentations, and give and
receive clear instructions.
PO11. PROJECT MANAGEMENT AND FINANCE: Demonstrate knowledge and
understanding of the engineering and management principles and apply these to one’s own work,
as a member and leader in a team, to manage projects and in multidisciplinary environments.
PO12. LIFE-LONG LEARNING: Recognize the need for, and have the preparation and
ability to engage in independent and life-long learning in the broadest context of technological
change.
PROGRAM SPECIFIC OUTCOMES (PSOs)

By the completion of Information Technology program the student will be able to


PSO1: Execute the mathematical foundations, algorithmic principles of engineering to
identify, formulate, design and investigate the intricate problems of Information
Technology.
PSO2: Comprehend the principles and applications of the software and hardware facets
of computer systems.
PSO3: Apply knowledge in various domains to identify research gaps and provide
solutions.

Articulation Matrix of Mapping the Project with POs and PSOs

P P P P P P P P P P
P P P P PS
CO O O O O O O1 O1 O1 SO SO
O3 O6 O7 O9 O2
1 2 4 5 8 0 1 2 1 2

PR
OJ.T 2 2 2 3 3 1 1 1 3 3 3 1 1 1 1
OT

Note: Enter Correlation levels 1, 2 or 3 as defined below:

1: Slight (Low)
2: Moderate (Medium)
3: Substantial (High)
ABSTRACT
Every living organism needs food to live, We cannot imagine life without
Irrigation. If everything gets automated even irrigation systems also need to
be. We have developed a Smart Irrigation system using the concept of IoT.
As we know farming has different stages, To help these farmers in
understanding the climatic conditions, the moisture content in the soil and to
make their decisions easy we have developed Smart Irrigation System using
IoT. We used different sensors that sense temperature, moisture and humidity
of the agricultural area. Information on all sensor nodes is collected by the
Arduino module and transmits the data to microcontroller connected with the
Wi-Fi module that uploads the report on the cloud where a farmer can
monitor those parameters in their Smart phones or PC on daily basis and take
necessary steps to make their agriculture farm grow smart…

Keywords Sensors, IOT, Things Speak Server.


TABLE OF CONTENTS
Certificate I
Declaration II
Acknowledgement III
Vision, Mission and PEOs IV
POs V
PSOs and Mapping of POs & PSOs VI
Abstract VII
1. Introduction 1
1.1 Motivation 10
1.2 Area of utility 11
2. Literature Review
3. Basic Of IOT
3.1 Framework of GWO
3.2 Overview of Chaos
3.3 ………..
4 Methodology
4.1 Hardware Components
4.2 Software
5 Improved Chaos based GWO for Feature Selection and Data Classification
5.1 Problem statement
5.2 Proposed method
6 Result Discussion/ Outcome Analysis
6.1 Complexity Analysis
6.2 Convergence Analysis
6.3 Statistical Significance
6.4 Data Graph
7 Social Implications
8 Conclusion and Future Scope
List of Publications
References
Chapter 1

1 INTRODUCTION

India is the country of village and agriculture plays an important role for
development of country. In our country, agriculture depends on the monsoons
which has insufficient source of water. So the irrigation is used in agriculture
field. In Irrigation system, depending upon the soil type, water is provided to
plant. In agriculture, two things are very important, first to get information of
about the fertility of soil and second to measure moisture content in soil.

Nowadays, for irrigation, different techniques are available which are used
to reduce the dependency of rain. And mostly this technique is driven by
electrical power and on/off scheduling. In this technique, water level indicator
placed in water reservoir and soil moisture sensors are placed root zone of
plant and near the module and gateway unit handles the sensor information
and transmit data to the controller which in turns the control the flow of water
through the valves.
1.1 Motivation

For continuously increasing demand and decrease in supply of food


necessities, it’s important to rapid improvement in production of food
technology. Agriculture is only the source to provide this. This is the
important factor in human societies to growing and dynamic demand in food
production. Agriculture plays the important role in the economy and
development, like India. Due to lack of water and scarcity of land water result
the decreasing volume of water on earth, the farmer use irrigation. Irrigation
may be defined as the science of artificial application of water to the land or
soil that means depending on the soil type, plant are to be provided with
water.

Area of utility

 The primary focus of this project is to help the farmers and reduce
their work.
 This module can be implemented in perennial plant irrigation land
and gardening land.
CHAPTER 2

2. LITERATURE SURVEY

In irrigation field, soil moisture sensor, temperature sensors are placed in root of
plant and microcontroller handles the sensor information and transmits data. One
algorithm was developed to measure threshold values of temperature sensor and
soil moisture sensor that was programmed into a microcontroller to control water
quantity.

A model of automatic irrigation system which is based on microcontroller and


solar power was used only for source of power supply. Various sensor are placed
in paddy field. Sensors sense water level continuously and give the information
to farmer through cellular phone. Farmer controls the motor using cellular phone
without going in paddy field. If the water level reaches at danger level,
automatically motor will be off without conformation of farmer.

The existing method and one of the oldest ways in agriculture is the manual
method of checking the parameters. In this method the farmers they themselves
verify all the parameters and calculate the readings. It focuses on developing
devices and tools to manage, display and alert the users using the advantages of a
wireless sensor network system. It aims at making agriculture smart using
automation and IoT technologies. The highlighting features are smart GPS based
remote controlled robot to perform tasks like weeding, spraying, moisture
sensing, human detection and keeping vigilance.

The cloud computing devices that can create a whole computing system from
sensors to tools that observe data from agricultural field images and from human
actors on the ground and accurately feed the data into the repositories along with
the location as GPS coordinates. This idea proposes a novel methodology for
smart farming by linking a smart sensing system and smart irrigator system
through wireless communication technology.
It proposes a low cost and efficient wireless sensor network technique to acquire
the soil moisture and temperature from various location of farm and as per the
need of crop controller to take the decision whether the irrigation is enabled or
not.

It proposes an idea about how automated irrigation system was developed to


optimize water use for agricultural crops. In addition, a gateway unit handles
sensor information. The atmospheric conditions are monitored and controlled
online by using Ethernet IEEE 802.3.

The partial root zone drying process can be implemented to a maximum extent.
It is designed for IoT based monitoring system to analyze crop environment and
the method to improve the efficiency of decision making by analyzing harvest
statistics.
CHAPTER-3

BASICS OF IOT

Definition

The Internet of Things (IoT) is the interconnection of uniquely identifiable


embedded computing devices within the existing Internet infrastructure.
The “Internet of Things” connects devices and vehicles using electronic sensors
and the Internet.
Introduction

The Internet of Things (IoT) is the network of physical objects devices,


vehicles, buildings and other items embedded with electronics, software, sensors,
and network connectivity that enables these objects to collect and exchange data.
The IoT allows objects to be sensed and controlled remotely across existing
network infrastructure, creating opportunities for more direct integration of the
physical world into computer based systems, and resulting in improved
efficiency, accuracy and economic benefit, when IoT is augmented with sensors
and actuators, the technology becomes an instance of the more general class of
cyber physical systems, which also encompasses technologies such as smart
grids, smart homes, intelligent transportation and smart cities. Each thing is
uniquely identifiable through its embedded computing system but is able to
interoperate within the existing Internet infrastructure.

So, Internet of Things or IoT is an architecture that comprises specialized


hardware boards, Software systems, web APIs, protocols which together creates
a seamless environment which allows smart embedded devices to be connected
to internet such that sensory data can be accessed and control system can be
triggered over internet.
Also devices could be connected to internet using various means like Wi-Fi,
Ethernet and so on. Furthermore devices may not needed to be connected to
internet independently. Rather a cluster of devices could be created (for example
a sensor network) and the base station
or the cluster head could be connected to internet. This leads to more abstract
architecture for communication protocols which ranges from high level to low
level.
Most interestingly, these devices must be uniquely discovered. For unique
discovery of the devices in a Network, they need to have unique IP address. IoT
devices essentially have IPv6 addressing scheme. All these devices have either
fixed or Subnet masked IP addresses of type v6. Unique IP addresses makes IoT
devices discoverable in the internet as independent node. This is the most

important concept to have in mind to understand IoT.

Figure 2.1 Internet of Things (IoT) Basic Architecture

What Devices Makes it to IOT


Since IoT are essentially embedded systems and smart objects connected to
internet with unique IP address which can be discovered and communicated over
internet. We have also seen that the IoT devices may have external peripheral
like Actuators and Sensors
4.METHODOLOGY

4.1 INTRODUCTION OF HARDWARES

4.1.1 ESP8266

INTRODUCTION TO ESP8266
ESP8266 is a complete and self-contained Wi-Fi network solution that can carry
software applications, or through another application processor uninstall all Wi-
Fi networking capabilities. ESP8266 when the device is mounted and as the only
application of the application processor, the flash memory can be started directly
from an external Move. Built-in cache memory will help improve system
performance and reduce memory requirements. Another situation is when
wireless Internet access assume the task of Wi-Fi adapter, you can add it to any
microcontroller-based design, and the connection is simple, just by SPI / SDIO
interface or central processor AHB bridge interface. Processing and storage
capacity on ESP8266 powerful piece, it can be integrated via GPIO ports sensors
and other applications specific equipment to achieve the lowest early in the
development and operation of at least occupy system resources. The ESP8266
highly integrated chip, including antenna switch balun, power management
converter, so with minimal external circuitry, and includes front-end module,
including the entire solution designed to minimize the space occupied by PCB.
The system is equipped with ESP8266 manifested leading features are: energy
saving VoIP quickly switch between the sleep / wake patterns, with low-power
operation adaptive radio bias, front-end signal processing functions,
troubleshooting and radio systems coexist characteristics eliminate cellular /
Bluetooth / DDR / LVDS / LCD interference.
pin-layout

Figure 2.2 Explore ESP8266 Wi-Fi Module


Block Diagram of ESP8266

Figure 2.3 Block Diagram of ESP8266

Characteristics of ESP8266

 802.11 b / g / n
 Wi-Fi Direct (P2P), soft-AP
 Built-in TCP / IP protocol stack
 Built-in TR switch, balun, LNA, power amplifier and matching network
 Built-in PLL, voltage regulator and power management components
 802.11b mode + 19.5dBm output power
 Built-in temperature sensor
 Support antenna diversity
 off leakage current is less than 10uA
 Built-in low-power 32-bit CPU: can double as an application processor
 SDIO 2.0, SPI, UART
 STBC, 1x1 MIMO, 2x1 MIMO
 A-MPDU, A-MSDU aggregation and the 0.4 Within wake
 2ms, connect and transfer data packets
 standby power consumption of less than 1.0mW (DTIM3)

Schematic Diagram ESP8266-EX

Figure 2.4 Schematic Diagram ESP8266EX


ESP Modules

The ESP8266 is a low cost Wi-Fi chip with full TCP/IP stack and
microcontroller capability produced by Shanghai-based Chinese manufacturer,
Espress if. These were the first series of modules made by third-party
manufacturer, AI-Thinker with the ESP8266 and remain the most widely
available.

Board ID Pins Pitch LE Antenna Dimensions


Ds mm
ESP-01 8 .1“ Yes Etched-on 14.3 x 24.8
PCB
ESP-02 8 .1” No None 14.2 x 14.2
ESP-03 14 2mm No Ceramic 17.3 x 12.1
ESP-04 14 2mm No None 14.7 x 12.1
ESP-05 5 .1“ No None 14.2 x 14.2
ESP-06 12+GN misc No None ?
D
ESP-07 16 2mm Yes Ceramic 20.0 x 16.0
ESP-08 14 2mm No None 17.0 x 16.0
ESP-09 12+GN misc No None 10.0 x 10.0
D
ESP-10 5 2mm No None 14.2 x 10.0
m?
ESP-11 8 1.27m No Ceramic 17.3 x 12.1
m
ESP-12 16 2mm Yes Etched-on 24.0 x 16.0
PCB
ESP-12-E 22 2mm Yes Etched-on 24.0 x 16.0
PCB
ESP-13 18 1.5m - Etched-on -
m PCB
ESP-14 22 2mm 1 Etched-on 24.3 x 16.2
PCB
WROOM- 18 1.5m No Etched on 20.0 x 18.0
02 m PCB
WT8266- 18 1.5m 1 Etched on 15.0 x 18.6
S1 m PCB
Table 1.1 ESP Modules

ESP8266 Applications

 Smart Power Plug


 Home Automation
 Industrial wireless control
 Baby Monitor
 Network Camera
 Wireless location-aware devices and positioning system signals
Explore ESP8266 Wi-Fi Module

The ESP8266 ESP12E Wi-Fi Module is more user friendly with the Explore
ESP8266 Wi-Fi Module. It fits on a breadboard with all pins taken out. The
module goes into programming mode with a single reset switch.

Features:

 Fits on a breadboard.
 Single button 'Reset' switch for programming. Uses MOSFET's to put
the module in programming mode.
 All pins of ESP12E taken out.
 Separate serial pins breakout compatible with FTDI cable layout.
 On-board LM1117-3.3V regulator.
 Works with Arduino IDE for ESP8266.
 Programs can easily dumped using USB to TTL converter.
 ESP8266 ESP12E features.

Schematic Diagram of Explore ESP8266 Wi-Fi Module

Figure 2.5 Schematic Diagram of Explore ESP8266 Wi-


Fi AT Commands

ESP8266, in its default configuration, boots up into the serial modem mode. In
this mode you can communicate with it using a set of AT commands. AT
commands are based on the Hayes Command Set.

Index of all known AT commands is given in table 3.3

Basic Wi-Fi layer TCPIP Layer

AT AT+CWMODE AT+CIPSTATUS

AT+RST AT+CWJAP AT+CIPSTART

AT+GMR AT+CWLAP AT+CIPSEND

AT+GSLP AT+CWQAP AT+CIPCLOSE

ATE AT+CWSAP AT+CIFSR

AT+CWLIF AT+CIPMUX

AT+CWDHCP AT+CIPSERVER

AT+CIPSTAMAC AT+CIPMODE

AT+CIPAPMAC AT+CIPSTO

AT+CIPSTA AT+CIUPDATE

AT+CIPAP +IPD
4.1.2 Soil Moisture Sensor

This moisture sensor can read the amount of moisture present in the soil
surrounding it. It's a low tech sensor, but ideal for monitoring an urban garden, or
your pet plant's water level. This is a must have tool for a connected garden. This
sensor uses the two probes to pass current through the soil, and then it reads that
resistance to get the moisture level. More water makes the soil conduct
electricity more easily (less resistance), while dry soil conducts electricity

poorly (more resistance). It will be helpful to remind you to water your indoor
plants or to monitor the soil moisture in your garden.

Figure 2.6 Soil Moisture Sensor YL-69 YL-38


A Chinese built YL-69 sensors (Figure 2.6) come with a ‘middle-man’ circuit
which allows to get two outputs: one is an analog readout of the resistance
between the sensor’s probes and the second is a digital output (essentially, HIGH
or LOW, 5v or 0v) depending on whether the humidity is above or below a
threshold which can in turn be adjusted by a built-in POTS. The YL-69 sensor
has two pins which need to be wired to be the two pins on the YL-38 Bridge. On
the other end of the YL-38 have four pins which represent VCC, GND, D0 and
A0. VCC and GND are power pins which should set to 3.3/5V and ground
respectively. A0 is an analog output. D0 is a digital output.
4.1.3 HUMIDITY AND TEMPERATURE SENSOR

Figure 2.7 Humidity and Temperature Sensor DHT-11


The DHT22 is the more expensive version which obviously has better
specifications. Its temperature measuring range is from -40 to +125 degrees
Celsius with +-0.5 degrees accuracy, while the DHT11 temperature range is from
0 to 50 degrees Celsius with +-2 degrees accuracy. Also the DHT22 sensor has
better humidity measuring range, from 0 to 100% with 2-5% accuracy, while the
DHT11 humidity range is from 20 to 80% with 5% accuracy.

There are two specifications where the DHT11 is better than the DHT22. That’s
the sampling rate which for the DHT11 is 1Hz or one reading every second,
while the DHT22 sampling rate is 0,5Hz or one reading every two seconds and
also the DHT11 has smaller body size. The operating voltage of both sensors is
from 3 to 5 volts, while the max current used when measuring is 2.5mA
The DHT xx sensors have four pins, VCC, GND, data pin and a not connected
pin which has no usage. A pull-up resistor from 5K to 10K Ohms is required to
keep the data line high and in order to enable the communication between the
sensor and the ESP8266 Board. There are some versions of these sensors that
come with a breakout boards with built-in pull-up resistor and they have just 3
pins. The DHTXX sensors have their own single wire protocol used for
transferring the data. This protocol requires precise timing and the timing
diagrams for getting the data from the sensors can be found from the datasheets
of the sensors. However, we don’t have to worry much about these timing
diagrams because we will use the DHT library which takes care of everything.

4.2 SOFTWARE
CODE:
#include <DHT.h>
#include <ESP8266WiFi.h>
String apiKey = "ZOV8IO069JJFUXZZ";
const char *ssid = "Galaxy M30sE082";
const char *pass = "supernova9";
const char* server = "api.thingspeak.com";
#define DHTPIN 0
DHT dht(DHTPIN, DHT11);
WiFiClient client;
void setup()
{
pinMode(A0,INPUT);
Serial.begin(115200);
delay(10);
dht.begin();
Serial.println("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, pass);
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
}
void loop()
{
int m=analogRead(A0);
float h = dht.readHumidity();
float t = dht.readTemperature();
if (isnan(h) || isnan(t))

{
Serial.println("Waiting for the sensor reading");
return;
}
if (client.connect(server,80))
{
String postStr = apiKey;
postStr +="&field1=”;
postStr += String(t);
postStr +="&field2=";
postStr += String(h);
postStr +="&field3=";
postStr += String(m);
postStr += "\r\n\r\n";
client.print("POST /update HTTP/1.1\n");
client.print("Host: api.thingspeak.com\n");
client.print("Connection: close\n");
client.print("X-THINGSPEAKAPIKEY: "+apiKey+"\n");
client.print("Content-Type: application/x-www-form-urlencoded\n");
client.print("Content-Length: ");
client.print(postStr.length());
client.print("\n\n");
client.print(postStr);
Serial.print("Temperature: ");
Serial.print(t);
Serial.print(" degrees Celcius, Humidity: ");
Serial.print(h);
Serial.print(" Soil moisture: ");
Serial.print(m);
Serial.println("%. Send to Thingspeak.");
}
client.stop();
Serial.println("Waiting...");
delay(10000);
}
CHAPTER-5
5.1 Problem Statement

In the case of traditional irrigation system water saving is not considered. Since,
the water is irrigated directly in the land, plants under go high stress from
variation in soil moisture, therefore plant appearance is reduced.The absence of
automatic controlling of the system result in improper water control system. The
major reason for these limitations is the growth of population which is increasing
at a faster rate. At present there is emerging global water crisis where managing
scarcity of water has become a serious job. This growth can be seen in countries
which have shortage of water resources and are economically poor. So this is the
serious problem in agriculture area. So we want to design an Smart Irrigation
System which is based on ARDUINO software programming using ESP8266
WIFI module that operate automatically by sensing the moisture content of the
soil.
5.2 Proposed Statement
In this model, Smart Irrigation System is based on ESP8266 WIFI module. This
prototype monitors the amount of soil moisture content in soil. A predefined
value of soil moisture is set and can be varied with crops. In case the soil
moisture of the soil deviates from the specified range. This project is mainly
based on ARDUINO based software C programming language. In simulation,
pin2 and pin3 are used as a input pin for WIFI Module and switch respectively.
This system can be implemented on a large scale for farming purposes, which
can further prove to be more advantageous. Owing to prevailing conditions and
water shortages, the optimum irrigation schedules should be determined
especially in farms to conserve water
CHAPTER-6
Result Discussion/ Outcome Analysis
6.1 Complexity Analysis
Initial Setups in Arduino IDE Software

Step 1: Install the Arduino 1.6.7 IDE.

Step 2: Go to File>>Preferences>>Additional Boards Manager URLs:

http://arduino.esp8266.com/stable/package_esp8266com_index.json

>>Ok

Step 3: Go to Tools>>Boards>>Boards Manager>>

Download the “esp8266 by ESP8266 Community version 2.2.0” Step 4: Go to

Tools>>Boards>>Generic ESP8266 Module

Step 5: Go to Tools>>Upload Speed>>115200 Port>>choose preferred COM

ports.

How to Flash ESP8266-12

Step 1: First upload Bare Minimum code to Arduino Uno board.

Step 2: Connect the pins of Arduino Uno to ESP8266-12 pins as mention below

Arduino Pins  ESP8266 pins

 5v  5v
 3.  3.3v,
3v CH_PD
 G  Gnd (both)
nd
 Tx  Tx
 Rx  Rx

Note: Program code is directly uploaded into ESP8266 module. In this case,
Arduino board is used as a Flash Burner, i.e. code is directly uploaded to
ESP8266 module.

Step 3: Reset the ESP8266 by connecting RESET pin to GND3.3vGND


and disconnect. But Explore ESP8266 Wi-Fi module has inbuilt Reset button.
Press the reset button to reset the module.

Step 4: While uploading the program code connect the GPIO 0 to GND.

Step 5: Once upload is successful, disconnect the GPIO 0 from GND.


Experimental Setup

List of Components

Components Quantity
Explore ESP8266 Wi-Fi Module 1
Temperature sensor 1
Moisture sensor 1
Humidity sensor 1
Power Supply - 5v 1 (from Arduino)
3.3v 1 (from Arduino)
9v 1 (from 9v battery)
18v 2 (from 9+9v battery)
Gnd From Arduino

Circuit Connection Procedure


Step 1: Make the connection in bread-board as shown in figure
Note:
The Wi-Fi module ESP8266 is must be connected to internet services via an
internet router (having specific USERNAME and PASSWORD which is
specified in program code).
6.2 Conversation Analysis
How module works?

Wi-Fi module has to connect the internet by an internet service provider like
mobile hotspot, Wi-Fi router.
Firstly module checks status of water level indicator, if water is present then it
proceeds otherwise it terminates.
 If water is present, then it checks status of soil moisture sensor 1,
 If Region 1 is wet, motor will be off.
 If Region 1 is dry, valve 1 will open and motor will be on for 10
seconds.
 If Region 1 is humid, valve 1 will open and motor will be on for 5
seconds.
 During this, valve 2 will remain closed.

Once again module checks status of water level indicator, if water is present
then it proceeds otherwise it terminates.
 If water is present, then it checks status of soil moisture sensor 2,
 If Region 2 is wet, motor will be off.
 If Region 2 is dry, valve 2 will open and motor will be on for 10
seconds.
 If Region 2 is humid, valve 2 will open and motor will be on for 5
seconds.
 During this, valve 1 will remain closed.

System is usually OFF state.
 It is possible to get STATUS of the field.
 It is possible to make System ON whenever. Once System is ON, it will
check the status and supply the water one time only. Then again System is OFF.

 It is possible to make System OFF. But usually System is always will OFF
condition
6.3 Statistical Significance
Analyzing Data from Thing Speak Server
ThingSpeak Channel ID:
Humidity Field Chart:
Temperature Field Chart
Soil Moisture Field Chart
Chapter-7

Social Implications

Firstly, existing pastoral farmers move to improve their traditional


farming base. Secondly, new-generation farmers enter into major
irrigation investment. They increase stock numbers and productivity but
generally stay with the same production base. Thirdly, widespread
changes in land use and farm ownership take place which include
conversion to dairying and other intensive land use options.

Irrigation schemes generally stimulate population growth, help arrest


population decline and by so doing help maintain the rolls of rural
schools. It may also provide increased employment to the area provided
the new land uses contribute more on farm jobs than existing forms of
agricultural production. Combined, these factors help maintain social
networks and sustain community vitality.

Irrigation social costs and benefits

• More intensive use of existing grazing properties by some current


owners.
• Other current owners converting to dairying or dairy support
• Some older farmers, particularly of smaller dry land grazing properties,
selling to purchasers who will convert the properties to dairy production
• An inflow of newcomers to the district to purchase properties and
work on the farms
the arrest of rural decline in non-irrigated areas and strengthened
viability of educational, health and other community services in nearby
townships
• The age structure of both the residential population and the farmers
and farm workers occupational group is likely to become more youthful
• Value conflicts between dry land farmers and dairy farmers because of
their different lifestyle, work routines and rates of community
participation
• Participation in community activities and membership of voluntary
organizations and clubs may decline in the short term, as newcomers
adjust to their new circumstances, but strengthen in the longer term
• Value conflicts between some urban residents and farming
communities over the environmental impacts of intensive farming systems
• lag effects as the service sector in rural areas adjusts to the supply of
new irrigation farming systems.
Chapter-8

CONCLUSION AND FUTUTE SCOPE

Conclusion:

The agriculture field is being monitored in ThingSpeak server. The


ESP8266 is the device at field end which receives the messages from
broker network and manipulates it and will perform the function
mentioned in message. The ESP8266 is the best device for IoT projects.
Since it is small, compact, lightweight, easily programmable, and easily
installable and have enough GPIO pins to use them.

Future Scope:
We can interface LCD screen in order to display the current status of the
soil moisture content levels, percentage of water utilized to water the
plant, duration of time for which the water pump is ON, etc. We can also
show the graphical representation of the moisture content levels in the
soil. To improve the efficiency and effectiveness of the system, the
following recommendations can be put into consideration.

Option of controlling the water pump can be given to the farmer. The
farmer may choose to stop the growth of crops or the crops may get
damaged due to adverse weather conditions. In such cases farmer may
need to stop the system remotely. The idea of using IOT for irrigation can
be extended further to other activities in farming such as cattle
management, fire detection and climate control. This would minimize
human intervention in farming activities
List of Publications and References:
[1]“Monitoring and Control of Relative Humidity in Soil using Lab
VIEW”, International Journal of Engineering Trends and Technology
(IJETT) – Volume 9 Number 10 - Mar 2014

[2]http://ethesis.nitrkl.ac.in/3342/1/Hardware_Implementation_of_Soil_
Moisture_Monitoring_System.pdf

[3]http://www.ni.com/white-paper/7588/en/

[4] https://en.wikipedia.org/wiki/LabVIEW#Interfacing_to devices

[5]AUTOMATIC IRRIGATION SYSTEM BASED ON RF MODULE,


by Ms. Deweshvree Rane PG Scholar - VLSI, Sevagram, Wardha, India.
Published by IJAICT Volume 1, Issue 9, January 2015,
[6]SENSOR BASED AUTOMATED IRRIGATION SYSTEM WITH
IoT: A TECHNICAL REVIEW by Karan Kanasura ,Vishal Zaveri, Babu
Madhav Institute of Technology, Uka Tasadia University, Bardoli,
Gujarat, India : ISSN:0975-9646

You might also like