news

ESP32-Powered Heart Rate and Pulse Oximetry Monitoring with MAX30102

Reporting from Shanghai, China
Mar 30, 2021

Learn how we can use ESP32 for monitoring vital health parameters!

Francesco Azzola’s recent tutorial on “Surviving with Android” demonstrates how to use ESP32 for the purpose of monitoring someone’s heart rate and pulse oximetry. To this end, ESP32 has to be connected to the MAX30102 sensor by Maxim Integrated Products, Inc. Concurrently, a Server-Sent-Event must be used along with ESP32, for updating the internal Web interface of ESP32, which also displays the results on a user interface. Although this project is not suitable for assessing someone’s overall health status, it is a great method for using an IoT system to monitor the heart-rate and the oxygen saturation of a patient’s hemoglobin.

MAX30102 Sensor Overview

MAX30102 is an integrated pulse oximetry and heart-rate monitoring module. It includes internal LEDs, photodetectors, optical elements, and low-noise electronics with ambient light rejection. MAX30102 provides a complete-system solution to ease the design-in-process for mobile and wearable devices.

MAX30102 operates on a single 1.8V power supply and a separate 3.3V power supply for the internal LEDs. Communication is achieved through a standard I2C-compatible interface. The module can be shut down by software, with zero standby current, thus allowing the power rails to remain powered at all times.

How to Connect ESP32 to MAX30102

As previously mentioned, this sensor has an I2C interface. Thus, we need to utilize only four of the 48 pins that ESP32 has. To measure someone’s heart rate and pulse oximetry, ESP32 must be connected to MAX30102 in the following way:

In this project we will connect the heart-rate sensor to the 3V3 pin of ESP32.

How to measure a heart rate with ESP32

There are several examples demonstrating how to develop a sketch. You can use this link to view all the possible examples. In this project, we have modified one of those examples to add ESP32’s internal Web interface which will be showing the heart rate and pulse oximetry measurements.

The entire code is given in Francesco Azzola’s blogpost. Based on this code, while the ESP32 takes the programmed measurements, it sends the respective values to a web interface so that we can visualize the results. To materialise this, we have to open our browser and point to the ESP32 Web server. The page is updated automatically. The final results are shown like in the picture below.

Francesco Azzola’s brief tutorial has demonstrated how we can retrieve vital information about our body by connecting the MAX30102 biosensor to ESP32. In this case, we focused on measuring someone’s heart rate and pulse oximetry, but this project is applicable to various other IoT scenarios for wearable electronics and beyond.

Share this article
Reuse this content