Tracking the Beat: MAX30102 Sensor Demo
- Hunter Treleaven

- Oct 23, 2025
- 2 min read
Measuring Heartbeats with Light
This week’s CardioTrack demo explored how the MAX30102 pulse oximeter measures heart rate in real time — using nothing but infrared and red light. The goal was to see just how close a low-cost optical sensor could get to the accuracy of a commercial-grade wearable like the Apple Watch.
Using the ESP32 microcontroller and custom Arduino code, the sensor captured raw data from reflected light on the fingertip. A rolling algorithm filtered noise and calculated beats per minute (BPM), updating every five seconds on the serial monitor and plotter.
Comparing Performance
To test reliability, readings from the MAX30102 were recorded alongside an Apple Watch under controlled conditions.The result: both tracked nearly identical heart-rate trends, averaging 69.9 BPM vs. 70.4 BPM which is only a 0.5 BPM difference. See the document for the table and graph comparison.
While the MAX30102 showed a slight delay from buffering and averaging, the overall precision was impressive for a sensor that costs a fraction of a smartwatch. It confirmed that with proper calibration, open-source hardware can perform remarkably close to consumer-grade wearables.
Lessons Learned
Two algorithm versions were tested:
Original IR-only code – demonstrated basic pulse detection but struggled with noise and motion.
Updated dual-LED version – used both red and IR light for cleaner, more stable readings and added SpO₂tracking capability.
This update made the sensor faster, smoother, and much closer in performance to modern PPG-based devices.
What's Next
The next stage of CardioTrack will combine the MAX30102 with the AD8232 ECG sensor to compare optical vs. electrical heart-rate measurements. This step will move the prototype closer to a full cardiac simulation and education platform.
Learn More
Intellectual Property Notice: The CardioTrack hardware, software, source code, wiring, and user interface are the original work of Hunter Alvin Treleaven. This project is designed for educational and research purposes only and may not be reproduced or modified for commercial use without authorization.



Comments