Vital Signs Monitoring Device with BPM and SpO2 Notification Using Telegram Application Based on Thinger.io Platform

Vital signs are an important component of monitoring the adult or child patient's progress during hospitalization, as they allow for the prompt detection of delayed recovery or adverse events. Vital signs are measured to obtain basic indicators of a patient's health status. The most common intervention performed in hospital medicine is a measurement of vital signs, and these traditionally consist of blood pressure, temperature, pulse rate, and respiratory rate. Advanced monitoring systems incorporate a balanced combination of clinical and technological aspects to give an innovative healthcare outcome. Remote patient monitoring systems are rapidly becoming the core of healthcare deliveries. The paradigm shifted from traditional and manual recording to computer-based electronic records and smartphones as versatile and innovative healthcare monitoring systems. This research aims to design a Vital Sign Monitoring device for BPM and SpO2 Parameters with Notifications through the IoT-Based Telegram application. This device can monitor vital signs, especially BPM and SPO2, wherever the patient is and whenever so that doctors or health workers and patients can find out their health condition. This display can be viewed via web thinger.io, then forwarded to telegram if an abnormal patient condition is found. Additionally, an indicator light will light up differently for each condition. This study uses the MAX30100, a digital sensor to detect oxygen saturation and heart rate. The results of this study have succeeded in displaying data on the IoT web and sending notifications to the Telegram application. And also, the resulting data has an error that does not exceed the allowable limit according to each parameter. The difference between heart rate readings and oxygen saturation values on the device and patient monitor is 0.015% for heart rate and 0.01% for oxygen saturation. This study indicates that it is time to monitor vital signs that can be seen remotely and have a system that is an inexpensive and easy-to-operate device for health workers without interfering with activities of daily living. INDEX TERMS Vital Sign Monitor, MAX30100, BPM, SpO2, IoT


