Keywords

1 Introduction

Medical technology is a key element in global problems concerning health, as it can improve the quality of life or extend it through the appropriate use and prevention. Its value is calculated not only for its economic cost but also for its impact in practice and the success of medical treatments. Due to medicine improvements, life expectancy has increased. Along with this, the caring for the elderly and people with chronic diseases have also improved, emphasizing the need of preventive medicine and monitoring of these patients. Also, the concept of Home Care appears as a promising alternative for these patients, preserving the social and familiar support and relations. Domotic is a growing area of commercial devices, due to the comfort search and home automation, but not specific for patients home care. Several attempts have been proposed, for monitoring daily life activities [1] and vital signs [2], between others, focusing the attention in alarms and emergency help. On the other side, new trends in Internet of Things have introduced the remote control of home appliances and electronic devices in order to optimize energy consumption and comfort. The control input is through cell phones, voice commands or remote access, through Wi-Fi or Bluetooth communication [3,4,5]. However, all these approaches are adapted to elderly or chronic people and not fully designed for them. The main objective of this work is the design and implementation of a non-obtrusive system, that accomplish with technical requirements of wearable systems, like low weight, small size, battery autonomy and versatility to different patients, pathologies and geographic situation.

2 Materials and Methods

The system has the following main blocks: wearable sensors network, home automation network, scenarios analyzer and information management (Fig. 1).

Fig. 1
figure 1

General diagram: The user block comprises the wearable sensors network and the relation with the input HCI; the home automation block and the Central Control, for scenario analysis and information management

2.1 Wearable Sensors Network

Health monitoring is accomplished through the wearable sensors network, that is unobtrusive, lightweight and low consumption. The physiological variables chosen for this application were corporal temperature (T°), blood oxygen saturation (SpO2), heart rate (HR), kinetic measurements (KM) and voice. The sensor nodes are based in the microcontroller CC2650, with Bluetooth 4.0 Low Energy (LE) of Texas Instruments® [6]. The processor is a M3Cortex 32bits, at 48 MHz. The benefit of this configuration is the low size and low energy consumption that allows the autonomy for long time periods with a CR2450 battery (3 V and 600 mAh).

The SpO2 node uses the AFE4403 embedded circuit, (Texas Instruments®), which consist in an analogical Front-End. For more information, see [7]. For temperature acquisition the sensor used was the LMT70, Texas Instruments ®, small size such as 1 × 1 mm and 0.05 °C of accuracy in the range of 20–42 °C [8]. To voice register the choice was a microcontroller with WiFi radio embedded. The microphone signal is filtered and digital codified by a TLV320 codec through Pulse Code Modulation (PCM) sampled at 22 kHz and with a resolution of 16bits [9]. This codec send the data under the I2S communication protocol to the microcontroller, which is in turn connected to the WiFi net for the Audio Over IP (AOIP) distribution using the User Datagram Protocol (UDP). This slaves or sensor nodes are schematized in Fig. 2.

Fig. 2
figure 2

a Block diagram for SpO2 and Heart Rate Sensor. The operation is based in the classical principles of IR and Visible Light absortion. Heart rate is obtained from signal processing. b Block diagram for Body Temperature Sensor. The data are sampled one per minute, for energy saving. EDA block is Electrodermic Activity, not tested yet. c Block diagram for Voice Register Node

The sensor node communication is achieved by a wireless link Bluetooth LE and concentrated in a collector that allows the relation between this net and another WiFi net, that pickup the information from all the sensors, including the other blocks sources. The battery level is also included in the information and all the data packages are sent to the scenario analyzer block in order to decide the interaction with the control actions, such as familiar alarm, emergency alarm, domotic control, and so on.

2.2 Domotic Network

Home-User interaction is done through a network of sensors and automated devices communicated through the MQTT message protocol [10]. This protocol proposes a Publicant-Suscriptor model between computers via WiFi, and can be established with topics that is represented by a hierarchical chain. The topics are created by the publicant and the nodes must be subscripted and communicated with him (Fig. 3). The basis of the MQTT is the TCP/IP protocol, but is a much better option due to the small size and the secure message delivery. The Broker chosen was the EMQ, because is open source, is scalable, allow coworking and secure connections by SSL, and can be used with Big Data applications (>1 M package per second).

Fig. 3
figure 3

Message exchange between nodes using MQTT protocol

Several nodes are distributed in home, in order to acquiere variables such as room temperature, luminosity, carbon monoxide, doors open and movement detection on circulation zones. Also, devices nodes are necessary to lights, air conditioner, blinds, and TV control. An important node is the call to nurse. The user commands the home appliances with different Human–Computer Interfaces (HCI), i.e. a tablet [11] (Fig. 4).

Fig. 4
figure 4

Domotic UI -User Interface SICAA for TV, PC or mobile tablet

2.3 Scenario Analyzer

The determination of patient’s situation is the ultimate objective of the work. For this purpoe, the sensor information is analyzed in order to interact with home appliances and activate the notification and alarms mechanisms if it is necessary. For this purpose a graphic web interface (Node-RED [12]) was designed to interconnect easily the blocks that represents the nodes distributed in the home. The information is analyzed and the system decides the action to pursuive.

2.4 Information Management

Sensors information is stored in a database of time series, that allows the analysis of the evolution of one variable or the multivariable study, which is our concern. The impact of habits changes in physiological and behavioral variables can be reflected in these time series. A time series database greatly facilitates the process of searching, collecting and validating information. For all the above, it is the choice for solutions where it is necessary to manage large volumes of information and analysis in real time. In our platform, we chose to use InfluxDB, from InfluxData [13]. On the other hand, the variables are monitored and analyzed using Grafana [14]. This solution allows us to obtain real-time graphs of all the variables collected by the system and visualize them in an interactive web interface (Fig. 5).

Fig. 5
figure 5

Node-RED as easy way for interact with sensors

2.5 Blocks Connection

The whole system is constructed above a virtual structure based in XenServer [15]. This is a flexible and modular scheme that allows the addition of new services, computing power and hardware changes without problems or reconfigurations (even in fail cases). Each virtualized system behaves as if it was a standalone PC, and each one is called Virtual Machine (VM) (Fig. 6).

Fig. 6
figure 6

Node Wearable modules. Master (left) and Slaves (right) modules for Hearth Rate/SpO2, IMU, Temperature, and microphone. Is important to note the size related with a wristwatch

3 Results

All sensors were designed and implemented in small size, for a first validation and test. The oxymeter and heart rate data were compared with a commercial device (Medix OXi-3), which was taken as a standard to calculate the absolute measurement error in the 10 volunteers. The values obtained (error average of 2%) show an acceptable performance [16]. Related to the graphical programming of the action plan for different situations with Node-RED, Fig. 7 shows two posible situations and the solutions proposed. Graphical interface and time series visualization is presented in Fig. 8. The Grafana interface allows us to obtain real-time graphs of all the variables collected by the system and visualize them in an interactive web interface.

Fig. 7
figure 7

Up: Example for movement detection in bedroom at night. Down: Example for Carbon Monoxide detection and alarm trigger

Fig. 8
figure 8

Up: Real-time graph showing wearable sensors’ values for a specific patient. Down: Real-time graph showing patient’s environment variables

4 Conclusions

The system presented is a complete solution for home and patient monitoring, constituting a suitable alternative for elderly and chronic people. All electronic designs were tested and validated with acceptable performance and the communication protocols and graphical interfaces are according with the main objective of the work. In the next stage of the project, home automation of volunteers must be done in order to conclude in the social impact of the system.