0% found this document useful (0 votes)
28 views13 pages

Design and Development of Low Cost LoRaWAN Gateway Using Raspberry Pi and Analysis of RSSI Packet Loss Vs Distance

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

Design and Development of Low Cost LoRaWAN Gateway Using Raspberry Pi and Analysis of RSSI Packet Loss Vs Distance

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

Design and Development of Low-Cost LoRaWAN

Gateway using Raspberry Pi and analysis of RSSI,


Packet Loss Vs Distance
Chamarthy Sri Bharathi Charan Alla Mitra Teja Aditya Vangaru
Dept of Electrical, Electronics and Dept of Electrical, Electronics and Dept of Electrical, Electronics and
Communication Engineering Communication Engineering Communication Engineering
GITAM Deemed to be University GITAM Deemed to be University GITAM Deemed to be University
Visakhapatnam, Andhra Pradesh Visakhapatnam, Andhra Pradesh Visakhapatnam, Andhra Pradesh
[email protected] [email protected] [email protected]

Vanukuru Naga Sai Kaushik Dr. Budidi Uday Kumar


Dept of Electrical, Electronics and Dept of Electrical, Electronics and
Communication Engineering Communication Engineering
GITAM Deemed to be University GITAM Deemed to be University
Visakhapatnam, Andhra Pradesh Visakhapatnam, Andhra Pradesh
[email protected] [email protected]

Abstract—This paper aims on development of an affordable IoT devices which will be connected through a network.
LoRaWAN gateway using Raspberry Pi, enabling seamless com- Each device equipped with LoRa are known as Nodes or
munication between sensor-equipped nodes and cloud platforms. end systems. Multiples nodes will be present in a network.
LoRaWAN technology provides an efficient and long-range
wireless solution, ideal for connecting IoT devices in remote LoRaWAN systems use end-devices that are connected directly
or challenging environments. By utilizing the Raspberry Pi to one (or more) Gateway(s), in a very similar way as a
as the gateway, leverages its cost-effectiveness and versatility, classic cellular network topology. Also, they use unlicensed
making it accessible for a wide range of applications. The spectrum to transmit data and most of them are open source.
sensor nodes are equipped with various sensors can securely Another important aspect is that they are designed to fill the
transmit data to the Raspberry Pi gateway. The gateway acts
as an intermediary, collecting data from multiple nodes and traditional technology gap by reducing power consumption
facilitating their transmission to the cloud. The Raspberry Pi at long communication distances for the end-devices in the
gateway is equipped with LoRaWAN. Additionally, the gateway network [1].
is designed to support multiple communication channels, allowing LoRaWAN gateway is an intermittent device which connects
compatibility with various cloud platforms. This paper focus on multiple LoRa end systems which are in same network or
replacement of conventional gateways with a low-cost gateway
and can be used in various applications in daily life such as in in a different network. Gateways generally receives the data
agriculture, aquaculture, Industries etc. from various nodes at a time and they temporarily store the
Index Terms—IoT, LoRaWAN, LoRaWAN Gateway, RSSI, data from various nodes and can further transfer the data to
Path Loss destination node or it can send data to cloud over internet.
LoRaWAN gateways are the prime locations in an LoRa
I. I NTRODUCTION network where the data can be directed to internet. There
Development of systems based on IoT architecture are able is a lot of scope in developing applications based on this
to solve many daily life problems nowadays. Development of infrastructure. So, the main purpose of simple LoRaWAN
new age sensors with upmost accuracy and precision are help- gateway is simple which is to store data and to route data.
ing in the development of new applications. Communication Smart Cities, Smart Parking systems, Smart Street lighting,
between systems and sharing of data plays an important key Smart agriculture applications etc. can be developed with the
role in the development of an IoT based application. There LoRa Communication.
will be some applications which requires to communicate over
long distances. LoRaWAN (Long Range Wide Area Network) II. L O R AWAN
enables this medium of long-range communications with low LoRaWAN (Long Range Wide Area Network) is a Media
power consumption. Access Control (MAC) layer protocol that is used to wirelessly
LoRaWAN enables a network of devices which are at long connect any electronic devices over a network. It leverages
distances connected wirelessly with radio communication. the LoRa(Long Range) modulation technique to achieve long-
These kinds of technologies are needed for development of range communication with low power consumption, making it
highly suitable for Internet of Things (IoT) applications that • End Devices: These are the IoT devices equipped with
require electronic devices to send and receive small chunks of LoRa technology that sense, collect, and send data. They
data over a large distance without consuming much energy. operate in a low-power mode to extend battery life,
potentially for years and can communicate bidirectionally,
A. Key Features receiving commands as well as transmitting data.
The Key features and benefits of LoRaWAN include: • Gateways: Gateways serve as the bridge between end
devices and the network server. They receive signals from
• Long Range: LoRaWAN can achieve communication
multiple end devices and forward the data to the network
ranges of up to 15-20 km in rural areas and 2-5 km in
server. LoRaWAN gateways are typically connected to
urban environments, depending on various factors like
the network server via standard IP connections and can
terrain and building density.
serve thousands of end devices within their range.
• Low Power: Devices can run on batteries for several
• Network Server: The network server is the central com-
years, thanks to the low power consumption of the LoRa
ponent that manages the network. It handles packet de-
modulation technique, making it ideal for IoT applica-
duplication from multiple gateways (since messages from
tions where devices need to operate without frequent
end devices can be received by more than one gateway),
battery replacements.
manages the network security (including the encryption
• Secure Communication: LoRaWAN includes built-in
and decryption of messages), performs adaptive data rate
support for end-to-end encryption, ensuring that data
settings, and manages the joining process of new devices.
transmitted across the network is secure from eavesdrop-
It ensures that the data gets routed correctly between end
ping and tampering.
devices and application servers.
• Adaptive Data Rate (ADR): LoRaWAN supports adap-
• Application Server: The application server is responsible
tive data rate, which optimizes data transmission rates
for processing and managing the application data. After
and airtime according to the network conditions and the
the network server handles the data, it forwards the
distance of the end-devices from the gateway, improving
application payload to the application server, which then
power efficiency and network capacity.
interprets the data and makes it available for user appli-
• Network Architecture: The network architecture is typ-
cations. This server is where the business logic resides,
ically deployed in a star-of-stars topology, where end
making sense of the incoming data and possibly sending
devices communicate with gateways that relay messages
commands back to the devices.
to a central network server. This architecture simplifies
• Joint Server: In some LoRaWAN implementations, par-
network setup and reduces operational costs.
ticularly those adhering to the LoRaWAN 1.1 specifi-
• Wide Range of Applications: Due to its versatility,
cation and beyond, there’s a dedicated Join Server that
LoRaWAN is used in a wide range of applications,
handles the initial device authentication and session keys
including smart cities (for monitoring lighting, waste
exchange. This improves security by isolating the process
management, and parking spaces), agriculture (for soil
of key management from other network operations.
moisture and climate monitoring), industrial applications
(for tracking assets and monitoring machinery), and more. These elements work together in a LoRaWAN network to
ensure secure, reliable, and efficient communication between
LoRaWAN is owned and managed by the LoRa Alliance,
IoT devices and the applications that use their data. The design
an open, non-profit association of members who constantly
allows for seamless scalability from a small local network to
work and develop Internet of Things applications. They work
a large-scale deployment covering an entire city or region.
together to drive the global success of the LoRaWAN protocol
by ensuring interoperability between operators in one open
global standard.
In theory, any bandwidth can be used for the LoRaWAN net-
work. In practical terms, due to the spectrum regulations and
physical limits of your transceiver, It can use the bandwidths
available in the spectrum. The most commonly used bandwidth
is 125 kHz, while chips can also modulate between 250 kHz
and 500 kHz, and lower frequencies. In 2.4 GHz LoRa chips
can handle up to a bandwidth of 1.625 MHz.

