ESP32/IoT B.Tech/Diploma Beginner

MAX30102 & Arduino: Heart Rate + Blood Oxygen Monitoring

Interfacing MAX30102 Pulse Oximeter Sensor with Arduino to measure Blood Oxygen Sp02 Heart Rate BPM in OLED Display with MAX30102 Code Library

  • Suitable forB.Tech/Diploma ESP32/IoT students
  • Build time1-2 weeks
  • LevelBeginner
  • Available atAjvika Labs, Kakinada

About this project

Overview
In this project, we will be interfacing
MAX30102
Pulse Oximeter Sensor with
Arduino
to measure
Heart Rate (BPM)
&
Blood Oxygen Concentration (SP02)
. The Pulse Rate value and Blood Oxygen value will be displayed on 0.96″
OLED Display
The MAX30102 is an integrated
pulse oximetry
and
heart-rate monitor
biosensor module based on PPG (
PhotoPlethysmoGraphy
). The MAX30102 pulse Oximeter Sensor can be integrated with any
microcontroller
like Arduino, ESP8266, ESP32, STM32 or Raspberry Pi Pico using the
I2C communication
protocol.
BPM
stands for ‘
beats per minute
,’ which typically range from
65
to
75
during rest for an average person. Athletes may have BPM rates lower than this range.
SpO2
represents the
oxygen saturation
level, which, for a normal individual, is above
95%
Earlier, we used
MAX30100 Pulse Oximeter
sensor but MAX30102 is
better
&
précised
version of same sensor. This project covers the
MAX30102
introduction, pinout, working, connection & applications in detail. At the end, the sensor can be used in
real-time application
project.
Bill of Materials
Following are the components that we need for this project. The components can be purchased from the given links.
S.N.
Components
Quantity
Purchase Link
1
Arduino UNO Board
1
Amazon
AliExpress
SunFounder
2
MAX30102 Pulse Oximeter
1
Amazon
AliExpress
SunFounder
3
0.96\" SSD1306 I2C OLED Display
1
Amazon
AliExpress
SunFounder
4
Push Button Switch
1
Amazon
AliExpress
SunFounder
5
Jumper Wires
10
Amazon
AliExpress
SunFounder
6
Breadboard
1
Amazon
AliExpress
SunFounder
MAX30102 Pulse Oximeter Sensor
The MAX30102 is an integrated pulse oximetry and heart-rate monitor module.
Not only heart rate, this device can also measure the concentration of oxygen in blood. This is a sensor designed by Analog Devices. The module is available in various board configurations designed by different manufacturers.
It includes internal LEDs, photodetectors, optical elements, and low-noise electronics with ambient light rejection. The MAX30102 provides a complete system solution to ease the design-in process for mobile and wearable devices.
MAX30102 Functional Diagram with Detailed Description
Lets take a look at the design part of the MAX30102 Pulse Oximeter Sensor Module. The sensor is designed for the demanding requirements of wearable devices. The device maintains a very small solution size without sacrificing optical or electrical performance. Here is its block diagram.
The MAX30102 is fully adjustable through software registers, and the digital output data can be stored in a 32-deep FIFO within the IC. The FIFO allows the MAX30102 to be connected to a microcontroller or processor on a shared bus, where the data is not being read continuously from the MAX30102’s registers. It has a fixed I2C address of
0xAE
(for write operation) and
0xAF
(for read operation). You may refer to
MAX30102 Datasheet
for more information.
SpO2 Subsystem
The SpO2 subsystem of the MAX30102 contains ambient light cancellation (ALC), a continuous-time sigma-delta ADC, and a proprietary discrete time filter. The ALC has an internal Track/Hold circuit to cancel ambient light and increase the effective dynamic range. The SpO2 ADC has
programmable full-scale ranges from 2µA to 16µA. The ALC can cancel up to 200µA of ambient current. The internal ADC is a continuous time oversampling sigma-delta converter with 18-bit resolution. The ADC sampling rate is 10.24MHz. The ADC output data rate can be programmed from 50sps (samples per second) to 3200sps.
Temperature Sensor
The MAX30102 has an on-chip temperature sensor for calibrating the temperature dependence of the SpO2 subsystem. The temperature sensor has an inherent resolution of 0.0625°C. The device output data is relatively insensitive to the wavelength of the IR LED, where the Red LED’s wavelength is critical to correct interpretation of the data. An SpO2 algorithm used with the MAX30102 output signal can compensate for the associated SpO2 error with ambient temperature changes.
LED Driver
The MAX30102 integrates Red and IR LED drivers to modulate LED pulses for SpO2 and HR measurements. The LED current can be programmed from 0 to 50mA with proper supply voltage. The LED pulse width can be programmed from 69µs to 411µs to allow the algorithm to optimize SpO2 and HR accuracy and power consumption based on use cases.
Technical Specifications
Maximum Current Consumption
6mA
Voltage
3.3-5V
Sample Rate
50Hz – 3200Hz
I2C Address
0xAE (Read) & 0xAF (Write)
Temperature Range
-40°C to +85°C
Temperature Accuracy
±1˚C
ADC Resolution
18 bits
IR LED peak wavelength
880nm
Red LED peak wavelength
660nm
MAX30102 Power Requirements
The MAX30102 IC operates on a single 1.8V power supply but a separate 3.3V power supply is required for the internal LEDs. So the module comes with 3.3V and 1.8V regulators.
The module can be shut down through software with zero standby current, allowing the power rails to remain powered at all times.
MAX30102 Module Pinout
Most of the MAX30102 Module has 5 Pins while some have 7 pins which are explained below:
Pin
Description
VIN
This pin is used to supply power to the sensor. This sensor is powered on at 3.3-5V.
SCL
This is the I2C serial clock pin.
SDA
This is the I2C serial data pin.
INT
This is the active low interrupt pin. It is pulled HIGH by the onboard resistor but when an interrupt occurs it goes LOW until the interrupt clears.
IRD
IR LED Cathode and LED Driver Connection Point
RD
Red LED Cathode and LED Driver Connection Point
GND
Ground Pin
How MAX30102 Pulse Oximeter Sensor Works?
Let us understand the working of MAX30102 Pulse Oximeter Sensor.
Principle
The MAX30102 works by shining both
lights
onto the finger or earlobe (or essentially anywhere where the skin isn’t too thick, so both lights can easily penetrate the tissue) and measuring the amount of
reflected light
using a
photodetector
. This method of
pulse detection
through light is called
Photoplethysmogram
The working of MAX30102 can be divided into two parts:
Heart Rate Measurement
and
Pulse Oximetry
(measuring the oxygen level of the blood).
Heart Rate Measurement
The
oxygenated hemoglobin (HbO2)
in the arterial blood has the characteristic of absorbing
IR light
. The redder the blood (the higher the hemoglobin), the more IR light is absorbed.
As the blood is pumped through the finger with each
heartbeat
, the amount of
reflected light
changes, creating a
changing waveform
at the output of the photodetector. As you continue to shine light and take
photodetector readings
, you quickly start to get a
heart-beat (HR)
pulse reading.
Pulse Oximetry
Pulse oximetry is based on the principle that the
amount of RED
and
IR light
absorbed varies depending on the
amount of oxygen
in your blood.
Interfacing MAX30102 Pulse Oximeter Sensor with Arduino
Let us interface the MAX30102 Pulse Oximeter Sensor with Arduino & find out how we can use it for Heart Rate Blood Oxygen measurement.
Wiring up a MAX30102 Module to an Arduino
Connecting a MAX30102 module to an Arduino board allows you to experiment with monitoring heart rate and blood oxygen levels. Here is the connection diagram.
Connect the VIN pin & GND Pin of the MAX30102 to the 3.3V & GND pin on your Arduino. Similarly Connect the SCL & SDA pin of the MAX30102 to the A5 & A4 pin on the Arduino Uno respectively.
You can use a breadboard and jumper wires for assembly.
Measuring Heart Rate, Blood Oxygen & Temperature with MAX30102 & Arduino
In the coding part of this project, we can use the MAX30102 Arduino library to measure the value of Heart Rate in BPM, Blood Oxygen in percentage and Temperature in degree Celsius. Before that, we need to install the MAX30102 library.
MAX30102 Arduino Library Installation
There are multiple libraries available for MAX30102 Sensor to measure the heart beat, blood oxygen and temperature. Out of all these libraries, the library fro

Technologies used

ESP32ESP8266ArduinoRaspberry PiSTM32BLESSD1306OLEDMAX30102I2CADC

Hardware components

  • ESP32
  • ESP8266
  • Arduino
  • Raspberry Pi
  • STM32
  • SSD1306
  • OLED
  • MAX30102

Software & tools

  • Arduino IDE

What you get

  • Working project / hardware kit, tested before delivery
  • Complete source code with explanation
  • Project demo and guidance for your viva
  • Project report, PPT and IEEE paper support (on request)
Delivery & Payment
Delivery takes a minimum of two weeks from the date your inquiry is confirmed. Payment is in two parts: • 50% advance to start the project • Remaining 50% before delivery Note: • Documentation and PPT are not included by default • If you need documentation/PPT, it can be arranged for extra time and cost We'll confirm the exact timeline and cost with you after reviewing your requirements.