1. Introduction
The Internet of Things (IoT) has become one of the most powerful communication paradigms and attracted many research interests in the 21st century [
1,
2]. It can connect numerous objects, such as sensors, vehicles, houses, and appliances, together to the Internet, which allows users to share information, data and resources. The emergence of IoT has made it a key component in the environmental monitoring and health-care applications. For example, wireless sensors can be deployed in various locations to monitor environmental conditions [
3], and wearable sensors can be attached to the subjects’ body to measure physiological status [
2]. Those data can be transmitted to a cloud infrastructure and presented to the targeted users. However, the existing works mainly focus either on environmental or health-care monitoring applications. There is a lack of such a system which can measure both of them and provide invaluable information about environmental and physiological data at the same time.
Wearable sensor nodes are generally deployed inside a wearable body area network (WBAN) to monitor physiological signals, such as the heart rate (HR), respiration rate (RR), electrocardiography (ECG), body temperature, body position, and blood pressure (BP) [
2,
4,
5,
6]. In addition to medical applications, WBAN can also be used to monitor environmental conditions around people [
7,
8]. Such applications can provide useful information for users to gain a deeper understanding of their surroundings, especially for safety-related applications. For instance, in a construction site, workers’ safety and health are always a major concern in the industry.
Overexposure to solar ultraviolet (UV) radiation is a risk for public health particularly for outdoor construction workers because of the typical detrimental effects such as sun burning, long-term risk of skin cancer, and eye diseases [
9]. High carbon dioxide (CO
2) concentration may cause respiratory and headache issues [
10]. Among other wearable monitoring applications, temperature and relative humidity are the most common environmental parameters that are monitored [
7,
8,
11]. As for the physiological parameters, the heart rate and body temperature are the most commonly monitored vital signs that indicate the health status of people.
A hybrid IoT network system that can monitor real-time physiological and environmental conditions to prevent workers from being exposed to risky and hazardous situations is of great importance. If users can react to emergency or accidents in time with the access to both data at the same time, risks can be reduced.
In this paper, we present a hybrid wearable sensor network system with edge computing to improve the safe working environments and reduce the health risks in the construction industry. The proposed IoT infrastructure incorporates two networks: a WBAN for data collection using Bluetooth low energy (BLE) and an LPWAN for the Internet connection using LoRa. The environmental conditions (temperature, humidity, UV and CO2) and vital signs (HR and body temperature) of the subject are measured by the wearable sensors deployed in the WBAN. The data from individual sensors are transmitted using BLE within the WBAN, which will be collected and transmitted to a gateway using LoRa within the LPWAN. The gateway can act as a local server for edge computing, namely pre-processing sensor signals, displaying data and triggering alerts when emergency incurred. Finally, an IoT cloud server is designed and implemented for data storage and further functionalities, such as web monitoring and mobile applications.
When dealing with healthcare monitoring, privacy and data security should be carefully considered. Developers can help to integrate security into devices, applications, and systems [
12]. For data sharing, developers can use a Client-Server model, in which the server shares a certain type of information with clients while keeping other information protected by appropriate credentials [
13]. Original LoRa transmission does not require encryption; however, this can be resolved by adding data encryption to LoRa transmission. Speck by National Security Agency (NSA) is a lightweight block cipher which has been optimized for performance in software implementations and is used in our Safe Node to encrypt the wireless data transfer and improve the data security. When the users need to access the data on the server, users will be asked to enter their credentials in our web application.
The remainder of this paper is organized as follows:
Section 2 discusses some related works about environmental and health monitoring in IoT applications; the overall system architecture will be described in
Section 3;
Section 4 illustrates the implementation of the sensor network hardware and software;
Section 5 discusses the system performance and evaluation;
Section 6 presents the design of the IoT gateway and the cloud service; finally, the conclusion and future works are summarized in
Section 7.
3. System Architecture
Safety is one of the most significant considerations in an industrial workplace, where occupational injuries and illness may change the life of workers permanently. WBAN, LPWAN, and IoT infrastructures have been taken into account in our design to achieve a reliable safety monitoring system in terms of wireless technologies suitable for WBAN, network coverage range of LPWAN, sensor node’s power consumption, and the IoT cloud server. The overall system architecture comprises three subsystems as presented in
Figure 1: (1) the wearable sensor nodes; (2) the IoT gateway; (3) the Internet cloud.
3.1. Wearable Network
There are two wearable sensor nodes on each subject: the Safe Node for environmental monitoring and the Health Node for physiological parameters’ measurements. The Health Node comprises a BLE module enabling WBAN communication, a PPG sensor for heart rate monitoring and a body temperature sensor. There are four environmental sensors on the Safe Node to measure the ambient temperature, relative humidity, CO2 and UV sensor. The Safe Node comprises two wireless modules: the BLE for communication within the WBAN and LoRa for transmission in the LPWAN.
The BLE in the Safe Node is responsible for receiving sensor data from the Health Node within the WBAN, which will be transmitted to a remote gateway via the LoRa network. BLE can transmit data at low power consumption and high data rate, but it is limited by the transmission range. LoRa can transmit data over a long distance while sacrificing the data rate and increasing power consumption. Therefore, in the proposed hybrid network design, LoRa is adopted for long-range data transmission and BLE is used to transmit data inside the WBAN. In addition to receiving data from the Health Node, the BLE can also transmit the wireless data to a smartphone for visualization. A web-based smartphone application is developed for this purpose.
3.2. IoT Gateway
The main role of the IoT gateway is to connect the wearable network to the IoT cloud and perform edge computing. The gateway consists of one Raspberry Pi, Internet connection, and a LoRa module. The Pi connected with the LoRa module receives data from the Safe Node, processes the data, and stores them into a local MySQL database. A web application that can show the data on the local website is developed for data visualization. Detailed implementations of the gateway are provided in
Section 6.1.
3.3. IoT Cloud
The IoT cloud server receives the data from the IoT gateway and stores the data into the cloud database-MySQL. The data stored in the database can be accessed later for further analysis. A mobile application and web interface are developed as the user interface (UI). Detailed implementations of the IoT cloud server are provided in
Section 6.2.
3.4. Network Implementation
The proposed data flow for the entire network is shown in
Figure 2. There are mainly two networks: one is in local environments—LPWAN including the WBAN, and the other one is the IoT network connecting to the cloud. As mentioned previously, the data from the Health Node and Safe Node will be transmitted to the IoT gateway and then finally to the cloud server. MQTT (message queuing telemetry transport) is used in our IoT network system to transfer the information between the gateway and the cloud server.
4. Implementation of the Sensor Node
MQTT is a publish-subscribe-based messaging protocol that works on top of TCP/IP protocol and requires only limited network bandwidth. It is simple and lightweight, which is ideal for IoT applications. CoAP (constrained application protocol) is an alternative to MQTT. They are both designed for resource-constrained devices [
37]. However, MQTT is a many-to-many communication protocol while CoAP is based on one-to-one communication protocol for transferring state information between client and server [
38]. MQTT can easily support multiple clients through a central broker and the broker can publish messages to many clients. Such a mechanism is ideal for our application because the broker needs to publish to several clients; hence, MQTT is implemented in our design.
A normal MQTT requires some clients and a broker. MQTT clients can subscribe and publish to the broker on different topics. The broker handles the client connections. A broker can be configured to work as an MQTT bridge that can connect two MQTT brokers together. In our IoT network, there is an MQTT bridge connecting two MQTT brokers together: one is the local MQTT broker installed on the Raspberry Pi and the other one is installed in the cloud server. Therefore, messages can be transferred between the local IoT gateway and the cloud server. The message/data from the local MQTT broker will be published to the local UI and the local UI subscribes to relevant topics. Similarly, the message/data from the cloud MQTT broker will be published to the cloud UI, and the cloud UI subscribes to the desired topics.
The design and implementation of Safe Nodes and Health Nodes are discussed in this section. To best use some existing hardware components, the main hardware of each board is configured from our previous projects [
7,
39]. Nonetheless, some major electronic components and software algorithms are re-designed according to their new requirements for this project.
Figure 3 demonstrates the wearable sensor nodes worn by the subject. The Safe Node is placed on top of the subject’s helmet, while the Health Node is attached to the subject’s chest. The Safe Node on top of the helmet is exposed to environments so that it can detect the environmental changing rapidly. The Health Node measures the body temperature and heart rate of the subject.
4.1. Safe Node
The Safe Node comprises a power management unit (PMU), four environmental sensors, a microcontroller (MCU) with embedded BLE capability (Simblee), and a long-range RF module (LoRa). The sensor node from the work [
7] is imported and used as the main shield for LoRa and sensors. The sensor node from the work [
39] is used as the main MCU. Two boards are joint together using flexible wires by connecting the Vcc (3.3 V), Ground (GND), Inter-integrated Circuit (I2C) interface and Serial Peripheral Interface (SPI) interface. Some key electronic components used in the Safe Node are tabulated in
Table 1. The schematic diagram and the figure of the Safe Node are shown in
Figure 4.
4.1.1. Power Management Unit
The power management unit consists of a rechargeable battery, a voltage regulator, and a load switch. The voltage regulator selected is MCP1810 from Microchips [
40], which regulates the input voltage from the battery and supplies constant voltage (3.3 V) for the whole sensor node. This is an ultra-low quiescent current low-dropout (LDO) regulator that consumes only 20 nA current (typical) while delivering 150 mA current and 1 nA when the LDO is shut down. This is desirable for wearable sensor node due to its low-power consumption.
A low power, low on-resistance load switch, TPS22908 from Texas Instruments (Dallas, TX, USA), is used to turn on and off the environmental sensors at different operation stages in the design [
41]. For example, the sensors can be turned off in sleep mode so as to reduce overall power consumption. The maximum quiescent and shutdown current of the switch are both 1 µA. In addition, the switch has a quick output discharge (QOD) function which will pull down the output by an internal resistor and discharge rapidly to ground level when the switch is turned off. Therefore, the devices connecting to the output pin will not be left in a floating state and cause unforeseen issues to the MCU.
4.1.2. Environmental Sensors
Temperature and humidity are measured by BME680 from Bosch-Sensortech, which is an integrated environmental sensor suitable for wearable applications [
42]. The sensor is a digital sensor using I2C to transfer data between BME680 and the MCU. The sensor can operate at a low voltage level (1.71–3.6 V) and consumes low current (0.15 µA) in sleep mode. The accuracy for both temperature and humidity are tabulated in
Table 1.
The UV index is acquired by SI1145 from Silicon Labs [
43]. This is an integrated UV index sensor with industry’s lowest power consumption (less than 500 nA in standby mode and 9 µA average in sensing mode). The sensor also has an I2C interface that is used to communicate with the MCU.
For CO
2 measurement, a non-dispersive infrared (NDIR) sensor, COZIR-GC0012 from CO2METER (Ormond Beach, FL, USA), is selected to detect a wide range of CO
2 concentration from 0–10,000 ppm [
44]. This is a low power sensor consuming less than 1.5 mA on average. It has a short warm-up period that is less than 10 s and supports battery-operated fast monitoring applications. This is a digital output sensor which supports serial communication with MCU.
4.1.3. MCU and Wireless Transmission
The Simblee RFD77101 from RF Digital Corporation (Hermosa Beach, CA, USA) is a high performance and professional grade Bluetooth Smart radio transceiver with built-in ARM Cortex M0 microcontroller. The MCU operates at 16 MHz with a 32 kHz precision crystal, 6 ADC (analog-to-digital converter) inputs, 2 I2C interfaces, and 2 SPI interfaces. The operating voltage is from 1.8–3.6 V and consumes 600 nA in ultra-low power sleep mode, 8 mA @ 0 dBm, 12 mA @ +4 dBm transmission mode, and 10 mA in receiving mode [
45].
RFM95 from HOPERF Electronic is selected as the long range (LoRa) transceiver module. The RF module has high interference immunity while minimizing current consumption [
46]. The transmission current is from 20 to 120 mA depending on the transmission power, while the sleep current is 0.2 µA. The RF communicates with MCU via SPI interface and some major parameters of LoRa, such as the SpreadingFactor (SF), transmission power, coding rate (CR) and bandwidth (BW), can be configured via the SPI interface.
4.1.4. Software Implementation for Safe Node
Figure 5 shows the software implementation of the Safe Node. Firstly, the MCU wakes up to acquire the data from the sensors, which will be turned off after the measurements by the load switch. Then the BLE module in the Safe Node will be enabled to receive the physiological data from the Health Node within the WBAN. After the health data are collected, the BLE will be switched off while the LoRa is turned on to send data to the gateway through the LPWAN. This data is encrypted by Speck block cipher. Once the receiving acknowledge is sent back by the gateway, the Safe Node will enter the sleep cycle which can be configured according to different monitoring frequency requirements.
For data encryption, both the sender (Safe Node) and the receiver (Gateway) are using the same cipher (Speck) and the same encrypt-key. Two software libraries are used in our work including RHEncryptedDriver from RadioHead [
47] and Speck from [
48]. RHEncryptedDriver is a library that adds encryption and decryption to the LoRa (RFM95) driver by using the Speck cipher. At first, the RHEncryptedDriver will encrypt the LoRa data using an encrypt-key and then transmit the data to the remote LoRa gateway. After the gateway receives the encrypted data, it will decrypt the data using the same key.
4.2. Health Node
The Health Node consists of a signal processing board for data processing and a sensor board for the measurements of HR and body temperature as shown in
Figure 6. Some key electronic components used in the Health Node are tabulated in
Table 2 [
39].
4.2.1. Signal Processing Board
The master board of the Health Node is designed for signal processing, data transmission, and power management. It uses the same MCU as the Safe Node, which will collect and process the signals from the sensor board. The calculated HR and body temperature will be sent to the Safe Node within the WBAN by BLE. All the environmental and physiological data are transmitted to the gateway of the LPWAN by LoRa, which will be stored and analyzed on the cloud.
The Health Node is powered by a 120 mAh rechargeable battery, which is regulated to a constant voltage by a buck-boost converter, RT6150A from Richtek Technology (Zhubei City, Taiwan). The RT6150A is a low-cost and highly efficient DC-DC converter with the shutdown current less than 1 µA and the quiescent current around 60 µA. The charging controller, MCP73831 from Microchip (Chandler, Arizona, USA), is adopted to manage the battery charging status to extend its lifetime. It first employs a fast charging mode with a constant current when the battery is in low capacitance and then a constant voltage mode after reaching a programmed voltage.
4.2.2. Physiological Sensors
The PPG sensor is implemented with a green LED (AM2520ZGC09 from Kingbright, Taipei, Taiwan) and a surface-mounted photodiode (APDS9008 from Avago, San Jose, CA, USA). The PPG uses a green LED as it is relatively less affected by motion artifacts compared with other light [
49]. The original signal from the photodiode (PD) will be pre-processed by an active low-pass filter and amplifier on the back side of the sensor board. The body temperature sensor, MAX30205 from Maxim Integrated (San Jose, CA, USA), can accurately measure temperature and provide over-temperature interrupt output to the MCU. It provides a 16-bit resolution with 0.1 °C accuracy between 37 to 39 °C. The sensor communicates with the MCU via I2C serial interface [
50].
4.2.3. Software Implementation
Figure 7 shows the software implementation for Health Node. First, the Health Node wakes up and measures the physiological sensors’ data, including body temperature and HR. After that, the BLE function of the Simblee will be enabled to transmit the physiological data to the Safe Node. Every transmission between the Health Node and Safe Node is acknowledged so that the packet success rate within BAN can be assured. Once all the data are successfully delivered, the BLE will be turned off; otherwise, a re-transmission is required. Lastly, the Health Node will enter sleep mode for the time pre-configured in the MCU software to reduce the power consumption.
7. Conclusions and Future Works
This paper presents the implementation of a hybrid wearable sensor network system for an IoT-based industrial safety monitoring applications. It comprises a WBAN for short-range wireless communication and an LPWAN for long-distance data transmission. Two sensor nodes, the Safe Node and Health Node, are deployed in the WBAN to collect the environmental and physiological data of the subject respectively, which will be further sent to an IoT gateway via the LPWAN infrastructure. The gateway (local server) is configured to perform the edge computing function, including receiving sensor signals, processing raw data, real-time display, emergency notification, as well as sending data to the Internet cloud server. The cloud will provide the IoT applications of the system, such as data storage, website display, and mobile user interface. The proposed IoT enabled wearable sensor system can be used in the industrial safety monitoring applications, such as the construction workplace, where both the environmental condition and the health status of the workers are important to ensure safety.
Table 4 summaries some recent wearable environmental and physiological monitoring applications.
In our future work, a smart IoT gateway that can cope with multiple wireless technologies and perform faster edge computing will be deployed. The edge computing can reduce the latency and improve the efficiency of the network system. A robust smartphone-based gateway can be further developed to reduce the dependency on the Raspberry Pi and best use the BLE function of the smartphone. Since the data security is very important for personal health data, security algorithm on both edge computing and cloud services will be developed to improve the privacy and security level of the entire system. More physiological parameters and different safety-related environmental sensors can also be integrated into the current work to provide a diverse monitoring system. In addition, more subjects will be involved to validate and improve the reliability and accuracy of the IoT network system.