B. LoRaWAN Network Elements Fig. 1. LoRaWAN Network.

The LoRaWAN network architecture is designed to sup-


port large-scale public networks as well as private ones, en- C. LoRaWAN Gateway
abling long-range, low-power communication among Internet A LoRaWAN gateway, often referred to simply as a gate-
of Things (IoT) devices. It comprises several key elements that way, acts as a bridge between LoRaWAN devices (end nodes)
work together to facilitate this communication: and the network server. It plays a crucial role in the LoRaWAN
architecture, enabling the communication of low-power, long- • Power Consumption: LoRa consumes significantly less
range devices with the internet or a private network. Lo- power than Bluetooth, allowing for extended battery life
RaWAN gateway provides the following services: in IoT devices, especially for applications that involve
• Signal reception and transmission low data rates and periodic communication.
• Multi-channel and multi-modem capabilities • Data Rate: Bluetooth provides higher data rates com-
• Packet forwarding pared to LoRa, making it more suitable for applications
• Bi-directional communication that require real-time data transfer, such as audio stream-
• Network connectivity ing and device-to-device communication.
• Database Management • Deployment Cost: LoRa deployment costs are generally
• Data security lower than Bluetooth, especially for applications that
require long-range communication and deployment over
III. C OMPARISON BETWEEN L O R AWAN AND OTHER a wide area.
WIRELESS TECHNOLOGIES
When comparing LoRa with other wireless communication IV. E-B YTE E32-433T30D L O R A M ODULE
technologies, it’s essential to consider various factors such as
The E-Byte E32-433T30D is a compact, low-power, long-
range, power consumption, data rate, deployment cost, and use
range LoRa module that operates in the 433 MHz frequency
cases. Here is a comparison between LoRa and some other
band, which is one of the common bands used for LoRa
popular wireless technologies:
communication. This module is designed for wireless com-
A. LoRa Vs Wi-Fi: munication applications that require long range, low power
• Range: LoRa offers a longer range (up to several kilo- consumption, and secure data transmission. It’s particularly
meters) compared to Wi-Fi, which has a range of up to suitable for IoT (Internet of Things) projects, remote control
a few hundred meters. systems, and sensor networks, among others. The Key features
• Power Consumption: LoRa consumes less power com- and specifications of E-Byte E32-433T30D LoRa Module are:
pared to Wi-Fi, making it suitable for battery-operated • Frequency Band: The module operates in the 433 MHz
IoT devices that need work for a longer time period. band, which is widely used for long-range communica-
• Data Rate: Wi-Fi provides higher data rates compared tion applications. This frequency band is less crowded
to LoRa, making it more suitable for high data rate than the 2.4 GHz band, offering less interference and
applications, such as video streaming, large file transfer, better propagation characteristics, especially in outdoor
and gaming. environments.
• Deployment Cost: LoRa deployment costs are generally • Transmission Power: The E32-433T30D has an ad-
lower than Wi-Fi, especially for applications requiring justable transmission power of up to 30 dBm (1 Watt).
extensive coverage over a wide area. This high-power output, combined with the sensitivity
of the LoRa modulation technique, enables long-range
B. LoRa Vs Cellular (3G/4G/5G): communication.
• Range: LoRa provides a much longer range compared • Communication Range: The module is capable of
to cellular networks, making it more suitable for ap- achieving a communication range of up to 8,000 meters
plications requiring communication over large distances, (about 5 miles) in open and clear conditions, making it
especially in remote and rural areas. suitable for various remote applications.
• Power Consumption: LoRa consumes significantly less • Data Rate: It supports adjustable data rates, which allows
power than cellular networks, which improves the battery users to balance between communication range and data
life of IoT devices. transmission speed according to their specific application
• Data Rate: Cellular networks offer higher data rates needs.
compared to LoRa, making them more suitable for appli- • Interface: The module provides a simple serial UART in-
cations that require high-speed data transfer and real-time terface, making it easy to integrate with micro-controllers
communication. and other devices for IoT applications.
• Deployment Cost: LoRa deployment costs are generally • Low Power Consumption: It is designed for low power
lower than those of cellular networks, especially for large- consumption, with a sleep mode that significantly reduces
scale IoT deployments that require extensive coverage power usage when the module is not actively transmitting
and minimal infrastructure. or receiving, thus extending the battery life of the device.
• Size and Form Factor: The E32-433T30D comes in a
C. LoRa Vs Bluetooth: small form factor, measuring 24 x 43 mm, which makes
• Range: LoRa has a much longer range compared to it easy to incorporate into compact devices or projects
Bluetooth, making it more suitable for applications that where space is a constraint.
require communication over longer distances and in en- • Configuration: The module can be configured via AT
vironments with obstacles. commands, which allows for easy customization of pa-
rameters such as transmission power, data rate, and The interfacing of UART to USB Converter with E-
operating mode. Byte E32-433T30D LoRa Module is:
• Applications: It’s suitable for a wide range of applica-
tions, including remote monitoring systems, agricultural
sensors, smart city infrastructure, environmental monitor-
ing, and more.

