E72(a) Project

The Photoplethsymograph        

            Your task this week is to build a photoplethysmograph.  A plethysmograph is a device that measures the amount of blood in part of the body.  A photoplethsymograph does this optically. The output of your photoplethysmograph will be the four LED's on your PIC board.  At the end of the project you will have your design fabricated onto a PCB.  There is a lot of design involved in this lab (which means a lot of missteps and errors along the way -- such is the nature of design).  Don't wait until the last minute to do the work.

    If you are ambitious you can add software to calculate heart rate and display it on an LCD (liquid crystal display) -- a photoplethsymographic cardiotachometer.  However the software to do this is fairly involved.

    In theory the photoplethysmograph is simple - it measures the variation in amount of light passing through your finger caused by the pulsatile nature of blood flow.  You will place a light source on one side of your finger, and a light sensitive resistor, a Cadmium Sulfide (CdS) cell, on the other side.  By monitoring variations in resistance of the CdS cell you get an indication of blood flow in your finger.  A simple block diagram of such a system is shown below.


The light passes through the finger and is attenuated a certain amount depending upon how much blood is in the finger.  As the amount of light striking the CdS cell varies, so does its resistance.  This changing resistance must be transduced, amplified and filtered.  The output of the amplifier is sent to an A/D convertor, and finally to the PIC.  The relative amount of fluid in the finger should be displayed on the four LEDs.  Much fluid (little light) should have all LED's on.  Little fluid (much light) should correspond to all LED's off.

     The next several sections discuss each of the blocks in the diagram to give you some idea on how to proceed.

Transduction, Amplification, and Filtration

The A/D convertor has limited resolution, so it is first necessary to create a signal of appropriate amplitude (0-5 V).  You can use what you've learned over the course of the semester, but there is an added difficulty in that the signal we are trying to generate is from 0 to 5 volts, it never goes negative.  In addition, since this device will be battery powered we only have 0-5 V (or 0-9V) to supply our op-amps.  You should read the page on single supply design.


The CdS cell changes resistance in response to light.  To work with this signal requires that it is transduced into a voltage.  Two ways of doing this are shown.  The actual values of resistance will have to be worked out.

In the diagrams below, virtual ground is depicted by a green symbol with thick lines, ground by a black symbol.

Method 1 Method 2

Note: Limited voltage gain from this stage. Note: 1) Amplifier may act as load on CdS cell circuit.
2) Can modify op-amp circuit to do filtering as well as amplification.
Virtual Ground Physical Ground

Don't feel limited to these methods, there are many other ways to do this.

Amplifier and Filters

    The signal we are trying to observe consists of very small variations (changes in light intensity due to blood flow into or out of the finger), superimposed on a large constant signal (average light flowing through finger).  It is only the time varying part of the signal that you would like to amplify, if you were to amplify the signal as it is the DC (constant) part of the signal would saturate the amplifier before you got any decent amplification of the AC (time varying) part.  To  get rid of the DC signal you can use a high-pass filter.  To ensure the signal you are interested in (the photoplethysmograph) is not obliterated by the filter you want to make sure that the cutoff frequency for the filter is below about 1 Hz (a typical heart rate).  If high frequency (>10 Hz) noise seems to be a problem, you can use a band pass filter.  Refer to the Filter Lab, and the Introduction to Filters, to refresh you memory on how filters can be built.  You probably don't need anything as complex as the switched capacitor filter.  Remember that most of the filter equations were in terms of radian frequency, w, not Hz frequency, f.  We normally speak of Hz frequencies (cycles per second).  Recall that w=2pf.

The A/D Convertor

    The analog signal from the amplification stage must be digitized before it is read into the PIC microcontroller.  For this we use an A/D convertor.  The A/D convertor that you built in a previous lab is too insensitive (only 4 voltage levels), so we will use a dedicated chip from National Instruments, the ADC0831 that has 8 bit (256 level) resolution.  I have developed some sample code to help you to make easy use of the device.


    If you want to try to extend the scope of the project you can add software that will display the time between heartbeats on an LCD display.  We are using a serial LCD driver from Wirz Electronics.  The data sheet is here.  I have developed some sample code to help you to make easy use of the device. There is a connector on the boards with the ZIF sockets for the serial LCD.

To do

Your completed circuit should have the six LED's lighting up in relation to how much blood is in your finger.  The LED's should go through one cycle for each of your cardiac cycles.  If you are ambitious, you should time each cycle and display the results on the LCD. 

Some things to consider:


To Turn in: