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

2019 1st Global Power, Energy and Communication Conference (IEEE GPECOM2019), June 12-15, 2019, Cappadocia, Turkey

ZigBee and LoRa based Wireless Sensors for Smart


Environment and IoT Applications
Ayanle I. Ali1, Sibel Zorlu Partal1, Salih Kepke1, Hakan P. Partal1,2
1Yildiz Technical University, Istanbul, Turkey, 2Syracuse University, Syracuse, NY, USA
aliayanle19@gmail.com, zorlu@yildiz.edu.tr, hpartal@ieee.org

Abstract— A communication system, which employs ZigBee knowledge about the reliability and performance of LoRa and
and LoRa communication protocols is designed, developed, and LoRaWAN technologies in a typical environment. The results
tested in this experimental paper. The designed system contains have shown that LoRa technology can be reliable for low-cost
a central receiver unit with LoRa and ZigBee transceiver remote sensing applications. In [5], analysis of the
modules, a microcontroller, a wireless sensor card with performance of a Low-Power Wide Area Network (LPWAN)
temperature and humidity sensors, LoRa and ZigBee based on LoRa technology is investigated. Authors in [5] did
transceiver modules, and a relay unit. The relay in the sensor an experimental validation of various performance metrics of
card can be remotely or cloud-based controlled, and the LoRa LPWAN technology. Authors in [6] evaluated the
temperature and humidity data from the sensor can be sent to
performance of LoRa based IoT applications in a university
the central receiver unit by using the ZigBee or LoRa
transceiver modules. The microcontroller was configured and
campus in Taiwan. They used a PM2.5 air quality monitoring
programmed by using the evaluation version of system to show the performance of LoRa. They examined the
STM32CubeMX and Kiel µVision Integrated Development transmission performance of LoRa from the nodes (end-
Environment (IDE). PCB designs of the central receiver unit devices) to the LoRa gateway, and they described how packet
and the wireless sensor card were done by using DipTrace CAD losses were affected by the distance between the nodes and the
software. Sub-components of the system were manufactured, gateway, the payload, the transmit power, the antenna angle
assembled and tested for its functionality, communication and the weather conditions.
efficiency and range. The practical design and reported results
given here are beneficial to communication engineers for low- II. ZIGBEE AND LORA TECHNOLOGIES
power, long-range smart Internet of Things (IoT) system
A. ZigBee Technology
applications. Taking advantage of the complementing
performances of ZigBee and LoRa wireless technologies, a ZigBee is a wireless technology developed by ZigBee
diversified communication system with smart features is alliance to enable low-cost, low-power, low-data-rate
proposed, designed, and tested in a single IoT system. Machine-to-Machine (M2M) communications and IoT
networks [7]. ZigBee compliant wireless devices are expected
Keywords— LoRa, ZigBee, IoT, Wireless Sensors, STM32 to transmit in a range of 10-75 meters, depending on the Radio
Frequency (RF) environment and the output power [8].
I. INTRODUCTION
ZigBee operates in the unlicensed Industrial Scientific and
Internet of Things (IoT) is a system of computing devices, Medical (ISM) frequency bands, such as 2.4GHz, 915MHz
digital machines, objects, animals or people that are given and 868MHz [8]. ZigBee supports three kinds of wireless
Identifiers (IDs). These things can transfer data over a network network topologies which are Mesh, Star and Cluster Tree [8].
by using wireless technologies and without the requirement of A typical ZigBee network consists of several types of devices
computer or human interactions [1]. IoT allows physical such as a network coordinator, Full Function Device (FFD)
objects to see, hear, think and to communicate with each other and Reduced Function Device (RFD) [8]. The ZigBee stack
to share data and information and to coordinate decisions. IoT architecture is made up of a set of blocks called layers, these
also changes these objects from being traditional to smart layers are the Open System Interconnection (OSI) layers, and
objects [2]. Based on their characteristics IoT devices use a it’s defined by IEEE 802.15.4 and ZigBee Alliance [9]. The
number of different technologies in order to support their physical layer ( PHY) and the Medium Access Control (MAC)
communication characteristics. For instance, Wi-Fi is sub-layer are defined by IEEE 802.15.4 while the network
available everywhere and transmits large data, but it is not a layer (NWk) and framework for the application layer are
low energy solution which makes it not the best solution for defined by ZigBee Alliance [9].
IoT applications. IoT devices are designed to utilize ultra-low
energy and send only a small amount of data. ZigBee which is B. LoRa Technology
low-power and low-data-rate wireless technology seems to be LoRa (Long Range) is a spread spectrum modulation
a candidate for IoT devices, but it cannot be used for outdoor technique that provides significantly longer-range transfer of
wireless communication systems due to its limited short data and information with a low transfer rate than the
distance coverage, whilst LoRa technology has the long-range competing technologies [10]. LoRaWAN is a LPWAN
and star network feature. protocol which is based on LoRa modulation and was
intended to remotely connect battery operated things to the
A new model which is energy efficient ZigBee Body Area internet in local, regional or worldwide networks [11].
Network (BAN) is proposed in [3], and the aim to present this LoRaWAN protocol uses the unlicensed radio spectrum in the
model was to provide quality solutions in the field of BAN ISM band, such as 433MHz, 868MHz and 915MHz [11].
and eHealth. The model consists of six ZigBee sensors and a LoRaWAN network is implemented by using a star network
sink node placed on a human body. The authors concluded topology and the structure of the network architecture can be
that the model serves as a realistic image of evaluation of the divided into two parts, back-end and front-end part [10]. The
BAN. In [4], the indoor and outdoor performance of LoRa and back-end part is the network server which is used to store the
LoRaWAN technologies was evaluated in Glasgow city- information sent by the sensors while the front-end consists of
Scotland, the purpose of this evaluation was to have enough end devices and a gateway, the gateway is the intermediate