Fig. 4. Interfacing UART to USB Converter with E-Byte E32-433T30D LoRa


Module.

The pin configuration for UART to USB Converter and


E-Byte E32-433T30D LoRa Module is:
Fig. 2. E-Byte E32-433T30D LoRa Module.
TABLE I
The E-Byte E32-433T30D LoRa module stands out for UART TO USB C ONVERTER AND E-B YTE E32-433T30D L O R A
its long-range communication capability, high transmission M ODULE C ONNECTIONS
power, low power consumption, and ease of integration. These
UART to USB E-Byte E32-433T30D
attributes make it an excellent choice for developers and Converter LoRa Module
engineers looking to implement reliable, long-distance wire- Vcc Vcc
less communication in their IoT projects or any application GND GND
RX TX
where remote data transmission is required. Its performance TX RX
characteristics align well with the needs of various sectors,
including agriculture, smart cities, environmental monitoring,
and industrial automation, among others. The RF Setting software for E-Byte E32-433T30D LoRa
Module is interactive software where interfacing the module
A. Configuration of E-Byte E32-433T30D LoRa Module: with UART to USB Converter is to be done and the active
These LoRa Modules are UART interfaced modules so to UART COM port over the available COM ports should be
configure the modules it requires a converter called UART opened so that it can open the port for accessing the mod-
to USB converter. Configuring the module is to set the ule parameters. These are the following parameters that are
module properties and assign the modules with addresses and obtained through the RF Setting software.
channels to the LoRa Modules. Generally, the module can be • UART Rate
operated on two modes programming the module by keeping • Parity
it in operating mode 3 which is configuring mode where it • Air Data Rate
can be accessed by giving M0 and M1 pins of the module • Power
High or “1” or it can be configured by the RF – Setting • FEC Status
software for accessing the module parameters. • Fixed Mode Status
• WOR Timing
• I/O Mode Status
• Address
• Channel
Some standard parameters need to be set to the E-Byte E32-
433T30D LoRa Module for establishing the communication
between the LoRa Modules. For configuration of LoRa Mod-
ules it need to be interfaced with UART to USB Converter
as the module is UART interface based and by that it can be
configured with required parameters.
The parameters that were set to E-Byte E32-433T30D LoRa
Module in order to achieve node-to-node communication are:
Fig. 3. UART to USB Converter.
TABLE II The pin configuration for Arduino UNO and E-Byte E32-
PARAMETERS CONFIGURED FOR E-B YTE E32-433T30D L O R A M ODULE . 433T30D LoRa Module is:
Parameter Description
UART Rate 9600 bps TABLE III
Parity 8N1 A RDUINO UNO AND E-B YTE E32-433T30D L O R A M ODULE
Air Data Rate 2.4Kbps C ONNECTIONS
Power 30dBm
FEC Enable Arduino UNO E-Byte E32-433T30D
Fixed Mode Enable LoRa Module
WOR Timing 250ms 5V Vcc
I/O Mode Push Pull GND GND
Address Range(0-65,535) D5 AUX
Channel Range(0-23) D2 TX
D3 RX
D7 M0
D6 M1
B. Communication Between Modules:

The E-Byte E32-433T30D LoRa Module is tested by creat-


