ECE 5030

Plethysmograph and oximeter

Introduction.

In this assignment you will build a pulse/oximeter, use the DAQ toolbox to interface to the computer, then write software to extract your heart rate and blood oxygenation from the fluctuating voltages.


Procedure

Modern pulse/ox units use two LEDs and a photosensor to get the absroption of light through your finger tip at two different wavelengths. From the ratio of absorption of the two wavelengths, you can derive the hemoglogin oxygen level. We are going to use IR, 940 nm (LTE4208), and red LEDs, 660 nm, and a OPT101 photosensor. The OPT101 is useful because it includes a photodiode and a transimpedance amplifier to convert photocurrent into voltage. The IR and red LEDs need to be alternately turned on around 100 times/second so that absorbance measurements of both wavelengths can be made in a small fraction of a heartbeat cycle.

The circuit below uses two transistors to gate the LEDs from the NIDAQ or from a 555 timer. The design below uses a 555 timer to generate a square wave. A CD4066 quad switch sample and hold is used to demux the two signals. A LM358 will be used as sample and hold buffer and for gain/filtering. To test the IR led you can see a slight glow in the IR emitter with your cell phone camera because the camera is slightly sensitive to infrared light. You will need to input four voltages to the NIDAQ.

pulse/ox


A slow analog input program shows how to set up the DAQ interface for one channel, and plots the data without scrolling. This may be useful for debugging. You will need to make a movie of your scrolling data. The following code (taken from the Matlab command help addframe) shows how to make an AVI file which can be played using Windows Media Player. An example AVI shows a startup transient as I put my thumb into the sensors, then several seconds of heart beat, then a transient as I removed my finger. At about 25-28 seconds into the recording, I did a gentle Valsalva maneuver which reduces heart stroke volume. You can see the reduced signal during these few seconds.

fig=figure;
set(fig,'DoubleBuffer','on');
set(gca,'xlim',[-80 80],'ylim',[-80 80],...
	'nextplot','replace','Visible','off')

vidobj = VideoWriter('example.avi');
open(vidobj);

x = -pi:.1:pi;
radius = 0:length(x);
for i=1:length(x)
	h = patch(sin(x)*radius(i),cos(x)*radius(i),...
			[abs(cos(x(i))) 0 0]);
	set(h,'EraseMode','xor');
	frame = getframe(gca);
	writeVideo(vidobj,frame);
end

close(vidobj);

Example from 2013, but with only the IR channel. See old lab.

To compute the blood oxygen level, refer to the references


Assignment

  1. Build the circuit above. You will need to adjust the gain, high pass, and low pass to get a good pulse with amplitude of a few hundred millivolts. You may also need to change the values of the 100 ohm resistors to get reasonable ranges of intensity for each LED so that the DC voltage is in a range useable by the ADC. Put a 1K potentiometer in series with the 100 ohm resistor if necessary.
  2. Save the circuit for the next lab assignment also.
  3. Use the USB-6008 to connect the plethysmograph circuit to your computer.
    Write a matlab program to:
    1. Read both plethysmograph output voltages 50-100 times/second.
    2. Automatically determine if the plethysmograph data represents a heart beat, or is just noise. (interface example)
      Make a visual indication of good data. (perhaps a red/green button on the display)
    3. Make a scrolling plot of voltage versus time for both channels (IR and red) and save a few seconds of the scrolling plot as a AVI movie file. Note that saving frames consumes a fair amount of time, so you may not want to do much realtime computation while recording the movie. In fact, you may need to slow the data acquisition down to as low as 10 samples/second while recording.
    4. A Quit button should end the data acquisition and close the figure.
    5. Compute and display the current heart rate and blood oxygen level only if the data is valid.
Your written lab report should include the sections mentioned in the policy page, and :
  1. Images and video to support observations. Send the video to the TA using dropbox.cornell.edu.
  2. The algorithm you used to detect valid heart rate data.
  3. Observations concerning biological effects, such as the Valsalva maneuver, breathing patterns, or other effects. This may include heart rate, pulse amplitude, pulse regularity, or other parameters. Do you see an effect of breathing on the heart rate waveform? Explain.


February 6, 2014 . Copyright Cornell university