978-1-5386-8086-5/19/$31.00 ©2019 IEEE

19
2019 1st Global Power, Energy and Communication Conference (IEEE GPECOM2019), June 12-15, 2019, Cappadocia, Turkey

device that forward packets coming from the end devices to III. DEVELOPMENT OF ZIGBEE AND LORA BASED
the network server [10]. LoRa allows the usage of scalable COMMUNICATION SYSTEM
bandwidth of 125kHz, 250kHz or 500kHz [12]. LoRaWAN
The ZigBee and LoRa based communication system was
has three different classes of end-devices to address various
designed, developed, and experimentally tested in
needs of applications and they are Class A, Class B and Class
Radarcomm R&D facilities at Yildiz Technical University
C [13]. These end-device classes trade off network downlink
campus in Istanbul, Turkey. The designed system contains a
communication latency versus battery lifetime. The battery
central receiver unit and a wireless sensor card placed in a
lifetime versus downlink communication latency of
room. The schematic diagram of the designed central receiver
LoRaWAN end-devices is given in Fig.1 [13].
unit is shown in Fig.2. The central receiver unit consists of a
Microcontroller Unit layer (MCU), a communication layer
with ZigBee and LoRa transceiver modules and a power
source layer. The MCU layer in the central receiver unit
provides full control of the system, i.e., it is responsible for the
identification of the sensor cards to be added to the system and
the control of sensors and relays connected to these devices.
The MCU communicates with ZigBee modules through the
Universal Asynchronous Receiver/Transmitter (UART)
interface, whilst it communicates with LoRa modules through
Serial Peripheral Interface (SPI).

Downlink Network Communication Latency


Fig.1. Classes of LoRaWAN end-devices

TABLE I. Comparison of wireless technologies


Technology Z-Wave Bluetooth Wi-Fi ZigBee LoRa
Frequency 868 MHz 2.4 GHz 2.4 GHz 868 MHz 868 MHz
915MHz 5 GHz 915 MHz 915 MHz
2.4 GHz 433 MHz
Modulation FSK/GFS FHSS QPSK DSSS CSS
K OFDM BPSK
QAM O-QPSK

Range 30-100m 10 m 100 m 10-100 m Up to 10


km

Data Rate 64 Kbps 1 Mbps 11 & 54 Mbps 250 Kbps Up to 50

Kbps
Topology Mesh Star and Star and Star and Star
Mesh Point-to-point Mesh

Network Size 232 7 Depends on # 64000 1000


of IP addresses

Power Low Medium High Low Low


Consumption Power

Number of N/A 19 13 11 and 16 10


Channels

As it’s very important for any LPWAN to have security,


LoRaWAN uses network and application security layers. The
network security certifies the authenticity of the end device in
the network while the application layer security guarantees the
network operator does not have access to the end user’s
Fig.2. Schematic circuit diagram of the central receiver unit
application data [13]. One of the main advantages of LoRa is
that it consumes less power and covers a wide range which The schematic circuit diagram of the designed sensor card is
makes it an ideal candidate for IoT applications. In Table 1, given in Fig.3, it is designed to conform ZigBee based XBee
the comparison of some of the competing wireless modules and SX1278 based LoRa modules. STM32L011
technologies is given [14]. microcontroller is used in the sensor card, and SHTC1 sensor
is used to measure the temperature and humidity of the room.
The received temperature and humidity values are transferred
to the central receiver unit using XBee or LoRa
communication modules.

20
2019 1st Global Power, Energy and Communication Conference (IEEE GPECOM2019), June 12-15, 2019, Cappadocia, Turkey

