Practical Precision Agriculture with LoRa based Wireless Sensor
Networks
Jonathan Gresl
1
, Scott Fazackerley
2 a
and Ramon Lawrence
1 b
1
Department of Computer Science, University of British Columbia, Kelowna, Canada
2
Department of Electronic Engineering Technology, Okanagan College, Kelowna, Canada
Keywords:
LoRa, Wireless Sensor Network, Precision Agriculture, Orchard, Vineyard.
Abstract:
Precision agriculture is enabled by using real-time data to manage environmental variations, measure perfor-
mance to improve upon previous seasons, and perform predictive analysis to make better growing decisions,
resulting in higher production yields with lower production costs. Although beneficial, collecting and ana-
lyzing the environmental data is an expensive and complicated endeavor. Numerous existing wireless sensor
network (WSN) solutions rely on protocols such as 802.15.4 b (LR-WPANs) and 802.11x (WLAN) but provide
limited transmission range, complex communication stacks and data management, and high power consump-
tion. Additionally, many existing services introduce challenges with data ownership and residency. These
factors present a high barrier to entry for growers. The resources required to implement and maintain sensor
networks are too high to justify the investment. This work presents an approach that uses inexpensive and
effective hardware that is easily setup and maintained. Costs to implement the network are reduced through
the use of open-source hardware. Transmission ranges and power consumption are improved by using long
range (LoRa) radio transceivers. By addressing these limitations, growers will be better enabled to adopt new
technologies, ultimately improving sustainability, viability, quality and profit margins in agriculture.
1 INTRODUCTION
Precision agriculture is an approach to farming that
uses information to ensure crops can grow in optimal
conditions. Environmental variations can result from
climatic conditions, soil composition, cropping prac-
tices, weeds, or diseases. Monitoring key point indi-
cators allow growers to track their crop’s status, which
can help them to determine if crops are suffering from
water stress, nitrogen stress, or if diseases are devel-
oping. Environmental variations result in loss of crops
and inconsistent growth. When conditions vary, ad-
justments can be made to regular farming activities
to control or stimulate growth in plants. The collected
data is also useful for measuring performance and im-
proving upon previous seasons. Using precision agri-
culture reduces production costs by mitigating waste.
Ultimately, precise growers can produce higher qual-
ity products with fewer resources and increased profit
margins.
Sensor networks have been extensively investi-
gated for use in agricultural settings (Ojha et al., 2015;
a
https://orcid.org/0000-0002-1323-272X
b
https://orcid.org/0000-0002-6779-4461
Jawad et al., 2017) to collect real-time environmen-
tal data. Early investigators experienced challenges
with complexity of deployment, network connectiv-
ity and battery life (Beckwith et al., 2004). While
systems can be deployed with a wire-based system
that provides power and facilitates data transfer over
a stable wired connection, they are inconvenient be-
cause large amounts of wire are needed to connect
the sensor nodes. The wire must also be concealed
in a manner that does not limit accessibility and is
protected from machinery and environmental degra-
dation. Damaged wires will disable some or all of the
sensor network and will require user intervention to
troubleshoot and restore functionality.
Wireless sensor networks were introduced to im-
prove practicality. The wireless components are pow-
ered by batteries and connected through a wireless
medium. Figure 1 depicts a typical wireless network
deployed in an agricultural setting. The sensor nodes
(blue pins) are deployed strategically across a field
within range of the central gateway (orange pin) and
depending on the choice of transceiver, modulation
technique and allowable transmission power, nodes
may communicate directly with the gateway or re-
quire intermediate nodes to act as cluster-heads and
Gresl, J., Fazackerley, S. and Lawrence, R.
Practical Precision Agriculture with LoRa based Wireless Sensor Networks.
DOI: 10.5220/0010394401310140
In Proceedings of the 10th International Conference on Sensor Networks (SENSORNETS 2021), pages 131-140
ISBN: 978-989-758-489-3
Copyright
c
2021 by SCITEPRESS Science and Technology Publications, Lda. All rights reserved
131
Figure 1: A potential node deployment in a grape vineyard.
facilitate routing to the gateway (Heinzelman et al.,
2002; Fazackerley et al., 2009). The gateway is con-
nected to the Internet to allow remote users to moni-
tor the different growing parameters that can be used
to improve decision making in an agricultural setting.
A database stores the sensor data and is accessible
through the network for configuration and sensor data
analysis (Ojha et al., 2015).
Although wireless sensor networks are more prac-
tical than wired networks, they also come with their
own set of challenges and limitations. The hardware
required to setup a network to cover large rural areas
is expensive. There is also a significant amount of ef-
fort required to setup or modify the network. WiFi
or Bluetooth protocols can be used for the data trans-
fer, but are complicated protocols that provide lim-
ited transmission range with high power consump-
tion. While mesh networks can be constructed to in-
crease transmission range, it increases the complexity
of the solution, leading to higher power consumption
and increased network traffic. Both WiFi and Blue-
tooth protocols have high overhead that are unneces-
sary for applications in agriculture.
For agriculture sensing networks, barriers to entry
are high costs, complexity, and power consumption.
High costs discourage growers from wanting to in-
vest in the technology without a clearly identified re-
turn. Deployments need to be accessible to users and
straight forward to implement and expand. Finally,
devices must be power efficient reducing the need for
continual service.
In this work we propose a sensor network data ex-
change and control protocol targeted for agricultural
applications. The system is based on LoRa (Semtech,
2020) physical layer transceivers which are com-
monly available in low cost formats. The contribu-
tions of this paper are:
A self-determining distributed time slot transmis-
sion algorithm and novel collision protocol
An architecture for node management and control
A localized data management strategy
A deployment of a prototype system, directly ap-
plicable to real-world agricultural challenges.
The paper outline is as follows. Section 2 presents
an overview of previous approaches and discusses the
LoRa protocol. The proposed architecture, commu-
nication and control and time slot algorithm are pre-
sented in Section 3. Discussion of the practical de-
ployment is in Section 4. The paper closes with future
work and conclusions.
2 BACKGROUND
The Okanagan Valley is one of Canada’s principal
fruit growing regions. The semi-arid region is an agri-
culturally intense area stretching 200 km north from
the US border and is approximately 20 km wide. The
region presents exceptional growing conditions with
hot summers and relatively mild winters. Extensive
information on soil conditions is available with ar-
eas of high productivity stretching along a series of
long, deep narrow lakes which help to regulate grow-
ing conditions for different tree-fruit and grape va-
rieties. In terms of agriculture in British Columbia,
the majority of the province’s tree fruits are produced
in this region, including extensive high-value cherry
production for the Asian market as well as grapes for
wine production. The Okanagan Valley is one of the
largest fruit and wine producing areas in Canada.
Figure 2: Scab infected apples showing the development of
lesions on the foliage and fruits
1
.
Due to the geography of the Okanagan valley,
growing regions are small with many compact grow-
ing operations. The margin on fruit crops is low due
to increasing operational costs and climate variability.
1
Shuhrataxmedov, CC BY-SA 3.0 https:
//creativecommons.org/licenses/by-sa/3.0 via Wikime-
dia Commons
WSN4PA 2021 - Special Session on Wireless Sensor Networks for Precise Agriculture
132
Figure 3: Grapes infected with powdery mildew
2
.
Interest has focused on how precision agriculture can
improve crop quality and increase profit margins.
In the fruit growing industry, growers are often
faced with making decisions based on limited infor-
mation for the well-being of their crop. Interest has
grown in the area of disease modelling to better pre-
dict and manage the crop. With a more in-depth un-
derstanding of crop growing conditions, predictions
can be made to help manage disease outbreaks with
minimal cost leading to higher overall crop quality.
Two key crops where sensor-based precision agricul-
ture can significantly impact growing decisions lead-
ing to improved yield and profit margins are apples
and grapes. Apple scab (Figure 2) is a common and
ongoing disease caused by the Ventruia inaequalis
fungus in the wetter interior growing regions. In the
Okanagan Valley it is especially common in years
with above average rainfall (AgriService BC, 2018).
With wine grapes, similar challenges exist with
the development and management of the fungus Unc-
inula necator. It causes grape powdery mildew which
attacks grape plants and limited related species. For
popular wine grape varieties in the interior of British
Columbia, it is the most common and widespread
disease of grapevines (British Columbia Ministry of
Agriculture, 2015).
While both diseases significantly impact local
fruit crops, disease modelling and forecasting for
improved management can be done with tempera-
ture and leaf wetness sensors (Garofalo and Cooley,
2020). In many cases, modelling is completed with
a limited number of data input points. With early
model tests in the Okanagan valley, accuracy was re-
duced due to model variability based on local con-
ditions (British Columbia Ministry of Agriculture,
2015); more temporal and spatial data is needed for
accurate modelling. While commercial systems are
available, they are cost prohibitive to many growers as
they require not only hardware costs but ongoing fees
2
Maccheek, CC BY-SA 3.0, https://commons.
wikimedia.org/w/index.php?curid=971184
for data access. This presents additional barriers for
growers as they do not have direct control over their
data. While larger data sets over a wide area help to
improve modelling and prediction allowing growers
to better visualize and predict risks during a growing
season, current solutions present barriers to adoption
due to cost and complexity of implementations.
2.1 Sensor Networks
In the design of low-power wireless sensor networks,
energy consumption is a key factor. Transmission
of data costs more in terms of energy than local
storage and processing (Pottie and Kaiser, 2000).
Sensors typically have been a small 8-bit processor
with limited local memory, a series of sensors and
a transceiver for communications (Akyildiz et al.,
2002). Processors are often chosen based on cost,
memory and energy efficiency. Energy efficiency is
a key consideration as it impacts the usable life of a
sensor in the field before having to be serviced or re-
placed. A device or sensor node is required to last
for an extended period of time without service. Pre-
vious research has led to the development of numer-
ous sensor platforms such as the MicaZ and TelosB
nodes. These have been replaced by a number of low-
cost, open source platforms such as the Feather M0
3
that include numerous transceiver options. These
new platforms offer significantly increased processing
speeds and memory capacity, due to the introduction
of low-cost and high-speed 32-bit ARM based cores.
This creates a further opportunity for local processing
and increased energy efficiency.
Sensor networks have been an ongoing area of re-
search that has been accelerated by the Internet of
Things. Sensor networks have been extensively inves-
tigated in areas such as industrial and factory automa-
tion, environmental monitoring, agriculture and mili-
tary applications (Akyildiz et al., 2002; Culler et al.,
2004; Romer and Mattern, 2004). Sensor networks
have been further enabled by being able to connect
to cloud data storage, visualization, and analysis plat-
forms to leverage the volume of data that is collected.
It is an emerging paradigm that is fusing existing data
collection systems with smart systems, frameworks
and other devices to offer potential growth in eco-
nomics and industry (Kumar et al., 2019).
With the explosive growth of IoT devices in ar-
eas such as healthcare, smart homes, traffic manage-
ment, industry 4.0, security and surveillance and agri-
culture (Kumar et al., 2019), it is important to un-
derstand that each of these domains present different
challenges and opportunities for the IoT.
3
https://www.adafruit.com/category/830
Practical Precision Agriculture with LoRa based Wireless Sensor Networks
133
Precision agriculture for high value crops presents
unique challenges that are different from other IoT ap-
plication domains. While many IoT applications fo-
cus on extremely large numbers of data generation de-
vices that are potentially in motion while connected to
the internet, many agricultural applications focus on
data collection from a low number of static devices.
Agricultural industries benefit from using wireless
sensor networks, but growers are hesitant to invest in
the technology if it is not practical for their applica-
tion. An ideal agricultural product is one similar to
smart home technologies with light bulbs. Growers
should be able to purchase a central gateway that sen-
sor nodes can communicate with. New sensor nodes
should easily synchronize with the central gateway
and be configurable through it. The gateway should
also support the option to be connected to the Inter-
net to provide remote configuration and data analysis.
Above all, growers should rarely need to replace sen-
sor nodes or their batteries.
For wireless sensor networks to be sustainable in
agriculture, they must be affordable, require little user
intervention, stay powered for long periods of time,
stay protected from the elements of nature, be easy
to implement and modify, and transmit at long ranges
while handling radio interference. This is a long list
of requirements, but they can all be achieved inex-
pensively with the emergence of open-source hard-
ware, open-source software, and 3D printing tech-
nology. In general, improving transmission distances
and reducing power requirements will make wireless
sensor networks more practical and affordable for the
grower.
Previous works have considered using protocols
such as 802.15.4 b (LR-WPANs, including Blue-
tooth and Zigbee) and 802.11x (WLAN) but provided
limited transmission range, complex communication
stacks and data management, and high power con-
sumption (Vieira et al., 2003; Buratti et al., 2009;
Fazackerley and Lawrence, 2010). For applications
that have focused on using these technologies in agri-
cultural applications, challenges exist with the power
and limited transmission distance. This means that
for areas of more that 25-50 meters, devices are re-
quired to use multi-hop route or mesh networking.
This introduces additional complexities in terms of
device synchronization, energy consumption and life-
time (Cagnetti. et al., 2020).
Recently, interest has grown in the area of Low
Power Wide Area Networks (LPWAN) as a way to
address power and link distance challenges presented
by previous technologies (Lavric and Petrariu, 2018).
Numerous vendors are active in this space and are fo-
cusing on improving the performance of wireless sen-
sors (Georgiou and Raza, 2017). These devices pro-
vide coverage areas where gaps exist in the current
short-range wireless space and address many of the
requirements (Raza et al., 2017). One of the most
promising technologies in this space is LoRa which
allows for flexible, long range communications at a
low price point and power budget. LoRa is a layer
1 protocol that allows higher levels and network ar-
chitecture to be built upon it. The LoRa Alliance has
defined a cloud-based medium access control (MAC)
layer protocol called LoRaWAN (Sornin, 2017) al-
lowing for the development of large scale systems.
Numerous applications have been proposed utilizing
LoRa and LoRaWAN technologies.
2.2 LoRa and LoRaWAN
The LoRa, (Long Range) protocol is a RF modulation
technology developed by Cycleo in 2009, which was
later acquired by Semtech in 2012. The technology
uses a proprietary chirp spread spectrum modulation
technique which enables data communication over
long ranges (>15 km line of sight), while using little
power, making it a flexible solution for rural use cases
in smart agriculture (Ojha et al., 2015). LoRa operates
in the unlicensed ISM bands worldwide. Although
there are multiple license-free bands, most long range
protocols operate in the sub-gigahertz license-free
bands, the most prominent of which are a large con-
tiguous band from 902-928 MHz and narrower bands
at 864-870 MHz, and 433 MHz depending on the re-
gion of the world a device is operating in.
With LoRa, key parameters need to be agreed
upon that control the channel bandwidth (BW), the
spreading factor (SF) and the coding rate (CR). The
spreading factor controls the duration of the chirp
with larger SF’s being able to transmit further but with
a slower data rate for a given bandwidth. LoRa also
includes the option of forward error correction as cod-
ing rate that will encode 4-bit data with redundancies
into 5, 6, 7 or 8-bits. For LoRa devices to communi-
cate, two devices must be operating in the same band,
and share the same channel bandwidth, spreading fac-
tor and coding rate. Unlike other wireless technolo-
gies, LoRa data transmission rates are in the order of
kilobits per second.
As the data rate is low, this makes LoRa most
suitable for implementations that do not require large
amounts of data transferred over short periods of time.
LoRa is ideally suited for low volume, and periodic
transmission of sensor data.
LoRaWAN is a MAC layer protocol utilizing
LoRa, that focuses on medium access and network
congestion. While LoRa allows physical point-to-
WSN4PA 2021 - Special Session on Wireless Sensor Networks for Precise Agriculture
134
point communications, LoRaWAN offers a complete
network topology, focused at scalability towards hun-
dreds of thousands of devices connecting to the Inter-
net. With LoRaWAN, the topology requires a gateway
that encapsulates network dataframes as well as pro-
viding cloud-based network services for storage and
analysis (Ert
¨
urk et al., 2019). LoRaWAN as a com-
munication protocol has been used for agricultural ap-
plications (Davcev et al., 2018; Kokten et al., 2020).
While a suitable technology, numerous limitations ex-
ist as LoRaWAN gateways and end nodes are costly
compared to LoRa. Additionally, with LoRaWAN a
cloud-based network service is required as data resi-
dency is no longer on site. LoRaWAN is targeted for
large scale networks and is prohibitive for cost sensi-
tive applications.
In contrast, LoRA allows developers to utilize
low-cost, open-source solutions knowingly sacrific-
ing high scalability. Specifically for cost sensitive,
agricultural applications this is suitable as an instal-
lation may only require hundreds of nodes. Unlike
with LoRaWAN, developers can implement low-cost,
local data storage and visualization tools, allowing a
grower to maintain control of data privacy and own-
ership. Finally, as many agricultural locations lack
internet connectivity, LoRa devices can be run decou-
pled from the internet, offering maximum flexibility.
3 SENSOR ARCHITECTURE
USING LoRa
A sensor network architecture for agricultural moni-
toring captures low speed and a low volume of data,
which offers flexibility in the design of the architec-
ture. LoRa is an ideal candidate to satisfy power and
link budgets and forms the communication backbone
of the proposed architecture. For small scale agricul-
tural deployments, LoRa eliminates the need for com-
plex and energy intensive routing and synchronization
protocols, allowing for sensor nodes to communicate
directly with the data collection point.
For the development of apple and grape disease
models, parameters such as air temperature, leaf-
wetness, and humidity are measured. These are rel-
atively slow moving parameters with respect to time.
This allows nodes to sample at a low interval on the
order of minutes between readings. Additionally, as
data is used in a predictive fashion for forecasting,
the real-time delivery requirements for data can be re-
laxed. This allows latency tolerant delivery where a
node is not required to deliver data immediately upon
sampling. Another key consideration is the size of the
data being transmitted. With LoRa and the time on
air constraints, focus must be given to minimize the
amount of data being transmitted against the needs of
the application.
The following protocol defines interactions and
exchange of data between nodes and a gateway us-
ing the LoRa physical layer and is called the LoRa
eXchange protocol (LoRa-X). With LoRa-X, two key
parameters are:
Sample Frequency which defines the expected
sample frequency or rate needed for a given sen-
sor in a device’s sensor suite.
Transfer Frequency which defines how often a
node will attempt to transmit data to the sink.
These parameters are used to determine expected
node behaviour with the gateway.
The following sections discuss the node and gate-
way software architecture and behaviours, as well as
node-gateway interactions and transmission time slot
determination.
3.1 Node Architecture
Figure 4: The three phase LoRa eXchange protocol system.
Nodes operate in one of three stages during their life-
time (Figure 4).
1. Idle - During the idle phase, devices operate in a
predetermined low energy phase.
2. Sample - During the sample phase, devices com-
plete the required sampling and local processing
of data as required by the sensor suite which can
include storing data in a local persistence layer.
The transceiver is left in a low energy state during
this phase and the mechanics of sampling is spec-
ified by the the application. Any data or messages
required to be sent to the sink are constructed and
transferred to the transmission queue which will
be serviced during the communication phase.
3. Communication - During the communication
phase, the node will switch to a transmission
Practical Precision Agriculture with LoRa based Wireless Sensor Networks
135
phase. During this phase, the node will attempt
to transmit all data messages in the transmission
queue.
In provisioning the system, consideration must be
given to the the amount of data that is being transmit-
ted along with the SF, channel bandwidth and coding
rate for the LoRa transceiver. In some regions devices
are limited to a strict time on air or channel idle times
when operating in the ISM band. The overarching
goal is to have the device on the air as little as possible
and minimize the amount of data being transmitted.
3.1.1 Transmission Queue
Each node maintains a queue to manage the transmis-
sion of data to the sink. When data is generated during
the sampling phase, each sample set is added to the
queue in order. Data sets will be transmitted based on
the order of sampling. When the node enters into the
communication phase, it will attempt to transmit the
queued messages to the sink. Each sample is trans-
mitted to the gateway utilizing a reliable datagram. If
the gateway acknowledges receipt of a sample, it is
removed from the queue and the node will attempt to
transmit the next element in the queue.
If the node does not receive a response within a
given timeout period, a re-transmission will be at-
tempted. The sensor node will attempt to transmit
the sample in the front of the queue until it receives
acknowledgment or until it has attempted an amount
of transmissions equal to the current size of the queue
(number of elements currently held). If the gateway is
not available at a given time slot, the samples will re-
main in the queue and are transmitted during the next
scheduled transmission. Configuration of the sample
and transfer frequencies need to consider the size of
the data being transmitted in addition to the number of
devices in the network (the number of available time
slots) to ensures proper queue management, such that
it does not fill up quickly.
3.2 Gateway Architecture
The gateway is constructed from a single channel
LoRa transceiver coupled with a Raspberry Pi sin-
gle board computer. This reduces costs significantly
while supporting the ability to customize packets. As
a result of the long transmission distance of the LoRa
physical layer, the system utilizes a single gateway.
The majority of target installations are smaller in size
than the transmission distance for LoRa eliminating
the need for complex routing and device-to-device
synchronization.
The gateway is continuously powered and pro-
vides access services for the nodes and users. It
provides a local database that maintains information
about the gateway transceiver, sensor node configura-
tions, geo-location information for nodes and the data
generated by each node. It also controls synchroniza-
tion of sampling and communication parameters be-
tween nodes and the gateway. Additionally, it main-
tains a local web server allowing users to interact with
the gateway and nodes, and provides an MQTT hook
so sensor data can be published to an external broker.
3.2.1 LoRa-X Interaction Models
When a new node is initially powered in the network,
it will send its unique serial number to the gateway
until it receives a response. The serial number is
based on the unique 128-bit serial number assigned to
the microprocessor at manufacturing. With LoRa-X,
as devices only need to be uniquely identified within
the local cluster, this address is only used to uniquely
identify the node during initialization. For regular
communications, the sensor node will utilize a logical
ID assigned by the gateway for local communications.
The size of the logical ID can be adjusted depending
on the number of logical devices in the network. The
logical ID is used for addressing to reduce the number
of bytes required during transmissions.
When the gateway receives the serial number from
the sensor node, it will query its local database to de-
termine if the node has already been synchronized
and assigned a logical ID. If the unique 128-bit se-
rial number does not exist in the system, the gateway
will generate and assign a logical ID. If the node is
already registered with the gateway, the current con-
figuration information and logical ID will be queried.
The gateway will return to the node the assigned logi-
cal ID, the current gateway date and time, and the de-
sired sample frequency and transmission interval fre-
quency. Once a node has been assigned a logical ID
and received its sample frequency information, it is
considered to be synchronized.
The gateway maintains a local web service that
allows a user to connect to the gateway and add ad-
ditional node configuration information, descriptions,
and coordinates. A user can change configuration
information regarding sampling and transmitting fre-
quencies. Changing either of sampling or transfer fre-
quency will update the sync status to Required, and
will flag the gateway to initiate a re-synchronization
with the sensor node during the target node’s next
time slot. This allows for the parameters of the net-
work devices to be modified without having to restart
the network.
During normal operations, a node will transmit
data to the gateway during its calculated time slot.
When data is received from a node, the gateway
WSN4PA 2021 - Special Session on Wireless Sensor Networks for Precise Agriculture
136
Figure 5: Autonomous greedy time slot determination.
parses sensor sample data, inserting the payload into
the gateway database. The gateway acknowledges the
successful receipt of data from a node.
3.3 Autonomous Greedy Time Slot
Determination
The goal is to allow the network to converge to a state
where nodes are not transmitting at the same time in-
terval to reduce the energy expenditure. Unlike other
LoRaWAN techniques that use pure Aloha (Hax-
hibeqiri et al., 2018), slotted-Aloha (Polonelli et al.,
2019) or autonomous slot assignment (Zorbas et al.,
2020), sensor nodes utilize a transmission frequency
interval and channel inactivity to determine an avail-
able unstructured time slot. The goal of the time slot
algorithm is for a node to determine an available time
window and attempt to utilize the same interval for
future communications.
For a node to determine its time slot, it first listens
for channel activity. If the channel becomes free, a
node will attempt to transmit messages currently be-
ing held in the queue. If the message transmission
is successful, the node will receive an addressed ac-
knowledgement from the gateway. The next time slot
for transmission is calculated as:
time
slot
t+1
= t
window end
+ t
CI
(1)
where time slot
t+1
is the start time of the next avail-
able window for the local device, t
window end
is the end
time of the last successful transmission window and
t
CI
is the requested interval between communication
events. The assumption is that t
CI
t
window
. Each
node uses the local real time clock to determine the
end of the last transmission that was acknowledged
successfully and calculates the start of the next win-
dow by adding the required communications interval
time.
Neither Aloha, where nodes attempt to transmit
when they have data and use an exponential back-off
(windowless), or slotted Aloha, which uses discrete
time-slots for transmission, use the status of the last
transmission windows as a basis for determining the
next likely available transmission window. With the
proposed protocol, as each node listens before trans-
mission, no two nodes will have the same window end
time for any transmission. In the event that two or
more devices attempt to transmit at the same time, the
gateway will only acknowledge one device, forcing
the other to re-enter the transmission cycle.
Consider Figure 5 which demonstrates the time-
line for three nodes autonomously determining the
next available time slot. For node 1, as the channel
is clear, it is able to transmit and receiving an ACK
without contention, thus determining the next time
slot during which it should attempt communications.
For nodes 2 and 3, they both determine that the
channel is busy and wait for the channel to go idle. In
the example, both devices detect a clear channel and
attempt to start their transmission window. While the
transmission window represents a probabilistic time
period where there are no other devices transmitting,
each individual packet transmission is handled in a
pure-Aloha fashion to resolve single over-the-air col-
lisions. In this example, node 2 is acknowledged forc-
ing node 3 to wait an additional time period before
attempting to re-transmit again.
To reduce the chances of collision, nodes use a
randomized back-off factor during the initial startup
to reduce the probability of multiple devices attempt-
Practical Precision Agriculture with LoRa based Wireless Sensor Networks
137
ing startup at the same time interval. While the chance
exists that a large number of devices will transmit at
the same time during startup, the practical implemen-
tation of this is low due to randomized offset, and
clock imprecision and drift in each node.
4 PROTOTYPE
IMPLEMENTATION
An experimental network deployment was developed
to validate the LoRa eXchange protocol connecting a
series of nodes to a gateway (Figure 6). The central
gateway is a Raspberry Pi 3 B+, with a 1.4 GHz pro-
cessor, 1 GB of SDRAM memory, WiFi and microSD
memory card support. The gateway uses the same
RF95 LoRa radio transceiver as the sensor nodes at-
tached to a Dragino LoRa Pi hat.
Nodes are based on the Feather M0 + LoRa open-
source platform which uses a Microchip SAMD21
ARM based processor running at 48 MHz and an
RF95 LoRa transceiver. Each node contains a ther-
mistor for temperature sampling as well as the ability
to report its own battery voltage level. Devices also
contained a digital BME280 sensor
4
which measures
relative humidity, temperature and barometric pres-
sure. Control of transceivers was done with the open-
source RadioHead packet radio library
5
that allows
for direct control of the LoRa transceiver as well as
providing reliable and addressable communications
between transceivers.
Figure 6: The LoRaX gateway and node architecture.
Local to the Raspberry Pi, a MySQL database is
used to store information about the central gateway,
4
https://www.bosch-sensortec.com/products/environmental-
sensors/humidity-sensors-bme280/
5
https://www.airspayce.com/mikem/arduino/RadioHead/
Figure 7: The LoRaX gateway and node configuration.
Figure 8: The LoRaX gateway dashboard showing list of
samples with filter options.
sensor nodes, and sensor samples, which are visible
through a web portal (Figure 7). The Gateway has
attributes for a description and GPS coordinates. A
gateway can be named and pinned on a satellite net-
work map within the user interface.
A description and GPS coordinates are also cap-
tured for each node as well as information used by the
gateway while synchronizing with sensor nodes. The
device serial number is used to identify sensor nodes
before synchronization. Timestamp attributes are in-
cluded to track a sensor node’s most recent transmis-
sion and synchronization with the gateway. Lastly,
there is data storing the number of minutes a sensor
node should wait before sampling and transmitting
samples. The gateway contains an MQTT hook al-
lowing it to publish sensor data to an external MQTT
broker for use by other applications.
A test deployment was installed to evaluate net-
work performance. Node and gateway placement can
be viewed on the network map using the Google Maps
API and allows for the configuration of the connected
components.
On power up, the sensor nodes synchronize with
the gateway and start sampling based on the sampling
and communication intervals provided by the gate-
way. Data that has been received at the local gate-
way can be viewed by logical node ID, and sensor
WSN4PA 2021 - Special Session on Wireless Sensor Networks for Precise Agriculture
138
Figure 9: The LoRaX gateway for longitudinal visualization
of temperature data.
type (Figure 8). The samples list can be filtered to
only display sensor data for a specific node and sensor
type. Longitudinal data analysis can also be viewed
for multiple nodes by sensor type (Figure 9).
5 CONCLUSIONS AND FUTURE
WORK
Wireless sensor networks can increase sustainability
in agriculture by providing growers with usable data.
Through the use of open-source software and hard-
ware designs, coupled with LoRa transceivers, inex-
pensive and power efficient sensing solutions can be
developed for agriculture allowing for long transmis-
sion distances and wide coverage from a single gate-
way installation.
The wireless sensor network developed in this
project uses LoRa transceivers and an efficient chan-
nel management mechanism to reduce energy usage
for data transmission with a novel collision handling
protocol. The architecture is easily deployed and
maintained.
Future work will investigate detailed performance
characteristics for the LoRa eXchange protocol. Ad-
ditionally, a large scale network will be deployed in
an agricultural setting to demonstrate the benefits of
precision agriculture and ease of use of the approach.
REFERENCES
AgriService BC (2018). Apple Scab Management in British
Columbia.
Akyildiz, I. F., Su, W., Sankarasubramaniam, Y., and
Cayirci, E. (2002). A Survey on Sensor Networks.
Communications Magazine, IEEE, 40(8):102–114.
Beckwith, R., Teibel, D., and Bowen, P. (2004). Report
from the field: results from an agricultural wireless
sensor network. In 29th Annual IEEE International
Conference on Local Computer Networks, pages 471–
478.
British Columbia Ministry of Agriculture (2015). Grape
powdery mildew.
Buratti, C., Conti, A., Dardari, D., and Verdone, R. (2009).
An Overview on Wireless Sensor Networks Technol-
ogy and Evolution. Sensors, 9(9):6869–6896.
Cagnetti., M., Leccisi., M., and Leccese., F. (2020). Re-
liability Comparison of Routing Protocols for WSNs
in Wide Agriculture Scenarios by Means of ηL Index.
In Proceedings of the 9th International Conference on
Sensor Networks - Volume 1: WSN4PA,, pages 169–
176. INSTICC, SciTePress.
Culler, D., Estrin, D., and Srivastava, M. (2004). Guest
Editors’ Introduction: Overview of Sensor Networks.
Computer, 37:41–49.
Davcev, D., Mitreski, K., Trajkovic, S., Nikolovski, V., and
Koteli, N. (2018). IoT Agriculture System Based on
LoRaWAN. In 2018 14th IEEE International Work-
shop on Factory Communication Systems (WFCS),
pages 1–4. IEEE.
Ert
¨
urk, M. A., Aydın, M. A., B
¨
uy
¨
ukakkas¸lar, M. T., and
Evirgen, H. (2019). A Survey on LoRaWAN Archi-
tecture, Protocol and Technologies. Future internet,
11(10):216.
Fazackerley, S. and Lawrence, R. (2010). Reducing Turf-
grass Water Consumption Using Sensor Nodes and an
Adaptive Irrigation Controller. In 2010 IEEE Sensors
Applications Symposium (SAS), pages 90–94.
Fazackerley, S., Paeth, A., and Lawrence, R. (2009). Clus-
ter Head Selection Using RF Signal Strength. In
2009 Canadian Conference on Electrical and Com-
puter Engineering, pages 334–338.
Garofalo, E. and Cooley, D. (2020). When Weather Goes
Wrong: Managing Apple Scab in a Changing Climate.
Georgiou, O. and Raza, U. (2017). Low Power Wide Area
Network Analysis: Can LoRa Scale? IEEE Wireless
Communications Letters, 6(2):162–165.
Haxhibeqiri, J., De Poorter, E., Moerman, I., and Hoebeke,
J. (2018). A Survey of LoRaWAN for IoT: From Tech-
nology to Application. Sensors (Basel, Switzerland),
18(11):3995.
Heinzelman, W. B., Chandrakasan, A. P., and Balakrish-
nan, H. (2002). An Application-Specific Protocol Ar-
chitecture for Wireless Microsensor Networks. IEEE
transactions on wireless communications, 1(4):660–
670.
Jawad, H., Nordin, R., Gharghan, S., Jawad, A., and Is-
mail, M. (2017). Energy-Efficient Wireless Sensor
Networks for Precision Agriculture: A Review. Sen-
sors (Basel, Switzerland), 17(8):1781.
Kokten, E., Caliskan, B. C., Karamzadeh, S., and Soyak,
E. G. (2020). Low-Powered Agriculture IoT Systems
with LoRa. In 2020 IEEE Microwave Theory and
Techniques in Wireless Communications (MTTW),
volume 1, pages 178–183. IEEE.
Kumar, S., Kumar, N., and Saini, R. K. (2019). Energy-
Saving Sensors for Precision Agriculture in Wireless
Sensor Network: A Review. In 2019 Women Institute
of Technology Conference on Electrical and Computer
Engineering (WITCON ECE), pages 65–70.
Practical Precision Agriculture with LoRa based Wireless Sensor Networks
139
Lavric, A. and Petrariu, A. I. (2018). LoRaWAN Commu-
nication protocol: The New Era of IoT. In 2018 Inter-
national Conference on Development and Application
Systems (DAS), pages 74–77.
Ojha, T., Misra, S., and Raghuwanshi, N. S. (2015). Wire-
less Sensor Networks for Agriculture: The State-of-
the-Art in Practice and Future Challenges. Computers
and Electronics in Agriculture, 118:66 – 84.
Polonelli, T., Brunelli, D., Marzocchi, A., and Benini, L.
(2019). Slotted ALOHA on LoRaWAN-Design, Anal-
ysis, and Deployment. Sensors (Basel, Switzerland),
19(4):838.
Pottie, G. J. and Kaiser, W. J. (2000). Wireless Integrated
Network Sensors. Commun. ACM, 43(5):51–58.
Raza, U., Kulkarni, P., and Sooriyabandara, M. (2017). Low
power wide area networks: An overview. IEEE Com-
munications Surveys Tutorials, 19(2):855–873.
Romer, K. and Mattern, F. (2004). The Design Space of
Wireless Sensor Networks. Wireless Communications,
IEEE, 11(6):54–61.
Semtech (2020). What are LoRa and LoRaWAN?
Sornin, N. e. a. (2017). LoRaWAN 1.1 Specification.
Vieira, M. A. M., Coelho, C.N., J., da Silva, D.C., J., and
da Mata, J. M. (2003). Survey on Wireless Sensor
Network Devices. In Emerging Technologies and Fac-
tory Automation, 2003. Proceedings. ETFA ’03. IEEE
Conference, volume 1, pages 537–544.
Zorbas, D., Abdelfadeel, K., Kotzanikolaou, P., and Pesch,
D. (2020). TS-LoRa: Time-slotted LoRaWAN for the
Industrial Internet of Things. Computer Communica-
tions, 153:1 – 10.
WSN4PA 2021 - Special Session on Wireless Sensor Networks for Precise Agriculture
140