DIY pulse oximeter
Lately, our electronic markets have
been flooded with pulse oximeter
probes based on the MAX30100 IC for
as low as INR250 (about $2) apiece,
such as the RCWL-0530. I purchased a
few from a local supplier, but I found
that the readings were awfully wrong!
After reading the MAX30100
data sheet and doing some internet
research, I discovered that these lowcost oximeters have two main problems: poor regulation of the 1.8V supply and incorrect I2C pull-up resistor
values.
The MAX30100 is an I2C infrared
measuring device. Ideally, the board
should supply 3.3V for the infrared
LED driver and 1.8V for the control &
measurement circuitry. The I2C and
interrupter pins need to be pulled up
to 3.3V via 4.7kW resistors, but many
implementations only pull them up to
the 1.8V rail. In this case, they will not
work with the I2C bus of an Arduino
or ESP32 micro.
The MAX30100 has a temperature
sensor for oxygen reading correction,
but it cannot be read separately, and
the sensor has a power-down sleep
state which is generally not used. I
don’t know why.
Check the voltage on either side of
the 3-pin (SOT-23) regulator with a
voltmeter. You should get readings
of 3.3V and 1.8V. So far, so good. But
the three 4.7kW resistors are connected
to the SCL, SDA & INT pins from the
+1.8V rail. This prevents us from
siliconchip.com.au
getting the correct measurements for
this device, even though the software
shows success.
The adjacent image shows where
you can cut the track and run a short
length of small-diameter solid-core
insulated wire to fix this (see github.
com/oxullo/Arduino-MAX30100/
issues/51).
We can now connect it to the ESP32
microcontroller module, as shown in
the circuit diagram. I have added a
DS18B20 temperature sensor since,
as mentioned above, we can’t query
the temperature sensor on the oximeter module.
The resulting probe measures the
oxygen level and temperature from a
finger and uploads it to ‘the cloud’ at
www.thingspeak.com The ESP32 has
been programmed to support multiple WiFi SSID and password combinations. It will connect to whichever
is available at that moment.
The LED at GPIO12 will blink briefly
to indicate that the data has been
uploaded to the cloud server. After
uploading the data, the micro goes into
deep sleep mode for 20 seconds, then
it wakes up and repeats the process.
During sleep mode, the IR led of the
MAX30100 sensor switches off and the
total power consumption goes down to
4.2mA. During measurement, the current is 160mA. One 26650 3.7V Li-ion
cell of around 3000mAh can sustain
this for weeks non-stop.
When attaching the sensor to a
Australia’s electronics magazine
On this RCWL-0530 module, the track
marked in yellow must be cut, and
then solder a piece of wire between
the two locations marked in red.
This connects the I2C pull-ups to the
correct 3.3V rather than 1.8V supply.
finger, ensure that the area which
makes contact is clean and without oil,
ink or grease. It’s better to clean it with
alcohol beforehand. If the body contact
is not perfect, the device will hang. To
solve that, the micro will restart after
25 seconds. It will also restart if it is
unable to upload data.
The Arduino sketch to load onto
the ESP32 is available for download
from siliconchip.com.au/Shop/6/5860
You will need to open a free account
at www.thingspeak.com and modify
the API key in the software to match
the one you are supplied with before
it will upload data.
Sample data is visible on my Thingspeak channel at www.thingspeak.
com/channels/1203838
Bera Somnath,
Vindhyanagar, India. ($100)
July 2021 63