IoT System for Vital Signs Monitoring in Suspicious Cases of Covid-19

Currently the world is going through a pandemic caused by Covid-19, the World Health Organization recommends to stay isolated from the rest of the people. This research shows the development of a prototype based on the internet of things, which aims to measure three very important aspects: heart rate, blood oxygen saturation and body temperature, these will be measured through sensors that will be connected to a NodeMCU module that integrates a Wi-Fi module, which will transmit the data to an IoT platform through which the data can be displayed, achieving real-time monitoring of the vital signs of the patient suspected of Covid-19. Keywords—Covid-19; vital signs; internet of things; NodeMCU; IoT platform

The health system in Peru is currently going through a very serious problem, according to the latest reports, there are more than 1,102,000 positive cases and more than 39,800 deaths due to Covid, with a 3.62% lethality rate, with only 11,200 hospitalized patients, 1,892 ICU beds, of which only 7 ventilators are available nationwide. [3], Hospitals and health centers do not have the resources to attend all suspected cases and positive patients. The most recent study on human resources in the health sector indicates that in Peru there are 13.6 physicians for every 10,000 inhabitants, i.e. only 1 physician for 1,000 patients, in addition to an inadequate distribution of medical personnel at the national level. [4], making the healthcare system totally deficient and inadequate to deal with the increasing number of patients caused by  As a result of the aforementioned data, the following question arises: What happens to the people who tested positive for Covid-19, because although Covid-19 cases are classified into five stages: asymptomatic, mild, moderate, severe and critical? [5]. It is those in serious and critical condition that are treated in health centers. Once the patient has been diagnosed with Covid-19, he/she is obliged to remain isolated in his/her home until the incubation and infection stage has passed, which can last between 12 to 15 days. [6], in addition to maintaining distance from family members to reduce the likelihood of contagion.
A new question arises: What happens to patients who are isolated in their homes, because they suffer the risk that the disease caused by Covid-19 worsens, and if they are not administered the necessary drugs, they may die, to perform this follow-up they would normally have to be taken to the hospital, where they will undergo various tests to identify the heart rate, respiratory rate, blood oxygen saturation, blood pressure and body temperature, because Covid-19 to develop in the body [7], the health system carries out patient followups by medical personnel, who go to the homes of positive or suspected Covid cases, where the lives of medical personnel are exposed to contracting the disease, in addition to generating effort and expense in the process.
Given the current situation in Peru, many of the medical centers nationwide are full of patients, exceeding their capacity of care, in these circumstances the medical centers do not attend in the right way, so people have to opt for private health services, as is the case of clinics, However, low-income people cannot have access to this service, neither to health services, nor to a Covid screening, having to spend the incubation stage in their homes, keeping home isolation, increasing the number of people vulnerable to contracting Covid-19, exposing the family of the infected or suspected case, if the necessary measures are not taken such as: isolating the infected person, keeping a distance of at least 2 meters and controlling symptoms on a daily basis. Faced with this situation that the country is going through, it is necessary to resort to innovative and outstanding ideas for the solution of the different problems that this pandemic has generated in society.
As we know, the internet of things has been developed even in the health sector, called telemedicine [8], but it can also be applied in the same homes for medical and health purposes. That is why an internet of things system will be developed to monitor vital signs in patients or suspected cases of Covid-19, this is done with the help of different specialized sensors.
The internet of things (IoT) is the interconnection of devices (sensors and actuators) or objects (everyday objects with internet access) through a network, in order to communicate and transfer information, without the need for human presence to do so, this is called machine-machine communication (M2M), for the development of an IoT system protocols, communication technologies, domains and applications are established [9]. The proposed IoT system aims to measure certain vital signs in order to provide prompt help in case of any drastic change in their health, reducing the effort of medical staff [10], also avoiding that the patient goes through stress, produced when a person is hospitalized, in the same way, reducing stress in medical personnel, according to a study done in China, cases of 1257 workers are reported, 50% began to feel symptoms of depression and more than 70% presented symptoms of psychological distress [11] thus generating a high risk for those who face this pandemic in the first row, with this proposed solution, the time to obtain vital signs, the time of medical care of home visits and the response time to an anomaly in the vital signs are reduced.