I. INTRODUCTION
Vital signs are an essential component of monitoring the adult or child patient's progress during hospitalization, as they allow for the prompt detection of delayed recovery or adverse events. Vital signs are measured to obtain fundamental indicators of a patient's health status. The most common intervention performed in hospital medicine is a measurement of vital signs, and these traditionally consist of blood pressure, temperature, pulse rate, and respiratory rate. Continuous monitoring of vital signs using wearable wireless devices may allow for timely detection of clinical deterioration in general wards compared to standard intermittent vital signs measurements. The heart is one of the essential organs in the body that has heavy-duty and works very hard. The heart works as a pump of blood throughout the body. Everything that is consumed and the activities that are done every day can 1 affect the condition of the heart [1]. The heart works continuously without stopping and will decrease with increasing human age. The standard human heart rate ranges from 60-100 beats per minute (beats per minute/bpm) [2]. A monitoring device is a device that serves to monitor a person's health condition. Monitoring is vital if there are symptoms of a disease that must be taken quickly so that the patient's condition does not worsen. The patient's condition can deteriorate anywhere and at any time. For that, we need a device equipped with a system that can notify doctors to take action if the patient shows results less or more than average [3]. This study aimed to design a Vital Sign Monitoring Device with IoT-Based Notification Parameters (BPM and SpO2). This device can monitor vital signs, especially BPM and SPO2, wherever the patient is and whenever so that doctors or health workers and patients can find out their health condition. This display can be viewed via web thinger.io, then forwarded to telegram if an abnormal patient condition is found, and there is an indicator light that will light up differently for each condition. This study uses the MAX30100, a digital sensor to detect oxygen saturation and heart rate.
In a previous study, Anggi Zafia made a prototype of an Inpatient Vital Monitoring Device using a Wireless Sensor as a Physical Distancing Effort for handling Covid 19 using Zigbee [4]. A similar study was also conducted by Fahmi Farisandi and Ahmad Fatkudin on Portable Patient Diagnostics equipped with Normal/Abnormal Indicators [5]. The device analyzed the rate of change of BPM and changes in the patient's body temperature. Several researchers and manufacturing companies in the medical field were conducting research and development of this system used for daily heart activity monitoring needs, as was done by [6] using the Max30100 sensor and Arduino microcontroller with a personal computer display with an accuracy of 92.36%. However, this system will only output BPM (Beat Per Minute) data. The other research [7] was a heart rate monitor based on a laptop interface microcontroller, using an AD8232 sensor and an Arduino Nano microcontroller, displaying ECG waveforms, bpm counts, and images of normal heart rates. Some of these studies used laptop displays, which are inflexible for some users. Therefore, we need a device design that can be used easily in monitoring heart rate using a PC or smartphone display at a low cost. The recording results can be known directly, then stored in a WEB application sent via internet media, known as IoT-based. The use of IoT systems in the medical world can also facilitate the information system [8]. Anan Wongjan, Amphawan Julsereewong, and Prasit Julsereewong made a device to measure heart rate and oxygen saturation in real-time using two LEDs, namely a red LED and an infrared LED, as well as a photodiode. The photodiode used is TCS-230 which is used to detect the intensity of light on the two LEDs reflected by the finger veins. To be able to produce readings of heart rate and oxygen saturation, this device is used on the finger. The measurement signal is processed using LabVIEW, which displays real-time heart rate per minute (BPM) and oxygen saturation readings. This device also has a probe-off alarm and a warning message when the finger is not attached to the sensor [9]. In this study, the machine had a fairly large shape besides that sensor readings are sent to a computer via NI_USB-6009, a data acquisition module, so it was not easy to carry anywhere, and wireless communication with Bluetooth is not yet supported. A 2019 study, heart rate monitoring and oxygen saturation through smartphones, was created by Arys Sulistyo Utomo et al. from the Electrical Engineering Academy, made to monitor heart rate and oxygen saturation that can be monitored via a smartphone [10]. The drawback of this study was the readings of the heart rate and oxygen saturation values are different between the display on the LCD and the smartphone due to the unequal time of sending the reading data. In the same year, research was conducted on a Hypoxic Symptom Detection System Based on Oxygen Saturation and Heart Using the Arduino-Based Fuzzy Method by Dian Bagas Setyo Budi et al. from Brawijaya University [11]. In 2013, Yessy Mega Jayanti made a Portable BPM With a Finger Sensor Based on the ATtiny2313 Microcontroller [12]; there were shortcomings in this study because this device did not have a remote monitor and RTC to find outpatient data every hour. Then it was developed by Riszqy Cahyaning Maulina, who made a Heart Rate Monitoring device with a Graphic LCD equipped with an SD Card and RTC storage [13]. However, the drawback of this device was that its physical condition was still large and did not display BPM but instead displayed a graph. Fachrul Rozie from Electrical Engineering, Tanjungpura University, in 2016, developed previous research with his research, namely the design of an android-based heart rate monitoring device [14]. However, the drawback of this device is that it only has one parameter. Guruh Hariyanto, Universitas Airlangga, continued his research, Designing a digital oximeter based on the Atmega16 microcontroller and found a drawback: the device only uses one parameter and is not portable [15]. In 2017, Lokeswara Darmalaksana, with his research, was a portable BPM with a finger sensor equipped with RTC and SD card storage [16]. Still, this device has the disadvantage of detecting bpm and is displayed on seven segments. In 2019, the SpO2 and BPM Smartwatch Design with Android Display by Eryanda Bima Mahendra [17] were made; this research was built based on the ATmega328P microcontroller, Max30100 sensor, OLED, and RTC. This research has proven that the accuracy of this device is feasible for SpO2 and BPM displayed on OLED. The device can be expanded by adding a sim card so that messages can be sent without connecting to android. 1 Based on identifying the condition above, the author desires to design a Vital Sign Monitoring device for BPM and SpO2 Parameters with Notifications through the IoT-Based Telegram application. This device is used as a monitoring device that can be used anywhere and anytime, and so that patients or users can monitor their vital conditions, which are displayed on display, web thinger.io, forwarded to telegram if the patient's condition is not normal, and the indicator lights will light up differently for each situation. Patients in the adult age range can use this device to relate well to medical personnel and receive timely care.

A. EXPERIMENTAL SETUP
This study used six normal subjects in relaxed conditions and was randomly sampled. Aditionally, the data collection was repeated six times.

1) MATERIALS AND TOOLS
The study uses the MAX30100 (Gy-Max30100, Hongkong) as a digital sensor to detect oxygen saturation and heart rate. The MAX30100 is an integrated heart rate monitor and pulse oximetry sensor solution. It combines two LEDs, a photodetector, optimized optics, and low-noise analog signal processing. This circuit is used to detect pulse oximetry and heart rate signals [18]. The prepared sensor is placed on the patient's finger. Furthermore, two microcontrollers are used to process the device so that it can achieve the desired target. The Arduino Mega [19] microcontroller reads sensor data and communicates with IoT using the ESP32 Microcontroller [20]. LCD Character 20x4 is used to display values , and an RGB LED will light up according to the displayed data values. A Patient Monitor (Mindray, Beneheart D6, China) will be used to compare device values. The study is used a MAX30100 (Gy-Max30100, Hongkong). The sensor was attached to the finger of the patient. Two microcontrollers are used to process the device. The Arduino Mega Microcontroller [19] reads the sensor data and communicates to the IoT using ESP32 [20] Microcontroller. A 20x4 LCD character displays the value, and RGB LED will light up according to the displayed data value. A Patient Monitor (Mindray, Beneheart D6, China) was used to compare the value from the device.

