Part 1: Low-Pass and High

The Electrocardiograph
With Sections written by:
Wei Lin
Department of Biomedical Engineering
Stony Brook University
Chris Kirtley
Department of Biomedical Engineering
Catholic University of America
Introduction
The electrocardiograph (ECG/EKG) is produced by the heart muscle(myocardium). It is the
timing signal (pacemaker) that causes the muscle cells to contract and pump blood round the
circulation. So, although it is responsible for the pumping action, it's important to realise that the
two are not the same.
The ECG is useful for three basic parameters of clinically interest:

The rhythm and rate of the heart: whether it is regular and normal, faster (tachycardia) or
slower (bradycardia) or normal

The axis of the heart, which can reveal any enlargement (hypertrophy) dueto, e.g. chronic
high blood pressure (hypertension)

The state of the myocardial muscle
Electrical Noise
ECG has an amplitude of only about 1 mV, so to detect it
an amplifier is needed. There is a problem, though electrical noise, or electromagnetic interference (EMI).
EMI is generated by many common appliances, such as
power lines, fluorescent lights, car ignitions, motors and
fans, computers, monitors, printers, TVs and television, and cell phones. When the ECG is
amplified, the noise is amplified too, and often swamps the ECG signal. Luckily, the noise is
usually of a higher frequency than the ECG. For example, AC hum is 60 Hz, which is above the
highest frequency in the ECG (about 20 Hz). So the noise can be reduced by low-pass filtering.
Submitting an Experiment
1
Circuit
The circuit consists of two modules: the filter and the amplifier:
The filter is a simple low-pass RC network (first order or single polefilter). Its job is to remove
60Hz electrical noise picked up from fluorescent lights, computers and AC power lines.
We will first develop a filter and then the amplifier.
Submitting an Experiment
2
Part 1: Low-Pass and High-Pass Filters
Wei Lin
Department of Biomedical Engineering
Stony Brook University
Instructor’s Portion
Summary
This experiment requires the students to build a low-pass filter and a highpass filter using operational amplifier. The two filters will be connected in
series and form band-pass filter. The students will estimate the frequency
response of the filter based on the values of the resistors and capacitors
used and use ELVIS work station to measure the real frequency response
of the filter.
Uses
This lecture applies to all courses of virtual instrumentation.
Equipment List

Computers

LabVIEW 7 Express

NI-ELVIS benchtop workstation

LabVIEW User’s Manual. April 2003

LabVIEW Introduction Course - Six Hours.

LabVIEW Introduction Course - Three Hours

Lecture Slides of “Data Analysis Using LabVIEW”

VIs from the project “Data Acquisition Using NI-DAQmx”
References
Submitting an Experiment
3
Student’s Portion
Introduction
The students will build the low-pass and high-pass filters based on the
provided schematics diagram. They will use the rules of ideal operational
amplifier to estimate the frequency response, i.e. identify the cutoff
frequencies of the filter. They are also required to develop a protocol to
measure the frequency response of the filter using the signal generator in
ELVIS workstation and the data acquisition VI developed in the previous
project titled “Data Acquisition Using NI-DAQmx VIs”.
Objectives


