Skip to content
Home > Components > Sensors > MAX30102 Heart Rate

MAX30102 Heart Rate Sensor

An optical pulse oximeter and heart-rate sensor module for biometric measurements.

Component Preview

MAX30102

The MAX30102 is an integrated pulse oximetry and heart-rate monitor biosensor module. It includes internal LEDs, photodetectors, optical elements, and low-noise electronics with ambient light rejection. In the simulator, you can configure simulated biological attributes (red and IR light reflection) to test your I2C code.

SensorsBiometricI2C

Overview

The MAX30102 operates via the I2C bus and requires a 3.3V or 5V power supply. It is heavily utilized in wearable fitness trackers and medical monitors to measure heart rate and blood oxygen levels (SpO2).

Pin Reference

PinTypeDescription
VINpowerPower supply (3.3V or 5V).
SDAdigitalI2C Data line. Connect to A4 on Uno.
SCLdigitalI2C Clock line. Connect to A5 on Uno.
GNDpowerGround connection.
INTdigitalInterrupt output. Triggers on new data or thresholds.
IRDdigitalIR LED driver pin (rarely used directly).
RDdigitalRed LED driver pin (rarely used directly).
NCncNo Connection.

Configurable Attributes

AttributeTypeDefaultDescription
i2cAddressstring0x57The I2C address of the sensor on the bus.
redLedobject{}Configuration for simulated Red LED reflection characteristics.
irLedobject{}Configuration for simulated Infrared LED reflection characteristics.

Working Principle

The module works by shining both red light and infrared light into the skin and measuring the amount of light that reflects back. Oxygenated blood absorbs more infrared light, while deoxygenated blood absorbs more red light. The pulsing of the blood allows the sensor to also calculate heart rate.

Wiring Diagram

Example of connecting the MAX30102 module to a microcontroller using I2C.

Wiring Diagram

Example Arduino Code

To test the MAX30102, you will typically use a library like the SparkFun MAX3010x library.

cpp
#include <Wire.h>
#include "MAX30105.h" // Works for MAX30102

MAX30105 particleSensor;

void setup() {
  Serial.begin(9600);
  
  if (!particleSensor.begin(Wire, I2C_SPEED_FAST)) {
    Serial.println("MAX30102 not found");
    while (1); // Halt if not found
  }
  
  // Set up the sensor with default settings
  particleSensor.setup(); 
}

void loop() {
  // Read both IR and Red values
  Serial.print(" R:"); 
  Serial.print(particleSensor.getRed());
  Serial.print(" IR:"); 
  Serial.print(particleSensor.getIR());
  Serial.println();
  
  delay(100);
}

Simulation Notes

  • In the simulator, placing your mouse over the sensor component allows you to interact with sliders to manually simulate biological reflection data (altering Red and IR values).
  • The I2C address is fixed at 0x57 unless changed in the component properties.

Notes / Warnings

  • Real-World Warning: Readings from this sensor are sensitive to motion and ambient light interference. It is not intended for clinical diagnostic use.

Released under the MIT License.