Abstract
The implementation of the Internet of things in healthcare is a promising challenge to achieve coverage for a bigger number of users in different places at lower costs. Internet of things might mean better technology regarding response time and proper control of medical parameters. This study introduces an Internet-of-things system for healthcare with possibilities to control medical variables according to recent breakthroughs in sensors and data processing. The goal of the system is to optimize the development of applications to obtain variables in real time and with less energy consumption. The proposed model is validated on the measurement and monitoring of oxygen saturation, heart rate, and body temperature in patients with respiratory disorders. This was achieved by the optimization of data acquisition, integrated into a secure architecture using Message Queuing Telemetry Transport protocol. A cloud architecture with interconnection to low-cost and open-source devices was implemented, which interconnect to the sensors and actuators’ network. The experimental results were statistically treated against the device pattern data, through hypothesis tests for mean differences to probe the accuracy of the model. Finally, the proposed model demonstrates an efficient performance in several clinical parameters, such as oxygen saturation and heart rate per minute.
Introduction
Nowadays, the technology used in healthcare areas is exponentially growing; however, acquisition of optimal medical data and safety have become a challenge. The Internet of things (IoT) is the most recent and optimal technology in health areas for three reasons. First, IoT allows for the control and monitoring of previously diagnosed illnesses. Second, it helps to complement other technologies such as through sensors and high-response medical equipment in real time. Third, users suffer from health deterioration. This last advantage is presented in useful and practical applications to be available for various patients. It is a great approach to developing applications on self-care to prevent respiratory disorders due to highest global socioeconomic impact in home care.
Various related studies have been undertaken to control and mitigate respiratory disorders. Dymerski et al. 1 presented an electronic nose technique in the field of fast diagnostics of patients suspected of chronic obstructive pulmonary disease. The technique uses a simple electronic nose prototype equipped with a set of six semiconductor sensors to record chemical signals. These chemical signals are a mash of references of different volatile organic compounds. As a result, the relevance of using electronic devices in chronic obstructive pulmonary disease cases was obtained. Fernandez-Granero et al., 2 subsequently, presented a pilot study of early detection of acute exacerbations. Through machine learning techniques and with an electronic sensor, a scenario was designed to monitor breathing in elderly people. 3 This study achieved detection rates of 75.8%, with an average of 5 ± 1.9 days in advance at medical attention. This and other studies validate the use of emerging technologies to optimize respiratory disorder detection, control, and prevention.
Blood oxygen saturation (SpO2) can be measured using the analysis of infrared light patterns in a finger, an earlobe, or a toe. This parameter allows to determine if body cells are receiving enough oxygen percentage. 4 An oxygen level under 90% or 85% can result in respiratory disturbances, cognitive disturbances, and gastrointestinal problems. 5 Improving the precision for SpO2 measurement is one of the greatest challenges faced; different methods have been implemented to this purpose. Some are based on the sampling per division of frequency using two-level pulses (bi-level pulsed frequency-division multiplexing (BPFDM)), others are based on time-division multiplexing (TDM) and on simple frequency-division multiplexing (FDM). 6 The importance of measuring this parameter has led to the development of different types of devices for its measurement and monitoring. 7 The use of communication and computer devices to develop measurement and monitoring modules for SpO2 levels, heart rate, temperature, and other vital signs has contributed to guaranteeing the safety of patients in different ways and places. 8 These personal monitoring systems are not only used when doing physical activities, but they also operate in other states from the daily life of a patient, for example, their implementation in a portable and automated sleep apnea detector to measure SpO2. 9
The breakthroughs in the devices connected to the network have managed to increase IoT applications that are currently limited by the structure inflexibility from the existing network. Creating new services and more efficient applications to cover the real requirements is a challenge for this type of systems. 10 IoT systems and their applications in the monitoring of vital signs can be divided into three large groups: monitoring, control, and data analysis, all these services are subject to possible security vulnerabilities. 11 To provide privacy and security to these new developments, light protocol designs have been developed to control IoT devices, external devices, and the effective central server against conventional attacks without the need of a highly computational capacity to implement measurements and controls in the operation. 12
The growing number of applications that use virtual and physical devices, which, in turn, constitute monitoring, homecare and self-care systems, may condition or interfere with the functioning of other elements or systems in their operating and surrounding areas. 13 This is a consequence of the need to use different frequencies for different wireless devices in a limited range of frequencies without causing interferences, restriction or limitation. 14 However, any device can generate electrical noise, which can be transmitted through physical means, which, in turn, can interfere with other devices that are in the same means, system or surroundings, through transients and waves that are over the limits of the proper functioning of a device. 15 Due to the previous premise, electromagnetic compatibility (EMC) is an essential requirement applied to electronic devices to guarantee non-interference toward the environment.16,17
In Colombia, healthcare attention to patients with respiratory disorder is high. In fact, it is the seventh highest cause of mortality. 18 Consequently, for countries with large geographical distances to health centers and a wide digital gaps, IoT technology convergence is a promising solution to detect and prevent respiratory disorders by means to pulmonary function tests (PFTs) using specialized spirometry equipment. In 2014, a medical cloud-based platform for respiration rate measurement and hierarchical classification of breath disorders was introduced. This study shows the development of Hub-IoT to record and process respiratory disorder signals, but not intended to replace PFTs but to improve patient monitoring to prevent respiratory disorders. 19 Real-time monitoring of oxygen saturation patterns is shown through body sensor networks. 20 Signals are recorded through oxygen saturation patterns and body temperature. Records are available in real time to access health data via cloud computing. Data remote accessibility allows the specialist to have complete tracking at time intervals, averages, critical and historical values, among others.
Materials and methods
IoT architectural design is based on signal acquisition through sensors and, then, processed using a programmable card. Database (DB) signals are then recorded in a Hub-IoT cloud server. Hub-IoT is a technology service for multiple programming languages DB access used in this study to acquire, save, process, and analyze by means of an application programming interface (API). Optimization capabilities for application development rely on communication channels, protocols (IoT, transport, and priorities), low resource-consumption technology, among others. A performance effectiveness test application is then developed (see Figure 1). The main acquisition module includes a high-efficiency wireless personal area network (WPAN) which is composed of low energy consumption sensors, and it also has a discontinuous control system to clinical parameters.