ing 2 nodes and each node is equipped with a LoRa Module
C. Long Range Testing of E-Byte E32-433T30D LoRa Mod-
and a microcontroller such as Arduino UNO or NodeMCU
ule:
or STM32 or a Raspberry Pi Pico. Here the two nodes were
classified as both sender and receiver termed as trans receiver. During the conduction of rigorous long-range testing within
The purpose node to node communication is to find whether a radius of 1 km to evaluate the performance of data trans-
the LoRa modules were actually communicating or whether mission via LoRa technology. Under optimal conditions where
there are any garbage values while the transmission and both the sender and receiver were positioned in a line-of-sight
reception process. The two modules will able to communicate situation, It is observed that the high levels of data transmis-
and exchange the data if those modules are in same frequency. sion with minimal delay. This scenario highlighted the robust-
ness of LoRa communication, particularly in environments
where direct visibility between devices is ensured. Despite
the extended distance, the LoRa signals exhibited remarkable
resilience, maintaining a strong connection between the sender
and receiver.
The absence of significant delays underscored the efficiency
Fig. 5. Communication Testing.
and reliability of the transmission process, demonstrating the
suitability of LoRa technology for long-range communication
The process of testing is by sending some text data at the applications. These findings hold significant implications for
sender end which is one of the 2 nodes where by the help various industries, including IoT deployments, smart agricul-
of microcontroller which transmit the data over LoRa and at ture, and remote monitoring, where reliable data transmission
the receiver node the LoRa will receive the incoming data and over extended distances is paramount. Following the initial
display it over Serial Monitor in the receiver end. Here both the testing within a 1 km radius, The extended investigation to
LoRa’s have same address and channel and they communicate determine the maximum distance for accurate data transfer
with each other in transparent transmission mode. By this using LoRa technology is resulted some findings. The findings
the Node to Node Communication between two E-Byte E32- revealed that, under optimal conditions with a clear line of
433T30D LoRa Modules is achieved. sight between the sender and receiver, the maximum distance
for seamless transmission stood at 2.73 km.
The result signifies the impressive long-range capabilities
of LoRa communication, showcasing its ability to maintain
reliable data transfer even over extended distances. By pushing
the boundaries beyond the initial test range, The gained
valuable insights into the practical limitations and performance
characteristics of LoRa technology. The establishment of a
clear maximum transmission distance is crucial for planning
and deploying LoRa-based systems in real-world applications,
ensuring optimal performance and reliability. This discovery
opens up new possibilities for deploying LoRa networks
in scenarios requiring communication over considerable dis-
tances, such as rural IoT deployments, environmental moni-
Fig. 6. Interfacing E-Byte E32-433T30D LoRa Module with Arduino UNO. toring, and smart city infrastructure.
quality of the wireless signal being received. RSSI values are
indicated by negative dBm values. The higher the number, the
better the signal. The best signal you can receive is -30 dBm,
and -90 dBm is unusable. RSSI, or Received Signal Strength
Indicator, is a metric used to measure the power level of a
received radio frequency (RF) signal. It provides an indication
of how strong or weak a received wireless signal is, typically
expressed in decibels (dBm) or a relative scale.
• Measurement Unit: RSSI is usually measured in deci-
bels (dBm), which is a logarithmic unit representing the
power ratio in decibels relative to 1 milliwatt.
• Signal Strength Interpretation: A higher RSSI value
generally indicates a stronger signal, while a lower value
suggests a weaker signal. RSSI values closer to 0 dBm
represent a stronger signal, while values further from 0
Fig. 7. Long Range Distance Testing of E-Byte E32-433T30D LoRa Module.
dBm indicate a weaker signal.
• Range and Thresholds: The RSSI value can be used to