and link quality between two XBee modules, a range test was
performed by using XCTU which is a multi-platform
application designed by DIGI. One XBee module was
attached to a computer, and another module was used as a
remote module, both in the same network. The local XBee
module was configured to work in an Application
Programming Interface (API) mode, while the remote module
was configured to work in a transparent mode. API and
transparent modes are methods used to send and receive data
to and from the XBee modules. The test involved sending data
packets from one module (local) to another module (remote).
During this process, the XCTU counted the number of data
packets sent and received by both modules and also measured
the Received Signal Strength Indicator (RSSI) value of the
remote XBee module. The remote module was receiving data
packets from the local module at 30 m line-of-sight. In Fig. 4,
the received signal strength over time graph is given, the graph
shows how the remote XBee’s signal strength changes as we
move away from the local XBee module. The RSSI is
measured in dBm, the closer to 0 dBm, the better the signal is.

Fig.3. Schematic circuit diagram of the designed sensor card

The ZigBee based XBee modules used in this design operates


on 2.4 GHz ISM band, and the type of antenna used in this
module is a whip antenna. The whip antenna which resonates
at 433MHz is a flexible wire antenna that can be moved
around to increase the signal strength, and it has range
advantage over the chip antenna. XBee Modules with
different frequencies cannot be mixed in the same network. Fig.4. RSSI chart of the remote XBee module
The supply voltage, operating current, output power, and the
A. LoRa Communication Testing
communication distance of the XBee modules are: 3.3V,
50mA, 1 mW (+0 dBm) and 30 m respectively. The SX1278 A line-of-sight test was performed and two identical
based LoRa modules used in this experiment operates on SX1278 based LoRa transceivers were used. One of the LoRa
433MHz ISM frequency band, and the whip antenna transceivers was installed stationary on Yildiz Technical
connection is provided by using Subminiature Version A University campus, whilst the other transceiver was used as a
remote unit. For convenience, one of the LoRa modules was
(SMA) connector. The output power, supply voltage,
connected to a temperature and humidity sensor and
operating frequency, communication speed, receiver
programmed with Arduino Nano, while the other remote
sensitivity and the tested communication distance of the module was connected to a mobile phone via USB On-The-
LoRa modules are: 63mW (+18dBm), 2.5-3,7V, 433MHz, Go (OTG). In Fig. 5, the LoRa modules used during the range
300kbps, -141 dBm, 400 m respectively. The hardware test is shown. Serial USB terminal was installed on an android
materials used in this system are as follows: phone and communication between the two LoRa modules
• 2x ZigBee based XBee RF modules; was monitored on the mobile phone screen. Data was
• 2x SX1278 based LoRa Modules; collected by walking and carrying the remote LoRa module
• STM32F072RB and STM32L011 microcontrollers; through the campus. The remote module was able to get the
• two separate voltage regulators; sensor data from the transmitter module at 400 m line-of-sight,
• 1x SHTC1 sensor; and it also recorded the RSSI values. Fig. 6 shows the sensor
• Relay; data received by the remote LoRa module and the RSSI values
in a serial USB terminal. The Spreading Factor (SF) and
• USB Serial Converter; bandwidth were set to 7 and 125KHz respectively. In LoRa
• 2x PCB cards; communication protocol SF is the number of transmitted bits
• 2x Arduino nano for LoRa communication tests. in one symbol. SF higher than 7 means lower-data and longer-
range. With a Global Positioning System (GPS) mobile
IV. TESTING AND RESULTS application the longest distances from which the tested LoRa
A. XBee Communication Testing module can operate is shown in Fig. 7. It was observed that
the system was operating at 400 m when there were no
The communication between XBee modules happens over
obstacles in front of the antenna and after 400 m the remote
the air and the quality of the signal can be affected by different
module was still able to capture some data packets with a very
factors, such as the line-of-sight issues, antenna style,
low RSSI value.
environment and a reflection of waves. To specify the range

21
2019 1st Global Power, Energy and Communication Conference (IEEE GPECOM2019), June 12-15, 2019, Cappadocia, Turkey

Fig.5. LoRa modules used during the test

Fig.7. A line of Sight test location with GPS mobile application

This experimental study shows that ZigBee and LoRa are


