electronics
Article
Monitoring the Health and Residence Conditions of Elderly
People, Using LoRa and The Things Network
José Paulo Lousado 1, * , Ivan Miguel Pires 2,3,4 , Eftim Zdravevski 5
1
2
3
4
5
6
*
Citation: Lousado, J.P.; Pires, I.M.;
Zdravevski, E.; Antunes, S.
Monitoring the Health and Residence
Conditions of Elderly People, Using
LoRa and The Things Network.
Electronics 2021, 10, 1729. https://
doi.org/10.3390/electronics10141729
Academic Editors: Marcello Traiola,
Elena-Ioana Vǎtǎjelu and
Angeliki Kritikakou
and Sandra Antunes 6
Research Centre in Digital Services (CISeD), Polytechnic Institute of Viseu, 3504-510 Viseu, Portugal
Instituto de Telecomunicações, Universidade da Beira Interior, 6200-001 Covilhã, Portugal; impires@it.ubi.pt
Computer Science Department, Polytechnic Institute of Viseu, 3504-510 Viseu, Portugal
Health Sciences Research Unit: Nursing (UICISA: E), School of Health, Polytechnic Institute of Viseu,
3504-510 Viseu, Portugal
Faculty of Computer Science and Engineering, University Ss Cyril and Methodius,
1000 Skopje, North Macedonia; eftim.zdravevski@finki.ukim.mk
Integrated Researcher at Centre for Studies in Education and Innovation (CI & DEI), Polytechnic Institute of
Viseu, 3504-510 Viseu, Portugal; santunes@estgl.ipv.pt
Correspondence: jlousado@estgl.ipv.pt; Tel.: +351-254-615-477
Abstract: The rapid development and widespread use of information and telecommunication technologies do not mitigate, in many situations, information exclusion, nor the physical isolation of
people—mainly that of the elderly living in remote locations, whose mobile network coverage is deficient or non-existent, preventing them from accessing health care, be it routine follow-up procedures
or emergencies. Addressing this, we raise the question that guides our study: how can we monitor
the elderly’s residence and health conditions, detect falls, and track their movement in the vicinity of
their homes in a non-intrusive manner? To answer this question, we present a system prototype that
uses affordable, low-cost, and low-energy equipment with media and data processing, supported by
LoRa (Long Range) and ESP32 microcontrollers, coupling several sensors. As a result, it is possible to
monitor sensors that predict and detect falls or other risk events for the user, e.g., fire, with authorized
persons and entities, family members, civil protection, and security forces accessing the gathered
data, assuring their security. We conclude that the system could decisively improve people’s quality
of life, particularly those of the elderly who live in remote places with greater vulnerability.
Keywords: IoT; LoRaWAN; pervasive systems; sensor data analytics; The Things Network;
remote monitoring
Received: 19 June 2021
Accepted: 15 July 2021
Published: 19 July 2021
Publisher’s Note: MDPI stays neutral
with regard to jurisdictional claims in
published maps and institutional affiliations.
Copyright: © 2021 by the authors.
Licensee MDPI, Basel, Switzerland.
This article is an open access article
distributed under the terms and
conditions of the Creative Commons
Attribution (CC BY) license (https://
creativecommons.org/licenses/by/
4.0/).
1. Introduction
The Internet of Things (IoT) is currently present in several domestic systems, be it
in small devices for regular use, such as a blood pressure meter, or in more extensive
equipment, namely, photovoltaic panels for energy production, household appliances,
consumption, and energy efficiency controllers, among others [1]. The remote monitoring
of people’s health and physical conditions is one area that has benefited the most from
this type of technology. It involves the use of miniaturized, non-intrusive, and pervasive
devices, which go unnoticed most of the time and transmit and adapt their behavior
according to the user’s needs [2].
IoT terminology, which refers directly to systems permanently linked to communication networks, has revolutionized the way we use different technologies, enabling
varied uses depending on the socio-economic conditions of populations and their digital
literacy [3]. Today, we can connect heterogeneous devices, e.g., smartphones with a mobile
network (3G/4G and, in the future, 5G), Bluetooth devices, wireless networks, and sensors,
among others. It enables interaction between these various devices and creating synergistic
technological systems, which improve people’s quality of life. However, many populations
Electronics 2021, 10, 1729. https://doi.org/10.3390/electronics10141729
https://www.mdpi.com/journal/electronics
Electronics 2021, 10, 1729
2 of 17
and individuals, particularly the elderly, are prevented from taking advantage of this
technological development, especially those living in small towns or isolated dwellings
without families or continued institutional support.
Nevertheless, recent studies have shown that the world population that currently
suffers or is likely to develop mental pathologies is growing exponentially. Therefore, it is
urgent to associate and put the various communication and information technologies at
the service of people, minimizing the negative impact that these pathologies have on their
quality of life [4,5]. Based on this reality, the question arising as the starting point of the
present work is the following: how can we monitor the health status of the elderly, detecting
falls and monitoring their movement in the vicinity of their homes in a non-intrusive way?
Using concepts already framed by other monitoring and follow-up environments
based on miniaturized sensors and telecommunications equipment, we present a system
model solution involving several actors, families, the security forces, and social solidarity institutions. This monitoring and protection system model for the elderly is named
IS4HMET—Information System for Home Monitoring and Elderly Tracking. It is targeted
to populations without physical and mental disabilities residing in isolated or low-density
communities, providing them with autonomy inside and outside their homes. Additionally,
it should be noted that the inhabitants of rural areas still maintain their food gardens near
the house, in areas without mobile communications signal coverage, or with a weak signal,
as shown by the Portuguese National Communications Authority [6].
Coincidentally, there is a dispersed population with poor accessibility in these regions
of Portugal that are currently installed the largest wind farms dedicated to energy production, particularly in the Caramulo mountain. The inclusion of entities related to these
infrastructures in strategic partnerships will be enriched in the future, whether due to
social responsibility or the installed technology. They can lend a decisive contribution since
these infrastructures are monitored in real time, maintaining a permanent connection to
the internet, either by satellite or mobile communications [7,8]. This social responsibility
must be practical and serve the most affected populations with the installation of wind
farms, as stated by Álvaro Pinto, president of the company responsible for managing the
Caramulo wind farm. Looking ahead with an entrepreneurial and innovative spirit, he
adopts the concern of contributing to a more sustainable future through the integration
of the legitimate desires of the communities in which it operates with respect for the
environment [9].
Therefore, we have set as the primary response to the question posed, to monitor,
using information and communication technologies, the health status of elderly adults
while moving within their homes and peripheries, living in areas away from urban centers.
In this way, support institutions, family members, support teams, or other entities can
follow and monitor, almost in real time, the state of health of these people. Furthermore, as
the systems geared to monitoring and managing people’s data are undergoing significant
evolution, we hope to improve the quality of life of people, particularly the low-income
elderly population. To do that, we propose using the LoRa (Long Range) communication
networks and their interconnection to The Things Network (TTN). TTN is an open Internet
of Things infrastructure supported by a global ecosystem of thousands of developers,
IT integrators, hardware manufacturers, universities, and governments, supported by
LoRaWAN, the secure messaging protocol, etc. [10]. On the TTN, we have registered a test
application Available online [10].
Given the use of the proposed technology and system, which proves viable, we intend
to establish a protocol with a private entity operating in the telecommunications area. We
already have a partnership for a possible implementation of the supporting infrastructure.
Of course, this entails the reorganization and redefinition of the electronic components.
Thus, they become more adapted to real-life conditions, miniaturizing all the equipment
used by the elderly in a non-invasive and non-intrusive way. Our focus is on validation,
testing and complete development, and some machine learning models.
Electronics 2021, 10, 1729
3 of 17
In addition to the introduction, the remainder of this paper is organized as follows.
In the Section 2, we address studies developed in this area that we consider to be relevant. Next, we show the research and development method in the Section 3 and present
the system support data model. Section 4 covers the materials and methods of system
development, including the description of components, development boards and their
characteristics, and the connectivity scheme of the developed models. The Section 5 discusses the results and shows how a machine learning model can detect abnormal events,
using accelerometer data, quickly and in a simplified manner. Finally, Section 6 concludes
the article.
2. Related Work
Several studies have been carried out in recent years on the use of low consumption and long-distance communication networks, mainly in the context of home automation [11,12] and agro-industrial applications [13], using LoRa networks and other similar technologies, namely SigFox [14], NB-IoT [15], LTE-M [16], and TV Whitespace [17],
among others.
LoRa communication technology enables the interconnection of several-thousandbatteries-powered devices over long distances with reduced power consumption. The LoRa
technology takes part in the LPWAN (Low Power Wide Area Network) group, particularly
LoRaWAN, allowing communication over long distances, even in adverse conditions, with
15 km in open space or 7 km in urban areas [18]. Furthermore, low power consumption is
essential in devices intended to be used for an extended time on a battery. LoRa technology
uses the unlicensed frequency band, with 868 MHz in Europe, 915 MHz in North America,
and 433 MHz in Asia [19]. The basic architecture of the LoRaWAN network is composed of
several nodes (devices) and Gateways that can be connected to The Things Network (TTN).
In addition, the data are stored in the cloud and later made available on interface platforms.
These platforms contain dashboards that enable the interaction and availability of data
on other platforms, using REST web services and access platforms by MQTT (Message
Queuing Telemetry Transport), e.g., Node-RED. Figure 1 shows a Node-RED connection
to the prototype system developed, using an MQTT Input object to obtain data from the
apptesttemp application created in TTN. Node-RED is an IoT application development
framework based on streams of visual programming initially developed by IBM to connect
hardware devices, APIs, and online services [20].
In Node-RED, an MQTT Input is in a node that reads the submitted data to the TTN
in real time, as shown in Figure 1, and one such node is connected to the apptesttemp
application and lorattgo1_teste device. Thus, whenever data are submitted, their values can
be analyzed in real time in the debug window or the dashboard application. Furthermore,
the nodes are connected by flows, where the terminal nodes output can be a graphical
representation, data in text, or registered in a database.
The authors of [21,22] present models of low-consumption and long-range networks
for homes and industry automation, respectively, using LoRa (Long Range) communication
technologies. These communication networks are essential if data are to be disseminated
and analyzed, without necessarily resorting to the internet, collecting data from various
sensors, and maintaining their activity for an extended time. As a result, the consumption
of devices and sensors is reduced.
In work [23], the authors have evidenced the potentialities to monitor wind farms,
using the LoRa and LoRaWAN (Long-range Wide Area Network) networks. The authors have shown that the use of LoRa networks allows efficient communication over
long distances when monitoring non-critical situations. In addition, the connection to
an external IoT platform produces some delay, and its use for real-time monitoring is
somewhat compromised.
Electronics 2021, 10, 1729
4 of 17
Figure 1. Example of MQTT connection to TTN using Node-RED (source: author’s elaboration).
Work [24] proposes an advanced architecture, combining Edge computing, Fog computing, LoRa, and other IoT-based technologies to monitor patients in hospital settings.
The proposed architecture can help overcome the limitations of existing IoT-based physical
integrity monitoring systems, e.g., in detecting falls, evidencing the functionality of the
architecture for this purpose.
In the context of smart cities—an area in which LoRa communications know a significant space of use—the authors of [25] show the efficient way to monitor urban buses, using
the LoRa and LoRaWAN networks to estimate, in real time, the approach of the bus to the
stop, allowing a global GPS view of the movement of the vehicles in their fleet.
3. Research Method
Portable sensors, such as the accelerometer, small in size, with low energy consumption, and with high precision, have been used in many tests in individuals with diseases
that restrict their mobility, allowing to validate, in real time, the occurrence of falls [26].
Several authors have been working with these and other sensors, showing the advantage
of using these small devices in tracking and monitoring people. One of the main problems
affecting the elderly is the incidence of falls leading to their disability due to fractures. Aziz
and Robinovitch [27] and Lustrek et al. [28] showed that the use of accelerometers made it
possible to determine the cause of a fall through machine learning algorithms, exploring
a hitherto under-worked strand, mainly in the field of adult monitoring. More recently,
Shany et al. [29] showed that portable sensors have enormous potential to monitor people’s
movements and analyze the incidence of falls.
The current mobile communication devices, which we call smartphones, have several
built-in sensors, including an accelerometer, gyroscope, and GPS, to mention a few. However, they are challenging to operate by the elderly population, who are unaccustomed to
using this type of technology, sometimes with significant physical limitations, as reported
by Vaportzis et al. [30]. Thus, we propose exploring and enhancing the use of these sensors,
integrating them into a solution to monitor, in real-time, the movement of older people and
Electronics 2021, 10, 1729
5 of 17
their state of health, within and outside the home, with sensors incorporated in pervasive,
non-intrusive devices.
Some authors have proven that the ESP32 microcontroller associated with the LoRa
transceiver is suitable and adds LoRa and LoRaWAN protocol support. It is needed to act
as Gateway for The Things Network [31], but also the Dragino Gateway LG01 could be
used [32], which is more versatile and has many connection types, such as Wi-Fi, Ethernet,
and 3G/4G. Another ESP32 module with LoRa support that includes GPS may be used in
outdoor environments [33].
The low-cost ADXL335 accelerometer sensor [34] is ESP32 compatible and can be
included for fall detection and systems driven by anomalous motion detection.
The body temperature [35], body humidity [36], and pulsation [37] sensors can be
interconnected with the ESP32 microcontroller to control vital signs.
3.1. Data Model
From an application point of view, monitoring should occur in an environment controlled by official and authorized entities, including police and civil protection authorities.
Therefore, it is necessary to have a database-supported system that allows real-time analysis of the data obtained and recorded in history. Figure 2 shows the conceptual schema of
the database proposed for the IS4HMET system, which consists of several relations that
allow obtaining the data through the TTN network, guaranteeing access only to authorized
persons. In addition, the database will allow storing a history of the operations performed
on the database, maintaining an ACL (Access Control List) for each type of user.
Figure 2. Entity Relational Diagram for IS4HMET.
Electronics 2021, 10, 1729
6 of 17
3.2. Database Anthology
Table 1 presents the system tables and relationships in a simplified version, which is
in response to the system requirements.
Table 1. Data model relationships.
Relation
System_User
UserACL
ttn_Administrator
ttn_Gateway
ttn_Application
Device
Sensor
Sensor_param
End_User
Residence
UserTask
Device_sensor
UserAlert
HomeAlert
Data_Collection
Residence_ACL
Description
The user who will have a specific type of access, reserved to
security forces, family, or other entities, who will have access
via a web application or mobile app
List of operations allowed to each user
The list that allows registering the data of the service
administrator connected to the TTN for system
administration purposes
Table to store the Gateways created and maintained by the
service management team
Data registration of the various applications created for the
management of devices and their data
Device data recorded in the application
Sensor data that is connected to each device
Calibration parameters for each sensor
Primary data of the device user residing in a given monitored
dwelling
Location by geographical coordinates of each residence of
end-users
Record of the history of tasks performed by the various
system users for historical purposes
List of active sensors on each device
List of alerts logged by the system for each user
List of alerts recorded by the system for each residence
Table to store data obtained from the TTN, which are sent by
the devices
List of the various system users who are authorized to receive
alerts and warnings from a particular residence or inhabitant
The operationalization of the system comprises several phases of implementation.
The first phase concerns the definition of strategic sites for establishing Gateways, which
will serve the populations and inhabitants of isolated agricultural regions and are essential
to make the system effective. The next phase involves installing a pilot project consisting
of a functional prototype, residential or personal, which allows assessing the quality of the
service and the usability characteristics of the system. Finally, it is a fundamental step to
invest in a solution that can increase the quality of life of the elderly population in isolated
regions, where they are deprived of communication services or where mobile network
coverage is deficient.
The following phases include in the pilot project the various entities that constitute
interest groups, namely municipalities and companies with installed technological capacity
(e.g., wind farms). In addition, it could create synergies with isolated populations and
other local entities, such as fire brigades and security forces.
3.3. Application Scenario
In the example of application in the Caramulo mountain, we considered installing a
LoRaWAN Gateway connected to the TTN in the residence in the nearest locality, which
receives data from the LoRa nodes, dispersed and isolated.
Additionally, technological capacity installed in mountainous regions, mainly to
produce wind energy, becomes an added value to the wind farms located in remote and
isolated areas and parks with power generation towers, allowing Gateways to be installed
with an internet connection. In the case of the mountainous region of Caramulo, here as a
Electronics 2021, 10, 1729
7 of 17
pilot project, this capacity is quite significant, being established in it one of the largest wind
farms in Portugal (Figure 3).
Figure 3. GENERG wind farm in Caramulo (source: Adapted from [9]).
The system consists of a web application that supports data management and incorporates an interactive dashboard that allows administrators to manage data and monitor
system messages.
The application set of support for the elderly monitoring and follow-up system
includes several modules, namely the following:
•
•
Data collection module for personal use, composed of an ESP32/LoRa microcontroller
with the sensors specified above.
Housing status data collection module, comprising an ESP32/LoRa microcontroller
with environmental sensors (temperature, humidity, carbon monoxide, gas, and smoke).
The LoRa Gateway is connected to the internet with an established connection to the
TTN, receiving from the LoRa nodes the periodically sent data. As for LoRa nodes, they
are divided into two distinct types, home and individual nodes, as shown in Figure 4.
Figure 4. Conceptual scheme of the system.
Electronics 2021, 10, 1729
8 of 17
4. Materials and Methods
4.1. Proof-of-Concept
A survey of the material and equipment was carried out to test the model. Then,
from the operational point of view, a single-channel LoRa Gateway was installed. Finally,
a prototype was built, which functions as a LoRa node, composed of several sensors
and equipment.
The LoRa Gateway comprises the following:
•
•
•
•
•
•
•
•
•
•
•
•
•
•
TTGO ESP32 OLED SX1276 LoRa 868/915 MHz Bluetooth WI-FI Lora Development
Board With Gateway software [38] or Dragino Gateway LG01 [32];
Internet connection (Wi-Fi/3G/4G);
LoRa Node (prototype) assembled with some components (Figure 5):
TTGO ESP32 OLED SX1276 LoRa 868/915 MHz Bluetooth Wi-Fi LoRa Development
Board;
DHT22 sensor (temperature and humidity);
Accelerometer ADXL335;
SIM808 with Bluetooth, 3G, and GPS;
Protoboard;
2 Resistances of 10 KΩ and 510 Ω, respectively;
Diode 1N4001;
Capacitor 22 uF;
Connection cables;
USB 5 V (Power Bank 10,000 mAh);
Cayenne LPP with TTN interface (software library).
Figure 5. Prototype connection scheme.
Figure 5. Prototype connection scheme.
The TTGO ESP32 card comes prepared with an OLED screen and incorporates Wi-Fi,
Bluetooth, and the LoRa transceiver, having the working frequency set to 868 MHz, which
is the free spectrum frequency in Europe. Furthermore, using the DHT22 sensor is efficient
because it allows the reading of temperature and humidity, requiring a small circuit to
adjust its connections.
The SIM808 is a powerful device that incorporates Wi-Fi, GSM, and GPS, albeit of
reduced dimensions. The main features of the SIM808 are as follows [39]:
•
•
•
•
•
Quad-band 850/900/1800/1900 MHz;
GPRS multi-slot class12 connectivity: max. 85.6 kbps(down-load/up-load);
Controlled by AT Command (3 GPP TS 27.007, 27.005 and SIMCOM enhanced AT
Commands);
Supports real-time clock;
Supply voltage range 3.4 V~4.4 V;
Electronics 2021, 10, 1729
9 of 17
•
•
•
•
•
Integrated GPS/CNSS and supports A-GPS;
Supports 3.0 V to 5.0 V logic level;
Low power consumption, 1 mA in sleep mode;
Supports GPS NMEA protocol;
Standard SIM for 2G/3G/4G card;
The SIM808 prototyping plate has to be powered externally, requiring a complementary power source. As the highest power from the ESP32 is 5 V, it is necessary to correct
the voltage so that it is between 3.4 V and 4.4 V, so the implemented circuit adjusts the
voltage to 3.7 V (Figure 5). In this way, we only need a battery as a power supply for the
whole circuit. With this equipment, it is possible to obtain the GPS coordinates in real
time, programmed to interconnect with the ESP32. Low energy consumption is critical,
as the system should be as economical as possible. The GPRS connection functionality is
still quite relevant in this device. However, all the work is thought of for regions where
the mobile network signal does not exist or is very low. Thus, it is possible to program it
so that, if a GPRS network exists, in an emergency, a risk situation warning mechanism
may be triggered, using the mobile network. This way, an SMS message, which requires
few communication resources, with the description of the risk event and the GPS location
can be sent. This functionality was not implemented, being reserved for the future since it
requires a telecommunications plan from an operator. The Bluetooth functionality was not
used in this equipment because it is not part of the requirements.
The ADXL335 is a high sensitivity 3-axis (x, y, z) accelerometer, which allows real-time
analysis of the object’s position carrying it and is calibrated in the first use. After calibration,
the mapping and adjustment to the Cayenne LPP format used is performed.
4.2. System Concept and Prototype
The prototype was built to test the proposed system as shown in Figure 6. We can
observe the temperature, humidity, GPS location displayed on the screen, and the distance
to the residence. In addition, the accelerometer data are also collected.
Figure 6. Functional prototype in operation powered with USB Power Bank.
Naturally, the prototype in Figure 6 is not usable by an older adult as it is, with the
prototyping boards requiring careful development and miniaturization work to avoid
unnecessary energy consumption. However, it is the next step in technology transfer to a
company interested in marketing the product. It is not our primary goal, so our focus is
on demonstrating the capabilities of the components used and the software developed to
achieve the goals.
The collected data are sent via LoRa communication to the Gateway and the TTN.
Data received by TTN do not remain on the system unless a Data Integration is configured.
Electronics 2021, 10, 1729
10 of 17
To store the data, we can set up a Data Integration connection on the TTN in a Data Storage
account, which allows data to be stored temporarily for seven days in the free version. To
have further access to the data, The Things Network access key authorization must be set
to make queries to the storage system. The result is obtained in JSON format. For the data
to be entered into the database developed to support the system, it is necessary to extract
and convert the relevant data and subsequently insert them into the appropriate tables.
Figure 7 shows the data obtained in the query executed over the Data Storage database,
integrated with TTN.
Figure 7. Example of the result obtained in the query from our C# standalone application, in JSON format.
From this API (Application Program Interface), we can obtain the data in other applications by programming the connection to the database, periodically executing triggers to
the database query to populate the global database for each user and each device.
5. Discussion and Results
The use of devices to monitor people using low-cost and long-range technology,
including LoRa networks, as demonstrated here, allows specific sensors to be used for
data collection and eventually the detection of abnormal events by users in their homes.
Several authors have studied the use of these sensors. Still, we focused our attention on
the security issues of the elderly in remote areas—places where mobile networks do not
exist or have low coverage. This presents a solution that may use, for the benefit of affected
populations, the technological potential installed in wind farms, making use of the internet
connection for the LoRa Gateway connection, thereby ensuring the coverage of this type of
communication network.
One of the sensors that we believe to be of great relevance, as mentioned in the chapter
on materials and methods, is the accelerometer, which allows detecting falls or other events
related to sudden movements. Thus, to analyze the accuracy of the ADXL335 sensor used,
we performed the statistical analysis of the data obtained. A predictive algorithm was
subsequently applied to predict, based on historical data, when an abnormal event of user
positioning (for example, a fall) may occur.
Electronics 2021, 10, 1729
11 of 17
To demonstrate that it is possible to apply machine learning techniques to the collected
data, we created a model that we tested with a data set. The model is not robust enough to
be used in a real context, but it serves as a proof of concept. It is possible to develop models
with greater and better precision, drastically reducing the possibility of the occurrence of
false positives and false negatives.
Training data were collected in a way that corresponds to the normal upright position
of the human body. First, the accelerometer was calibrated, using the sketch provided by
the ADXL335 programming library, detecting the maximum and minimum values for each
axis. Subsequently, the accelerometer was moved to simulate human walking in various
directions, and the minimum and maximum limit values were determined for the three
axes. They correspond to the possible positions of the body and are classified as “Normal
position”, “Fallen back”, “Fallen front”, “Fallen to the right”, “Fallen to the left”.
As for the test data, the accelerometer within the prototype inside a duly stowed
backpack and pre-defined courses were followed with different falls simulations. Then, the
obtained data were classified, and the column concerning the class was removed. In this
way, we were able to correctly know which data corresponded to the respective category.
5.1. Predictive Model
The WEKA software [40] was used to create the predictive model for detecting user
position, including falls. This software was used to develop predictive models, being
relatively easy, intuitive to use, and proven to be robust and reliable in determining
predictive models, using data mining.
The algorithm that best fit the study’s objectives was the J48 (J48 is an open-source
Java implementation of the C4.5), an algorithm of decision trees. The data obtained directly
from the accelerometer represent integer values between a maximum (positive) and a
minimum (negative) value for the x, y, and z axes, which generally require prior calibration
as explained previously. However, the CayenneLPP format present in the TTN uses these
values divided by one thousand. Therefore, in terms of database data representation, it is
performed on the values obtained by TTN. Concerning the obtained values and because
the decision process is carried out on the integer values processed in the MCU ESP32, the
predictive model is received on this order of magnitude and not on the values divided by
one thousand. The list of data prepared for the creation of the model is shown in Figure 8.
Figure 8. Data fields definition for test on the WEKA model.
For creating the training model, 2066 occurrences of readings of the direct accelerometer data applied in the prototype were used. Some rules were established initially, particularly the fact that the vertical position is represented by negative values close to the
minimum and is naturally dependent on the position of the sensor in the electronic circuit.
The application of algorithm J48 after parameterization to maximize effectiveness
produced the following decision tree model (Figure 9).
Electronics 2021, 10, 1729
12 of 17
(A)
(B)
Figure 9. Descriptive model (A) and the decision tree produced by algorithm J48 (B).
To measure the accuracy of the model obtained, we can consider the statistical data
obtained on the values of the training sample, whose separation between test and training
Electronics 2021, 10, 1729
13 of 17
was 50% (Figure 10) with an accuracy of 99.73%, which is very relevant from the point of
view of benchmarking and validating the model.
Figure 10. Statistical and precision analysis of the model.
Figure 10. Statistical and precision analysis of the model.
Another tool that allows us to assess and validate the model is the confusion matrix
(Figure 11).
Figure 11. Confusion matrix.
The confusion matrix shows that all expected normal (vertical) position occurrences
were correctly classified, with only three cases incorrectly classified, which is not very
significant. Thus, it can be said that the model is quite well adjusted to reality. Later, the
decision tree model was applied to a test group, with the unknown classification variable
(represented by the symbol “?” in Figure 12), and very consistent results were obtained.
Electronics 2021, 10, 1729
14 of 17
Figure 12. Sample of the test data file.
5.2. Testing Data with the Predictive Model
After obtaining the predictive model, we can assess the accuracy with actual test data.
For example, in Figure 13, we can observe part of the result of the model on the test data in
which the classification is unknown at the outset, showing the precision obtained by the
application of the predictive model.
Figure 13. Results were obtained by applying the model to the test group.
Most of the results are accurate between 99.9% and 100%, so the model is consistent
with the actual data obtained. As a result, we can state that positioning sensors, such as the
accelerometer, effectively detect the falls of people. Furthermore, its association with the
GPS (SIM 808) and temperature sensors, among others, can contribute to improving the
quality of life of people living in remote areas where there is no mobile network coverage.
The combination of LoRa networks overcomes this lack of mobile network coverage, so
the use of strategically placed Gateways can ensure complete coverage of those regions.
Electronics 2021, 10, 1729
15 of 17
Furthermore, it keeps people connected to the central system, which will be in operation
with authorized entities for that purpose, namely, security forces, fire brigades, and families.
It should be noted that the SIM808 has an interface for a mobile SIM card. Thus, the
system presented here is perfectly viable and functional when the current mobile network
(2G/3G/4G) can be used. In addition, it can be used in LTE-M and NB-IoT technology
(standard to be integrated into 5G), where mobile networks are used for communications,
using low resources, even in low coverage locations. However, they always require a paid
mobile communications plan, with increased costs for the user.
5.3. Limitations
The system was placed in a backpack and transported on some previously defined
routes. It was tested by placing the equipment in this position for some time. The only
position that was not tested with the prototype in the backpack was the fall backward,
for obvious safety reasons. We fully understand that the prototype is not as robust as a
consumer-grade product. Still, to demonstrate the approach’s feasibility, we strongly argue
that such a prototype serves its purpose.
This limitation forced us to reuse the prototyping boards that we have available, which
are much larger than what would be necessary, such as ESP32 and SIM808. We only used
GPS in the prototype; however, it considerably increases energy consumption. Therefore,
everything will have to be adjusted with much more efficient components in a commercial
product, even boards with ESP32, including a GPS and accelerometer.
The use of the protoboard allowed us to reorganize the components, making it easy to
build a PCB board for soldering components. We also intend to look for the most adjustable
sensors for human use to miniaturize the prototype for human use and monitor residences’
habitability conditions. Our prototype covers these two parts, the accelerometer and GPS,
being naturally disposable in homes, and it may have other sensors, for example, the
detection of smoke or gas, among others.
6. Conclusions
This article addresses an area of application that is very relevant to society, considering the vast potential underlying long-range telecommunications equipment and devices
(LoRa) that we currently have available on the market at a low cost. The widespread
use of IoT has gained enormous potentiality in monitoring older adults and their homes,
particularly with sensors that may detect floods, gas leakage, excess carbon monoxide,
and fire, to name but a few. In housing, actuators may be incorporated that will trigger
specific actions, such as cutting off gas, cutting off water and electricity supply, and the
release of fire-retardant chemicals. Using the system here proposed, isolated inhabitants,
primarily the elderly, can move freely around the outer spaces of their homes without
feeling constrained in their privacy. In addition, a rescue mechanism may be triggered to
inform support entities, family, or friends, who will have access to the GPS coordinates of
their recent location in case they suffer some accident, fall, or change of vital signs. All calibration parameters and tolerances, including false positive and false negative occurrences,
must be very well-validated to make the system efficient and practical, avoiding eventual
unnecessary alerts and emergency calls that may misuse resources.
Another essential factor to be considered in the proposed system, which has not yet
been used, is the possibility to integrate the technology installed in some remote regions.
Local people increasingly use technology for wind energy production and clean energy
with negative effects, such as the noise produced and interference in television reception
signals, but whose value should be understood to be an asset.
To guarantee compliance with all ethical and data protection principles, the objectives
of the system and its operation will be communicated to the National Data Protection
Commission. Authorization to collect anonymous data will be requested for statistical
purposes only, namely for academic and scientific research work.
Electronics 2021, 10, 1729
16 of 17
Author Contributions: Conceptualization, methodology, software and hardware assembly, J.P.L.;
visualization, validation, S.A.; writing—review and editing, J.P.L., S.A., I.M.P. and E.Z. All authors
have read and agreed to the published version of the manuscript.
Funding: This work is funded by FCT/MEC through national funds and co-funded by FEDER—
PT2020 partnership agreement under the project UIDB/50008/2020. This work is also funded by
National Funds through the FCT—Foundation for Science and Technology, I.P., within the scope of the
project UIDB/00742/2020. This work is also funded by National Funds through the FCT—Foundation
for Science and Technology, I.P., within the scope of the project UIDB/05583/2020.
Acknowledgments: This work is funded by FCT/MEC through national funds and co-funded by
FEDER—PT2020 partnership agreement under the project UIDB/50008/2020. This work is also
funded by National Funds through the FCT—Foundation for Science and Technology, I.P., within
the scope of the project UIDB/00742/2020. This work is also funded by National Funds through the
FCT—Foundation for Science and Technology, I.P., within the scope of the project UIDB/05583/2020.
This article is based upon work from COST Action IC1303–AAPELE–Architectures, Algorithms and
Protocols for Enhanced Living Environments and COST Action CA16226–SHELD-ON–Indoor living
space improvement: Smart Habitat for the Elderly, supported by COST (European Cooperation in
Science and Technology). More information is Available online www.cost.eu (accessed on 1 July
2021). Furthermore, we would like to thank the Research Centre in Digital Services (CISeD) and the
Polytechnic of Viseu for their support.
Conflicts of Interest: The authors declare no conflict of interest.
References
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
Atzori, L.; Iera, A.; Morabito, G. The Internet of Things: A survey. Comput. Netw. 2010, 54, 2787–2805. [CrossRef]
Wickramasinghe, N.; Wickramasinghe, N. Pervasive Computing and Healthcare. In Pervasive Health Knowledge Management; Bali,
R.K., et al., Eds.; Springer: New York, NY, USA, 2013.
Chin, W.S.; Kim, H.S.; Heo, Y.J.; Jang, J.W. A context-based future network infrastructure for IoT services. Procedia Comput. Sci.
2015, 56, 266–270. [CrossRef]
Abdullah, S.; Choudhury, T. Sensing Technologies for Monitoring Serious Mental Illnesses. IEEE Multimed. 2018, 25, 61–75.
[CrossRef]
Maresova, P.; Tomsone, S.; Lameski, P.; Madureira, J.; Mendes, A.; Zdravevski, E.; Chorbev, I.; Trajkovik, V.; Ellen, M.; Rodile, K.
Technological Solutions for Older People with Alzheimer’s Disease: Review. Curr. Alzheimer Res. 2018, 15, 975–983. [CrossRef]
[PubMed]
ANACOM Avaliação do Desempenho de Serviços Móveis e de Cobertura GSM, UMTS e LTE, na Região Alentejo (NUTS II).
Available online: https://www.anacom.pt/streaming/RelatAlentejo_QoS_234Gv28nov2019rev.pdf?contentId=1499091&field=
ATTACHED_FILE (accessed on 12 October 2020).
Pina, A.C.F.R. Parque Eólico de Videmonte; University of Porto: Porto, Portugal, 2006.
NetBiter Remote Monitoring of Wind Turbine Power Generators. Available online: https://www.netbiter.com/applications/
renewable-energy/wind-power-monitoring (accessed on 10 December 2020).
Pinto, Á.B. GENERG—Energia Eólica. Available online: http://www.generg.pt/pt/institucional/#Ambiente (accessed on 10
December 2020).
Industries, T.T. The Things Network and LoRaWAN. Available online: https://www.thethingsnetwork.org/docs/lorawan/
(accessed on 5 July 2020).
Risteska Stojkoska, B.L.; Trivodaliev, K.V. A review of Internet of Things for smart home: Challenges and solutions. J. Clean. Prod.
2017, 140, 1454–1464. [CrossRef]
Totonchi, A.T. Internet of Things for Smart Home: State-of-the-Art Literature Review. Available online: https://www.researchgate.
net/publication/328955978-Internet-of-Things-for-smart-home-state-of-the-art-literature-review (accessed on 10 December
2020).
Stočes, M.; Vaněk, J.; Masner, J.; Pavlík, J. Internet of Things (IoT) in Agriculture—Selected Aspects. AGRIS Online Pap. Econ.
Inform. 2016, 8, 83–88. [CrossRef]
SIGFOX SIGFOX, A 0G NETWORK. Available online: https://www.sigfox.com/en (accessed on 10 December 2020).
Group, T. Narrowband IoT (NB-IoT). Available online: https://www.thalesgroup.com/en/markets/digital-identity-andsecurity/iot/resources/innovation-technology/nb-iot (accessed on 10 December 2020).
GSMA Long Term Evolution for Machines: LTE-M. Available online: https://www.gsma.com/iot/long-term-evolution-machinetype-communication-lte-mtc-cat-m1/ (accessed on 1 July 2021).
Harris, B. How TV White Space Is Helping Bridge the Digital Divide. Available online: https://news.microsoft.com/on-theissues/2019/06/25/airband-white-space/ (accessed on 10 December 2020).
Electronics 2021, 10, 1729
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
17 of 17
Workgroup, T.M. A Technical Overview of LoRa®and LoRaWAN TM What Is It? Available online: http://www.auto.tuv.by/
content-media-files/master-content/services/products/1555-tuv-rheinland-lora-alliance-certification/tuv-rheinland-loraalliance-certification-overview-lora-and-lorawan-en.pdf (accessed on 1 July 2021).
De Carvalho Silva, J.; Rodrigues, J.J.P.C.; Alberti, A.M.; Solic, P.; Aquino, A.L.L. LoRaWAN—A low power WAN protocol for
Internet of Things: A review and opportunities. In Proceedings of the 2017 2nd International Multidisciplinary Conference on
Computer and Energy Science (SpliTech), Split, Croatia, 12–14 July 2017; pp. 1–6.
OpenJS Foundation Node-RED API. Available online: https://nodered.org/about/ (accessed on 6 July 2021).
Gambi, E.; Montanini, L.; Pigini, D.; Ciattaglia, G.; Spinsante, S. A home automation architecture based on LoRa technology and
Message Queue Telemetry Transfer protocol. Int. J. Distrib. Sens. Netw. 2018, 14. [CrossRef]
Sandoval, R.M.; Garcia-Sanchez, A.J.; Garcia-Haro, J. Performance optimization of LoRa nodes for the future smart city/industry.
Eurasip J. Wirel. Commun. Netw. 2019, 2019, 1–13. [CrossRef]
Mikhaylov, K.; Moiz, A.; Pouttu, A.; Martin Rapun, J.M.; Gascon, S.A. LoRa WAN for Wind Turbine Monitoring: Prototype and
Practical Deployment. In Proceedings of the 2018 10th IEEE International Congress on Ultra Modern Telecommunications and
Control Systems and Workshops (ICUMT), Moscow, Russia, 5–9 November 2018; pp. 1–6.
Queralta, J.P.; Gia, T.N.; Tenhunen, H.; Westerlund, T. Edge-AI in LoRa-based Health Monitoring: Fall Detection System with
Fog Computing and LSTM Recurrent Neural Networks. In Proceedings of the 2019 42nd IEEE International Conference on
Telecommunications and Signal Processing (TSP), Budapest, Hungary, 1–3 July 2019; pp. 601–604.
Guan, P.; Zhang, Z.; Wei, L.; Zhao, Y. A Real-Time Bus Positioning System Based on LoRa Technology. In Proceedings of the
2018 2nd IEEE International Conference on Smart Grid and Smart Cities (ICSGSC), Kuala Lumpur, Malaysia, 12–14 August 2018;
pp. 45–48.
Ermes, M.; Pärkkä, J.; Mäntyjärvi, J.; Korhonen, I. Detection of daily activities and sports with wearable sensors in controlled and
uncontrolled conditions. IEEE Trans. Inf. Technol. Biomed. 2008, 12, 20–26. [CrossRef] [PubMed]
Aziz, O.; Robinovitch, S. An analysis of the accuracy of wearable sensors for distinguishing the cause of falls. IEEE Trans. Neural
Syst. Rehabil. Eng. 2009, 19, 670–676. [CrossRef] [PubMed]
Lustrek, M.; Gjoreski, H.; Gonzalez Vega, N.; Kozina, S.; Cvetkovic, B.; Mirchevska, V.; Gams, M. Fall Detection Using Location
Sensors and Accelerometers. IEEE Pervasive Comput. 2015, 14, 72–79. [CrossRef]
Shany, T.; Redmond, S.J.; Narayanan, M.R.; Lovell, N.H. Sensors-based wearable systems for monitoring of human movement
and falls. IEEE Sens. J. 2012, 12, 658–670. [CrossRef]
Vaportzis, E.; Clausen, M.G.; Gow, A.J. Older adults perceptions of technology and barriers to interacting with tablet computers:
A focus group study. Front. Psychol. 2017, 8, 1–11. [CrossRef] [PubMed]
Lousado, J.P.; Antunes, S. Monitoring and Support for Elderly People Using LoRa Communication Technologies: IoT Concepts
and Applications. Future Internet 2020, 12, 206. [CrossRef]
Dragino Dragino Gateway: Connect to TTN. Available online: http://wiki.dragino.com/index.php?title=Connect_to_TTN
(accessed on 30 January 2021).
Shenzhen Xin Yuan Electronic Technology Co., L. TTGO T-Beam V0.7 ESP32 868/915Mhz Wi-Fi Wireless Bluetooth Module GPS
NEO-6M SMA LORA 32 18650 Battery Holder. Available online: http://www.lilygo.cn/prod_view.aspx?TypeId=50033&Id=1237
&FId=t3:50033:3 (accessed on 1 July 2021).
Analog Devices, I. ADXL335. Available online: https://www.analog.com/media/en/technical-documentation/data-sheets/
ADXL335.pdf (accessed on 1 July 2021).
Texas Instruments, Temperature Sensor LM35. Available online: https://www.ti.com/product/LM35 (accessed on 1 July 2021).
Ali, A.S.; Zanzinger, Z.; Debose, D.; Stephens, B. Open Source Building Science Sensors (OSBSS): A low-cost Arduino-based
platform for long-term indoor environmental data collection. Build. Environ. 2016, 100, 114–126. [CrossRef]
Murphy, J.; Gitman, Y. Pulse Sensor Amped. Available online: https://pulsesensor.com/pages/open-hardware (accessed on
1 July 2021).
Westenberg, M. Single Channel LoRaWAN Gateway. Available online: https://github.com/things4u/ESP-1ch-Gateway (accessed
on 25 March 2020).
SIMcom. SIM808_Hardware Design_V1.00. Available online: https://cdn-shop.adafruit.com/datasheets/SIM808_Hardware+
Design_V1.00.pdf (accessed on 1 July 2021).
Hall, M.; Frank, E.; Holmes, G.; Pfahringer, B.; Reutemann, P.; Witten, I.H. The WEKA Data Mining Software: An Update.
SIGKDD Explor. 2009, 11, 10–18. [CrossRef]