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

How to Use MAX30102 Heart Rate and Oxygen Sensor: Examples, Pinouts, and Specs

Image of MAX30102 Heart Rate and Oxygen SensorDesign with MAX30102 Heart Rate and Oxygen Sensor in Cirkit Designer

Introduction

The MAX30102 is an integrated pulse oximetry and heart-rate monitor sensor solution. 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 devices, fitness accessories, and medical monitoring devices due to its high sensitivity, small form factor, and low power consumption.

Explore Projects Built with MAX30102 Heart Rate and Oxygen 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!
Image of ESP-8266 Based Heart Rate and Oxygen Level Monitor with OLED Display: A project utilizing MAX30102 Heart Rate and Oxygen Sensor in a practical application
ESP-8266 Based Heart Rate and Oxygen Level Monitor with OLED Display

This circuit features an ESP-8266 microcontroller interfaced with a MAX30102 heart rate and oxygen sensor and a 0.96" OLED display. The ESP-8266 uses its I2C pins (D1 for SCL and D2 for SDA) to communicate with both the sensor and the display, which share the same I2C bus. The MAX30102's INT pin is connected to the ESP-8266's D0 pin, likely for interrupt-driven measurements, while all components share a common ground and are powered by the ESP-8266's 3.3V output.

Open Project in Cirkit Designer
Image of Arduino Nano-Based Pulse Oximeter with OLED Display: A project utilizing MAX30102 Heart Rate and Oxygen Sensor in a practical application
Arduino Nano-Based Pulse Oximeter with OLED Display

This circuit is designed around an Arduino Nano microcontroller, which interfaces with a 0.96" OLED display and a MAX30102 heart rate and oxygen sensor. The OLED display shows the user's heart rate and blood oxygen saturation, while the MAX30102 sensor measures these biometrics. A pushbutton is included to allow user interaction, likely for navigating the display or setting the device into a sleep mode.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

Pin Number Name Description
1 VIN Supply voltage for the sensor (3.3V to 5V)
2 SDA I2C Data Line
3 SCL I2C Clock Line
4 INT Interrupt pin. Active low
5 IRD Infrared LED cathode
6 RD Red LED cathode
7 GND Ground

Usage Instructions

How to Use the Component in a Circuit

  1. Connect the VIN pin to a 3.3V to 5V power supply.
  2. Connect the GND pin to the ground of the power supply.
  3. Connect the SDA and SCL pins to the I2C data and clock lines, respectively.
  4. Optionally, connect the INT pin to an interrupt-capable GPIO pin on your microcontroller.

Important Considerations and Best Practices

Example Code for Arduino UNO

#include <Wire.h>
#include "MAX30105.h" // Use the appropriate library for MAX30102

MAX30105 particleSensor;

void setup() {
  Serial.begin(115200);
  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 IR signal is strong enough
    Serial.print("Heart rate: ");
    Serial.print(particleSensor.getHeartRate()); // Get heart rate
    Serial.print(" bpm - SpO2: ");
    Serial.print(particleSensor.getSpO2()); // Get SpO2 value
    Serial.println("%");
  } else {
    Serial.println("No finger detected.");
  }
  delay(1000);
}

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: Yes, the VIN pin can handle 3.3V to 5V, but the logic levels for I2C should be level-shifted if necessary.

Q: How can I improve the accuracy of the sensor? A: Ensure stable contact with the skin, avoid motion artifacts, and filter the signal in software if needed.

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

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