First of all, please read the post title. This doesn’t work on an ESP32 MCU.
I only made it work on an ESP8266 MCU.
This afternoon I received a couple of MAX30100 sensors that I ordered some days before (44 days, China, COVID19, …)
The board is quite easy to connect: it has an I2C interface and you even don’t need the INT pin, so all you have to do is wiring the SDA and SCL pins.
I used D22 and D21 pins in my ESP32 MCU, as they are also used for I2C_SDA and I2C_SCL interfacing (checkout pinout diagram here)
Summarizing, the pins you need to connect are:
ESP32 GND to SENSOR GND
ESP32 3.3 to SENSOR VIN
ESP32 D22 to SENSOR SDA
ESP32 D21 to SENSOR SCL
Once you have all the pins connected it’s software time.
In Arduino IDE, select Manage Libraries and install the Sparkfun MAX3010X Library
After that, you are ready to open any of the examples provided with the library and test the module.
Probably you will notice that doesn’t work correctly. It seems to initialize the module correctly and even it starts to make some measurements. You even would think that is working for a few seconds, but it isn’t.
The behaviour, at least in my case, is the next:
- The module initialize with a SUCESS status
- It lights on the red led
- You put your finger over the sensor
- It starts measuring, but after a second the red led goes off
- It seems to measure intermittently
If this is your case, don’t waste your time. I was searching for troubleshootings and all I found was replacing the inbuilt 4K7 resistors or bypassing the voltage limiter in the sensor board. Don’t do it, it is not a problem of pull-up resistors.
I decided then to try with an ESP8266 MCU and this is the result:
The sensor board works fine, so probably it is a problem of compatibility between the library and ESP32.
The sensor measures heart rate and SpO2. I only used the heartBeat event to light the led to show that it works.