Blood Oxygen Sensor: Difference between revisions

From PC5271 wiki
Jump to navigationJump to search
Lubo (talk | contribs)
Lubo (talk | contribs)
Line 14: Line 14:


The measurement is carried out using two specific wavelength LED light sources (660 nm red light and 940 nm infrared light), the transmitted light signal is detected by the photodiode, and the weak current signal generated by the photodiode is converted into an easy-to-measure voltage signal by an operational amplifier to achieve the purpose of accurately determining the oxygen saturation of the blood.
The measurement is carried out using two specific wavelength LED light sources (660 nm red light and 940 nm infrared light), the transmitted light signal is detected by the photodiode, and the weak current signal generated by the photodiode is converted into an easy-to-measure voltage signal by an operational amplifier to achieve the purpose of accurately determining the oxygen saturation of the blood.
Schematic diagram of blood oxygen measurement.jpeg


==Principle==
==Principle==

Revision as of 23:55, 28 April 2025

Team members

He Lingzi: e1352952@u.nus.edu
Xu Yintong: e1127400@u.nus.edu
Zhao Lubo: e1127502@u.nus.edu
Zhang Ruoxi: e1350111@u.nus.edu

Idea

This project aims to build a sensor to detect the oxygen concentration in the blood.

Blood oxygen sensors typically operate on optical principles. The most common type of blood oxygen sensor is the pulse oximetry (SpO2) sensor. The SpO2 sensor utilizes the light absorption characteristics to measure the oxygen saturation level of hemoglobin. It works by emitting two different wavelengths of light (usually red and infrared) through the skin into the blood, and then measuring the intensity of the light that is reflected back through the skin using corresponding photoelectric sensors. Based on the difference in absorption of red and infrared light, the oxygen saturation level in the blood can be calculated.

Introduction

The aim of this project is to design a blood oxygen concentration sensor based on optical principles. The most common type of blood oxygen sensor is the pulse oximeter (SpO₂ sensor), the basic principle of which is to take advantage of the property that light of different wavelengths (usually red and infrared) is absorbed by haemoglobin in the blood at different levels after it penetrates the skin and enters the blood. When the light is reflected or transmitted back to the skin surface from the blood, the change in light intensity of the transmitted or reflected light is detected by a photodiode, and then the oxygen saturation level in the blood is calculated based on the difference in absorption between red light and infrared light.

The measurement is carried out using two specific wavelength LED light sources (660 nm red light and 940 nm infrared light), the transmitted light signal is detected by the photodiode, and the weak current signal generated by the photodiode is converted into an easy-to-measure voltage signal by an operational amplifier to achieve the purpose of accurately determining the oxygen saturation of the blood.

Schematic diagram of blood oxygen measurement.jpeg

Principle

1. Emission of Light from LEDs

The sensor uses two specific LED sources with wavelengths of:

  • Red LED (660 nm)
  • Infrared LED (940 nm)

These wavelengths are chosen specifically because they exhibit distinctly different absorption characteristics for HbO₂ and Hb, allowing clear differentiation between the two forms of hemoglobin present in the blood.

2. Photoplethysmography (PPG) Signal Formation The pulse oximeter detects changes in light absorption corresponding to the pulsatile nature of arterial blood flow. This results in a photoplethysmographic (PPG) signal, which reflects the blood volume changes in the microvascular bed of tissue. Analyzing the PPG signal allows for the determination of SpO₂ levels.

3. Photodiode Conversion and Signal Detection

The transmitted light signals are captured by an S5971 photodiode, which converts the received optical signal into a small electrical current. However, this photocurrent is very weak and not directly measurable, necessitating further signal amplification.

4. Amplification and Processing of Signal

To effectively measure the weak photocurrent signal, the project utilises an operational amplifier (OPA177) in a transimpedance amplifier configuration, as shown in the figure of experimental set-up below. The photodiode is connected to the amplifier's inverting input, and a 150 kΩ feedback resistor is placed between the output and the inverting input. This setup converts the small photocurrent generated by the photodiode into an easily measurable voltage signal.

