Introduction.
In this assignment you will build a plethysmograph, use the DAQ toolbox to interface to the computer, then write software to extract your heart rate from the fluctuating voltage. In addition you will build a breath monitor.
Procedure
The circuit below uses a infrared emitter to shine light into your finger tip. The amount of light scattered out is related to the amount of blood flow and hence phase of the heart beat. The light scattered is measured by a phototransistor, amplified and filtered by the two opamps. You can try reflection or transillumination. I found transillumination of my thumb to give the best signal. It is important that your finger does not move relative to the phototransistor or emitter. Notice the polarity of the emitter and phototransistor.
You can see a slight glow in the IR emitter (on the left) because the camera is slightly sensitive to infrared light. The Phototransistor is the black device just to the right of the thumb in the last image. The black color is caused by a filter in the plastic body of the phototransistor which blocks visible light.
A slow analog input program shows how to set up the DAQ interface for one channel, and plots the data without scrolling.
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);
Examples 2013
Assignment
Quit
button should end the data acquisition and close the figure.