**Communication latency between the Arduino and the Choreographer**

**Figure 9.** Comparison of the delay in the communications for the system deployed on a desktop computer and a Raspberry Pi for the segmen<sup>t</sup> between the Arduino and the Choreographer for the active communication mode.

Another finding involves the precision of time intervals. The PC shows a bigger reliability by means of a lower standard deviation and a lower range. As an example, for the EMG communication between the Arduino and the Choreographer (Figure 9), the PC has a delay of 0.051 ± 0.0035 s and a range of 0.2504 s (N = 300), whereas the Raspberry has a delay of 0.0175 ± 0.149 s and a range of 0.294 s (N = 300). Therefore, the Choreographer achieves a higher reliability for acquiring measurements if deployed in a PC.

**Communication latency between the Choreographer and the Web Page**

**Figure 10.** Comparison of the delay in the communications for the system deployed on a desktop computer and a Raspberry Pi for the segmen<sup>t</sup> between the Choreographer and the webpage with the active communication mode.

## **4. Discussion**

In this paper, we present an integration of two innovative paradigms: Health Sensors and IoT focused on simple deployments. These two streams, which are widely accepted by the scientific community, are seen as the future of how information and communication technologies can make health care system sustainable. Moreover, the connection of these two paradigms with new ubiquitous computing and artificial intelligence models can promote the crucial step-forward for the adoption and spread use of health sensors for the managemen<sup>t</sup> of chronic conditions.

In this context, forecasts on the increment of the population over 60 years old in developed countries and the pandemic dimension some diseases are reaching deserves special attention. Health care systems are not prepared to sustain these numbers and there is increased demand for better and personalized care services. This is the main reason that pushes us to propose cheap and scalable solutions that allow users to plug and play them without the need of understanding complex standards or programming frameworks.

One of the flagship projects on the evaluation of remote care presented in Section 1 (Whole System Demonstrator Programme) has demonstrated favorable results on the managemen<sup>t</sup> of patients with chronic conditions, but stating that the technology is not ye<sup>t</sup> ready for scaling-up [11]. The system proposed and evaluated in this study is based on a Service Oriented Architecture with a central component (Choreographer). The Choreographer works as a message dispatcher that allows

connecting different modules (health sensors, webpages, etc.). The simplicity of the Choreographer prevents us from using another type of complex integration solutions like Enterprise Serial Bus (ESB), which provides a gain on the performance of its execution and fault tolerance [20].

The Choreographer relies on existing libraries and communication stacks of Microsoft .NET v4.5 framework, a key element for ensuring its reutilization and the compatibility with legacy systems in hospitals and health care infrastructures. The Choreographer implements a protocol based on a custom formatting message exchange language, XMGS. XMSG is based on SOAP and not REST to achieve a minimum level of standardization of information exchange across the system. Nevertheless, as reported in Section 3, REST stands as a proper methodology for describing the interfaces of the system by simply serializing XSMG. The proposed architecture can be adapted to a RESTful architecture with JSON messages, but due to the complexity of the distributed system, the number of sensors and client applications, it is needed to ensure a minimum set of information into the exchanged messages.

The eHealth sensing platform has been built on purpose using the Arduino Libellium kit, a low-cost solution that allows the integration of a wide range of physiological sensors. Even though these sensors are for prototyping, they are useful to work with on the design, development and evaluation of possible solutions to record, store and transmit biometric signals (ECG, EMG, Airflow, etc.). This technology was chosen over other commercial health sensors because of the cost as well as the integration simplicity: Arduino provides serial communication over wired and wireless physical interfaces, whereas the majority of sensors only provide wired communication, and, most of the time, the protocols to retrieve measurements are not available for third parties or are based on complex standards as the ISO/IEEE 11073 [14].

The proposed system is capable of hosting and serving a website as a regular web service. This is an extremely important feature that allows certifying the system as plug-and-play. With the proposed architecture of communications, health sensors may be configured to be subscribed to a specific website to perform a real-time broadcasting of the measurements, at the same time that these measurements may be stored in cloud services or analyzed by complex algorithms.

The deployment of this system is feasible on either a PC or a Raspberry Pi. According to our experiments (Figures 9 and 10), there is a statistically significant increased delay on the Raspberry Pi with respect the PC, which is understandable considering the unbalanced set of computational resources. However, for some specific cases, this delay is not relevant for the medical and monitoring purpose; (in the case of ECG, latency difference is below 0.030 s).

The significantly increased delay of Raspberry Pi may be related to the processor technical features, which has fewer capabilities than the personal Computer processor (ARMv8 @1.2 GHz and 1 GB RAM versus Dual Core @2.6 GHz and 4 GB RAM). Future work should consider experimental verification of the causes of the delay. Our results show that the latency experimented from side-to-side (meaning from sensors to the webpage) has not a big difference (even though significant), and the delay introduced by the Raspberry Pi is assumable. The low costs and requirements of a Raspberry Pi are not comparable with the high costs and requirements of a personal computer. Therefore, our experiments sugges<sup>t</sup> that the new architectures for monitoring bio-signals could rely on the implementation of networks based on the Raspberry Pi without compromising the latency.

## **5. Conclusions**

In this manuscript, we present and evaluate a scalable system based on five wearable sensors that allow the plug-and-play deployment on different use scenarios (on Raspberry and desktop computer). Raspberry pi yields a significant increased delay with respect to the same implementation in a personal computer. However, the measured delay is negligible and acceptable in real-time remote monitoring. Implementation of health web sensor node as a part of the Internet of Things using a Raspberry Pi has benefits with respect the use of a desktop computer, which paves the way to the implementation of new portable systems for remote managemen<sup>t</sup> of chronic conditions. Future work will pursue on this

line, finding out the percent of missing packets and the throughput in terms of other KPIs, such as the error rate, memory use, power consumption and influence of the network load (4 G/5 G). Moreover, future research should implement large amounts of traffic (several users and longer periods) to reflect the performance differences in commercial environments.

**Author Contributions:** J.-L.B.-M. and A.M.-M. conceived and designed the experiments; W.H. performed the experiments; A.M.-M., J.-L.B.-M. and W.H. analyzed the data; C.F.-L., Y.S. and V.T. contributed to materials and analysis tools; and J.-L.B.-M.and A.M.-M. wrote the paper.

**Funding:** This research received no external funding.

**Acknowledgments:** The authors would like to acknowledge *Cátedra Telefónica* at the Universitat Politècnica de València for supporting the acquisition of the materials used in the research herein presented.

**Conflicts of Interest:** The authors declare no conflict of interest. The founding sponsors had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, and in the decision to publish the results.
