Pulse Oximeter
Circuits, Signals, and Sensors: Instrumentation Laboratory
Dr. Warren Zipfel
Team of 2
August 2022 - December 2022
Skills:
-
Microcontrollers (PIC)
-
Analog/Digital Circuit Design
-
Signal processing
-
USB/HID devices
-
C for firmware
-
MATLAB for data collection
Overview
Over the course of ten labs, one of our semester long projects was to build a two-color pulse oximeter from scratch on a breadboard. We broke down all of the necessary circuits and subcircuits down to really understand them; as well as how to structure an electronic medical device as a whole. Unfortunately, we were not allowed to use an Arduino microcontroller or similar unit, which tends to abstract the microcontroller circuit and put it all into a black box. We used a PIC18F2455 microcontroller and had to build the microcontroller circuit on the breadboard as well. This included adding an analog-to-digital converter (ADC) manually. Uploading code to the microcontroller was not as simple as simply clicking "Upload" in the Arduino IDE and I also had to understand how to use an ICSP to flash our PIC microcontroller. Building everything from scratch gave me a solid understanding of electronics, analog and digital circuit design, and microcontroller programming.

Oximeter Design
The pulse oximeter works by comparing the absorbance of oxygenated and unoxygenated hemoglobin at 660 nm and 940 nm. We want to read this absorbance in the pulsatile volume of arterial blood as this removes possible interference from other sources, such as venous blood and tissue. Because the other signals are DC signals, we can easily filter them out with a circuit. There is also an empirically-determined equation which accounts for light scattering within tissue, which is taken care of in the firmware.
However, reading these absorbances also requires a lot of other subcircuits to switch the LEDs, filter out noise, and amplify the signal to a readable level. Below is a list of the subcircuits we needed for our oximeter:
-
A BJT transistor switching circuit to switch the LEDs really fast and essentially read both absorbance values simultaneously without switching both LEDs on at the same time.
-
A photodiode coupled to a current-to-voltage op-amp that amplifies the small photodiode current into a readable voltage by the ADC.
-
An analog switch to multiplex our two LED signals.
-
Two active low-pass filtering circuits to filter out the 3 kHz switching frequency from our switching circuit.
-
Two AC-coupled active high-pass filtering circuits to extract the AC signal (essentially the arterial blood that pumps due to our heartbeats)
Firmware
We also needed to write the code and firmware as well. Communicating with the ADC, reading values, etc. was a lot more difficult without being able to use the handy built-in Arduino commands, but it gave me a much stronger understanding of the underlying electronics and microcontroller programming. Having to always manually write the clock and chip-select pins also gave me a new appreciated for the Arduino IDE environment. While we wrote all of the firmware in C, we used MATLAB to communicate with the device. We learned about and used the USB HID communication protocol, which MATLAB had support for.