both compatible protocols for smart devices and smart
environment applications. It is concluded that ZigBee
performs better if a mesh network is needed and higher data
needs to be delivered. On the other hand, LoRa performs
better when the distance is longer and the data size is
respectively small. For most applications, LoRa can handle
an extensive star network with ultra-low power feature with
no mesh network is needed. The payload limitation for both
ZigBee and LoRa wireless protocols as well as throughput
analysis is not covered in this paper, which is an open
research. It is concluded by this experimental research that
establishing a dual ZigBee and LoRa based network, with
Fig.6. RSSI and sensor data received by the remote LoRa module benefits of the both utilized by including hardware and
software development, offers diverse and reliable
The midpoint in Fig. 7 is the position of the transmitter communication potential for many smart devices and IoT
module. It was noticed that after -120dBm RSSI value no applications.
data was coming from the transmitter module, and the ACKNOWLEDGEMENT
remote module was showing “device is disconnected”
message. This study has been supported in part by the Scientific and
Technological Research Council of Turkey (TUBITAK)
V. CONCLUSION under TEYDEB program and conducted in Radarcomm R&D
In this experimental study, ZigBee and LoRa based facilities at Yildiz Technical University campus.
wireless sensor network has been developed in one system. A REFERENCES
central device which contains STM32 microcontroller, LoRa
[1] B. Adam B, A. Kumar J and R.Kumar “Lora Based Intelligent Home
and XBee transceiver modules was used as a receiver unit. A Automation System”, International Journal of Engineering and
mobile sensor card which also contains LoRa and XBee Advanced Technology (IJEAT), Vol.6 Issue-3, February 2017.
communication modules and SHTC1 sensor has been [2] A. Al-Fuqaha, M. Guizani, M. Mohammadi, M. Aledhari and M.
developed. The sensor card was able to send sensor data Ayyash, "Internet of Things: A Survey on Enabling Technologies,
(temperature and humidity) to the central receiver unit by Protocols, and Applications," IEEE Communications Surveys &
Tutorials, vol. 17, no. 4, pp. 2347-2376, Fourth quarter 2015.
using either XBee or LoRa as requested by the receiver.
[3] A. Koren and D. Šimunić, "Modelling an energy-efficient ZigBee
There was no direct communication between LoRa and XBee (IEEE 802.15.4) body area network in IoT-based smart homes," 2018
as they use different protocols. A line-of-sight range test for 41st International Convention on Information and Communication
both XBee and LoRa modules was performed with RSSI Technology, Electronics and Microelectronics (MIPRO), Opatija,
2018, pp. 0356-0360.
measurements. XCTU platform was used to test the range of
[4] A. J. Wixted, P. Kinnaird, H. Larijani, A. Tait, A. Ahmadinia and N.
XBee modules while LoRa modules were programmed with Strachan, "Evaluation of LoRa and LoRaWAN for wireless sensor
Arduino to send and receive sensor data from a local LoRa networks," 2016 IEEE SENSORS, Orlando, FL, 2016, pp. 1-3.
module to a remote one. This system is applicable for IoT [5] Juha.P, K.Mikhaylov, M.Pettissalo, J.Janhunen and J.Iinatti
applications such that monitoring and control of the sensor “Performance of a low-power wide-area network based on LoRa
data on a web interface is possible, by only adding an ethernet technology: Doppler robustness, scalability, and Coverage”,
International Journal of Distributed Sensor Networks, 2017, Vol. 13(3).
connection and proper embedded codes.
[6] Wang et al., "Performance of LoRa-Based IoT Applications on
Campus," 2017 IEEE 86th Vehicular Technology Conference (VTC-
Fall), Toronto, ON, 2017, pp. 1-6.

22
2019 1st Global Power, Energy and Communication Conference (IEEE GPECOM2019), June 12-15, 2019, Cappadocia, Turkey

[7] C. M. Ramya, M. Shanmugaraj and R. Prabakaran, "Study on ZigBee


technology," 2011 3rd International Conference on Electronics
Computer Technology, Kanyakumari, 2011, pp. 297-30

[8] L. Y. Hua and Z. J. Xiang, "Smart Home Based on the ZigBee


Wireless," 2012 Fifth International Conference on Intelligent
Networks and Intelligent Systems, Tianjin, 2012, pp. 122-125.
[9] ZigBee Alliance, Document [Online]. http://www.zigbee.org/wp-
content/uploads/2014/11/docs-05-3474-20-0csg-zigbee-
specification.pdf
[10] A. Lavric and V. Popa, "Internet of Things and LoRa™ Low-Power
Wide-Area Networks: A survey," 2017 International Symposium on
Signals, Circuits and Systems (ISSCS), Iasi, 2017, pp. 1-5.
[11] Semtech LoRa Technology, [Online],
https://www.semtech.com/lora/what-is-lora, accessed: 2019-01.
[12] B. Reynders, W. Meert and S. Pollin, "Range and coexistence
analysis of long range unlicensed communication," 2016 23rd
International Conference on Telecommunications (ICT),
Thessaloniki, 2016, pp. 1-6.
[13] LoRa Alliance, Document [Online] https://lora-
alliance.org/sites/default/files/2018-04/what-is-lorawan.pdf.
[14] U. Noreen, A. Bounceur and L. Clavier, "A study of LoRa low power
and wide area network technology," 2017 International Conference
on Advanced Technologies for Signal and Image Processing
(ATSIP), Fez, 2017, pp. 1-6.

23

You might also like