Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

7KH,QWHUQDWLRQDO(OHFWULFDO(QJLQHHULQJ&RQJUHVV L((&21 

IOT based Wireless Sensor Network for Precision


Agriculture
Nisar Ahmad Ali Hussain Ihsan Ullah Bizzat Hussain Zaidi
Department of Computer Department of Electrical Department of Electrical Department of Electrical
Engineering, and Computer Engineering and Computer Engineering Engineering
The University of Lahore, CUI, Abbottabad Campus CUI, Abbottabad Campus DHA Suffa University
Lahore, Pakistan Abbottabad, Pakistan Abbottabad, Pakistan Karachi, Pakistan
nisar.ahmad@dce.uol.edu.pk ali0403hussain@gmail.com ihsan@ciit.net.pk bizzat.hussain@dsu.edu.pk

Abstract— With the passage of time the trend of technology usage forming a network. A sensor node consists of transceiver,
by farmers has been increasing to improve the quantity and sensor, processor, power source (battery), analog to digital
quality of crop production. The multi parameter monitoring converter (ADC), antenna and memory unit. WSN are preferred
system is presented in this research where farmers/users will be due to low cost, low power, easy to maintain that share their
updated with the help of internet. In this research two different contribution in home automation, agriculture, health sector and
technologies, Internet of things (IoT) and wireless sensor network in military applications.
are combined in an innovative way for smart remote monitoring
system of crops. Sensor nodes are deployed in fields which gather C. Internet of Things (IoT)
data about different parameters. At transmission side these values The internet of things (IoT) is a network of globally
are displayed and then transmitted to the base station using a connected devices and machines which communicate with each
network of XBee sensors. A database is established for other. IoT is one of the latest technology trends that are gaining
maintaining sensor values which could be helpful for research and popularity among vast majority of industries. It has been
analysis of environmental factors such as soil moisture, UV index,
forecasted that till the year 2020 IoT based units will reach up to
rain, air pressure and humidity on crop production.
26 billion. IoT applications include human to device and device
Keywords—Internet of Things (IoT); Wireless Sensor Networks
to device interactions in reliable way. Main application areas are
(WSN); XBee; Sensor; Precision Agriculture (PA)
categorized as data and business analysis, monitoring and
I. INTRODUCTION control, and collaboration and information sharing [2].
As Agriculture sector plays leading role in the economy of 1) Cloud Computing
many developing countries, therefore, it is highly important to IoT applications need space for data storage and huge
focus on the improvement of cultivation techniques. These data manipulations for real time decision making [2]. Cloud
countries not only fulfill the requirement of their own but also computing is a platform that provides solution for high data
contribute to provide quality food items to the rest of the world. transfer and data storage in real time.
Irrigation and unequal water distribution for crops not only
In this paper, a smart and low cost IOT based Precision
effects the crop production but also results in possible water
Agriculture (PA) system is presented. Data related to the
wastage which is a precious resource.
parameters responsible for crop growth are collected by
Important parameters in cultivation that need to be placing sensor nodes as shown in Fig.1 in random locations.
addressed are soil moisture, Humidity, Air Pressure, Solar panel with rechargeable battery is used to fulfill the
Temperature and weather forecast etc. Additional sensors can power needs. These nodes (XBee) are interconnected
be installed to monitor crop health and any kind of infestation. according the cluster tree topology. Each node consists of
Based on the information collected, measures can be taken to several sensors capable of measuring parameters such as
avoid any damage or improve crop production. The data soil moisture and humidity, Temperature, Air quality and
gathered can be interpreted by scientists for forecasting crop atmospheric pressure. The data from these sensors is
production or for policy making. transmitted through a network of interconnected nodes to
the server, which then uploads the data to a cloud. The
A. Precision Agriculture (PA) server consists of a separate processing unit responsible for
In Precision Agriculture information technology is used to controlling the drip irrigation system. This data is made
improve the yield by precisely monitoring the various crop accessible in visual form to the end user. A MATLAB GUI
parameters. In result, better crop irrigation, suitable herbicides, is designed for visualization.
pesticides and sowing techniques are achieved [1].
The rest of the Paper is organized as; Section II presents
B. Wireless Sensor Network (WSN) related work using WSN technology for precision
Wireless Sensor Network is a wireless network of separately agriculture. Section III provides methodology adapted to
placed sensor nodes which gather and share data with each other

‹,(((
7KH,QWHUQDWLRQDO(OHFWULFDO(QJLQHHULQJ&RQJUHVV L((&21 

design and achieve smart irrigation system. Section IV conditions was made possible by the Graphical user interface
consists of hardware and software Implementation of the based software.
system. Section V contains conclusion.
III. METHODOLOGY AND MATERIALS
The proposed and implemented methodology is presented in
Fig.2, where different wireless sensor nodes are deployed in
field for data collection. These nodes are connected with each
other according the cluster tree topology. Different sensors
gathering information related to soil moisture, humidity,
temperature, ultraviolet index and air quality are directly
connected to Arduino UNO by analog pins. A program has been
written in C/C++ to read the analog pins where these sensors
are connected.

Fig. 1. A single Sensor Node being setup for data acquisition

II. RELATED WORK


In [1] an intelligent Greenhouse monitoring system
(IGMS) based on WSN is presented. Environmental
parameters such as humidity, soil moisture and temperature
are measured using IGMS. Sensors data is monitored using
software which activates the control system to irrigate and Fig. 2. Implemented System Setup
fertile the crops according to a preset threshold. It is an
internet based application which uses open source The measurements from each sensor are transmitted
technologies. wirelessly in the form of frames to the server. The sensor
A real time feedback control system is designed and measurements are also displayed on an LCD mounted on each
presented in [4] that uses drip irrigation to control the wastage node. Automatic irrigation control mechanism is developed at
of water. Different types of sensors are used for precise server side. Server directly controls the irrigation process by
monitoring and control of agriculture fields. The control sending control signals to open and close the electric valve for
circuit consists of ARM based LPC2148 microcontroller as water supply. Water supply is monitored using water flow
main part of circuitry. End user is informed about field sensor. Data from sensor nodes are received serially at server.
conditions using available mobile network structure. User At the server an Esp8266 device is configured to upload data
can investigate about field conditions by sending a message to cloud for access at base station. At base station sensors data
through GSM. Sensors can be activated according to the is made accessible using cloud and a MATLAB GUI is used to
user’s request and required information will be sent to the filter and visually present the data. The end user can also access
user by same medium. this data using internet and take rapid measures related to crops
A wireless monitoring system is used in [3] to enhance the safety and health.
mango production. Eko nodes are deployed in fields to To create an effective filed deployable wireless sensor
monitor different environmental parameters. Nodes are network, optimization of power consumption by the hardware
connected according the mesh topology to transmit sensor components is necessary [6]. Communication protocol also
values. plays an important role in reduction of power consumption.
In [5] a Wireless sensor networks (WSN) based irrigation Efficient power management is required for wireless
system is designed for site specific irrigation management. communication by wireless sensor nodes [7].
Six sensors are developed, deployed and used to gather soil Each sensor node is powered using a 12V, 2.5AH Battery
properties and sensor data is transmitted to a base station. which is continuously charged using a 10-Watt solar panel. The
Programmable logic controller (PLC) based irrigation total power consumption of the system is 0.64WH. This gives
machine is developed to irrigate the field and locate the each continuously transmitting and receiving sensor node
position of sprinklers using Global Positioning System approximately a battery life of 2 days when operating on battery
(GPS). This information is wirelessly communicated to the alone. However, the sensor node, when charged by the solar
base station. A stable and real time remote access to field plate can operate indefinitely.
7KH,QWHUQDWLRQDO(OHFWULFDO(QJLQHHULQJ&RQJUHVV L((&21 

When operating in power saving mode, where each sensor life. Simple and flexible protocol stack is also maintained in
node is programmed to transmit every 60 minutes and stay 802.15.4 standard [10].
active for 2 minutes, the system can operate for 62 days without
charging. The power saving mode can be activated when
installing each node, it can also be activated from the base
station by the end user.
Two power supply circuits are designed to supply power to
the system. The main power supply circuit is designed to supply
5V DC to the controller, whereas a buck converter is used to
supply 3.3V to the transceiver and the UV index sensor.
Irrigation system is a feedback system which is controlled
by the on-field server. Server receives sensor data wirelessly
from sensor nodes and takes decisions to open or close the
solenoid valve for water supply. The irrigation system can be
set to a time-based mode, a water flow-based mode or a manual
mode in where the end user controls it. The irrigation depends Fig. 3. Block diagram of the developed node with sensors
on soil humidity and because sensors are prone to measurement
noise so, decision is made on running average of the soil Few of the free spectrum bands spectrum devices use are:
humidity measurements from the sensor. 2.4-2.48 GHz, 5.8-5.9 GHz and 902-928 MHz [11]. A device
Wireless sensor node is developed as main module of the which utilizes the frequency channel of 2.4GHz is used for
project. This sensor node is consisted of Arduino UNO, infield communication between the nodes.
sensors and XBee radio module. This research uses the Arduino XBee is serially connected with Arduino UNO using UART
UNO- a microcontroller board based on ATmega328P communication interface. In this node setup sensors are
microcontroller. This board has 14 digital input/output pins.6 connected to the Arduino UNO which reads data directly from
pins out of 14 can be used as PWM outputs, 6 analog inputs, 16 sensors and then transmits the data to the XBee device serially.
MHz quartz crystal oscillator, a power jack, a USB port, reset XBee communication is made in the form of frames in API
button and ICSP header. It can be easily powered by an AC-DC mode.
adapter or battery. UNO board is the first version in series of
USB Arduino boards. This controller is already programed with An array of length 14 is used in code to gather all sensors
bootloader. There is no need of external hardware to program data. Each sensor’s measurement data follows a few bits
the device. To start working with UNO a software platform representing the sensor id, a total of 5 sensors were installed on
known as Arduino IDE is also required [8]. each node. along with a predefined data end stream. The data
frame consists of 10 node id bits, 3 battery power level indicator
XBEE is a low cost, easy to deploy radio frequency module bits, 4 sensor id bits followed by the corresponding sensor’s 10-
which provides end point connectivity with devices and bit measurement and 18 node time bits. Single frame length of
sensors. It follows 802.15.4 standard for communication. This each serially transmitted data packet to the XBEE is 8 bytes.
module is ideal for low latency applications, point to point and
multipoint configurations. It has 15 digital I/O pins. Suitable On the in-field server-side data received from all the nodes
supply voltage is 2.1 to 3.6V. Current consumption on is transmitted after placing a predefined 8 bit start-of-sensor and
transmission is 33mA and 28mA [9]. end-of-sensor indicator. The in-field server then uploads the
received data on the cloud for end user access, analysis and
Environmental data is obtained by placing wireless sensor action.
nodes in field. All the sensors are connected to form a sensor
node except the Anemometer which is installed on the in-field In a cluster tree topology, a special node which identifies the
server only. entire network is called root, the nodes that associate with other
nodes are routers, and end devices having no ability to associate
Separate code is developed for each sensor measurement. other nodes are known as child nodes [12]. Cluster tree
Each sensor’s functionality is verified before final topology is implemented by connecting different XBee devices
implementation. XBee is configured using XCTU having unique mac addresses. XBee is a full duplex data
programming environment before connecting with the Arduino communication device which uses mac address of other devices
UNO shield. The key components of an individual node are to form a network and share data using unique channel.
represented by Fig. 3.
Esp8266 is extremely cost effective board with self-
The characteristics of physical and MAC layers for Low-rate contained system on chip (SOC) and integrated TCP/IP stack.
Wireless Personal Area Networks (LR-WPAN) are defined by Esp8266 is simple to start working with as it comes pre-
the IEEE standard 802.15.4. The benefits of such standard are programmed with AT commands set firmware. It supports
reliable data transfer, extremely low cost and reliable battery external application specific devices or sensors to be connected
with its GPIO pins due to its powerful on board processing and
7KH,QWHUQDWLRQDO(OHFWULFDO(QJLQHHULQJ&RQJUHVV L((&21 

storage capability. It follows 802.11 b/g/n wireless Data reception at base station is verified in real time. This data
communication standard, has s 1MB flash memory and will be helpful for analysis of crops by analyzing the
supports GPIO, I2C, ADCC, SPI and PWM. environmental factors affecting crop production thus providing
the end user with decisions on improving crop yield. The
IV. RESULTS designed hardware may as well serve as mini weather station.
To visualize the parameter values, Matlab GUI is designed When deployed on mass scale the system will play a critical
at user side. The raw data received is passed through a moving role in policy making.
average filter with a lag of 80 samples. The tested node
transmits data after every minute with an active session of 27
hours. The air quality measurements are displayed in Fig. 4. Air
quality trends are in line with the expected results.

Fig. 6. Temperature measurement

REFERENCES
[1] Kassim, Mohamed Rawidean Mohd, Ibrahim Mat, and Ahmad Nizar
Fig. 4. Air quality measurement Harun. "Wireless Sensor Network in precision agriculture application."
In Fig. 5 below soil moisture measurements are displayed. International Conference on Computer, Information and
Telecommunication Systems (CITS), 2014. IEEE, 2014.
Figure 6 shows the temperature measurements Temperature
[2] Lee, In, and Kyoochun Lee. "The Internet of Things (IoT): Applications,
rises in the day from morning to afternoon and gradually falls investments, and challenges for enterprises." Business Horizons 58.4
in evening. (2015): 431-440.
[3] Kodali, Ravi Kishore, and Nisheeth Rawat. "Wireless sensor network in
V. CONCLUSION mango farming." IEEE Nirma University International Conference on
Engineering (NUiCONE),2013. IEEE, 2013.
This paper presents an application of Wireless sensor
[4] Prathyusha, K., G. Sowmya Bala, and K. Sreenivasa Ravi. "A real-time
network (WSN) and Internet of Things (IoT) in precision irrigation control system for precision agriculture using wsn in indian
agriculture (PA). The self-powered precision agriculture based agricultural sectors." International Journal of Computer Science,
experimental setup’s functionality is completely tested and real Engineering and Applications 3.4 (2013): 75.
time sensor measurements are successfully transmitted using [5] Kim, Yunseop, Robert G. Evans, and William M. Iversen. "Remote
cluster topology to the server. This information is stored on sensing and control of an irrigation system using a distributed wireless
sensor network." IEEE transactions on instrumentation and measurement
cloud and then accessed by the end user where it is visualized 57.7 (2008): 1379-1387.
using a GUI. Automatic control of irrigation is made possible [6] Slijepcevic, Sasha, and Miodrag Potkonjak. "Power efficient organization
by setting a threshold value at server. of wireless sensor networks." IEEE International Conference on
Communications, 2001. ICC 2001. Vol. 2. IEEE, 2001.
[7] Pottie, Gregory J. "Wireless sensor networks." Information Theory
Workshop, 1998. IEEE, 1998.
[8] "Arduino Uno Rev3." Store.arduino.cc. N.p., 2018. Web. 5 July 2018.
[Online]. Available: https://store.arduino.cc/arduino-uno-rev3
[9] DIGI XBee S2C 802.15.4 RF Modules. DIGI. Web. 5 July 2018.
[Online].Available: https://www.digi.com/pdf/ds_XBee-s2c-802-15-
4.pdf
[10] Baronti, Paolo, et al. "Wireless sensor networks: A survey on the state of
the art and the 802.15. 4 and ZigBee standards." Computer
communications 30.7 (2007): 1655-1695.
[11] "Tech Stuff - Unlicensed Frequencies." Zytrax.com. N.p., 2018. Web. 5
July 2018. [Online]. Available:
http://www.zytrax.com/tech/wireless/free.htm
[12] Koubaa, Anis, Mário ALVES, and Eduardo TOVAR. "Modeling And
Worst-Case Dimensioning Of Cluster-Tree Wireless Sensor Networks."
Fig. 5. Soil moisture measurement 27Th IEEE International Real-Time Systems Symposium (RTSS'06).
IEEE, 2006.

You might also like