D. High Data Rate Testing of E-Byte E32-433T30D LoRa estimate the distance between a transmitting device (e.g.,
Module. Wi-Fi router, Bluetooth device) and the receiving device.
Different wireless technologies may have different RSSI
Following assessment of the maximum distance for seam-
thresholds for signal quality (e.g., in Wi-Fi, a higher RSSI
less data transmission using LoRa technology, The high data
is generally better)
rate testing to ascertain the practical limitations regarding
• Limitations: RSSI alone may not provide a complete
data size is conducted. Through this experimentation, wherein
picture of the link quality or reliability, as it does not
data was transmitted every second, It is determined that the
consider factors like interference, noise, or the quality of
maximum size of data that could be sent seamlessly stood at
the received signal. Different devices and manufacturers
58 bytes.
The findings underscores the trade-off between data rate and may use different algorithms and calibrations to deter-
payload size inherent in LoRa communication. While LoRa mine RSSI, leading to variations in reported values.
• Applications: Wireless Networks (Wi-Fi): RSSI is com-
excels in long-range communication, achieving high data rates
necessitates compromises in payload size to maintain reliable monly used in Wi-Fi networks to assess the signal
transmission. The identified limit of 58 bytes provides critical strength between a device and an access point. Bluetooth:
insights for optimizing data transmission protocols and design- RSSI is utilized in Bluetooth technology to estimate
ing applications reliant on LoRa technology. Understanding the distance between paired devices. Wireless Sensor
these limitations enables the development of efficient data Networks: In IoT applications, RSSI can be used to opti-
transfer strategies, ensuring that systems operate within the mize communication between sensor nodes. Localization:
constraints imposed by the LoRa communication protocol RSSI data can be employed for location estimation in
while maximizing the utility of available bandwidth. some applications.
• Influence of Obstacles and Interference: RSSI values
can be affected by obstacles, reflections, and interfer-
ence in the signal path, leading to fluctuations in signal
strength.
• RSSI in Wireless Security: In wireless security, mon-
itoring RSSI can be used to detect unauthorized access
points or devices.
A. Calculation of RSSI With the Distance.
The Received Signal Strength Intensity (RSSI) will be
calculated by using a simple formula:
• RSSI (dB) = Transmit Power(dB) + Antenna Gain(dB) –
Fig. 8. High Data Rate Testing of E-Byte E32-433T30D LoRa Module.
Path Loss(dB)
• Transmit Power = 30 dBm. As, 10*log(dBm) = dB
V. R ECEIVED S IGNAL S TRENGTH I NTENSITY (RSSI) V S • 10*log(30dBm) = 14.771dB
D ISTANCE A NALYSIS • Antenna Gain = 3.6dBi
RSSI stands for Received Signal Strength Indicator. It’s a • As, dB = dBi – 2.15, Antenna gain = 3.6 – 2.15 = 1.45dB
measurement of how well a device can hear a signal from a • Path Loss(dB) = 32 + 20*log (Distance (Km)) + 20*log
router or mobile phone. RSSI values indicate the strength and (Frequency (MHz)), where frequency = 412MHz
After calculating the RSSI for the distances of range (0.1Km Path loss is the ratio of transmit power to receive power.
to 4Km). The obtained values of RSSI in dB are as follows: In a link budget, this refers to the largest transmit power
that the transmitter can send and the smallest receive power
TABLE IV at which the receiver can recover the original information.
RSSI V S D ISTANCE A NALYSIS FOR E-B YTE E32-433T30D L O R A Path loss can occur for a variety of reasons. For example,
M ODULE .
when communicating from Earth to a geosynchronous satellite,
S.No Distance (Km) RSSI (dB) the path loss term is −190 db. Typical values of path loss
1 0.1 -48.0767318 exponents range between 1.5 and 5.
2 0.2 -54.0973317
3 0.3 -57.6191569 Path loss, also known as signal attenuation or free-space
4 0.4 -60.1179316 loss, refers to the reduction in signal strength as a radio
5 0.5 -62.0561319 wave travels through the air or any other medium. It is a
6 0.6 -63.6397568
7 0.7 -64.9786926 fundamental concept in wireless communication systems and
8 0.8 -66.1385315 plays a important role in determining the range and coverage
9 0.9 -67.161582 of wireless networks.
10 1 -68.0767318
11 1.5 -71.598557 Several factors contribute to path loss, and understanding
12 2 -74.0973317 them is essential for designing efficient and reliable commu-
13 2.5 -76.0355319
14 3 -77.6191569 nication systems. The primary factors influencing path loss
15 3.5 -78.9580927 include:
16 4 -80.1179316
• Distance: As the distance between the sender and re-
ceiver increases with time, the signal strength diminishes.
The graph obtained by the values of Received Signal Strength
This is a direct consequence of the spreading of the
Intensity (RSSI) Vs Distance is:
electromagnetic waves over a larger area, leading to a
decrease in signal intensity.
• Frequency of the Signal: Higher frequency signals ex-
perience more significant path loss than lower frequency
signals. This is due to the increased absorption and
scattering of higher frequency waves by atmospheric
gases and objects in their path.
• Obstacles and Absorption: Physical obstacles such as
buildings, trees, and terrain can block or absorb radio
waves, leading to increased path loss. The composition of
materials in these obstacles also affects signal absorption,
with different materials exhibiting varying degrees of
signal attenuation.
• Atmospheric Conditions: Weather conditions and atmo-
spheric constituents can impact path loss. For instance,
Fig. 9. RSSI Vs Distance Analysis for E-Byte E32-433T30D LoRa Module.
rain, snow, and fog can absorb or scatter radio waves,
contributing to signal degradation. In some cases, certain
The above graph of RSSI Vs Distance analysis of E-Byte atmospheric conditions can enhance signal propagation.
E32-433T30D LoRa Module states that as the increase of • Antenna Characteristics: The design and characteris-
distance between nodes results in decrease of Received Signal tics of the antennas used in the communication system
Strength Intensity (RSSI). influence path loss. Directional antennas may provide a
stronger signal in a specific direction but might result in
VI. PATH L OSS V S D ISTANCE A NALYSIS increased path loss in other directions.
Path loss, also known as free-space path loss (FSPL) or • Multipath Fading:In a real-world environment, radio
simply propagation loss, is the reduction in signal strength as waves often take multiple paths to reach the receiver due
a wireless signal travel from a transmitter to a receiver over to reflections, diffraction, and scattering. This can result
a certain distance. It is a natural phenomenon that occurs in in constructive interference or destructive interference,
wireless communication systems and is influenced by various causing fluctuations in signal strength known as multipath
factors. fading.
Path loss is the reduction in power density of an electro- Generally, the wireless channel has more noise. The noise-
magnetic wave as it travels through space. It’s also known as free communication never exists. The AWGN (Additive White
path attenuation. Path loss is a key component in the design Gaussian Noise) model is frequently utilized for characterizing
and analysis of a telecommunication system’s link budget. It’s channel noise in communication systems. It posits that noise is
usually expressed in decibels (dB). added to the signal during transmission, resulting in a received
signal containing both the desired data and the accompanying sideration and mitigation strategies during system design and
noise. An adequate signal level at the receiver relative to the operation. By addressing path loss effectively, communication
noise floor is crucial for reliable detection and decoding of the systems can achieve reliable and efficient performance even
transmitted data. under adverse atmospheric conditions. The graph obtained by
In addition to noise, atmospheric losses can also signif- the values of Path Loss Vs Distance is:
icantly impact the integrity of transmitted signals. When
designing wireless link budgets, various losses are taken into
consideration to account for signal degradation. These losses
include atmospheric absorption, scattering (which encom-
passes phenomena like rain attenuation), reflection, diffraction,
and path loss. Among these, path loss is of particular impor-
tance in long-distance wireless communications.
Path loss refers to the reduction in the signal strength
as it propagates through the transmission medium, typically
the atmosphere. It is influenced by factors such as distance,
frequency of operation, and the presence of obstacles or
obstructions along the transmission path. Understanding and
accurately accounting for path loss is more essential for
Fig. 10. Path Loss Vs Distance Analysis for E-Byte E32-433T30D LoRa
optimizing the performance and reliability of wireless com- Module.
munication systems, especially over extended distances.
The above graph of Path Loss Vs Distance analysis of E-
A. Calculation of Path Loss With the Distance.
Byte E32-433T30D LoRa Module states that as the increase
The Path Loss will be calculated by using a simple formula: of distance between nodes results in increase of Path Loss.
• Path Loss(dB) = 32 + 20*log (Distance (Km)) + 20*log
VII. R ASPBERRY P I A S L O R AWAN G ATEWAY
(Frequency (MHz)), where frequency = 412MHz
After calculating the Path Loss for the distances of range The Raspberry Pi is a small single-board mini computing
(0.1Km to 4Km). The obtained values of Path Loss in dB is device which was invented and developed by the Raspberry
as follows: Pi Foundation in collaboration with Broadcom. Originally
designed to promote teaching of basic computer science in
TABLE V schools of economically weaker countries, the Raspberry Pi
PATH L OSS V S D ISTANCE A NALYSIS FOR E-B YTE E32-433T30D L O R A quickly gained popularity outside its intended market due to its
M ODULE . low cost, modularity, and open design. It has become widely
S.No Distance (Km) Path Loss (dB) used in various areas such as hobbyist projects, education,
1 0.1 64.29794432 digital art, and industrial applications. There have been several
2 0.2 70.31854423 generations of Raspberry Pi, each improving on the last in
3 0.3 73.84036942
4 0.4 76.33914415 terms of CPU speed, memory capacity, networking capabili-
5 0.5 78.27734441 ties, and connectivity options.
6 0.6 79.86096933 The features of Raspberry Pi for LoRaWAN Gateway are:
7 0.7 81.19990512
8 0.8 82.35974406 • LoRaWAN support
9 0.9 83.38279451 • GPIO pins
10 1 84.29794432
• Low-power consumption
11 1.5 87.8197695
12 2 90.31854423 • Ethernet and Wi-Fi connectivity
13 2.5 92.25674449 • Customization and flexibility
14 3 93.84036942
• User friendly
15 3.5 95.17930521
16 4 96.33914415 • Cost-effectiveness
• Software compatibility
The required components for setting up raspberry Pi are:
By comprehensively analyzing path loss and its effects, • Raspberry Pi 4 Model B: This comes in variants with
engineers and designers can develop strategies to mitigate its different RAM capacities (2 GB, 4 GB, and 8 GB), priced
impact and ensure robust communication links. This involves between $35 and $55.
employing appropriate modulation schemes, antenna configu- • Power Supply: A USB type C power adapter is required
rations, and power management techniques to compensate for to power the Raspberry Pi. Branded power adapters
signal attenuation and maintain adequate signal-to-noise ratios typically cost around $10.
at the receiver. • Case: Cases are available from various vendors to protect
So, Path Loss represents a significant challenge in long- the device from physical damage, with prices starting
distance wireless communication, necessitating careful con- from $5.
• Testing and Documentation: This involves testing the
application to ensure that it meets the requirements and
creating documentation for the application.
• Implementation and Training: This involves deploying
the application to production and training users on how
to use it.
• Maintenance: This involves fixing bugs and adding new
features to the application.
Fig. 11. Raspberry Pi at Receiver Side. Applications can be classified into 2 categories:
• Real Time Applications
• Minimal Time Applications

