Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use MAX30102 HR + SpO2 sensor: Examples, Pinouts, and Specs

Image of MAX30102 HR + SpO2 sensorDesign with MAX30102 HR + SpO2 sensor in Cirkit Designer

Introduction

The MAX30102 is an integrated pulse oximetry and heart-rate monitor sensor module. It combines two LEDs, a photodetector, optimized optics, and low-noise analog signal processing to detect pulse oximetry and heart-rate signals. The MAX30102 is widely used in wearable health devices, fitness trackers, and medical monitoring devices due to its small form factor and low power consumption.

Explore Projects Built with MAX30102 HR + SpO2 sensor

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!

Common Applications and Use Cases

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

Pin Number Name Description
1 VIN Power supply (1.8V to 3.3V)
2 SDA I2C Data Line
3 SCL I2C Clock Line
4 INT Interrupt pin (active low)
5 IR Infrared LED cathode
6 R Red LED cathode
7 GND Ground

Usage Instructions

How to Use the Component in a Circuit

  1. Power Supply: Connect the VIN pin to a 1.8V to 3.3V power source and the GND pin to the ground.
  2. I2C Communication: Connect the SDA and SCL pins to the corresponding I2C data and clock lines on your microcontroller.
  3. Interrupts (Optional): The INT pin can be connected to an interrupt-capable GPIO pin on your microcontroller to handle events like data-ready.

Important Considerations and Best Practices

Example Code for Arduino UNO

#include <Wire.h>
#include "MAX30105.h" // Include the MAX30105 library

MAX30105 particleSensor;

void setup() {
  Serial.begin(115200); // Initialize serial communication at 115200 baud rate
  Wire.begin(); // Initialize I2C

  if (!particleSensor.begin(Wire, I2C_SPEED_FAST)) { // Initialize sensor
    Serial.println("MAX30102 was not found. Please check wiring/power.");
    while (1);
  }

  particleSensor.setup(); // Configure sensor with default settings
  particleSensor.setPulseAmplitudeRed(0x0A); // Set Red LED amplitude
  particleSensor.setPulseAmplitudeIR(0x0A); // Set IR LED amplitude
}

void loop() {
  long irValue = particleSensor.getIR(); // Read IR value

  if (irValue > 50000) { // Check if the sensor is covered
    // Read the heart rate and SpO2 levels
    float heartRate, spO2;
    if (particleSensor.checkForBeat(irValue) == true) {
      if (particleSensor.getSpO2(&spO2, &heartRate)) {
        Serial.print("Heart Rate: ");
        Serial.print(heartRate);
        Serial.print(" bpm - SpO2: ");
        Serial.print(spO2);
        Serial.println("%");
      }
    }
  } else {
    Serial.println("No finger?");
  }

  delay(1000); // Wait for 1 second before next reading
}

Troubleshooting and FAQs

Common Issues Users Might Face

Solutions and Tips for Troubleshooting

FAQs

Q: Can the MAX30102 be used on a 5V system? A: The MAX30102 operates at 1.8V to 3.3V. A logic level converter is required for 5V systems.

Q: How can I improve the accuracy of the readings? A: Ensure a snug fit against the skin, minimize motion, and avoid direct sunlight on the sensor.

Q: What is the I2C address of the MAX30102? A: The default I2C address is 0x57 (7-bit).

Q: Can the MAX30102 measure heart rate through clothes? A: No, the sensor needs to be in direct contact with the skin for accurate measurements.