IoT general architecture to data acquisition.
WPAN module is composed of two sensors interconnected to an e-health card developed. The first is a digital Expense body temperature sensor. The second sensor is a CMS50DL Pulse Oximeter. For this device, a synchronization protocol for e-health communication is established prioritizing SpO2. E-health cards allow users to access biometric and medical applications where body monitoring takes place. E-health cards support the use of nine multiple sensors: heart beat, blood oxygen SpO2, air flow (breathing), body temperature, electrocardiogram (ECG), glucometer, galvanic skin response (GSR)—sweating, blood pressure (sphygmomanometer), and patient position sensor (accelerometer). This allows for an efficient use of sensors, thus generating low energy consumption during data transmission. This work uses both body temperature thermometers and pulse oximeters to measure heart rate and oxygen saturation.
Wireless sensor networks nowadays provide considerable benefits over traditional approaches for multiple applications, including intelligent homes, health attention, environmental monitoring, and safety.21,22 Sensors are connected to everyday objects (doors, appliances and, even, the human body). Wireless body area network (WBAN) allows for medical attention applications that are in an early development stage, but offers valuable contributions at monitoring, diagnostic and therapeutic levels. However, the comparison of technologies and protocols on WBANs allows to analyze the development of new monitoring architectures for the collection of medical information in real time with secure data communication and low energy consumption. 23
To search, low-error range and comfortable-for-the-patient sensors that range human body temperature, oxygen saturation, and heart rate are examined. Tables 1 and 2 show multiple temperature, and heart rate and oxygen saturation sensors analyzed under different specifications, respectively.
Body temperature sensor specification.
Heart rate and oxygen saturation sensor specification.
Then, the environmental conditions during testing stage: room temperature of 21°C and a relativity humidity of 19%. The environmental conditions are not considered to change the patient diagnostic because the sensors are connected directly to the patient. E-health platform carries out an analogue-to-digital converter (ADC) process and, then, data may be used digitally. However, sensors acquire data analogously and include an ADC module.
Transmission module is composed of Arduino Uno (1) and Raspberry Pi Model 3B (Rpi3B) programmable cards. Arduino is an open-source electronics prototyping platform based on hardware and software. 24 This device conducts serial communication with the Raspberry over baud rate of 9600. Rpi3B programmable card is a small host connecting multiple sensor interfaces to Internet through multiple processing languages. Its main function is to be subscribed to the cloud broker and send data received from the Arduino. All data are then recorded in an SQL language DB, based on Not Only Structured Query Language (NoSQL) DB has better performance than the model on SQL DB. 25 To analyze the data collected, an end-user application is developed in Java language. A graphic interface shows the sensor values on considerable times of acquisition.
Message Queuing Telemetry Transport (MQTT) was the communication and control protocol used over IoT. This protocol was selected based on the analysis conducted on a decision model to work with IoT protocols based on cloud computing platforms.26,27 MQTT capabilities, management, and safety were decisive to carry out communication between broker, sensors, and applications. However, variables control was implemented using an Android application connected to the broker, thus allowing to add buttons, modify topics, publications, and subscriptions as well as to create a personal configuration per person, handling MQTT protocol, users, and passwords. Figure 2 shows the final architecture used in the analysis scenario (MQTT protocol) with temperature, oxygen saturation, and heart rate sensors. For the evaluation of magnetic compatibility, reference was made to the tests performed with the devices used in. 28 The above results are within the ranges and standards of compliance established in. 14 For the above reason, we consider that the results obtained and disclosed by are a benchmark and apply to the edge devices used in the implementation of the IoT system.28,29

