health
Interfacing MAX30102 with Arduino Uno
What is the MAX30102?
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.
Setting Up MAX30102 with Arduino Uno
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. |
Swipe sideways to see every column →
- 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.
Related Components
A3144
Digital Hall-effect switch for contactless magnetic detection
ACS712
Measure AC or DC current with an analog Hall-effect sensor
ADXL345
Low-power 3-axis accelerometer with tap/double-tap and freefall detection for wearables.
AHT10
A tiny I2C sensor that packs temperature and humidity sensing into the smallest footprint possible.
Related Guides & Projects
Arduino Uno R4 Minima Pinout: Every GPIO, ADC, DAC, and Op-Amp Pin Explained
A complete Arduino Uno R4 Minima pinout reference — digital I/O, ADC, DAC, op-amp, CAN, dual UART, and exactly what it leaves out compared to the WiFi variant.
Mastering PWM on Arduino: Dimming LEDs and Controlling Motors
Understand what PWM actually is on Arduino, dim an LED smoothly, and safely control a DC motor's speed with a driver chip -- plus the mistakes (like wiring a motor straight to a pin) that damage boards.
4-Digit 7-Segment Counter with TM1637 & Arduino
Drive a TM1637-based 4-digit 7-segment display with Arduino Uno to show a real-time up/down counter, elapsed timer, and scrolling text. Covers library setup, brightness control, and custom segment mapping.
Arduino Uno R4 Minima vs WiFi: Which One Should You Choose?
Same processor, same memory, different price. Here's what the WiFi variant's extra hardware actually gets you, and when the Minima is the smarter buy.