This repository contains three Arduino sketches for building a real-time heart rate monitor using the MAX30102 IR sensor and a 128×64 OLED display. The system performs beat detection, BPM estimation, and waveform visualization without requiring a serial interface. Designed for both breadboard prototyping and custom PCB deployment using the Atmega328P microcontroller.
- Arduino IDE
- Libraries:
- MAX30102 IR heart rate sensor (I2C)
- SSD1306 128x64 OLED display (I2C)
- Atmega328P (Arduino-compatible)
- 16 MHz crystal + 22pF capacitors
- LED for heartbeat alert
- 10kΩ pull-up resistors (SDA/SCL, if needed)
- Power supply (e.g., 6V via coin cell or USB)
heart-tracker-arduino: For Arduino Uno/Nano boardsheart-tracker-breadboard: Minimal Atmega328P setup on breadboardheart-tracker-pcb: Final version for custom PCB
- The
schematic/folder contains:- Circuit schematic diagram
- 3D rendering of the board
All hardware was designed using EasyEDA.
- Choose the appropriate
.inofile:- Use Arduino IDE
- Select the correct board and programmer
- For bare-metal Atmega328P (breadboard/PCB), use an ISP (e.g., Arduino as ISP)
- Upload the sketch
- The OLED will show:
- Real-time IR signal waveform
- Calculated BPM
- Live IR readings
- The LED flashes on each heartbeat (when IR signal is strong)
MIT © 2025