A. Internet of Things (IoT)
Also known as IoT. It is the interconnection between devices, objects or things-electrical appliances, modules, machines, devices and more, through the internet to communicate and exchange data [12].
To make it possible to develop this technology it is necessary an integral series of technologies, such as the (API) that are those that connect to the internet the different devices, in addition to the use of standards and IoT platforms where the different devices that are connected will be visualized.

B. Arduino IDE
It is an open source Arduino software, where it is easier to code, load and run a series of codes, which will form the program we develop, this software is a text editor and compiler at the same time, serves to program and to transfer the code to the Arduino board, but is also compatible with many other modules, note that this software works with the Processing programming language and can be installed on operating systems such as Windows, Mac and Linux [13].

C. NodeMCU ESP8266
It is a development board belonging to the NodeMCU family, it is a totally free software and hardware, this board allows the connection of several devices with each other, through the internet, thanks to the ESP8266 Wi-Fi module that has incorporated, this chip is also compatible with TCP/IP, being the easiest and fastest way to develop IoT projects [14].

D. Pulse Oximeter Sensor MAX30102
Very compact sensor, it is considered non-invasive, with which you can measure: the level of oxygen saturation in hemoglobin (SpO2), through a LED circuit and a photodetector capable of measuring the amount of light reflected through the finger, as there are variations between the reflection that occurs through the blood loaded with oxygen with deoxygenated blood, oxygenated blood tends to absorb more infrared light, while deoxygenated blood absorbs more red light [15].

E. Sensor LM35
It is a temperature sensor of good assertiveness index, having a very low cost, with a working range between -55°C to 150°C, has an analog output with its respective power pins, has an accuracy of 0.5°C making it easy to use with a variety of applications where it can be implemented [16].

III. BACKGROUND
In recent years, medicine has made great advances, developing a variety of technologies for health monitoring. At [17] the importance of the development of portable biomedical sensors to facilitate the remote monitoring of patients is expressed, focusing on the measurement of heart rate and body temperature, for different conditions presented by the patient, whose data will be sent to a doctor through the Zigbee network.
In the investigation [18] presents a monitoring system developed for the measurement of cardiac pulse and oxygen saturation, focused on preventing and monitoring different diseases, consisting of an oximetry sensor and a Nellcor DS-100 sensor in charge of detecting the signs and their variations, which will then be sent to a mobile application, which will process the data to issue an alarm if necessary and to visualize the data.
In the investigation [19] shows a prototype system for monitoring vital signs, including body temperature, heart rate and oxygen desaturation, using an lm35 sensor, Pulse Sensor Amped and an Arduino board, which will allow the detection, processing and sending data to a mobile application on a cell phone and with a monitor you can view the graphs with respect to the heart rate.
In the investigation [20] presents a system to monitor the patient's desaturation remotely, taking into account the anomalies that can cause oxygen desaturation in a patient, so it is considered a permanent monitoring of this sign, to improve the diagnostic process of the patient, who is at home, this is achieved through different electronic components and a Wi-Fi module, at the end the data are displayed on a local host by the doctor.
In all the mentioned works is present the importance of monitoring vital signs, focused on different types of diseases, the research work developed, focuses on the monitoring of Covid-19, establishing the different levels of severity of the different signs, has the minimum number of sensors to capture the signs that vary in that disease, In addition to having a web system, in which the doctor can view statistics and graphs of the different vital signs, managing to send alerts to an email or a mobile device, in this way, this research unifies different technological aspects of the antecedents and seeks better alternatives to focus on monitoring patients suspected of Covid-19.