2) EXPERIMENT
After the design is complete in this study, a trial will be carried out to obtain numerical results whose values will be compared with the IoT and LCD displays. The results obtained will then be compared using a calibrated vital sign monitor installed during the trial on the same patient to test the device. Measurement of examination taking was carried out 6 (six) times in a row on 6 (six) different patients.

B. THE DIAGRAM BLOK
The MAX30100 sensor will read the heart rate and oxygen saturation values attached to the finger in this research. The results of the sensor readings will be processed in the Arduino Mega 2560 microcontroller as a data processor, which will then be sent via serial communication to the ESP32 (FIGURE 1). Furthermore, wifi on the ESP32 will send data to the thinger.io server, whose data can be accessed by health workers. If the data output from the parameter is not normal, a notification of the patient's vital status will be sent via telegram received by the health worker. In addition, the RGB LED device will light up according to the patient's condition with the following information: red color means below normal, green color means normal, and blue color means above normal:

C.THE FLOWCHART
The Arduino program is built based on the flowchart as shown in FIGURE 2. When the on button is pressed, the initialization process occurs. The MAX30100 sensor will detect and calculate the value of heart rate (BPM) and oxygen saturation (SpO2). The microcontroller Arduino Mega 2560 will process the data and send it to ESP32 while the data is displayed on the LCD Display. ESP32 will wait for the wifi to be connected.

III. RESULT
In this study, the device has been tested by comparing it to a patient monitor (Mindray, Beneheart D6, China) and MAX30100 (Gy-MAX30100, Hongkong) placed on the human body. The result shows that the device is feasible to be used by patients. FIGURE 3 is the monitoring vital sign design with the LCD Display and RGB LED. The measurement of the BPM value is shown in the display LCD and thinger.io, and then they are compared to the patient monitor. The measurement and the error are in TABLE 1.  The measurement of SpO2 value was also compared in this study between the design and patient monitor. The result was shown in TABLE 2. FIGURE 4 shows the display of thinger.io compared to the standard unit's design (patient monitor). Measurements were made on respondent 1 in a relaxed state. The display on Thinger.io and the serial monitor also appears on the display module with the same value, 72 bpm for heart rate and 95% for respondent oxygen saturation. 1 saturation. Telegram programming is on ESP32 by giving calls to endpoints that have been provided by thinger.io as a facility.

IV. DISCUSSION
In this study, a comparison of data was carried out to determine the Mean value and Error value of the device made. After accumulation, the average error in the SpO2 parameter is = 0.01%, in the ECRI provisions regarding the maximum allowable error in the blood oxygen saturation (SpO2) parameter, which is 1%, and the average error in the BPM parameter is = 0.015%, in the ECRI provisions regarding the maximum allowable error in the BPM parameter, which is 5% [21]. The results of comparing the module with the comparison device have an average error value that does not exceed the permissible limit according to their respective parameters. The resulting SpO2 and BPM parameter values are displayed on the LCD, web thinger.io, telegram notifications equipped with light indicators on the device.

V. CONCLUSION
This research aims to design a Vital Sign Monitoring device for BPM and SpO2 Parameters with Notifications through the IoT-Based Telegram application. The device has succeeded in detecting heart rate and oxygen saturation values satisfactorily and with sufficient accuracy. Furthermore, IoT thinger.io has achieved in monitoring patient conditions and can be accessed by users and medical personnel in real-time in various places using the Telegram application. According to each parameter, the resulting data has an error that does not exceed the allowable limit. The difference between the heart rate readings and oxygen saturation values on the device and patient monitor is 0.015% for heart rate and 0.01% for oxygen saturation. There is still a need to improve the ease of operation and competitive components to be affordable for people. int indexnya =0; LOOP: unsigned long currentMillis = millis(); if(currentMillis -previousMillis >= interval){ previousMillis = currentMillis; String data = ""; while(DataSerial.available()>0){ data += char(DataSerial.read());} char buf[sizeof(data)]; data.trim(); data.toCharArray(buf,sizeof(buf)); char *p=buf; char *str;