A. Real Time Applications.


In the view of Real Time Application development some
tests are conducted to evaluate the efficacy of transmitting
data via LoRa modules using a Raspberry Pi gateway inte-
grated with a real-time clock generator. This setup aimed to
assess the reliability and efficiency of LoRa communication
Fig. 12. Raspberry Pi interfacing with E-Byte E32-433T30D LoRa Module.
while ensuring synchronized and accurate timekeeping. By
incorporating a real-time clock generator into the Raspberry Pi
• MicroSD Card: An 8 GB microSD card is sufficient to gateway, To ensure precise timing for data transmission, which
load the operating system for booting. However, larger is crucial for maintaining synchronization between the gateway
capacities may be necessary depending on your require- and LoRa nodes. Through rigorous testing, the monitoring of
ments. Alternatively, booting from a USB device is also the transmission of data packets over varying distances and
an option. environmental conditions is needed for evaluating factors such
• IO Devices: Mouse, keyboard, monitors, and cables may as packet loss, latency, and overall reliability. The utilization
be needed depending on the project’s requirements. These of the real-time clock generator enabled us to synchronize
peripherals are not mandatory as it’s possible to work on data transmission intervals and accurately timestamp received
the Raspberry Pi without them. data, facilitating streamlined data processing and analysis. The
• Other peripherals: Various supporting devices such as findings provide valuable insights into the practical imple-
heat sinks, cooling fans, cameras, and sensors are avail- mentation of LoRa technology for long-range communication
able in the market to enhance functionality. applications, highlighting the significance of synchronized
• Operating System: The Raspberry Pi Foundation offers timekeeping for optimizing performance and ensuring seam-
an operating system called Raspberry OS, which is a less data transmission. The applications of real-time testing
customized version of Debian Linux. Alternatively, there are:
are several open-source operating systems available for • Strict timing constraints.
use with the Raspberry Pi. • Will meet specific deadlines.
• Crucial in airline operation, medical equipment, and
VIII. A PPLICATIONS
industrial automation.
Applications are the derivatives of any developed infras-
tructure. Applications are developed based on the problem B. Minimal Time Applications.
statement or cause of an issue. Application development is the In the view of Minimal Time Applications development,
process of creating both software and hardware applications It was aimed to assess the effectiveness of transmitting data
to aid customers with computer tasks or programs. It involves via LoRa technology using a Raspberry Pi gateway integrated
gathering business requirements, designing, prototyping, cod- with a real-time clock generator, while minimizing data trans-
ing, testing, and ongoing improvements and debugging of mission frequency. Specifically, The conduction of tests is
software. Application development can be broken down into done where data packets were sent only once per hour. By
six steps: employing this minimal-time testing approach, It is sought to
• Planning and Requirements: This involves gathering evaluate the reliability and efficiency of LoRa communication
business requirements and defining the scope of the under conditions of infrequent data transmission. The inclusion
project. of a real-time clock generator in the Raspberry Pi gateway
• Analysis and Design: This involves creating a detailed ensured precise timing for data transmission intervals, allowing
design of the application, including its architecture, user us to synchronize the transmission process with minimal effort.
interface, and database. Throughout the testing, the monitoring of the transmission
• Programming and Construction: This involves writing of data packets over varying distances and environmental
the code for the application. conditions is needed for evaluating the factors such as packet
loss, latency, and overall reliability. Despite the reduced fre-
quency of data transmission, the real-time clock generator
facilitated accurate time stamping of received data, enabling
streamlined data processing and analysis. The findings will
provide valuable insights into the practical implementation of
LoRa technology for long-range communication applications,
demonstrating the feasibility of infrequent data transmission
intervals while maintaining synchronization and reliability.
The applications of minimal-time testing are:
• Emphasizes reducing overall time delay and latency.
• Useful in scheduled monitoring systems.
• Prioritizes minimizing delays for a more responsive ex-
perience.

