MAX30102 Photometric Biosensor Coupled to ESP32-Webserver Capabilities for Continuous Point of Care Oxygen Saturation and Heartrate Monitoring

: Continuous monitoring is of upmost importance to manage emergency situations in healthcare. Therefore, we investigated the use of MAX30102, a commercial photometric biosensing module coupled to ESP32 system-on-a-chip and its internet of things capabilities to continuously gather and process peripheral oxygen levels (SpO 2 ) and heartrate (HR) from users. Moreover, a user-friendly graphic interface was designed and implemented, and an anatomical case was 3D printed in thermoplastic polyester. Results showcased that the device functioned reliably and according to literature describing photometric sensor functioning, thereby shedding light on the use of simple and affordable electronics for developing biosensing medical devices.


Introduction
The development of innovative and affordable biosensing platforms for continuous biomarker monitoring is of upmost importance for patient management during healthcare crisis [1]. In this regard, several authors correlated the uninterrupted checking of patient signals to the improvement of clinical outcomes [2,3]. For instance, it has been reported that by following peripheral oxygen levels (SpO2) and heartrate (HR), medical staff can prevent the aggravation of the symptoms of respiratory diseases such as the one caused by the severe acute respiratory syndrome coronavirus 2 (SARS-Cov-2), which reaches a critical stage upon silent hypoxia [4].
Concerning the levels of SpO2 and HR in diseases, it has been proved that respiratory impairment reduces oxygen saturation [4,5], whist feedback mechanisms enhance the cardiac frequency by positive chronotropic effect [6,7]. This condition is known in many infectious respiratory diseases such as SARS-Cov-2, but it is not limited to them. It is widely reported in literature that the drop in SpO2 and ventricular tachycardia is a strong indication of chronic obstructive lung disease as well as other cardiopulmonary and circulatory ailments [8,9].
The monitoring of SpO2 and HR in the clinical setting is performed by means of pulse oximeters, which evaluate the saturation through photometric means [10]. In this sense, the probe of the device houses two light-emitting diodes (LEDs), which emit light at 660 and 940 nm; as well as a photodiode [11]. This system is positioned so that the user's finger makes an interface between the LEDs and the photodiode, so that the light intensity captured by the photodiode changes according to: the concentration of oxygen in the blood  and also due to the passage of blood through the finger. The resultant photoplethysmogram allows both the mensuration of SpO2 and HR [12].
Although simple pulse oximeters are somewhat inexpensive, the need for health professionals to frequently check the outputs on the digital displays of these devices implies the requirement of constant surveillance. This can become a nuisance if human resources are limited such as when there are many simultaneous hospitalizations, like in the current pandemic scenario [13]. In this sense, some works have interfaced pulse oximeters with wireless technologies, thereby allowing remote patient surveillance by health professionals [14][15][16].
The combination of internet-of-things (IoT)-based communication with artificial intelligence and classification tools in pulse oximeters has allowed medical staff to better analyze patient status, evolution and prediction of their clinical outcomes [17,18]. Nevertheless, even though promising, the products which employ wireless technologies are still costly, thereby hindering their acquisition by hospitals. In fact, this is further aggravated in developing nations due to taxation and currency exchange rates for imported electronic material [19], what therefore highlights the importance of developing innovative medical devices capable of affordably combining IoT communications and continuous monitoring.
Therefore, owing to the relevance in developing low-cost platforms to aid the remote surveillance of patient biomarkers, this work employed a commercial photometric module (i.e., MAX30102) and an inexpensive low-power system-on-a-chip (SoC) microcontroller (i.e., ESP32) in order to develop an open-open source IoT-based pulse oximeter to remotely monitor SpO2 and HR continuously.

Materials
MAX30102 was used as the sensing module. This component is an integrated SpO2 and HR monitor module for low-noise electronics with built-in ambient light rejection. MAX30102 functioning is fully validated and comprises an optical module of 5.6 mm × 3.3 mm × 1.55 mm 14-Pin with low-power HR monitor (<1 mW) and ultra-low shutdown current of 0.7 µA, as well as robust motion artifact resilience and −40 °C to +85 °C operating temperature range. It can be supplied with a single 1.8 V source, or a separate 3.3 V [20,21]. Moreover, ESP32 was also used. This component is a 32-bit, low-cost, low-power SoC which operates at 160 or 240 MHz, and has integrated IoT capabilities (Wi-Fi and dualmode Bluetooth) [22]. The board used for the project are the LILYGO ® TTGO T-Display that include the ESP32 and a 1.14 Inch liquid crystal display (LCD), this board it is also capable of running on a rechargeable Lithium-Ion battery. Furthermore, thermoplastic polyester (polylactic acid) (PLA) filaments were used in a custom 3D printer in order to build and assemble the case.

