The GY-MAX30102 is a heart rate and SpO2 sensor module designed for non-invasive health monitoring. It utilizes photoplethysmography (PPG) technology to measure blood oxygen saturation (SpO2) and heart rate by detecting changes in blood volume through light absorption. The module is built around the MAX30102 sensor chip, which integrates red and infrared LEDs, a photodetector, and an ambient light rejection circuit for precise measurements.
This module is widely used in wearable health devices, fitness trackers, and medical monitoring systems. Its compact size and low power consumption make it ideal for portable applications.
The GY-MAX30102 module has six pins. Below is the pinout and description:
Pin | Name | Description |
---|---|---|
1 | VIN | Power supply input (3.3V to 5V). Connect to the 3.3V or 5V pin of your microcontroller. |
2 | GND | Ground. Connect to the ground of your circuit. |
3 | SCL | I²C clock line. Connect to the SCL pin of your microcontroller. |
4 | SDA | I²C data line. Connect to the SDA pin of your microcontroller. |
5 | INT | Interrupt pin. Optional, used for event-driven applications. |
6 | IRD | Infrared LED driver pin. Typically not used in standard applications. |
Below is an example of how to use the GY-MAX30102 with an Arduino UNO:
#include <Wire.h>
#include "MAX30105.h" // Include the SparkFun MAX3010x library
MAX30105 particleSensor; // Create an instance of the sensor
void setup() {
Serial.begin(9600); // Initialize serial communication
Serial.println("Initializing GY-MAX30102...");
// Initialize the sensor
if (!particleSensor.begin()) {
Serial.println("MAX30102 not detected. Check connections.");
while (1); // Halt execution if the sensor is not found
}
// Configure the sensor
particleSensor.setup(); // Use default settings
particleSensor.setPulseAmplitudeRed(0x0A); // Set red LED brightness
particleSensor.setPulseAmplitudeIR(0x0A); // Set IR LED brightness
}
void loop() {
// Read data from the sensor
long redValue = particleSensor.getRed(); // Get red light reading
long irValue = particleSensor.getIR(); // Get IR light reading
// Print the readings to the serial monitor
Serial.print("Red: ");
Serial.print(redValue);
Serial.print(" IR: ");
Serial.println(irValue);
delay(100); // Wait 100ms before the next reading
}
Sensor Not Detected:
Inaccurate Readings:
No Data Output:
High Noise in Readings:
Can the GY-MAX30102 measure SpO2 and heart rate simultaneously? Yes, the module can measure both parameters simultaneously using the red and IR LEDs.
What is the maximum I²C clock speed supported? The MAX30102 supports I²C clock speeds up to 400kHz.
Can I use the GY-MAX30102 with a 5V microcontroller? Yes, the module has an onboard voltage regulator, allowing it to work with 3.3V and 5V systems.
Is the module suitable for continuous monitoring? Yes, but ensure proper heat dissipation and power management for long-term use.