IV. METHODOLOGY
For the development of this project, Methodology V is used, this methodology is used for the development of ICT projects, used for the management and also for the development of systems, especially software development for ICT components. www.ijacsa.thesai.org The reason why this methodology is used is because it is very easy to use for the development of this research, has 6 phases, focuses on quality management procedures, because at each level it has, there is an opposite side that performs the tests and thus reduce the risks that the project or product goes wrong.
The V methodology or V method, has 4 levels of which there is a parallel phase of verification, referring to the shape of the model, as it compares the phases of development with their respective quality control, in each phase describes the activities performed and the results produced throughout the development, on the left side are the phases of specification, containing the tasks of design and development of the system, while on the right side are the phases of testing, which contain the control measures of each phase as unit tests and integration tests [21].
V. DEVELOPMENT The IoT system that was developed, can perform three measurements of a patient, which are: heart rate, oxygen saturation and body temperature, these being the vital signs that are affected by the disease Covid-19, presenting with various symptoms such as fever, cough among others, the data of these vital signs, are obtained through the use of two sensors such as the MAX30102 sensor, with which it is possible to obtain the heart rate and oxygen saturation in the blood and the LM35 sensor for measuring body temperature.

A. Phase 1: Specifications
At this stage the appropriate sensors and modules will be chosen, among the sensors is the MAX30102, which is used to measure heart rate and oxygen saturation, through red and infrared LED circuit, both lights are intercepted are reflected through the finger and a photodiode captures it and calculations are made of oxygen saturation, can also measure heart rate while held down, after a series of operations are performed, such as calculating the average per minute, you get a specific number, this being the number of beats per minute [22]. The other sensor to be used is the LM35 sensor that can measure the temperature, with a high assertiveness, having an accuracy of 0.5°C.
We also use the NodeMCU board, which has a microcontroller, where it is programmed through the Arduino IDE. The important thing about this board is that it has a WiFi module, this allows a wireless connection that can easily connect us to the internet, allowing us to send or receive files over the internet. Table I shows the functional requirements of the prototype, then Table II shows the non-functional requirements of the prototype to be developed.

B. Phase 2: Overall Design
The design of the system is presented interacting with the web and those involved, visualizing the path of the vital signs data, it starts when the patient is using the prototype and this is connected to the WiFi network, where the NodeMCU board will be the brain of the system, thanks to the microcontroller it has, in this module will be connected LM35 sensors for temperature and MAX30102 sensor for heart rate and oxygen saturation, then the data will go to the internet where they reach the Ubidots platform and then to the web application.
All the above process is reflected in the system architecture, as shown in Fig. 1. Fig. 2 shows the established design, using the Fritzing software, the connections between the NodeMCU board and the MAX30102 and LM35 sensors can be observed. The prototype must connect to the home WiFi network automatically.

RFP2
The prototype must be connected to the Ubidots platform.

RFP3
The prototype must analyze serial communication data from the MAX30102 sensor to obtain frequency and saturation data.

RFP4
The prototype must analyze the serial communication data from the LM35 sensor to obtain the temperature data. The prototype must be connected to the MAX30102 sensor.

RNFP2
The prototype must be connected to the LM35 sensor.

RNFP3
The prototype must integrate a NodeMCU

RNFP4
Prototype must be connected to a battery for portability.

RNFP5
The prototype must not be invasive to the user.

RNFP6
The prototype should start operating when connected to a power source. The LM35 temperature sensor is very small and has three pins for connection. When connected with a typical jumper cable, it does not connect firmly to the pins of the LM35 and when it comes in contact with the skin, it alters the captured data.
It is therefore necessary to solder the pins and cover them with thermofit, as shown in Fig. 3, where the LM35 sensor pins are completely covered.
2) LM35 sensor programming: The LM35 sensor is programmed to obtain the body temperature data, in addition to establishing the Wi-Fi connection, the HTTP protocol must be established to send the data to the Ubidots platform, a certain part of the code is as shown in the following Fig. 4.
3) MAX30102 sensor programming: The MAX30102 sensor is programmed to obtain the data related to the oxygen saturation and heart rate signals. Fig. 5 shows part of the code, specifically the Void Loop, where the data that will be printed on the serial monitor at the time of execution can be seen.

E. Phase 5: Verification
This phase focuses on the verification of the hardware and software modules, on a unitary basis, to check that they are working properly.

1) MAX30102 sensor test:
After programming the MAX30102 sensor, the necessary test is performed, where the oxygen saturation data captured by the sensor is observed through the serial monitor, as shown in Fig. 6.
2) LM35 sensor test: After programming the LM35 sensor, we proceed to perform the necessary tests. In Fig. 7, the patient data captured by the sensor are shown, printed on the serial monitor, where the values must be stable, so that the values are automatically sent to the Ubidots platform.