Circuit Design, Firmware and Device Construction
The overall operation of the device consisted of the signal acquisition from the user's fingers by MAX30102. These signals were then transmitted to the ESP32 by SPI protocol, moreover the MAX30102 was powered by the ESP32. The firmware in ESP32 SoC then allowed the information to be shown on the liquid crystal display (LCD), as well as to use ESP32 IoT capabilities to transmit data to the cloud (webserver). The firmware of the sensor platform herein described was developed using Arduino Integrated Development Environment (Arduino IDE). Both native and external libraries were used, such as Wifi, SPI, Wire as well as SparkFun electronics sensor MAX30102 library. The assembly of the device consisted of integrating both the sensing module and ESP32 SoC platform, and connecting MAX30102 and ESP32 with jumper wires made of copper and soldering iron. The jumper connections were 0.9 mm diameter. Furthermore, a case was designed to house each element of the device, and prototyped by 3D printing using yellow PLA filaments. The overall functioning of the device, as well as the circuit topology and tridimensional rendering used for 3D printing are showcased in Figure 1.

Figure 1. (A)
Outline of the device functioning, wherein the signals from patient's finger is gathered by MAX30102 and transmitted to ESP32, which both displays the information on an LCD display, as well as send it to the cloud using the SoC IoT capabilities. (B) Circuit topology evidencing the use of MAX30102 and ESP32 SoC general-purpose input/output pins for communication between these two integrated circuits. (C) Rendering of the model used for the 3D printing of the device. ESP32 is housed in the wrist while the MAX30102 is in the finger of the user. The connections between MAX30102 and ESP32 were performed with 0.9 mm diameter jumper wires.

Results and Discussion
After communicating MAX30102 and ESP32, the hardware was placed in the 3Dprinted PLA case. Then, a universal serial bus (USB)-C cable was used to transfer the firmware to the device using Arduino IDE. The prototype is showcased in Figure 2. As showcased in Figure 2, the prototyped device presented the expected dimensions, being able to properly house ESP32 SoC and MAX30102 sensing module. Each part was firmly attached to the case; therefore, the user could freely move his hands without risking dislodging the components. Moreover, the clip at the finger portion worked well in attaching the fingertip of the user so that the sensor could touch the skin surface.
Furthermore, the readings of pulse oximetry were collected and compared to a standard pulse oximeter. Data was monitored both from the LCD, as well as ESP32 webserver, being the graphical product of the webserver results depicted in Figure 3. The readings could be performed both in the LCD at the wrist of the user, as well as remotely through a personal computer connected with ESP32 webserver. Both readings were the same and showcased values akin to those provided by a standard pulse oximeter. Considering that MAX30102 is a highly functional and reliable sensing module whose applicability in medical devices is widely reported and of acknowledged validation, the adequate functioning was an expected finding [13]. Moreover, the operation of the device followed the reliability described by other authors who communicated development platforms such as the one herein used with MAX30102 [20,23]. In addition, the webserver capabilities of ESP32 were adequate to a single-user setting, taking into account the memory limits of this SoC. Indeed, several developers described the easy integration of MAX30102 with AT-mega328P-based Arduino and also Tensilica Xtensa LX6 microprocessor-based ESPs [14,24]. Considering that the ESP32, such as the one herein used, allows ready IoT integration due to native wireless modules, its use is therefore more appropriate considering easiness of development and use. Moreover, ESP32 is considerably less bulky than Arduino development board, what therefore allows easier portability, such as by integrating the SoC on the wrist of the user for pulse oximetry purposes.
Nonetheless, the integration of ESP32 and MAX30102 has already been described by several developers and hobbyists due to its very easy reproduction. However, the integration of the IoT capabilities of ESP32 has not been often reported for biosensing purposes. In this regard, many reports described do-it-yourself prototype devices which were of bench-top nature, as required direct communication with computers to operate and were not designed for portability. On the other hand, the device herein described is fully operational and IoT-integrated with simple programing, as well as portable and anatomic, due to the prototyped PLA case. Therefore, this work evidences how the use of simple and affordable electronics can assist the inexpensive develop IoT-based medical devices.

Conclusions
This work investigated the use of MAX30102, a commercial photometric biosensing module coupled to ESP32 SoC and its IoT capabilities to continuously gather and process SpO2 and HR from users. Results showcased that the device functioned reliably and according to literature describing photometric sensor functioning, thereby shedding light on the use of simple and affordable electronics for developing biosensing medical devices.