IoT architecture with tele-health of Group Telemedicine Research, TIGUM center on real scenario.
Performance analysis
It is important to facilitate aggregate sensor traffic with variable report times and to control data traffic with respect to channel capacity based on frame size during transmission. 15 Direct real-time optimization is carried out during sensor processing with definite periods in algorithms according to traffic and use of small frames toward Hub-IoT, DB, and final user. Thus, Hub-IoT is similar to Hub-Sensor because both have an environment to support IoT-related application and service development. 28 For algorithm optimization over bandwidth and efficiency over data transmission, see application flow diagrams. Figure 3 and 4 shows algorithms implemented.

Algorithm deployment on programmable Arduino Uno (1).

Algorithm deployment on programmable Rpi3B.
When serial communication receives values containing letters O, T, and P, the program decides to send data from oxygen saturation, temperature, and heart rate sensors recording the current data of the sensor connected to the Arduino.
Rpi3B card is programmed to satisfy user needs regarding particular data or a specific sensor; all this in accordance with e-health parameters. Depending on the sensor and data, it transmits a letter: “T” is transmitted to identify temperature, “O” to identify oxygen saturation, and “P” to identify heart rate data the sensor is reading at that moment.
After entering the topic message, the program decides which sensor to use and, then, sends such data to the Arduino, which, in turn, returns sensor value through serial communication. Thanks to recent technology advances, it is now easier to own low-cost computers, for example, Rpi cards, Intel Galileo, and small credit-card like devices, thus allowing for low-cost IoT with higher resources.
New studies about expediting Internet connection via MQTT communication protocol are based on low bandwidth use, low data weight, and information safety configuration, thus permitting speed communication between sensors and Arduino and Rpi3B e-cards. In this study, MQTT user device can publish date to the broker-configured subscribed cloud with the purpose of monitoring data or send such data to the other subscribed broker-configured subscribed cloud. This study was based on protocol and architecture to bring IoT proposed. 14 Figure 5 shows sensor connectivity to client process.

Sensors connectivity to client process.
Data sent by sensors can be seen in applications, PCs, or mobile applications, where ongoing applications can be seen while recording data from subscribed topics under a TCP/IP protocol.
Results
Technical system validation
Initial tests based on data recording and statistical analysis are conducted in the following order: heart rate, oxygen saturation, and finally, temperature (see Figures 6–8).

Heart rate: (a) IoT system and (b) Agilent M3046Am device.

Oxygen saturation: (a) IoT system and (b) Agilent M3046Am device.