C. RTC (Real Time Clock) Module. Fig. 14. RTC (Real Time Clock) Module interfacing with Arduino UNO
A real-time clock generator is a critical component in (LoRa Node).
electronic devices that enables them to keep track of time
accurately and reliably. Unlike traditional clocks, a real-time D. Data Format.
clock generator operates independently of external factors
such as power outages or system resets, ensuring continuous The data which will be sent to the receiver needs to be in a
timekeeping even in adverse conditions. It typically consists format in order to store it in a database at the receiver side and
of a quartz crystal oscillator circuit, which generates precise to host the data on a website. For every node there are some
electrical pulses at a consistent frequency. These pulses are important parameters for the nodes that should be hosted and
then divided and processed to produce accurate timestamps regularly updated in the website.
for various operations within the device. Real-time clock They are:
generators play a crucial role in various applications, including • Node ID: Tells from which node data is coming.

embedded systems, consumer electronics, industrial automa- • Node Status: It resembles the current status of node.

tion, and communication devices, where precise timekeeping • Data Mode: It tells the mode of the data transmission

is essential for synchronization, scheduling, and data logging. (R.T or M.T)


• Data: This is the data that is obtained from the node. Here
R.T resembles Real Time and M.T resembles Minimal
Time.
The data format is followed while sending the data from the
sender to the receiver is as follows:
N ode − Status − M ode − Data (1)

Fig. 15. Sending Data Format.

Fig. 13. RTC (Real Time Clock) Module.


IX. I NTERACTIVE W EB PAGE D EVELOPMENT
The interfacing of RTC (Real Time Clock) Module with the An interactive and creative website should be developed for
Arduino UNO where it is a LoRa Node which sends the data the hosting of the local data over to the internet so that any
to the Gateway is: one able to access the Node data. So, for the webhosting of
Node data, There is a need to develop a website. So first it A. Front-end and Back-end Development.
requires a prototype design of the website. The website, created using the Python Flask framework and
There is a process to follow for the develop of this website connected to an SQLite3 database, serves as an interactive
and it involves some steps: dashboard to display data from various nodes, each represented
as a table within the database. Flask, a lightweight and flexible
• Design: The website design process involves defining the Python web framework, facilitates the development of web
website’s overall look and feel, as well as its user inter- applications, including dynamic web pages that can respond
face (UI) and user experience (UX). This includes creat- to user input and queries. In this case, Flask routes are defined
ing a sitemap, wireframes, and mockups. The flowchart to fetch data from the SQLite3 database, where each node’s
shows that the frontend of the website will be designed data—such as timestamps, data modes, statuses, and sensor
using HTML, CSS, and JavaScript. HTML provides the readings—is stored in separate tables. The website’s dashboard
basic structure and the content of the web pages, CSS is meticulously designed to present this data in an organized
styles the visual appearance of the pages, and JavaScript and user-friendly manner, allowing users to easily navigate
adds interactivity and dynamic behavior. through different nodes (tables) and visualize the real-time or
• Content Development: Once the design is finalized, the historical data collected from various sensors. By employing
website’s content can be developed. This includes writing HTML, CSS, and potentially JavaScript alongside Flask’s
text, creating images and videos, and collecting other template engine (Jinja2), the dashboard is made interactive
multimedia assets. The flowchart does not explicitly show and aesthetically pleasing. Users can benefit from this setup
content development, but it is an important part of the by having a centralized platform to monitor and analyze data
website development process. from multiple nodes, enhancing decision-making processes
• Development: The development stage involves coding and operational efficiency in applications.
the website’s backend and frontend. The backend is
only responsible for the storing and managing the data,
while the frontend is what users see and interact with.
The flowchart shows that the backend of the website
is developed using Python Flask and SQLite. Python
Flask is a web framework that makes it easy to create
web applications, and SQLite is a lightweight database
management system.
• Testing and Launch: Once the website is developed,
it needs to be thoroughly tested for ensuring that the
website functions properly and is free of errors. The
Fig. 17. Website View.
flowchart shows that the website is tested using manual
and automated testing methods. Once the website is tested
Node Info-graphics are mentioned on the website which
and approved then it can be launched to the public.
relies on the 4 important parameters of the Nodal data.
• Maintenance: Once any website is designed and
launched, it requires some maintainance on an ongoing
basis. This includes fixing bugs, updating content, and
adding new features. The flowchart does not show website
maintenance, but it is an important part of the website
development process.

Fig. 18. Node Info-graphics in Front end.