Low-pass and high-pass filters
Data acquisition using LabVIEW
Theory
The low-pass and high-pass filters are designed based on the rules of the
operational amplifier. When the feedback resistor is paralleled by a
capacitor, the amplifier becomes a low-pass filter. When the input resistor to
the negative terminal of the operational amplifier is in series with a
capacitor, the amplifier becomes a high-pass filter. The cutoff frequency of
the filter is defined as the frequency at which the gain of the filter is 3dB
less than the gain in pass-band. The students are required to derive the
equations that determine the cutoff frequency.
Lab Procedure
1.
2.
3.
4.
5.
Keep ELVIS workstation power off.
Identify the pin assignment of the operational amplifier (LF353).
Get familiar with the layout of breadboard.
Place two LF353 on the breadboard.
Place the resistors and capacitors on the breadboard and connect the
pins of the operational amplifiers using these components if possible.
6. Create lines of power supplies (+15V, -15V) and ground.
7. Connect the +15V to pin 8 of LF353 (Vcc) and -15V to pin 4 of LF353
(Vee).
8. Connect the ground of the circuit.
9. Verify that all the connections are correct.
10. Connect one input terminal to FUNC OUT terminal on ELVIS.
11. Turn on the ELVIS workstation.
12. Launch LabVIEW and ELVIS.
13. Measure the frequency spectrum of the amplifier by measuring the
gain at multiple frequency points.
Submitting an Experiment
4
Lab Report
The lab report should contain the following:
Appendix
Filter schematics
Submitting an Experiment
5
Part 2: Electrocardiograph
Wei Lin
Department of Biomedical Engineering
Stony Brook University
Instructor’s Portion
Summary
This experiment requires the students to build a electrocardiograph based
on the previous projects of instrumentation amplifier and high-pass/lowpass filters. The students are required to build a sub VI that can measure
the heart rate from the collected ECG signal.
Uses
This lecture applies to all courses of virtual instrumentation.
Equipment List

Computers

LabVIEW 7 Express

NI-ELVIS benchtop workstation

LabVIEW User’s Manual. April 2003

LabVIEW Introduction Course - Six Hours.

LabVIEW Introduction Course - Three Hours

VIs from the project “Data Acquisition Using NI-DAQmx”
References
Submitting an Experiment
6
Student’s Portion
Introduction
The students will build the electrocardiogram (ECG) amplifier based on the
provided schematics diagram. They will develop a VI that can detect the R
wave in the ECG signal and convert the R-R interval into heart rate. The ECG
amplifier will be based on the circuits developed in the previous projects of
instrumentation amplifier and filters. The students will modify the data
acquisition VIs developed in the previous project titled “Data Acquisition
Using NI-DAQmx VIs” to collect ECG and measure heart rate.
Objectives



ECG amplifier
Data acquisition using LabVIEW
Data analysis using LabVIEW
Theory
The basic ECG amplifier consists of two components. The first component
is the instrumentation amplifier with typical gain of 1000 (60dB). The
second component is the band-pass filter. The low cutoff frequency is
around 0.5Hz to minimize the baseline shift. The high cutoff frequency is
around 100Hz for antialiasing purpose.
Lab Procedure
1. Keep ELVIS workstation power off.
2. Locate the instrumentation amplifier on the prototyping board and identify the resistor R4
and R5. Replace the resistors with resistors of 10k
3. Connect the output of the instrumentation amplifier to the input of the high-pass filter.
4. Connect BANANA A on the prototyping board to the positive input of instrumentation
amplifier (Pin 3 of LF353)
5. Connect BANANA B on the prototyping board to the negative input of instrumentation
amplifier (Pin 5 of LF353)
6. Turn on the ELVIS workstation.
7. Place ECG electrodes on the wrists of both arms and connect the electrodes to the
connectors (BANANA A & B) of the ELEVIS station.
8. Launch LabVIEW and ELVIS.
9. Measure the frequency spectrum of the amplifier by measuring the gain at multiple
frequency points.
10. Use ELVIS scope to check the ECG signal.
11. Using finite data acquisition VI to record ECG signals
Submitting an Experiment
7
12. Modify the continuous data acquisition VI measure the heart rate. The sub VI for the
measurement of heart rate should be finished before the lab. Students are encouraged to
develop their own algorithms.
Lab Report
The lab report should contain the following:
1. The experiment title
2. The experiment objective
3. The experiment procedure and theory, which include your protocol to
measure the gain of the amplifier and the equations fro cutoff
frequencies.
4. Experiment results, which include the plot for frequency spectrum
(gain vs. frequency).
5. The experiment procedure and theory. Experiment results, which
include the plot for frequency spectrum (gain vs. frequency).
6. Discussion
7. You may add your lab design into this project.
8. You must submit the sub VI for the heart rate measurement with the
description of use.
Submitting an Experiment
8
Appendix
Filter schematics
Submitting an Experiment
9
Submitting an Experiment
10