<build> : Pulse Oximeter
- HP
- Mar 5, 2020
- 6 min read
As part of my biomedical course at Michigan, I have spent the last few weeks constructing a pulse oximeter. Pulse oximetry is a noninvasive process to measure the oxygen saturation (hemoglobin in blood carrying oxygen) in your blood or the oxygen levels in your blood. Pulse oximeters are great because they can rapidly detect small changes in the efficiency of oxygen transportation to the extremities from the heart such as the arms and legs. Furthermore, they are beneficial in monitoring and detecting heart conditions that relate to the pumping of blood, in nearly real-time. To successfully construct a functioning pulse oximeter, it was imperative to understand the components of a pulse oximeter as well as construct software that could extract, filter, and smooth a signal into an interpretable and useful waveform.
Materials
General
Breadboard
Panoma BNC Cable/Cables
Panoma Banana Clips
Wires
DAQ Board
Agilent DC Power Supply
Agilent 33220A Function Generator
Tektronix TDS 2012C Oscilloscope
LabVIEW Software
Finger Cuff
1/2" PVC pipe
Power Drill
Drill bits: 5/32, 3/16, 13/64
Emitters
Red Light Emitting Diode (LED)
Infrared Light Emitting Diode (LED)
Resistors: 100 Ω (1), 43 Ω (1)
Detectors
Infrared Phototransistor
Red Phototransistor
Resistors: 5 kΩ (2)
Low-pass Filter (x2)
LM471 Op-Amp (2)
Resistors: 5 kΩ (2)
Capacitor: 2.2 μF (1)
High-pass Filter (x2)
LM471 Op-Amp (2)
Resistors: 15 kΩ (1), 1 MΩ (1)
Capacitor: 100 μF (1)
Software
LabVIEW
Methods
Hardware/Circuitry
Finger Cuff

To construct the finger cuff, 4 holes were drilled into a PVC pipe parallel to one another. The spacing between the top two holes was chosen arbitrarily; however, the goal was to keep the two emitters and detectors close while mitigating cross-talk. To drill each of the holes, we used a pre-drill (a drill bit smaller than the actual size required), which was then followed by increasing sizes until the LEDs fit snug into the cavity. The finger is placed in the cavity on top of the detectors. The fit of the finger is not tight and requires user awareness. For testing, the emitter LEDs are powered by the DAQ interface with the computer. To avoid cross-talk between the LEDs, the emitter diodes are controlled via the LabView software, where they are made to pulse at a given sampling rate. A picture of the finger cuff is shown below in Figure 1. Once the emitters and detectors were created (soldered and taped) they were placed in their ports, and then taped to the cuff in order to maintain stability. Furthermore, the tape was placed over the end of the finger cuff in order to eliminate the effects of light entering from the end of the cuff, opposite the finger.
Circuit Diagram
Below is our final circuit diagram for a single emitter and detector. This circuit was built twice, once for the Red LED and again for the IR LED. We separated the DC output from the AC output to allow our software to characterize the pulsatile flow from the vascular bed. To do so, we created a low pass filter for our DC output and a high-pass filter for our AC output. For the emitter, we followed the forward current set up, while for the detector, we utilized the Fairchild switch circuit.

LED Circuit
Red LED
Values regarding the red LED were extracted from Datasheet [1]. These values were then taken into account when constructing the final circuit design.
Lambda (wavelength) = 647 nm
Forward Current, Ir = 50mA
Supply Voltage, V = 5V
Resistor, R_theoretical = 100 Ω
Measured Resistor Value: 99.85 Ω
Infrared LED
Values regarding the red LED were extracted from Datasheet [2]. These values were then taken into account when constructing the final circuit design.
Lambda (wavelength) = 940 nm
Forward Current, Ir = 20 mA
Supply Voltage, V = 5V
Resistor, R_theoretical = 43 Ω
Measured Resistor Value: 43.11 Ω
Fairchild Phototransistor Switch