B. Database Management.
To further analyze the data collected from the sensor nodes,
The data need to be sent through SQLite3 database and then
Fig. 16. Classification of Website Development.
hosted in a website through web dashboard. To send data
received from a LoRa module to a Raspberry Pi into an
SQLite3 table named ”Node 1,” the process generally involves
a few key steps. First, the Raspberry Pi needs to be equipped
with a LoRa receiver module and the necessary libraries to
interface with it, such as the RPi.GPIO library for Python.
Once the LoRa module receives data, a Python script on the
Raspberry Pi reads this data through the GPIO pins. This
script then utilizes the SQLite3 library to interact with an
SQLite database. It connects to the database (creating it if
it doesn’t exist) and then inserts the received data into the
”Node 1” table by executing an INSERT SQL statement. It
is important to ensure that the table ”Node 1” is created
well in advance with the mentioned columns and the to be
updated instantaneously with the data received from Lora. This
approach enables the efficient and organized storage of data
received from LoRa devices, facilitating further data analysis
or real-time monitoring applications.
The table includes four essential columns:
• Timestamp: This column records the exact time the
data was received. The Timestamp is crucial for tracking
when each piece of data was collected, allowing for time-
series analysis and ensuring data integrity by providing
a temporal context. The data type for this column is
typically DATE-TIME, which can store both date and
time information.
• Data Mode: The ”Data Mode” column indicates the
nature of the data transmission, specifically whether the
received data is in ”real-time” or ”minimal time.” ”Real-
time” could imply that the data is transmitted immediately
as it is collected, offering near-instantaneous insights.
Fig. 19. Data of Node-1 stored in a table in the SQLite3 Database.
In contrast, ”minimal time” might refer to data sent
at predefined intervals, reducing network congestion but
potentially delaying information receipt. This column can
be represented as TEXT or VARCHAR, storing short X. C ONCLUSIONS
strings that denote the data transmission mode.
• Status: This column shows whether the node (in this
In this paper research project has successfully developed
context, the sensor sending data via LoRa) is ”online”
a low-cost LoRaWAN gateway utilizing Raspberry Pi, pre-
or ”offline.” An ”online” status indicates that the node is
senting a viable solution for establishing long-range com-
actively communicating, while ”offline” suggests a lack
munication with sensor-equipped nodes. By harnessing the
of communication, which could be due to power issues,
adaptability and affordability of Raspberry Pi, this gateway
connectivity problems, or other failures. This vital infor-
offers accessibility across diverse applications within the
mation helps in monitoring the health and connectivity
realm of Internet of Things (IoT). The project underscores
status of each node. Similar to ”Data Mode,” the ”Status”
the secure transmission of data from sensor nodes to the
column is best implemented as TEXT or VARCHAR.
Raspberry Pi gateway, accessible through a dedicated website
• Data: The ”Data” column contains the actual value read
interface. This facilitates real-time monitoring and analysis
by the sensor. Depending on the sensor’s nature and what
of data, enhancing operational efficiency. Furthermore, the
it measures (temperature, humidity, pressure, etc.), this
integration of multiple communication channels augments the
column could store numerical values (using data types
gateway’s adaptability across various environments. Leverag-
like INTEGER or REAL) or even formatted strings if
ing the strengths of LoRaWAN technology and Raspberry Pi,
the data is more complex (using TEXT or VARCHAR).
this solution provides an economical, long-range, and efficient
By structuring the table in this way, user can store the value means of data transmission. The implementation of a user-
received as data, instantaneous time from timestamp, mode friendly website for data visualization further simplifies data
which is real time or minimal time and the status if it is online monitoring and analysis from multiple nodes in real-time.
or offline. This structure supports a wide range of applications, Overall, this research marks a significant advancement in IoT
from environmental monitoring to asset tracking, by providing infrastructure, offering a cost-effective gateway solution with
a robust framework for data analysis and decision-making. wide-ranging applications.
R EFERENCES
[1] A. I. Petrariu, A. Lavric and E. Coca, ”LoRaWAN Gateway: Design,
Implementation and Testing in Real Environment,” 2019 IEEE 25th
International Symposium for Design and Technology in Electronic
Packaging (SIITME), Cluj-Napoca, Romania, 2019, pp. 49-53, doi:
10.1109/SIITME47687.2019.8990791.
[2] A. Lavric and A. I. Petrariu, ”LoRaWAN communication protocol: The
new era of IoT”, 2018 International Conference on Development and
Application Systems (DAS), 2018.
[3] K. Tzortzakis, K. Papafotis and P. P. Sotiriadis, ”Wireless self powered
environmental monitoring system for smart cities based on LoRa”,
2017 Panhellenic Conference on Electronics and Telecommunications
(PACET), 2017.
[4] E. Bingol, M. Kuzlu and M. Pipattanasompom, ”A LoRa-based Smart
Streetlighting System for Smart Cities”, 2019 7th International Istanbul
Smart Grids and Cities Congress and Fair (ICSG), 2019.
[5] M. Centenaro, L. Vangelista, A. Zanella and M. Zorzi, ”Long-Range
Communications in Unlicensed Bands: The Rising Stars in the IoT and
Smart City Scenarios”, IEEE Wireless Communications, vol. 23, no. 5,
pp. 60-67, 2016
[6] Z. Xihai, Z. Mingming, M. Fanfeng, Q. Yue, X. Suijia and H. Senghout,
”A Low-Power Wide-Area Network Information Monitoring System by
Combining NB-IoT and LoRa”, IEEE Internet of Things Journal, vol.
6, no. 1, pp. 590-598, 2019.
[7] [online] Available: https://github.com/xreef/LoRa E32 Series Library
[8] F. Van den Abeele, J. Haxhibeqiri, I. Moerman and J. Hoebeke, ”Scal-
ability Analysis of Large-Scale LoRaWAN Networks in ns-3”, IEEE
Internet of Things Journal, vol. 4, no. 6, pp. 2186-2198, 2017.
[9] A. Lavric, A. I. Petrariu and V. Popa, ”Long Range SigFox Commu-
nication Protocol Scalability Analysis Under Large-Scale High-Density
Conditions”, IEEE Access, vol. 7, pp. 35816-36825, 2019.
[10] SX1278 - E-Byte E32-433T30D LoRa Module datasheet

You might also like