5. Signal Analysis and Oxygen Calculation

The amplified voltage signals are recorded using an oscilloscope or data acquisition system. The oxygen saturation level is then calculated based on the difference between the red and infrared signals.

Experimental Setup

Equipment Used

  • Photodiode: S5971 - used for detecting transmitted light.
  • Operational Amplifier: OPA177 - configured for amplification of the photodiode signal.
  • Resistor: Install a 150k ohm resistor between the amplifier's output and the ground to adjust the gain of the amplifier based on the expected light intensity.
  • LEDs: 660 nm (red) and 940 nm (infrared) wavelengths – used for measuring the absorption characteristics of oxygenated and deoxygenated hemoglobin.
  • Function Generator: Tektronix AFG1022 – used to drive the LEDs.
  • Oscilloscope: R&S RTE2004 – used to observe the photodiode output signal.
  • Power Supply: Keithley 2231A-30-3 – configured to provide ±6 V.
  • Commercial Oximeter – used for reference comparison.

Circuit Setup

1. Photodiode and Amplifier Connection

The S5971 photodiode is reverse-biased and connected to the inverting input of the OPA177 operational amplifier. A 150 kΩ feedback resistor is used between the output and the inverting input of the op-amp, forming a transimpedance amplifier. This configuration converts the small photocurrent generated by the photodiode into a readable voltage output.

8-Pin Op-Amp Pinout Description is shown below:

Figure 1: Amplifier

The circuit diagram is shown below:

Figure 2: Circuit Diagram
Figure 3: Connected Circuit

2. Power Supply Configuration

The Keithley power supply only provides positive voltages. To generate a dual supply of ±6 V, two +6 V outputs were connected in series:

Connect the ground of one channel to the +6 V of the other. The remaining terminals act as +6 V and –6 V relative to the common ground. This provides a symmetric ±6 V supply for the op-amp.

3. LED Driving Signal

The 660 nm and 940 nm LEDs are driven by a square wave signal generated by the function generator:

  • Frequency: 500 Hz
  • Amplitude: 5 V (peak-to-peak)
  • Offset: +2.5 V

The offset ensures that the entire waveform stays within the positive voltage range (0–5 V), which simplifies interfacing and avoids negative voltages across the LED.

Signal Observation

The amplified signal from the op-amp is connected to the digital oscilloscope to observe the voltage waveform corresponding to the modulated LED signal. This helps in analyzing the absorption changes related to blood oxygen levels.

The total experimental setup is shown in the picture below:

Figure 4: Experimental Setup

During the experiment, a finger was placed directly over the optical sensor, allowing the modulated LED light (660 nm and 940 nm) to shine through the finger. The photodiode detected variations in light intensity corresponding to blood volume changes with each heartbeat.

The output of the amplifier was connected to the oscilloscope, and the resulting signal is shown below:

Figure 5: Signal from Oscilloscope

Signal Interpretation

  • The high-frequency square wave comes from the modulated LED drive signal (500 Hz).
  • The envelope (slow modulation) shows a pulsatile waveform, which correlates with the heartbeat.
  • The peak-to-peak voltage ranges from approximately −1.2 V to +1.2 V, indicating good signal strength after amplification.
  • This waveform demonstrates the periodic blood volume changes in the finger, confirming successful detection of the photoplethysmographic (PPG) signal.

Measurements and Analyzing Data

1. Calculate the R Value

Blood oxygen saturation is typically determined by first obtaining the R value. To calculate the R value in dual-wavelength PPG, red and infrared light are used. For each wavelength, extract the AC and DC components: ACred,ACIR,DCred,DCIR. The R value is calculated using the following formula:

R=ACred/DCredACIR/DCIR

This R value represents the relative light absorption associated with arterial blood.

