How a Pulse-Oximeter Works
Pulse oximeter is a device that measures both your heart rate & oxygen saturation.
What is Oxygen Saturation?
Oxygen enters the lungs and then is passed on into blood. The blood carries the oxygen to the various organs in our body. The main way oxygen is carried in our blood is by means of hemoglobin.
- The hemoglobin without oxygen is known as de oxygenated hemoglobin (deoxy Hb)
- The hemoglobin without oxygen is known as de oxygenated hemoglobin (deoxy Hb)
Oxygen saturation simply refers to the percentage of the available hemoglobin that carries oxygen. For an example in the situation below the oxygen saturation is 75%.
How the Pulse oximeter works
Pulse oximetry uses light to work out oxygen saturation. Light is emitted from light sources which goes across the pulse oximeter probe and reaches the light detector.
When a finger is placed in between the light source and the light detector, the light will now have to pass through the finger to reach the detector. Part of the light will be absorbed by the finger and the part not absorbed reaches the light detector.
The amount of light absorbed depends on the following (which are used to calculate the oxygen saturation):
- Concentration of the light absorbing substance.
- Length of the light path in the absorbing substance.
- Oxyhemoglobin and deoxyhemoglobin absorb red and infrared light differently.
Different lights have different wavelengths, the pulse oximeter uses two lights to analyze hemoglobin.
- A red light, which has a wavelength of approximately 650 nm.
- An infrared light, which has a wavelength of 950 nm.
Oxy Hb absorbs more infrared light than red light, whereas deoxy Hb absorbs more Red light than Infrared light.
And the ratio of absorbed red light and infrared light is used by the pulse oximeter as the the Oxygen Saturation.
Important Notes :
- Finger nail polish can affect the accuracy of saturation determination.
- Abnormal hemoglobin can affect pulse oximeter readings. (carboxy hemoglobin, methemoglobin, which is dangerous as they both doesn’t contain oxygen, but the pulse oximeter calculates them as they hemoglobin that contains oxygen).
- Pulse oximeter uses Beer’s and Lambert’s Law (absorbance depends on concentration and path length) as part of its factors that it uses to compute oxygen saturation. Blood is not a neat red liquid Instead, it is full of various irregular objects such as red cells etc. This makes the light scatter, instead of going in a straight line. As the calibration curve is mathematically estimated, pulse oximeters are typically less accurate below saturations of about 75 – 80 %.
How to Make a Simple Pulse-Oximeter
To make the pulse oximeter I used a MAX30100 chip within a breakout board, integrated with Arduino Uno and a Piezo Buzzer. The MAX30100 chip acts as a combined pulse oximetry and heart-rate monitor sensor solution.
The overall goal with this was to make a pulse oximeter that can be later converted to a ear wearable prototype that,
- Modulates light from an IR LED and a red-light LED.
- uses MAX30100 and Arduino.
- Uisplays heart rate or oxygen saturation levels on Adruino IDE Serial printer, when connected to a computer.
- For the piezo buzzer give a sound alert when heart rate and oxygen levels are below the standard rates. ( 93%).
Items needed:
- Arduino Uno
- MAX30100 Breakout Board
- Piezo buzzer
- Adruino IDE installed on a laptop
- Jumper wires
- Soldering Wires
- Soldering tools
Pulse oximetry operates on the red and IR light absorption characteristics of oxygenated and deoxygenated hemoglobin. Blood oxygen concentration is calculated from the ratio between the absorption red light and IR light by the hemoglobin. Heart rate is detected by the change of blood volume throughout the finger, that is then quantified by the amount of light that passes through the finger.
The MAX30100 chip integrates two LEDs: red and infrared (IR), a photodetector and low-noise signal processing to detect pulse oximetry and heart rate signals. In the heart rate mode, only the IR LED is switched on, while in the dual mode both IR and red LEDs are switched on. we used both the oximetry and heart rate detection operations with the MAX30100, so we can detect both heart rate and oxygen saturation at the same time.
The MAX30100 is an I2C device, therefore through code it requires the wire library to interface with the Arduino. Physically, the MAX30100 (in this case, the breakout board) is connected to the Arduino through special pins that can read data from the SCL and SDA lines, which are A4 and A5. The SCL and SDL lines provide the data signal and the clock signal. The ground and Vin lines are connected to the GND and 5V (or 3.3V) lines respectively.
The piezo buzzer is then connected to the Arduino on any digital pin and the ground. Using the pin where we control the sound output, so that it will buzz only when the oxygen concentration or the heart rate falls below the required.
The code used for this project is based on an open-source library by Raivinis Strogonovs, who had implemented his own version of the pulse oximeter with the MAX30100.
Ear Wearable Pulse Oximeter Prototype
Once the Pulse oximeter is working with the Arduino uno, although we need to make a custom board inorder to make it wearable; For the prototype I had to find the smallest Arduino. The smallest Arduino that is currently available in the market was the DF Robot Arduino Beetle
Beetle is the smallest Arduino Leonardo board. It comes with Atmel AtMega32u4 (datasheet) @16MHz clock time and has expanded amounts of interfaces: 10 digital pins, 5 analog pins and 4 power pins with an operating voltage of 5V DC
As it is a smaller board all wires need to be carefully soldered in to it. The SCL, SDA connections of the MAX3100 breakout board will be directly soldered to the SDL, SCA points of the beetle board. The VIN connection will be soldered to the 5V output connection of the Beetle.
As everything needs to be soldered to the beetle the ground cables of both MAX30100 and the piezo buzzer need to share the ground Output connection hence they both need to be carefully soldered together. The piezo buzzer’s digital pin can be soldered in to any Digital pins marked as D9, D10 etc.
Once all wires are soldered upload the same code in to the Arduino beetle board using the Arduino IDE. The beetle board will be identified as Arduino Leonardo on the IDE select the Leonardo board and the correct port and upload the code.
Things to Remember
- When purchasing the MAX30100 There are two types of boards. One with only the Infrared light and with both lights. Make sure you check and buy the Dual function board.
- The MAX30100 board is 10mm in size hence when soldering you need to be extra careful as you can easily burn the board.
- when soldering the piezo buzzer can easily corrupt due to exssesive heat. Therefore you need to make sure that the soldering is done quickly without letting the buzzer to heat up
- Finger nail polish can affect the accuracy of saturation determination.
- Abnormal hemoglobin can affect pulse oximeter readings. (carboxy hemoglobin, methemoglobin, which is dangerous as they both doesn’t contain oxygen, but the pulse oximeter calculates them as they hemoglobin that contains oxygen).
- Pulse oximeter uses Beer’s and Lambert’s Law (absorbance depends on concentration and path length) as part of its factors that it uses to compute oxygen saturation. Blood is not a neat red liquid Instead, it is full of various irregular objects such as red cells etc. This makes the light scatter, instead of going in a straight line. As the calibration curve is mathematically estimated, pulse oximeters are typically less accurate below saturations of about 75 – 80 %.
- when giving power to the beetle remember to supply between 8V and 5V as by giving anything more than that can currupt the board.