Smart Irrigation System Using IoT - Report 2016 PDF
Smart Irrigation System Using IoT - Report 2016 PDF
Smart Irrigation System Using IoT - Report 2016 PDF
Dharwad-580002
(An autonomous Institution affiliated to
Visvesvaraya Technological University, Belgaum 590018)
Conducted by
Conducted by
CERTIFICATE
Certified that this report on the mini-project entitled SMART
IRRIGATTION SYSTEM USING INTERNET OF THINGS is a bonafied work
carried out by Mr. Babanna Kumbar (2SD13EC016), Mr. Basavaraj Galagi
(2SD13EC017), Mr. Bheemashankar (2SD13EC018) and Mr. Naveen Honnalli
(2SD13EC060) students of 6th semester, Department of Electronics and
Communication Engineering, SDM College of engineering and Technology,
Dharwad, for the partial fulfillment of the requirements for the completion of third year
Engineering course, during the academic year 2015-16. The report has been thoroughly
reviewed and it is approved that the report satisfies the necessary academic requirements
prescribed for the said course.
Examiner I Examiner II
Signature
with date:
Name:
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
ACKNOWLEDGMENT
The completion of any project depends upon cooperation, co-ordination and combined
efforts of several sources of knowledge. This report acknowledges a number of guidance,
supervision, stimulation and lot of inspiration from numerous people. First of all, we thank the
almighty for the blessings that have been showered upon us to complete this project work
successfully.
It is our privilege to express our sincerest regards to our project guide Prof. Kotresh
Marali for his valuable inputs, able guidance, encouragement, whole-hearted cooperation and
constructive criticism throughout the duration of our project.
Our grateful regards to Prof. Dr. S.B Vanakudre, Principal, SDMCET, Dharwad for
his constant support and motivation.
We take the opportunity to thank all our lectures who have directly or indirectly helped
our project. We pay our respects and love to our parents and all other family members and
friends for their love encouragement throughout our career. Last but not the least we express
our thanks to our friends for their cooperation and support.
Mr. Bheemashankar
i
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
ABSTRACT:
The project describes the smart irrigation system using the concept of IoT. The project
uses a Wi-Fi module (ESP8266-12) which connects the system to internet. This module
controls a motor and two solenoid valves for supplying water to the field on the information
obtained from a water level indicator and two soil moisture sensors. This whole system is
monitored and controlled by MQTT server (My MQTT android App) through internet. The
project also depicts the concept of Internet of Things (IoT).
ii
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
CONTENTS
1.1 Introduction 1
1.2 Motivation 1
2.1 Definition 3
2.2 Introduction 3
2.4.1 MQTT 8
3.1 Arduino 11
iii
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
3.2 ESP8266 13
3.2.9 AT Commands 18
iv
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
4.4 Results 28
CHAPTER 6: CONCLUSION 34
REFERENCES 34
PHOTO GALLERY 35
v
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
CHAPTER 1
INTRODUCTION AND LITERATURE SURVEY
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.2 Motivation
For continuously increasing demand and decrease in supply of food necessities, its
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.
1
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
2
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
CHAPTER 2
BASICS OF IoT
2.1 Definition
The Internet of Things connects devices and vehicles using electronic sensors and the
Internet.
2.2 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.
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
3
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
or the clusterhead 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.
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
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
One of the most common in day to day life are mobile phones. Mobile phone is
essentially an embedded system with a processor at the core having display and keypad. They
support wide variety of sensors like ambient light Sensors, Accelerometer, Gyroscope and so
on. They are connected to internet. Mobile phones gets IP addresses, can access internet. In
other words it virtually fits every description of IoT. So can we call mobile phones IoT devices?
This doubt was clarified at a keynote event during Sept 2011's Mobile World Congress
in Barcelona by Qualcomm Chairman and CEO Dr. Paul Jacobs.
Paul Jacobs talked about how mobile technology could be used to connect non-phone,
non-tablet devices called IoT devices and objects to the Internet. In this future where
everything is Web-connected, mobile phones will serve as the hub, or the remote control,
for Internet of Things.
So IoT is internet connectivity of smart objects and embedded system other than mobile
phones which can be connected with external hardware and Mobiles, Tablets, Laptops and PCs
are remote control/access center of IoT.
5
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
The most common and popular technologies in IoT will give an overview devices. The
IoT devices into two broad categories: The wearable ones and Microcontroller /Microprocessor
driven embedded IoT devices. Some of the embedded devices like Arduino Lillypad are
minisque and it can further utilize them to make wearable solution. But wearable includes
hardware which are pretty standard and IoT has only software scope for the developer. Some
peripheral hardware are which might require are in IoT hardware in embedded level. Apps can
be used with popular wearable platforms, Embedded IoT platform may include broader
technologies like Raspberry Pi, Arduino or Galileo, etc.
As figure 2.2 suggests, a large Android Wear devices are now being made and
marketed. Smart watches are getting popular by every day. Android Wear apps can be
developed and tested in Eclipse. This Android Developer Guide helps you in setting up
Android Wear development environment in Eclipse.
Arduino is probably the best starting point for embedded based IoT. Basic Arduino
boards don't come with Ethernet shield or Wi-Fi shield and for Arduino to be able to work as
IoT device, their need to select Arduino with Ethernet shield or Wi-Fi shield. Arduino Yun on
the other hand is a board that comes ported with Ethernet shield.
6
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
Raspberry Pi is probably one of the best things to happen in DIY IoT. A wide range
of Data driven applications like Home Automation Server to Home Multimedia server, File
Server can be developed with Pi. PI like Arduino has general purpose IO pins. But seamless
working with sensors is bit tedious in Pi.
Another efficient IoT board is Intel Edision which has integrated BLE, Wi-Fi among
host of other features. It supports wide range of Industry standard hardware (over 30) through
70-pin interface.
Intel Galileo is another good offering by Intel which supports the same shielding that
of Arduino Uno. So it can be said to be first Intel powered device which is Arduino compatible.
It has among other thing a USB host controller like Raspberry Pi which makes this an attractive
hardware. Galileo also has ethernet shield in built.
IoT really can bring several services (like online payment gateway), several hardware
platform (like embedded board of the vending machine) and smart objects and data like NFC,
GPS into a seamless environment.
Now it can integrate online payment into beverage vending machine, if one is using
location service for beverage machine, then utilizing the location and payment service can be
done. One can get the data of a medical diagnosis like ECG (acquired through another
embedded board pertaining to medical electronics) into cloud such that several doctors can
view it and form a comprehensive opinion about the patient's state.
Well, infact all of them are possible. A little understanding of web and software design
would take your mind towards cloud. Just like Web of Machines, in a Machine to Machine
(M2M) or Machine to Objects (M2O) or any similar communication several modules will be
common and several modules demands data to be available for sharing. Cloud APIs comes in
handy in this regard.
For instance, to make a device discoverable in web, then assign a fixed IP address,
maintain a router and follow several networking skills.
Yaler is a great example of what services and cloud can bring to table. This provides
connection as a service such that your device is easily discoverable and communicable over
the web without much hassle and take care of underneath security.
7
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
OpenIoT is an open source IoT platform that provides out of other services a unique
Sensing as a Service.
Google has already integrated location services with its cloud. Location extracted from
your devices are silently put in your status updates in facebook and twitter and are also used
for more personalized searches.
So cloud APIs has a great potential in IoT in all levels of architecture starting from
firmware to hardware to more top level architecture.
This project uses concept of IoT for monitoring and controlling the system using a
public server called MQTT server. It uses an android app called MyMQTT. In this app, one
has to subscribe a topic and publish a message of specific function. The server will call-back
to perform the function.
2.4.1 MQTT
MQTT has a client/server model, where every sensor is a client and connects to a server,
known as a broker, over TCP.
MQTT is message oriented. Every message is a discrete chunks of data, opaque to the
broker.
8
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
MQTT defines methods (sometimes referred to as verbs) to indicate the desired action
to be performed on the identified resource. What this resource represents, whether pre-existing
data or data that is generated dynamically, depends on the implementation of the server. Often,
the resource corresponds to a file or the output of an executable residing on the server.
Disconnect: Waits for the MQTT client to finish any work it must do, and for
the TCP/IP session to disconnect.
UnSubscribe: Requests the server unsubscribe the client from one or more topics.
Publish: Returns immediately to the application thread after passing the request to the MQTT
client.
All three clients open TCP connections with the broker. Clients B and C subscribe to the topic
temperature (Figure 2.3).
9
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
At a later time, Client A publishes a value of 22.5 for topic temperature. The broker forwards
the message to all subscribed clients (Figure 2.4).
Figure 2.4 Client A publishing a value and broker forward this to other clients.
The publisher subscriber model allows MQTT clients to communicate one-to-one, one-to-
many and many-to-one.
10
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
CHAPTER 3
INTRODUCTION OF HARDWARES
3.1 Arduino
11
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data.
External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a
low value, a rising or falling edge, or a change in value.
PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite ()
function.
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication
using the SPI library.
LED: 13. There is a built-in LED driven by digital pin 13.
TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire
library.
The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of
resolution (i.e. 1024 different values). By default they measure from ground to 5 volts, though
is it possible to change the upper end of their range using the AREF pin and the
analogReference () function.
AREF Reference voltage for the analog inputs. Used with analogReference ().
Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset
button to shields which block the one on the board.
12
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
Microcontroller ATmega328P
Operating Voltage 5V
Length 68.6 mm
Width 53.4 mm
Weight 25 g
Table 3.1 Technical Specification
3.2 ESP8266
ESP8266 is a complete and self-contained Wi-Fi network solutions 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
13
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
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.
14
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
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)
15
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
The ESP8266 is a low cost Wi-Fi chip with full TCP/IP stack and microcontroller
capability produced by Shanghai-based Chinese manufacturer, Espressif. These were the first
series of modules made by third-party manufacturer, AI-Thinker with the ESP8266 and
remain the most widely available.
16
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
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.
17
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
3.2.9 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.
AT AT+CWMODE AT+CIPSTATUS
AT+CWLIF AT+CIPMUX
AT+CWDHCP AT+CIPSERVER
AT+CIPSTAMAC AT+CIPMODE
AT+CIPAPMAC AT+CIPSTO
AT+CIPSTA AT+CIUPDATE
AT+CIPAP +IPD
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
18
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
poorly (more resistance). It will be helpful to remind you to water your indoor plants or to
monitor the soil moisture in your garden.
A Chinese built YL-69 sensors (Figure 3.6) come with a middle-man circuit which
allows to get two outputs: one is an analog readout of the resistance between the sensors 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.
Solenoid valves are the most frequently used control elements in fluidics. Their tasks
are to shut off, release, dose, distribute or mix fluids. They are found in many application areas.
Solenoids offer fast and safe switching, high reliability, long service life, good medium
compatibility of the materials used, low control power and compact design.
19
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
A 2-way valve, for example, has 2 ports; if the valve is open, then the two ports are
connected and fluid may flow between the ports; if the valve is closed, then ports are isolated.
If the valve is open when the solenoid is not energized, then the valve is termed normally
open (N.O.). Similarly, if the valve is closed when the solenoid is not energized, then the valve
is termed normally closed.
The figure 3.7 depicts the basic components of a solenoid valve. The valve shown in
the picture is a normally-closed, direct-acting valve. This type of solenoid valve has the most
simple and easy to understand principle of operation. The media is controlled by the solenoid
valve enters the valve through the inlet port. The media must flow through the orifice (9) before
continuing into the outlet port (3). The orifice is closed and opened by the plunger (7).The
valve pictured above is a normally-closed solenoid valve. Normally-closed valves use a spring
(8) which presses the plunger tip against the opening of the orifice. The sealing material at the
tip of the plunger keeps the media from entering the orifice, until the plunger is lifted up by an
electromagnetic field created by the coil.
A submersible pump (or sub pump, electric submersible pump) (figure3.8) is a device
which has a hermetically sealed motor close-coupled to the pump body. The whole assembly
is submerged in the fluid to be pumped. The main advantage of this type of pump is that it
prevents pump cavitations, a problem associated with a high elevation difference between
20
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
pump and the fluid surface. Small DC Submersible water pumps push fluid to the surface as
opposed to jet pumps having to pull fluids. Submersibles are more efficient than jet pumps. It
is usually operated between 3v to 12v.
Specifications:
Voltage : 2.5-10V
Maximum lift : 40-110cm / 15.75"-43.4"
Flow rate : 80-120L/H
Outside diameter : 7.5mm / 0.3"
Inside diameter : 5mm / 0.2"
Diameter : Approx. 24mm / 0.95"
Length : Approx. 45mm / 1.8"
Height : Approx. 30mm / 1.2"
Material : Engineering plastic
Driving mode : DC design, magnetic driving
Continuous working life for 500 hours
Relay is an electromagnetic device which is used to isolate two circuits electrically and
connect them magnetically. They are very useful devices and allow one circuit to switch
another one while they are completely separate. They are often used to interface an electronic
circuit (working at a low voltage) to an electrical circuit which works at very high voltage. For
example, a relay can make a 5V DC battery circuit to switch a 230V AC mains circuit. Thus a
small sensor circuit can drive, say, a fan or an electric bulb.
21
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
A relay switch can be divided into two parts: input and output. The input section has a
coil which generates magnetic field when a small voltage from an electronic circuit is applied
to it. This voltage is called the operating voltage. Commonly used relays are available in
different configuration of operating voltages like 6V, 9V, 12V, 24V etc. The output section
consists of contactors which connect or disconnect mechanically. In a basic relay there are
three contactors: normally open (NO), normally closed (NC) and common (COM). At no input
state, the COM is connected to NC. When the operating voltage is applied the relay coil gets
energized and the COM changes contact to NO.
22
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
The relay circuit consists of relay switch, diode and transistor as shown in figure 3.12.
This circuit controls 18-24v DC solenoid valve or 2.5-10v submersible motor. The control
signal from controller to the base of transistor controls ON-OFF of actuators. The diode
prevents the reverse flow of current in input end of the relay switch. At output end of relay
switch a series connection of battery source and actuator. It is used because of actuators needs
supply of 3-24v DC, but controller output signal is of 3.3v DC.
Figure 3.12 Circuit Diagram to controls actuator (motor) using relay switch.
23
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
CHAPTER 4
EXPERIMENTAL SETUP AND RESULTS
http://arduino.esp8266.com/stable/package_esp8266com_index.json
>>Ok
Step 2: Connect the pins of Arduino Uno to ESP8266-12 pins as mention below
5v 5v
3.3v 3.3v, CH_PD
Gnd Gnd (both)
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.
24
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
Step 3: Reset the ESP8266 by connecting RESET pin to GND3.3vGND 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.
25
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
Step 2: Once results are confirmed, make a PCB layout using software ExpressPCB as shown
below in figure 4.2.
Step 4: Itching: Immerse the printed PCB copper plate in a copper sulphate solution until all
copper oxidizes except PCB traces. Then, wash with petrol to remove printed carbon.
Step 5: Place the components and carefully solder them. Front and rear views are shown in
figure 4.3a, 4.3b.
26
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
Step 5: Make the complete connections, i.e. connect the water level indicator, soil moisture
sensors, submersible motor pump and solenoid valves.
Step 6: Connect the power supplies to output ends of relay switches as mentioned in the circuit
diagram. 9v to motor pump, 18v to both valves. Connect the power supplies to PCB board 5v,
3.3v and ground from Arduino board.
Physical connections include the placing the sensors and actuators in small model of
agriculture field and includes proper connections. Detail is given below
27
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
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).
4.4 Results
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.
28
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
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.
Features: Connect to MQTT v3.1 Broker (optional with username and password)
Subscribe to various topics.
Publish messages to a topic
Save messages
Filter received Messages
Depending upon messages published, different functions will be executed and client will
publish in Dashboard what it do? what it will be does? what it done?
29
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
30
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
Figure 4.4e Publsih of message(STATUS) Figure 4.4f Messages on Dashboard due to STATUS
31
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
32
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
33
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
CHAPTER 6: CONCLUSION
The agriculture field is being monitored and controlled by MyMQTT android app at
user end. 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. After it will
send the messages to broker network and inturn it will be published to the Client (user end).
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.
References
34
Department of Electronics & Communication Engineering, SDMCET, Dharwad
SMART IRRIGATION SYSTEM USING INTERNET OF THINGS
PHOTO GALLERY
Guide
Students
Mr. Bheemashankar
USN: 2SD13EC018
35
Department of Electronics & Communication Engineering, SDMCET, Dharwad