Download writeup

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Superheterodyne receiver wikipedia , lookup

Oscilloscope wikipedia , lookup

Operational amplifier wikipedia , lookup

Wien bridge oscillator wikipedia , lookup

Audio crossover wikipedia , lookup

Amplifier wikipedia , lookup

Oscilloscope types wikipedia , lookup

Radio transmitter design wikipedia , lookup

Battle of the Beams wikipedia , lookup

Index of electronics articles wikipedia , lookup

Regenerative circuit wikipedia , lookup

Signal Corps (United States Army) wikipedia , lookup

Analog television wikipedia , lookup

Analog-to-digital converter wikipedia , lookup

Oscilloscope history wikipedia , lookup

HD-MAC wikipedia , lookup

Dynamic range compression wikipedia , lookup

Valve RF amplifier wikipedia , lookup

Resistive opto-isolator wikipedia , lookup

Cellular repeater wikipedia , lookup

High-frequency direction finding wikipedia , lookup

Opto-isolator wikipedia , lookup

Transcript
The Photoplethysmograph
[Insert picture of finger in box]
ABSTRACT
The heart rate is an important measure of health and physical fitness. Medical
professionals rely on the rate as a measure of health conditions and use to prescribe
treatment to individuals. Athletes value the heart rate highly as a tool for regulating
frequency and intensity of workouts because the rate gives a quantification of exercise
intensity. By looking at the rate, athletes can tailor their workouts to a heart rate target
and receive feedback. Instant feedback is highly desired for these individuals, and
fortunately simple devices can provide these to them.
A plethysmograph is a device that measures the amount of blood in a particular part of
the body. A photoplethysmograph performs the task optically by measuring the variation
of the amount of light passing through a part of the body—in our case we chose a
finger—caused by the pulsatile nature of blood flow. This measurement allowed us to
determine the heart rate by looking at the period of the blood flow.
DESIGN PROCESS
A simple block diagram of the photoplethysmograph system we designed is shown below.
An LED light source (red to match the color of blood) was applied to the finger on one
side, and a light sensitive resistor, a Cadmium Sulfide (CdS) cell on the other side varies
its resistance, and thus the voltage, to obtain an indication of blood flow in the finger.
The change in the resistance is transduced into a voltage, and in its raw form gave a
voltage range of 0 to 2.5 volts. It is the variation in this signal caused by the pulsatility of
blood flow in the finger that we want to measure, which had a max voltage of 50 mV.
Then the signal needed amplification so that its range went from 0 to 5 volts which can
later be sent to an A/D converter. Before that, the raw signal possessed much noise,
which needed filtering to produce a crisper-looking one. Once that was achieved, the
digital signal was sent to the PIC where it would run an algorithm to measure the time
between each heart beat, and display that on a web server. Six LEDs was set up to all
light up when the CdS detects little light from having most of it blocked by the blood
flow, and turn off when encountering much light, corresponding to no fluid.
That was overview of the project, and in the following section we discuss the design
details in-depth.
Transduction, Amplification, and Filtration
Single supply design (Vcc = 5V) was required to power the circuit components.
Transduction
The CdS cell changes resistance in response to the amount of light it receives. To work
with this signal requires that it is transduced into a voltage. The CdS cell was placed in
series with a 47 KOhm resistor, and the signal was taken between them. The signal then
would range from 0 to Vcc/2 or 2.5 volts as the CdS resistance varies.
Amplification
We chose the non-inverting configuration of a TLCV2772 (link) rail-to-rail operational
amplifier as it is common to use this kind in single supply design. These amplifiers can
output voltages quite near the power supply voltage or rail. And since we want to
measure the changes of the 2.5 voltage signal due to the blood flow, we want to amplify
the changes rather than the entire signal. A virtual ground was employed to achieve this
by amplifying the changes from the 2.5 volts. A rail-splitter in the form of TLE2426
(link) was used and attached to the positive terminal of the op-amp. Below is a diagram
of the design constructed so far.
Virtual Ground Physical Ground
Notice that the inverting configuration was chosen because it can easily be modified to
also act as a filter as we shall soon see. A secondary gain stage was implemented using
the same configuration to invert the inverted signal from the primary gain stage.
The gain of an inverting amplifier is shown below.
[Insert gain equation]
The total gain we wanted in the amplifiers was ___. Thus, we chose the he first stage
gain to be ___ and the second ___. Thus, the overall gain was ___, pretty close to our
desired one.
Filtration
Once again, the signal we want to end up with consists of tiny 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). Recall that we only want the
time varying part of the signal amplified, and if we were to amplify the raw signal the DC
(constant) part of the signal would saturate the amplifier before obtaining desired
amplification of the AC (time varying) part.
To get rid of the DC signal we used a high-pass filter because DC signals are effectively
extremely low frequency. But we had to be careful not to attenuate the pulse signal,
which is usually about 1 Hz (equivalent to one heart beat per second). But we do want
other low frequency noise from component values attenuated. Considering these
requirements, a band-pass filter was appropriate with a frequency band from .5 Hertz to
10 Hertz. We decided that a first-order simple band-pass filter would be sufficient, which
can be implemented by modifying the amplifier. A capacitor in series with the input
resistance constitutes a high-pass filter, and one in parallel with the feedback resistance
constitutes a low-pass. RC values were selectively chosen to set the pass-band
frequencies as shown below.
[Insert modified amplifier with filter]
[Insert RC calculations]
The A/D Convertor and the PIC Microcontroller
The analog signal from the amplification and the filter stage must be digitized
before it is read into the PIC 16LF873A microcontroller. We chose the ADC0804 to
handle the task because of its high resolution (8 bits) and a free running conversion mode.
We used 6 of the 8 bits (with the least two significant bits ignored since they were always
on) to represent the blood content in the finger.
The Heart Rate on the Web Server
Software was written in C-programming language and programmed into the PIC
to measure the time between each beat, and displayed on a Web Server. The algorithm to
perform this task upon a push of a button is described below





Establish a high threshold to determine the approximate location of a spike in the
signal, now represented by a digital value from 0 to 256. The threshold chosen
was 25% of the range less than the peak.
Start a millisecond counter once the high threshold is passed.
Establish a low threshold to ensure that local peaks are not counted.
Once the digital signal has passed the low threshold and reaches the high
threshold once again, stop the counter. The counter time roughly corresponds to
the period of a heart beat.
Calculate the heart rate in beats per minute (BPM) and display it on the Web
Server.
Notice that the thresholds are macros that should be determined for each individual since
signals are different from finger to finger and person to person.
RESULTS
Below are oscilloscope printouts of the raw signal and the signal for David and Heather
after the signal processing.
[Insert figures of raw signals and processed signals]
The beat period for both subjects was measured on the oscilloscope, and the
corresponding BPM values were in the ball park range. They are reproduced below.