The sensor has two LEDs, one emitting red light, the other emitting infrared light. Infrared light is required for pulse rate. But, Both red light and infrared light are required for measuring Sp02 levels in the blood. When the heart pumps the blood, the oxygen level is increased because there is more blood. But, when the heart rests, there is a decrease in oxygenated blood. Hence, the pulse rate is determined by getting the time between the rise and fall of oxygenated blood. The oxygenated blood absorbs more infrared light and passes more red light. But, deoxygenated blood absorbs red light and passes more infrared light. Basically, the MAX30100 sensor reads the absorption levels for both light sources and stores them in a buffer that can be read via I2C pins.
Features of MAX30100:
- Consumes very low power (operates from 1.8V and 3.3V) - Ultra-Low Shutdown Current (0.7µA, typ) - Fast Data Output Capability
======== ESP8266 Code & cct & lib ==========
The MAX30100 has I2C Pins. So connect its SDA pin to D21 & SCL pin to D22 of ESP32 Board. The power supply required by MAX30100 is 3.3V. So connect its VCC terminal to 3.3V of ESP32.