Body temperature: (a) IoT system and (b) Begut MT 402 device.
The statistical treatment applied to the experimental samples obtained from the measurements was a hypothesis test for the mean differences, where a null hypothesis with the sample mean
Table 3 shows the measurements obtained in the 838 heart rate samples made in 17 measurement intervals for each of the volunteers, and it also shows the standard deviation and the statistical operator: in the case of volunteer 1, t = 0.5234, where
Heart rate outcome on IoT system versus Agilent M3046A.
IoT: Internet of things.
Tables 4 and 5 show that t values obtained for SpO2 (0.6964, –0.3248) and for body temperature (1.0436, 0.6964), are less than
SpO2 outcome on IoT system versus Agilent M3046A.
IoT: Internet of things.
Body temperature outcome on IoT system versus Begut MT 402.
IoT: Internet of things.
Discussion
The system proposed in Chan et al., 8 evaluated the ease of use, reliability, and validity of measurement from a pulse oximeter, through the design of customized applications in smartphones, during the sessions of exercise and rest from the users with and without lung disease. The IoT system proposed collects the measurements from the same parameters in any type of session, not only in exercise and rest. In addition, the proposed IoT system has a strong computing architecture in the cloud that allows for better monitoring and data analysis.
The design shown in Son et al. 4 has a similar design to the one proposed regarding the functioning, and this design proposes a mobile device for the monitoring in real time of vital parameters, such as SpO2 and heart rate, but does not include body temperature, nor actuators for remote control. It also considers the open-source and open-hardware principles, but does not include low energy consumption devices. The standard deviations shown for contrasted heart rate (6.7, 5.9, 4, 4.5, 5.1), shown in Table 3 (4.3665, 4.3137, 3.7072, 3.7269), indicate that the IoT system proposed accomplishes more significance in heart rate measurement. For the case of SpO2, 4 it shows the following deviations (1.1, 4.4, 2, 1.2, 4), compared to the ones obtained by our IoT system (2.8823, 2.8702, 2.8718, 2.8438), and this comparison shows a similar average value for the deviations.
The Web-based system for the measurement and monitoring of heart rate and temperature shown by Raharja and Wijaya 7 contains the Web visualization of parameters, just like the IoT system proposed in this article (http://tigum.umng.edu.co/tigum/?page_id=593). However, the visualization only shows data in real time, but does not show historic data for monitoring or alerts. However, the system proposed shows historical data. The system shown by Raharja and Wijaya, 7 just like the proposed IoT system, considers the use of open hardware, but only the proposed IoT system considers the use of low energy consumption devices. The average standard deviations from Raharja and Wijaya 7 are heart rate = 2.48 and temperature = 0.63, and for the proposed IoT system, the average standard deviations are heart rate = 4.028 and temperature = 0.6245. Finally, the system 7 does not consider an actuators’ network for remote control.
Conclusion
The proposed IoT system used the measurement of oxygen saturation in the blood (SpO2) as the main medical parameter, which has been playing an increasingly important role in medical monitoring and health detection. This measurement can become a control tool for patients with respiratory disorders, even when the patient is in an unconscious state.
The use of authentication, authorization, and encrypted communication based on MQTT protocol and TLS Handshake Protocol caused that the connection was the operation that takes longer.
When the client (into IoT) is already connected, the resources it consumes and the time it takes to conduct in both cases are practically the same and do not represent a significant impact in the performance of the MQTT broker.
Even if the inflexibility from the traditional network architectures is inefficient, new ways of using infrastructure and technological communications in health are required. Open, low-cost, and low energy consumption devices can lead to more extensive monitoring periods for greater control using IoT platforms.
The implementation of this type of monitoring systems allows for the control of parameters in the environment of a patient due to their size, low energy consumption characteristics, and their compatibility with other systems. In addition, it allows for the analysis of historic data and behaviors, since it has a computing and storage capacity in the cloud systems that allows for the analysis and processing in short response times. These systems can generate alerts, control signals, or new diagnoses for patients in different environments and places because of the analysis and monitoring.
IoT technology has provided efficient solutions to health management, thus reducing care attention costs and increasing accessibility to medical data, patient safety, and time optimization in care services. All this has been achieved through multiple connections between institutions, patients, and technologies. Research outcomes enhance the benefits of IoT when monitoring and controlling vital signs.
The proposed IoT system can operate via Bluetooth in very low consumption mode, activated with ultra-low-power (ULP) protocols, with consumption under 10 mA, thus extending battery usage time. Besides, this also allows the IoT system to continue with its monitoring and control functions for the user without having an alternative power source for its energy supply during sleep states. This results in a low-cost tool that can benefit the daily life of users with respiratory disorders, thanks to the historic data and analysis available for possible diagnosis and subsequent treatments.
Footnotes
Handling Editor: Francesc Pozo
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This research was supported by the Universidad Militar Nueva Granada (Project code: IMP-ING-2660) and by the special cooperation agreement No. 002-IMP-ING-2660 of 2018 between USACH (Chile) and UMNG (Colombia).
