The MAX30100 is an integrated pulse oximetry and heart-rate monitor sensor solution. It combines two LEDs, a photodetector, optimized optics, and low-noise analog signal processing to detect pulse oximetry and heart-rate signals. The MAX30100 is widely used in wearable technology, fitness assistant devices, and medical monitoring equipment.
Pin Number | Name | Description |
---|---|---|
1 | VIN | Supply voltage (1.8V to 3.3V) |
2 | SCL | I2C clock |
3 | SDA | I2C data |
4 | INT | Interrupt output |
5 | RD | Red LED cathode |
6 | IRD | IR LED cathode |
7 | GND | Ground |
#include <Wire.h>
#include "MAX30100_PulseOximeter.h"
PulseOximeter pox;
uint32_t tsLastReport = 0;
void setup() {
Serial.begin(115200);
if (!pox.begin()) {
Serial.println("Failed to initialize pulse oximeter!");
for(;;);
} else {
Serial.println("Pulse oximeter initialized.");
}
}
void loop() {
// Make sure to call update as fast as possible
pox.update();
if (millis() - tsLastReport > 1000) {
Serial.print("Heart rate:");
Serial.print(pox.getHeartRate());
Serial.print("bpm / SpO2:");
Serial.print(pox.getSpO2());
Serial.println("%");
tsLastReport = millis();
}
}
Note: This example assumes the use of a MAX30100 library, which provides the PulseOximeter
class and simplifies the interaction with the sensor.
Q: Can the MAX30100 be used with a 5V system? A: While the MAX30100 operates at 1.8V to 3.3V, level shifters can be used for 5V systems.
Q: How can I improve the accuracy of the sensor? A: Ensure a snug fit against the skin, minimize motion, and avoid external light interference.
Q: What is the default I2C address of the MAX30100? A: The default I2C address is 0x57 (7-bit).
Q: How do I know if the MAX30100 is functioning correctly? A: Check for a stable heart rate and SpO2 reading. If the readings are erratic, review the sensor placement and circuit connections.