Component guide · Intermediate · 3 min read
MAX30102 Heart Rate and SpO2 Sensor Guide
By Geekobot Learning Team · Updated 24 Oct 2026
On this page
The MAX30102 is an optical sensor with red and infrared LEDs and a photodetector. It measures the tiny changes in light absorbed as blood pulses through a fingertip, called photoplethysmography, from which code estimates heart rate and blood oxygen (SpO2). It talks over I2C at address 0x57 and modules run from 3.3 V or 5 V. Readings suit learning projects, not medical decisions.
Key specs at a glance
- LEDs
- Red (about 660 nm) and infrared (about 880 nm)
- Interface
- I2C, address 0x57
- Supply
- 1.8 V core and 3.3 V LED rail; modules regulate from 3.3 to 5 V
- Data
- 18-bit ADC, configurable sample rate, 32-sample FIFO
- Outputs
- Raw red and IR readings; heart rate and SpO2 come from your code
- Predecessor
- MAX30100 (similar, lower resolution)
How it measures pulse and oxygen
Each heartbeat pushes a little more blood into the fingertip, absorbing more light, so the reflected signal rises and falls with the pulse. Counting those peaks gives heart rate. Oxygen-rich blood absorbs red and infrared light differently from oxygen-poor blood, so comparing the pulse size at the two wavelengths gives an SpO2 estimate. The sensor only provides raw light values; the library does the maths.
Wiring and code
Connect VIN to 3.3 V (or 5 V if your module has regulators), GND to GND, SDA and SCL to the I2C pins, and optionally INT to a GPIO. Some purple low-cost modules pull SDA and SCL up to 1.8 V; they usually work with 3.3 V boards but may be unreliable with a 5 V Uno, in which case add 4.7 kΩ pull-ups to 3.3 V or use a level shifter.
The SparkFun MAX3010x library works with Arduino and ESP32 and includes heart-rate and SpO2 examples. Show readings on an OLED for a portable pulse meter.
Getting stable readings
- Rest the finger with light, steady pressure; pressing hard stops the blood flow.
- Keep still and shade the sensor from room light, ideally with a finger clip or a small cover.
- Wait 5 to 10 seconds for the readings to settle before trusting a value.
- Cold fingers give weak signals; warm hands help.
Not a medical device. Hobby modules and open-source algorithms are not calibrated or approved for diagnosis. Do not use them to make health decisions.
Try it: I2C pull-up calculator
Change the values and the diagram and results update as you type.
Common mistakes to avoid
- Pressing the finger hard on the sensor.
- Moving during the reading.
- Using the module in bright light without a cover.
- Trusting SpO2 values for medical decisions.
- Ignoring the 1.8 V pull-up issue on some modules with a 5 V board.
Frequently asked questions
Is the MAX30102 accurate?
Heart rate is usually within a few beats per minute when still. SpO2 estimates vary more and are not medical grade.
What is the difference between MAX30100 and MAX30102?
The MAX30102 has a higher-resolution ADC, lower power and a larger FIFO, and is the better choice today.
Why does my MAX30102 read zero or random values?
Check that the finger covers the window with light pressure, that I2C wiring is correct, and that the board's pull-ups suit your logic level.
Can I use the MAX30102 with ESP32?
Yes, over I2C at 3.3 V. Its readings can be sent to a phone or dashboard over Wi-Fi.
Can it be worn on the wrist?
It can work on a wrist, but signals are weaker and more affected by movement than on a fingertip.
Parts for this guide
Calculators
Terms in this guide
Projects that use it
Put this into practice: 2 step-by-step builds in our project library use parts from this guide.
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.


