The SparkFun MAX30105 Breakout is a sophisticated sensor module designed for non-invasive optical heart rate monitoring and pulse oximetry. It features the MAX30105 sensor from Maxim Integrated, which is capable of detecting the amount of oxygen in the blood, the volume of blood changes in the body, and even the heart rate through the process of photoplethysmography (PPG). This breakout board simplifies the use of the MAX30105 sensor by providing an easy-to-use I2C interface and onboard LEDs for indication, making it an ideal choice for wearable devices, fitness assistant devices, and medical monitoring applications.
Pin Number | Name | Description |
---|---|---|
1 | VIN | Power supply (1.8V-3.3V) |
2 | GND | Ground connection |
3 | SCL | I2C clock line |
4 | SDA | I2C data line |
5 | INT | Interrupt pin |
6 | RD | Red LED control (optional) |
7 | IR | IR LED control (optional) |
8 | G | Green LED control (optional) |
#include <Wire.h>
#include "MAX30105.h" // Include the MAX30105 library
MAX30105 particleSensor;
void setup() {
Serial.begin(115200);
Wire.begin();
if (!particleSensor.begin(Wire, I2C_SPEED_FAST)) { // Initialize sensor
Serial.println("MAX30105 was not found. Please check wiring/power.");
while (1);
}
particleSensor.setup(); // Configure sensor with default settings
particleSensor.setPulseAmplitudeRed(0x0A); // Set Red LED amplitude
particleSensor.setPulseAmplitudeGreen(0x0A); // Set Green LED amplitude
}
void loop() {
long irValue = particleSensor.getIR(); // Read IR value
if (irValue > 50000) { // Check if the sensor is covered
// Read the heart rate and SpO2 after a finger is placed on the sensor
float heartRate, spO2;
if (particleSensor.checkForBeat(irValue) == true) {
// We sensed a beat!
long delta = millis() - lastBeat;
lastBeat = millis();
heartRate = particleSensor.getRate();
spO2 = particleSensor.getSpO2();
Serial.print("Heart rate: ");
Serial.print(heartRate);
Serial.print(" bpm. SpO2: ");
Serial.print(spO2);
Serial.println("%");
}
} else {
Serial.println("No finger?");
}
delay(1000);
}
Q: Can the MAX30105 be used to measure blood pressure? A: No, the MAX30105 is designed for heart rate and SpO2 measurements, not blood pressure.
Q: How can I improve the accuracy of the sensor? A: Ensure a snug fit against the skin, minimize motion, and avoid direct exposure to external light sources.
Q: Is the MAX30105 suitable for medical use? A: The MAX30105 is not FDA-approved for medical use and should not be used for diagnosis or treatment of any conditions.
For further assistance, consult the MAX30105 datasheet and the SparkFun MAX30105 Breakout board schematic available on the SparkFun website.