Hello everyone!
In this blog I also put the MAX30102 sensor into operation. This module incorporates a MAX30102 that can be used to measure pulse oximetry and heart-rate. It is compact, having small dimensions, and is also suitable in applications for measuring blood oxygen saturation. The MAX30102 sensor incorporates LEDs, photodetectors and other optical elements, as well as low-noise electronics with ambient light rejection. The voltage at which it works is 1.8Vcc obtained from the power rail that also supplies internal LEDs, communicating through a standard I2C compatible interface. An interesting feature is represented by the possibility of a stand-by mode, through the software method, which invokes zero current consumption. So, MAX30102 could be a suitable choice for applications such as optical pulse oximetry and health monitoring and not only that.
From a functional point of view, we can say that MAX30102 integrates some red and obviously IR LEDs, having 660nm wavelength for Red LED and 880nm wavelength for IR part, which have the role of modulating LED pulses for oxygen saturation (SpO2 ) and heart rate measurements. The width of a pulse can be set to allow the algorithm to optimize SpO2 and HR accuracy and even power consumption based on our requirements.
The SpO2 subsystem of the MAX30102 contains ambient light cancellation (ALC), a continuous-time oversampling sigma-delta ADC with 18-bit resolution, and a proprietary discrete-time filter. The ALC has an internal Track/Hold circuit to cancel ambient light and increase the effective dynamic range. The MAX30102 also has an on-chip temperature sensor with an inherent resolution of 0.0625°C for calibrating the temperature dependence of the SpO2 subsystem.
The SpO2 subsystem of the MAX30102 contains ambient light cancellation (ALC), a continuous-time sigma-delta ADC, and a proprietary discrete-time filter. The ALC has an internal Track/Hold circuit to cancel ambient light and increase the effective dynamic range. The SpO2 ADC has programmable full-scale ranges from 2µA to 16µA. The ALC can cancel up to 200µA of ambient current. The internal ADC is a continuous-time oversampling sigma-delta converter with an 18-bit resolution. The ADC sampling rate is 10.24MHz. The ADC output data rate can be programmed from 50sps (samples per second) to 3200sps.
The MAX30102 has an on-chip temperature sensor for calibrating the temperature dependence of the SpO2 subsystem. The temperature sensor has an inherent resolution of 0.0625°C. The device output data is relatively insensitive to the wavelength of the IR LED, where the Red LED's wavelength is critical to correct interpretation of the data. A SpO2 algorithm used with the MAX30102 output signal can compensate for the associated SpO2 error with ambient temperature changes. The MAX30102 does not require a specific Power-Up sequence but requires a supply voltage of 1.8V to work correctly. Therefore, a small regulating LDO is used, the MAX8511, providing a 1.8V out of both 5V and 3.3V power rails. Also, it can be shut down through software with zero standby current, allowing the power rails to remain powered at all times.
The MAX30102 based module communicates with a microcontroller using the standard I2C 2-Wire interface with a maximum clock frequency of 400kHz. It is fully adjustable through software registers, and the digital output data is stored in a 32-deep FIFO within the device. Since the sensor for operation requires a power supply of 1.8V, this module also features the PCA9306 and SN74LVC1T45 voltage-level translators. The I2C interface bus lines are routed to the voltage-level translators allowing it to work with both 3.3V and 5V MCUs properly. Also, it uses an interrupt pin, the INT pin of the module socket, used for when an interrupt occurs, after the power is established, to alert the system that the MAX30102 is ready for operation.
This board can operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. This way, it is allowed for both 3.3V and 5V capable microcontrollers to use the communication lines properly (see the picture above).
Compared to the MAX30100, the MAX30102 sensor offers:
- 32-bit FIFO vs. 16-bit FIFO - the MAX30102 has more storage for data that has yet to be passed to the microcontroller, allowing for faster data transmission;
- 18-bit vs 14-bit ADC resolution - the MAX30102 is more sensitive to changes in IR receiver voltage;
= 69 us-114 us vs 200 us-1.6 ms LED pulse width - the MAX30102 has a narrower LED pulse width, resulting in lower power consumption;
Maybe these things could also justify the slight price increase on the MAX30102 than MAX30100.
The electronic scheme is the same as in the case of the MAX30100, I used the shield+MAX30102 which is mounted on top of the Arduino Uno, like a sandwich.
Regarding the programming software part, I searched in the library manager of Ardui0no IDE and found a library that seems compatible with the MAX30102 hardware, but when running the sketch an error may appear as if the sensor is missing from the circuit or could not be found. I think the found library would work even better, rather with a MAX30105. After a few attempts, at least I managed to get the MAX30102 working, I don't know why, at first, the Arduino gave an error, the sensor was not present in the circuit, it could not be initialized. I thought of changing the jumper from the MAX30102 power supply from 3.3V to 5V, now I use the 3.3V source. The accuracy of the measurements is not the best, I don't know how much we can rely on them, they show deviations and fluctuations that are sometimes quite aberrant, as a result I attach more pictures to illustrate the commissioning of the MAX30102. There are enough causes that could produce these false measurements, the software library that would be much more compatible with the MAX30105, the calculation and conversion formulas, maybe even the hardware connections, although I do not use jump wires.
Heart Rate gathering data example:
Oxygen Saturation gathering data example:
For a healthy person, a normal resting heart rate for adults ranges from 60 to 100 beats per minute. and the ideal oxygen saturation is 100%, and if it fluctuates, it is not allowed to fall below 95%. Problems already start to appear if the oxygen saturation drops below 90%. So, among the values recorded with the MAX30102, it is clear that there are also some errors.
I also came with an LCD on which the measured values are displayed, but my phone broke down and I don't have other device with a better camera with which I can make a video.
For the next part I want to associate the MAX30102 and Arduino with Node Red, I will create a graphic interface similar to the one made previously for the MAX30100.
Web references:
https://www.hnhcart.com/blogs/sensors-modules/a
https://www.mikroe.com/oximeter-5-click
See you next time.