Biomedical Engineering DISCUSSION

How does a pulse oximeter calculate SpO2 from red and infrared light signals?

Started by plcprogramming pulse oximetrySpO2 ratio of ratiosphotoplethysmographyred and infrared LEDsensor calibration
5 replies 248 views 6 participants
Latest activity · 30 Sep 2026

How does a pulse oximeter calculate SpO2 from red and infrared light signals?

plcprogramming Biomedical Engineering Forum
#1

I am experimenting with a reflective pulse oximetry sensor module that has a red LED, an infrared LED and a photodiode. I can read the two raw signals and see the heartbeat in both, but I do not understand how two light intensities become an oxygen saturation percentage.

What is the principle, what is the ratio-of-ratios calculation, and how much can I trust a figure computed from a hobby sensor?

Community replies 5

Re: How does a pulse oximeter calculate SpO2 from red and infrared light signals?

#2

The principle is that haemoglobin changes its absorption spectrum when it carries oxygen. Deoxygenated haemoglobin absorbs red light (around 660 nm) much more strongly than oxygenated haemoglobin does, while in the near infrared (around 880 to 940 nm) the oxygenated form absorbs somewhat more. Comparing absorption at the two wavelengths therefore indicates the proportion of haemoglobin that is oxygenated.

The pulse is what isolates arterial blood. Skin, tissue, bone and venous blood absorb a constant amount; only the arterial blood volume changes with each heartbeat, so the pulsating part of the signal belongs to arterial blood.

Re: How does a pulse oximeter calculate SpO2 from red and infrared light signals?

#3

The calculation uses the pulsating (AC) and steady (DC) parts of each signal. Dividing AC by DC for each wavelength normalises out LED brightness, skin tone and tissue thickness. Then R = (AC_red / DC_red) / (AC_ir / DC_ir). The AC part is small, typically about 1 to 2 percent of DC, so it needs a clean measurement.

R maps to SpO2 through a calibration curve. A textbook linear approximation is SpO2 = 110 - 25 × R, which gives 97.5 percent for R = 0.5 and 85 percent for R = 1.0. It is an illustration of the shape, not a calibration for any particular sensor.

Re: How does a pulse oximeter calculate SpO2 from red and infrared light signals?

#4

The reason a formula cannot be derived exactly is that tissue scatters light, so the simple Beer-Lambert absorption law does not hold. Commercial oximeters are calibrated empirically against laboratory blood measurements on volunteers, over a limited saturation range, and each sensor design, with its own LED wavelengths and geometry, gets its own curve. LED wavelength also shifts with temperature and from part to part, and the absorption curve is steep on the red side, so a few nanometres matter.

A module's example code normally contains a curve fitted by the manufacturer for that optical design; use that rather than the generic line.

Re: How does a pulse oximeter calculate SpO2 from red and infrared light signals?

#5

Signal processing decides whether the number means anything. Sample both channels at 50 to 100 Hz or more, remove ambient light by subtracting a reading taken with both LEDs off, and band-pass the AC part to about 0.5 to 5 Hz, which covers heart rates of 30 to 300 beats per minute. Compute R over several beats, and reject windows where the two channels are poorly correlated, because motion moves venous blood and the sensor itself and shows up in both channels.

Low perfusion from cold fingers, sensor pressure and nail polish all degrade the AC signal.

Re: How does a pulse oximeter calculate SpO2 from red and infrared light signals?

#6

On trust: treat the output of a hobby build as a demonstration of the principle. It has not been validated against a reference, and even approved oximeters are specified only to within a few percentage points over their calibrated range. Do not use a self-built or uncalibrated sensor to decide anything about a person's health; someone who is unwell or short of breath needs a medical assessment, not a reading from a development board.

As an engineering exercise, the honest way to report results is as the ratio R and a note on the curve used, not as a bare SpO2 value.

TEP COMMUNITY