MAX30102 practical reference
The MAX30102 is an integrated pulse oximetry and heart-rate monitor module that combines red and infrared LEDs, a photodetector, and low-noise analog signal processing into a single package. It measures blood oxygen saturation (SpO2) and heart rate by shining light through the skin and detecting the tiny changes in reflected light caused by blood flow, making it the go-to sensor for wearable health trackers, pulse monitors, and fitness project builds.
Key specifications
- Sensor type: Integrated SpO2 and heart-rate module with red + IR LEDs and photodetector
- Operating voltage: 1.8V logic / 3.3V LED supply (breakout boards regulate from 3.3-5V input)
- Operating current: Configurable LED current, typically 5-10 mA average during active sampling
- ADC resolution: 18-bit internal ADC
- Measurement: Heart rate (BPM) and blood oxygen saturation (SpO2 %) via photoplethysmography
- Interface: I2C, up to 400 kHz (fast mode)
- Sample rate: Programmable, 50-3200 samples per second
- Additional feature: Onboard temperature sensor for optical readout calibration
Pinout and connection notes
The default I2C address is 0x57. Because the sensor is very sensitive to motion and ambient light, best results come from a firm, still fingertip placement (or a wrist strap design) shielded from direct sunlight, and most libraries need a short warm-up period before heart-rate/SpO2 values stabilize.
- VIN: Power, 3.3–5V DC depending on breakout regulator
- GND: Ground
- SCL: I2C clock line
- SDA: I2C data line
- INT: Interrupt output — signals when new sample data is ready, avoiding constant polling
- IRD / RD: Some breakouts expose raw IR/RED LED test points, not typically used in normal designs
Integration checklist
- Confirm the exact part number and breakout-board revision.
- Verify supply voltage, current demand, logic levels, and signal direction against the datasheet.
- Check controller pin assignments and bus address or interface mode against the example code.
- Power up with external loads disconnected, then test signals before full integration.
- If readings or communication fail, check power and ground first, then pin mapping, interface settings, and library initialization.
Troubleshooting and reproducibility
Record the board used, wiring, library/version, supply arrangement, and measured behavior. Use the selected board-specific wiring example as the source of truth. Never assume visually similar modules share identical voltage tolerance or pin order.
MAX30102 at a glance
Specifications
- Sensor
- MAX30102 optical module with red and infrared LEDs and photodetector
- Interface
- I²C; common module address is 0x57
- Logic and LED rails
- The bare IC uses separate low-voltage logic and LED supplies; breakout boards differ in regulators and level shifting
- ADC
- 18-bit optical sampling path; effective results depend on configuration and signal quality
- Sampling
- Programmable sample rate and pulse width; higher settings increase data and power requirements
- Data
- Raw red/IR photoplethysmography samples; heart-rate and SpO₂ estimates require validated algorithms and good placement
- Use limitation
- Hobby modules are not medical devices and must not be used for diagnosis or treatment decisions
Pinout
| Pin | Name | Description |
|---|---|---|
| VIN / VCC | Module supply | Supply voltage depends on the breakout regulator and level-shifter design; verify the exact board before using 5 V. |
| GND | Ground | Common ground with the controller. |
| SCL | I²C clock | I²C clock line; use a compatible pull-up voltage and controller logic level. |
| SDA | I²C data | I²C bidirectional data line; use a compatible pull-up voltage and controller logic level. |
| INT | Interrupt | Optional active-low interrupt output on common boards; confirm polarity and pull-up implementation for the exact module. |
Wiring & code
Board integration
Library
SparkFun MAX3010x Pulse and Proximity Sensor Library by SparkFun
Arduino IDE → Tools → Manage Libraries → search "SparkFun MAX3010x Pulse and Proximity Sensor Library" → Install
Wiring
| Component pin | Arduino Uno pin | Note |
|---|---|---|
| VIN | 5V | |
| GND | GND | |
| SDA | A4 | I2C data. |
| SCL | A5 | I2C clock. |
#include <Wire.h>
#include "MAX30105.h"
MAX30105 particleSensor;
void setup() {
Serial.begin(9600);
if (!particleSensor.begin(Wire, I2C_SPEED_FAST)) {
Serial.println(F("MAX30102 not found — check wiring"));
while (1);
}
particleSensor.setup(); // defaults: red+IR LEDs, sample avg 4, 100Hz
}
void loop() {
long irValue = particleSensor.getIR();
if (irValue < 50000) {
Serial.println(F("No finger detected"));
} else {
Serial.print(F("IR: "));
Serial.println(irValue);
// Real BPM/SpO2 math needs the full SparkFun algorithm example —
// see File > Examples > SparkFun MAX3010x > Example4_HeartbeatDetector
}
delay(20);
}- Getting usable BPM/SpO2 numbers needs the peak-detection algorithm from the library's own examples (Example4_HeartbeatDetector, Example5_HeartRate) — raw getIR()/getRed() values are just brightness, not a heart rate.
- Needs firm, still contact with a fingertip covering both LED and photodiode; motion and light gaps around the finger are the main source of bad readings, not the sensor itself.
- This is a consumer wellness sensor, not a medical device — do not use it for actual medical diagnosis or monitoring.