Purpose: The Fairchild Phototransistor Switch was utilized for the detector component. This circuit design ensured that the input signal to the op-amps was not saturated by the supply voltage. Based on the datasheet for the Fairchild phototransistor switch, it was advised to use a 5 kilo-ohm resistor for R_e, and it is for this reason that that resistor value was chosen. At this resistor value, the phototransistor would have the optimal sensitivity to display the blood oxygenation changes in a human finger.
For Red LED:
Measured Resistor Value: 5.081 Ω
For IR LED:
Measured Resistor Value: 5.085 Ω
Low Pass Filter
Purpose: The goal of the low-pass filter was to provide a DC output signal and filter out 60Hz noise. We picked a frequency cut off to be 20 Hz to ensure we were in line with that of a human heartbeat. Because our output signal from the phototransistor was 1.5V, the low-pass filter had a gain of 1. Anything larger saturated our signal, which was not ideal.

Frequency cut off: 20 Hz (to get a human heartbeat and filter out 60Hz noise)
For Red LED:
Measured Resistor 1 Value: 5.078 kΩ
Measured Resistor 2 Value: 5.164 kΩ
Measured Capacitor Value: 2.2 μF
For IR LED:
Measured Resistor 1 Value: 5.084 kΩ
Measured Resistor 2 Value: 5.105 kΩ
Measured Capacitor Value: 2.2 μF

High Pass Filter
Purpose: The goal of the high-pass filter was to provide an AC output signal by filtering out the DC signal and amplifying the signal. Since our AC signal was 1% of our DC signal, it was 1.5mV. We picked a frequency cut off to be 0.01 Hz to filter out the DC signal and used a gain of 100 to amplify our 1.5mV AC signal.

Frequency cut off: 0.1 Hz (to get rid of DC signal)
For Red LED:
Measured Resistor 1 Value: 14.927 kΩ
Measured Resistor 2 Value: 0.9968 MΩ
Measured Capacitor Value: 102.2 μF
For IR LED:
Measured Resistor 1 Value: 14.944 kΩ
Measured Resistor 2 Value: 0.9967 MΩ
Measured Capacitor Value: 101.8 μF

Software Methods
The software component was constructed using LabVIEW software. Using this software enabled for the acquisition, separating, filtering, analyzing, and displaying of the DC and AC components from both the red and IR light. The four signals that were output from the hardware were each connected to a different voltage channel in the DAQ board. Once the signals were acquired, they were split and then sent to their respective filter and display. Each of the signals were first subject to a collector in order to accumulate data, thus allowing for fluent and uninterrupted signals that more accurately represented reality.
For the DC signals a bandstop filter was used in an attempt to filter out 60 Hz noise. Following this, the DC signals were output in order to determine the offset that each provided using the waveform chart. Then, the mean DC value of both the red and IR signals was calculated in order to properly determine values for the oxygen saturation level using Beer's Law.
Each of the AC signals was subject to a collector as well, followed by a filter. The difference between the filter used for the DC signal, and that of the AC signal is that the AC signal filter served as a smoothing filter. That is, it was a lowpass filter that enable small frequencies to pass, while filtering out high frequency noise. This provided a cleaner looking signal. For the AC signals, their peak to peak measurements were extracted for the Beer's law calculation.

The software portion of this study was originally constructed so that the IR and red LED would alternate in order to mitigate the interference caused by both of them being on at the same time. This however, proved to be very difficult when attempting to combine the hardware and software components. The original block diagram that was used in order to flicker the lights on an off is shown below in Figure 9. The main difference between this block diagram and the one which was used is the looping structure introduced in the latter.

The heart rate that was displayed on the front panel of the LabVIEW software was calculated in a manner similar to that in the previous ECG lab. The heartbeat was calculated by extracting peaks from the IR AC signal which oscillated with according to the arterial waveform. The threshold that could be manipulated determined at what point a peak would be considered for the heart beat calculation. The heartbeat could also be calculated using the red AC signal; however for our samples the IR signal was always more indicative of the arterial waveform.
The Beer-Lambert Law was ultimately used to calculate the oxygen saturation levels. This equation consists of two equations. The first of which determines the ratio of the time varying signal to the total signal (R_ac). Essentially, this portion of the Beer-Lambert Law compares the AC portion of the signal to the DC portion. Furthermore, it requires that the peak-to-peak intensity is much less than that of the DC intensity. The value calculated for R_ac is then used to calculate the SpO2 according the equations in Figure 10.

This calculation was introduced in two steps within the LabVIEW software and integrates a critical portion from each of the voltage inputs.
Final Circuit and Results


Sources:
[1] LITE ON LED (Red) LTL2P3KRK Datasheet
[2] LITE ON LED (Infrared) LTE-5208A Datasheet
[3] Fairchild Semiconductor Phototransistor circuits
Comments