Interfacing MAX30100 Pulse Oximeter Sensor with Arduino
Interfacing MAX30100 Pulse Oximeter Sensor with Arduino to measure Blood Oxygen & Heart Rate & display SpO2 & BPM on 16x2 LCD Display.
- Suitable forB.Tech/Diploma Arduino students
- Build time1-2 weeks
- LevelBeginner
- Available atAjvika Labs, Kakinada
About this project
In this project we will be I
nterfacing MAX30100 Pulse Oximeter Sensor with Arduino
. The MAX30100 Sensor is capable of measuring
Blood Oxygen
&
Heart Rate
. We can use any display like a
16×2 LCD Display
to view the value of
SpO2
and
BPM
. The blood Oxygen Concentration termed SpO2 is measured in Percentage and
Heart Beat/Pulse Rate
is measured in BPM.
The MAX30100 is a
Pulse Oximetry
and heart rate monitor sensor solution. It combines two
LEDs
, a
photodetector
optimized optics
, and low-noise analog signal processing to detect pulse oximetry and heart-rate signals. You can use this sensor with any microcontroller like Arduino
, ESP8266
, or
ESP32
and easily measure the patient’s health parameters. This cheap
DIY Pulse Oximeter
sensor just cost around 5$ and can be used in multiple applications if you are a beginner or an Electronics enthusiast.
You can go through some of the projects made using this sensor:
Blood Oxygen & Heart Rate Measurement on OLED Display
IoT Pulse Oximeter using Blynk & ESP8266
Measure SpO2 & BPM on Blynk using ESP32
MAX30102 & Arduino: Heart Rate + Blood Oxygen Monitoring
IoT Based Patient Health Monitoring System
Bill of Materials
Following are the components that you need for Interfacing MAX30100 Pulse Oximeter Sensor with Arduino. You can purchase all the components online from Amazon. The components name as well as purchased link is given below.
S.N.
Components
Quantity
Arduino UNO Board
Amazon
AliExpress
MAX30100 Pulse Oximeter Sensor
Amazon
AliExpress
16x2 LCD Display
Amazon
AliExpress
Potentiometer 10K
Amazon
AliExpress
Connecting Wires
Amazon
AliExpress
Breadboard
Amazon
AliExpress
How does Pulse Oximeter Works?
Oxygen
enters the lungs and then is passed on into blood. The blood carries oxygen to the various organs in our body. The main way oxygen is carried in our blood is by means of
hemoglobin
. During a pulse oximetry reading, a small clamp-like device is placed on a finger, earlobe, or toe.
Small beams of light pass through the blood in the finger, measuring the amount of oxygen. It does this by measuring changes in
light absorption
in
oxygenated
or
deoxygenated blood
MAX30100 Pulse Oximeter
The sensor is
integrated pulse oximetry
and heart-rate monitor sensor solution. It combines two LED’s, a photodetector, optimized optics, and low-noise analog signal processing to detect pulse and heart-rate signals. It operates from
1.8V
and
3.3V
power supplies and can be powered down through software with negligible
standby current
, permitting the power supply to remain connected at all times.
Features
1. Consumes very low power (operates from 1.8V and 3.3V)
2. Ultra-Low Shutdown Current (0.7µA, typ)
3. Fast Data Output Capability
4. Interface Type: I2C
Working of MAX30100 Pulse Oximeter and Heart-Rate Sensor
The device has
two LEDs
, one
emitting red light
, another emitting
infrared light
. For pulse rate, only infrared light is needed. Both red light and infrared light are used to measure
oxygen levels
in the blood.
When the heart pumps blood, there is an increase in
oxygenated blood
as a result of having more blood. As the heart relaxes, the volume of oxygenated blood also decreases. By knowing the time between the increase and decrease of oxygenated blood, the
pulse rate
is determined.
It turns out, oxygenated blood absorbs more
infrared light
and passes more red light while deoxygenated blood absorbs red light and passes more infrared light. This is the main function of the MAX30100: it reads the absorption levels for both light sources and stores them in a buffer that can be read via
I2C
communication protocol.
Interfacing MAX30100 Pulse Oximeter Sensor with Arduino
Now let us interface MAX30100 Pulse Oximeter Sensor with Arduino and display the value in serial monitor.The circuit diagram and connection is very simple. You can follow the same.
Connect the Vin pin of MAX30100 to Arduino
5V
or
3.3V
pin, GND to GND. Connect the I2C Pin of MAX30100, i.e
SCL & SDA
to
A5 & A4
of Arduino.
Source Code/Program
The
source Code/program
for interfacing
MAX30100 Pulse Oximeter with Arduino
is written in C programm for Arduino IDE. This code will display the value in serial monitor. Copy this code and upload it to Arduino Board.
But before that downloaded the
MAX30100 Library
from here:
Arduino MAX30100 Library
#include <Wire.h>
#include "MAX30100_PulseOximeter.h"
#define REPORTING_PERIOD_MS 1000
PulseOximeter
pox
;
uint32_t
tsLastReport
=
;
void
onBeatDetected
(
)
{
Serial
println
(
"Beat!"
)
;
}
void
setup
(
)
{
Serial
begin
(
115200
)
;
Serial
(
"Initializing pulse oximeter.."
)
;
// Initialize the PulseOximeter instance
// Failures are generally due to an improper I2C wiring, missing power supply
// or wrong target chip
if
(
!
pox
begin
(
)
)
{
Serial
println
(
"FAILED"
)
;
for
(
;
;
)
;
}
else
{
Serial
println
(
"SUCCESS"
)
;
}
pox
setIRLedCurrent
(
MAX30100_LED_CURR_7_6MA
)
;
// Register a callback for the beat detection
pox
setOnBeatDetectedCallback
(
onBeatDetected
)
;
}
void
loop
(
)
{
// Make sure to call update as fast as possible
pox
update
(
)
;
if
(
millis
(
)
tsLastReport
>
REPORTING_PERIOD_MS
)
{
Serial
(
"Heart rate:"
)
;
Serial
(
pox
getHeartRate
(
)
)
;
Serial
(
"bpm / SpO2:"
)
;
Serial
(
pox
getSpO2
(
)
)
;
Serial
println
(
"%"
)
;
tsLastReport
=
millis
(
)
;
}
}
After uploading the code, open the serial monitor to see the values as shown in the image. Initially the the BPM & SpO2 value appears as incorrect value but soon you can observe the correct stable reading.
Displaying MAX30100 SpO2 & BPM Value on LCD Display
Now let us use the
16X2 LCD Display
to see the value of
BPM & SpO2
instead of Serial Monitor. Assemble the circuit as per the circuit diagram below.
Connect the Vin pin of MAX30100 to Arduino 5V or 3.3V pin, GND to GND. Connect the I2C Pin, SCL & SDA of MAX30100 to A5 & A4 of Arduino. Similarly connect the LCD pin 1, 5, 16 to GND of Arduino and 2, 15 to 5V VCC. Similarly connect LCD pin 4, 6, 11, 12, 13, 14 to Arduino pin 13, 12, 11, 10, 9, 8. Use 10K Potentiometer at pin 3 of LCD to adjust the contrast of LCD.
Source Code/Program
#include <LiquidCrystal.h>
#include <Wire.h>
#include "MAX30100_PulseOximeter.h"
LiquidCrystal
lcd
(
)
;
#define REPORTING_PERIOD_MS 1000
PulseOximeter
pox
;
uint32_t
tsLastReport
=
;
void
onBeatDetected
(
)
{
Serial
println
(
"Beat!"
)
;
}
void
setup
(
)
{
Serial
begin
(
115200
)
;
Serial
(
"Initializing pulse oximeter.."
)
;
lcd
begin
(
)
;
lcd
(
"Initializing..."
)
;
delay
(
3000
)
;
lcd
clear
(
)
;
// Initialize the PulseOximeter instance
// Failures are generally due to an improper I2C wiring, missing power supply
// or wrong target chip
if
(
!
pox
begin
(
)
)
{
Serial
println
(
"FAILED"
)
;
for
(
;
;
)
;
}
else
{
Serial
println
(
"SUCCESS"
)
;
}
pox
setIRLedCurrent
(
MAX30100_LED_CURR_7_6MA
)
;
// Register a callback for the beat detection
pox
setOnBeatDetectedCallback
(
onBeatDetected
)
;
}
void
loop
(
)
{
// Make sure to call update as fast as possible
pox
update
(
)
;
if
(
millis
(
)
tsLastReport
>
REPORTING_PERIOD_MS
)
{
Serial
(
"Heart rate:"
)
;
Serial
(
pox
getHeartRate
(
)
)
;
Serial
(
"bpm / SpO2:"
)
;
Serial
(
pox
getSpO2
(
)
)
;
Serial
println
(
"%"
)
;
lcd
clear
(
)
;
lcd
setCursor
(
)
;
lcd
(
"BPM : "
)
;
lcd
(
pox
getHeartRate
(
)
)
;
lcd
setCurso
nterfacing MAX30100 Pulse Oximeter Sensor with Arduino
. The MAX30100 Sensor is capable of measuring
Blood Oxygen
&
Heart Rate
. We can use any display like a
16×2 LCD Display
to view the value of
SpO2
and
BPM
. The blood Oxygen Concentration termed SpO2 is measured in Percentage and
Heart Beat/Pulse Rate
is measured in BPM.
The MAX30100 is a
Pulse Oximetry
and heart rate monitor sensor solution. It combines two
LEDs
, a
photodetector
optimized optics
, and low-noise analog signal processing to detect pulse oximetry and heart-rate signals. You can use this sensor with any microcontroller like Arduino
, ESP8266
, or
ESP32
and easily measure the patient’s health parameters. This cheap
DIY Pulse Oximeter
sensor just cost around 5$ and can be used in multiple applications if you are a beginner or an Electronics enthusiast.
You can go through some of the projects made using this sensor:
Blood Oxygen & Heart Rate Measurement on OLED Display
IoT Pulse Oximeter using Blynk & ESP8266
Measure SpO2 & BPM on Blynk using ESP32
MAX30102 & Arduino: Heart Rate + Blood Oxygen Monitoring
IoT Based Patient Health Monitoring System
Bill of Materials
Following are the components that you need for Interfacing MAX30100 Pulse Oximeter Sensor with Arduino. You can purchase all the components online from Amazon. The components name as well as purchased link is given below.
S.N.
Components
Quantity
Arduino UNO Board
Amazon
AliExpress
MAX30100 Pulse Oximeter Sensor
Amazon
AliExpress
16x2 LCD Display
Amazon
AliExpress
Potentiometer 10K
Amazon
AliExpress
Connecting Wires
Amazon
AliExpress
Breadboard
Amazon
AliExpress
How does Pulse Oximeter Works?
Oxygen
enters the lungs and then is passed on into blood. The blood carries oxygen to the various organs in our body. The main way oxygen is carried in our blood is by means of
hemoglobin
. During a pulse oximetry reading, a small clamp-like device is placed on a finger, earlobe, or toe.
Small beams of light pass through the blood in the finger, measuring the amount of oxygen. It does this by measuring changes in
light absorption
in
oxygenated
or
deoxygenated blood
MAX30100 Pulse Oximeter
The sensor is
integrated pulse oximetry
and heart-rate monitor sensor solution. It combines two LED’s, a photodetector, optimized optics, and low-noise analog signal processing to detect pulse and heart-rate signals. It operates from
1.8V
and
3.3V
power supplies and can be powered down through software with negligible
standby current
, permitting the power supply to remain connected at all times.
Features
1. Consumes very low power (operates from 1.8V and 3.3V)
2. Ultra-Low Shutdown Current (0.7µA, typ)
3. Fast Data Output Capability
4. Interface Type: I2C
Working of MAX30100 Pulse Oximeter and Heart-Rate Sensor
The device has
two LEDs
, one
emitting red light
, another emitting
infrared light
. For pulse rate, only infrared light is needed. Both red light and infrared light are used to measure
oxygen levels
in the blood.
When the heart pumps blood, there is an increase in
oxygenated blood
as a result of having more blood. As the heart relaxes, the volume of oxygenated blood also decreases. By knowing the time between the increase and decrease of oxygenated blood, the
pulse rate
is determined.
It turns out, oxygenated blood absorbs more
infrared light
and passes more red light while deoxygenated blood absorbs red light and passes more infrared light. This is the main function of the MAX30100: it reads the absorption levels for both light sources and stores them in a buffer that can be read via
I2C
communication protocol.
Interfacing MAX30100 Pulse Oximeter Sensor with Arduino
Now let us interface MAX30100 Pulse Oximeter Sensor with Arduino and display the value in serial monitor.The circuit diagram and connection is very simple. You can follow the same.
Connect the Vin pin of MAX30100 to Arduino
5V
or
3.3V
pin, GND to GND. Connect the I2C Pin of MAX30100, i.e
SCL & SDA
to
A5 & A4
of Arduino.
Source Code/Program
The
source Code/program
for interfacing
MAX30100 Pulse Oximeter with Arduino
is written in C programm for Arduino IDE. This code will display the value in serial monitor. Copy this code and upload it to Arduino Board.
But before that downloaded the
MAX30100 Library
from here:
Arduino MAX30100 Library
#include <Wire.h>
#include "MAX30100_PulseOximeter.h"
#define REPORTING_PERIOD_MS 1000
PulseOximeter
pox
;
uint32_t
tsLastReport
=
;
void
onBeatDetected
(
)
{
Serial
println
(
"Beat!"
)
;
}
void
setup
(
)
{
Serial
begin
(
115200
)
;
Serial
(
"Initializing pulse oximeter.."
)
;
// Initialize the PulseOximeter instance
// Failures are generally due to an improper I2C wiring, missing power supply
// or wrong target chip
if
(
!
pox
begin
(
)
)
{
Serial
println
(
"FAILED"
)
;
for
(
;
;
)
;
}
else
{
Serial
println
(
"SUCCESS"
)
;
}
pox
setIRLedCurrent
(
MAX30100_LED_CURR_7_6MA
)
;
// Register a callback for the beat detection
pox
setOnBeatDetectedCallback
(
onBeatDetected
)
;
}
void
loop
(
)
{
// Make sure to call update as fast as possible
pox
update
(
)
;
if
(
millis
(
)
tsLastReport
>
REPORTING_PERIOD_MS
)
{
Serial
(
"Heart rate:"
)
;
Serial
(
pox
getHeartRate
(
)
)
;
Serial
(
"bpm / SpO2:"
)
;
Serial
(
pox
getSpO2
(
)
)
;
Serial
println
(
"%"
)
;
tsLastReport
=
millis
(
)
;
}
}
After uploading the code, open the serial monitor to see the values as shown in the image. Initially the the BPM & SpO2 value appears as incorrect value but soon you can observe the correct stable reading.
Displaying MAX30100 SpO2 & BPM Value on LCD Display
Now let us use the
16X2 LCD Display
to see the value of
BPM & SpO2
instead of Serial Monitor. Assemble the circuit as per the circuit diagram below.
Connect the Vin pin of MAX30100 to Arduino 5V or 3.3V pin, GND to GND. Connect the I2C Pin, SCL & SDA of MAX30100 to A5 & A4 of Arduino. Similarly connect the LCD pin 1, 5, 16 to GND of Arduino and 2, 15 to 5V VCC. Similarly connect LCD pin 4, 6, 11, 12, 13, 14 to Arduino pin 13, 12, 11, 10, 9, 8. Use 10K Potentiometer at pin 3 of LCD to adjust the contrast of LCD.
Source Code/Program
#include <LiquidCrystal.h>
#include <Wire.h>
#include "MAX30100_PulseOximeter.h"
LiquidCrystal
lcd
(
)
;
#define REPORTING_PERIOD_MS 1000
PulseOximeter
pox
;
uint32_t
tsLastReport
=
;
void
onBeatDetected
(
)
{
Serial
println
(
"Beat!"
)
;
}
void
setup
(
)
{
Serial
begin
(
115200
)
;
Serial
(
"Initializing pulse oximeter.."
)
;
lcd
begin
(
)
;
lcd
(
"Initializing..."
)
;
delay
(
3000
)
;
lcd
clear
(
)
;
// Initialize the PulseOximeter instance
// Failures are generally due to an improper I2C wiring, missing power supply
// or wrong target chip
if
(
!
pox
begin
(
)
)
{
Serial
println
(
"FAILED"
)
;
for
(
;
;
)
;
}
else
{
Serial
println
(
"SUCCESS"
)
;
}
pox
setIRLedCurrent
(
MAX30100_LED_CURR_7_6MA
)
;
// Register a callback for the beat detection
pox
setOnBeatDetectedCallback
(
onBeatDetected
)
;
}
void
loop
(
)
{
// Make sure to call update as fast as possible
pox
update
(
)
;
if
(
millis
(
)
tsLastReport
>
REPORTING_PERIOD_MS
)
{
Serial
(
"Heart rate:"
)
;
Serial
(
pox
getHeartRate
(
)
)
;
Serial
(
"bpm / SpO2:"
)
;
Serial
(
pox
getSpO2
(
)
)
;
Serial
println
(
"%"
)
;
lcd
clear
(
)
;
lcd
setCursor
(
)
;
lcd
(
"BPM : "
)
;
lcd
(
pox
getHeartRate
(
)
)
;
lcd
setCurso
Technologies used
Hardware components
- ESP32
- ESP8266
- Arduino
- OLED
- MAX30102
Software & tools
- Arduino IDE
- Blynk
What you get
- Working project / hardware kit, tested before delivery
- Complete source code with explanation
- Project demo and guidance for your viva
- Project report, PPT and IEEE paper support (on request)
Delivery & Payment
Delivery takes a minimum of two weeks from the date your inquiry is confirmed.
Payment is in two parts:
• 50% advance to start the project
• Remaining 50% before delivery
Note:
• Documentation and PPT are not included by default
• If you need documentation/PPT, it can be arranged for extra time and cost
We'll confirm the exact timeline and cost with you after reviewing your requirements.