F. Phase 6: Integration
In this phase, the sensors will be integrated into the same code in the Arduino IDE, and the data will be obtained at the same time from the NodeMCU board, so that they are then sent to the Ubidots platform and subsequently sent through the web system, thus, to perform the respective monitoring of the patient.

1) Connection of the prototype:
We proceed to connect all the system components: the NodeMCU board, the MAX30102 sensor and the LM35 temperature sensor. Fig. 8 shows the prototype with all the components correctly connected.
2) Unified prototype programming: After making the prototype connections, integrating the NodeMCU board with the MAX30102 and LM35 sensors, we proceed to perform the necessary programming.   As shown in Fig. 9, we can see the libraries and variables established to operate both sensors, in addition to placing the credentials to establish the Wi-Fi connection and access to the Internet. Fig. 10 shows some operations established in the Void Loop, necessary for sending data to the Ubidots platform, the data are captured and sent in a specific order, in addition to containing an identifier for that prototype.

3) Prototype testing:
The test is performed, where the data must be real values of the patient, and the test is performed by comparing the printed values with the values obtained by means of specialized instruments. Fig. 11 shows the data printed on the serial monitor, the data are captured by the sensors and sent to the Ubidots platform, in addition to having established a condition not to capture data if the patient does not have his finger on the MAX30102 sensor, thus avoiding the sending of invalid data.
As shown in Fig. 12, the Ubidots platform can be seen, with the data sent by the prototype.
The data from the Ubidots platform are sent to the developed web system, where the patient chosen to perform the test is selected, and the respective values of the patient's vital signs are displayed, as shown in Fig. 13.
The patient data in the web system can also be viewed through graphs, as shown in Fig. 14.      Different tests were performed to test the hypothesis: that the use of a prototype system based on the Internet of Things improves the process of monitoring vital signs in suspected cases of Covid-19, taking into account the following indicators: Indicator 1: The use of a prototype system based on the internet of things reduces the time required to obtain vital signs.
In this test we want to demonstrate that the time in which the measurements of the patient's vital signs are taken, using the patient's daily instruments and having to go to the patient's home to take the measurements, takes an average of 29.5 minutes, while using the prototype developed and taking the measurements remotely, the average is 4.6 minutes, as shown in Fig. 15.
Indicator 2: The use of a prototype system based on the Internet of Things reduces the medical care time.
In this test we want to show that the time in which the patient receives medical care, including results, recommendations and prescription, is expedited, this process takes on average about 28.3 minutes, instead using the prototype developed and perform medical care remotely, the average is 12.4 minutes, as shown in Fig. 16.   In this test it is desired to show that the time in which the doctor is alerted about any change in the patient's signs, so that the doctor can perform the necessary actions in relation to his condition, this process takes on average about 2528.5 seconds, instead using the developed prototype, which can issue a notification, message or call, the average communication time of the patient's condition is 18.8 seconds, as shown in Fig. 17.

VII. CONCLUSIONS
In conclusion, this system is of great help to patients or suspected cases of Covid-19, who are in their homes, monitoring their vital signs and see if the disease worsens in their body to provide a prompt solution and provide appropriate assistance, preventing the disease from worsening in their body.
In a different way, it will help medical personnel by preventing them from being exposed to many Covid-19 positive cases and running the risk of becoming infected, eliminating the face-to-face follow-ups that are currently performed on positive patients who are isolated in their homes. While it is true that medical staff will always be needed in hospitals or clinics, this system will help to reduce the number of patients presenting at hospitals, and staff can focus only on severe cases and reduce to some extent their stress and fear of exposure and interaction with so many patients.
An internet of things prototype, built with the NodeMCU board, is beneficial for monitoring vital signs and facilitates sending data to the internet in a fast and secure way, with the different communication protocols that can be used to send data to the internet.
The construction of a vital signs monitoring system can be done with a minimum amount of sensors and expenses, since the sensors and boards used in this project are the cheapest in the market, and the code for its operation can be found by searching the internet.