In this experiment, AC and DC values were obtained through the following procedure. The waveform image captured from the oscilloscope was imported into Origin for reconstruction. Straight-line fitting was applied to approximate the signal's peaks, troughs, and baseline, allowing for the extraction of average values. The DC component corresponds to the baseline level of the signal, represented by the lowest line in the figure, with a measured value of 1.18913. The AC component is defined as the difference between the peak and the baseline; in this case, it is the difference between the highest line at 1.81525 and the middle line at 1.48455.

Figure 6: Waveform showing AC and DC levels

2. Estimating SpO₂ from the R Value

Because standard devices measure SpO₂ mostly between 98% and 99%, low-oxygen data is hard to obtain, making it difficult to model the full R–SpO₂ relationship and preventing accurate fitting or simulation.

In this experiment, to calculate blood oxygen saturation, we referred to the empirical fitting formula provided by MAXIM based on its sensor. This formula was obtained by fitting a large amount of experimental data and establishes a relationship between the R value and SpO₂, expressed as:

SpO2=45.060R230.354R+94.845

To simplify the analysis and obtain effective SpO₂ estimates, this fitting formula was adopted as the basis for data processing.

3. Data Processing

Blood oxygen levels were measured from two individuals, each with three trials. Oscilloscope waveforms were imported into Origin to calculate R values, which were then used to compute SpO₂. After calculating the variance, poor-quality data were excluded to improve accuracy. The remaining values were then averaged to obtain reliable results. The results were compared with readings from a fingertip pulse oximeter.

The figure below shows the waveform plotted in Origin based on the oscilloscope data.


Figure 7: Red and IR waveforms for Group A - Dataset 1
Figure 8: Red and IR waveforms for Group A - Dataset 2
Figure 9: Red and IR waveforms for Group A - Dataset 3
Figure 9: Red and IR waveforms for Group B - Dataset 1
Figure 10: Red and IR waveforms for Group B - Dataset 2
Figure 11: Red and IR waveforms for Group B - Dataset 3


From the figure above, the AC values are identified. Using the formula mentioned earlier, the corresponding R values and calculated blood oxygen levels are shown in the table below.


Table 1. R Value and SpO₂ Measurements for Group A and B
Parameter A B
1 2 3 1 2 3
R peak 2.070 2.201 3.164 2.771 2.537 2.956
R trough 1.713 1.857 2.782 2.397 2.162 2.593
R DC 1.375 1.482 2.240 1.918 1.747 2.089
R AC 0.357 0.344 0.382 0.374 0.375 0.363
IR peak 0.658 0.766 0.719 1.069 0.839 1.120
IR DC 0.472 0.557 0.524 0.773 0.610 0.899
IR AC 0.218 0.209 0.195 0.296 0.229 0.221
R 0.562 0.619 0.458 0.509 0.572 0.707
SpO₂ (%) 97.669 96.379 99.292 98.617 97.469 93.787

Note: R values were calculated from AC/DC ratios of red and infrared signals. SpO₂ was computed using a fitted empirical formula.


The average SpO₂ values for groups A and B are 97.780 and 96.624, respectively. Using the variance formula:

s2=1n1i=1n(xix¯)2

the variances of groups A and B are calculated to be 1.385 and 4.122, respectively.

After removing one set of poor-quality data and calculating the average, the result is compared with the measured blood oxygen value:

Table 2. Comparison of Experimental and Measured SpO₂ Values
A B
Experimental 97.024 98.043
Measured 98 99


Comparison between the experimental and measured SpO₂ values shows that both groups A and B exhibit minimal deviations (–0.976 and –0.957, respectively), with errors below 1%. These results demonstrate that the experimental procedure is accurate and reliable, providing a close approximation to actual blood oxygen saturation levels and validating the effectiveness of the measurement and calculation approach.

P.S. In fact, we conducted experiments on more datasets beyond just groups A and B. However, the performance of the other datasets was not as good, mainly due to excessively large variances or significant deviations from the actual measured values.

Results, Comparison and Improvement

....

References

[1] OPA177 Precision Operational Amplifier Datasheet. Texas Instruments (PDF).