University of Pennsylvania
School of Engineering and Applied Sciences
Department of Electrical and SystemsEngineering
ESE 206
MINI-PROJECT I
CARDIAC MONITOR VI
Please do not print on the lab printers
Background

An electrocardiogram (ECG) is a graphic tracing of the electric current generated by the heart muscle during a heartbeat. It provides information on the condition and performance of the heart. Electrocardiograms are made by applying electrodes to various parts of the body to lead off the tiny heart current to the recording instrument. The four extremities and the chest wall have become standard sites for applying the electrodes. Standardizing electrocardiograms makes it possible to compare them as taken from person to person and from time to time from the same person. The normal electrocardiogram shows typical upward and downward deflections that reflect the alternate contraction of the atria (the two upper chambers) and of the ventricles (the two lower chambers) of the heart.

The first upward deflection (ref Figure 1 of ECG waveform), P, is due to atrial contraction and is known as the atrial complex. The other deflections, Q, R, S, and T, are all due to the action of the ventricles and are known as the ventricular complexes. Any deviation from the norm in a particular electrocardiogram is indicative of a possible heart disorder. Information that can be obtained from an electrocardiogram includes whether the heart is enlarged and where the enlargement occurs, whether the heart action is irregular and where the irregularity originates, whether a coronary vessel is occluded and where the occlusion is located, and whether a slow rate is physiological or caused by heart block. The presence of high blood pressure, thyroid disease, and certain types of malnutrition may also be revealed by an electrocardiogram.

During the late 1960s, computerized ECG's came into use in many of the larger hospitals. This VI involves array manipulation, analog processing, Boolean logic, and the design and construction of a transistor speaker drive circuit to provide audio alerts.

A typical single cardiac waveform of a normal heartbeat as it appears on electro-cardiograph charts is shown in Figure 1. The voltages produced represent pressures exerted by the heart muscles in one pumping cycle. It is one of the life signs monitored in many medical and intensive care procedures. Instrumentation is provided to alert medical staff to any changes detected in the cardiac function.


Figure 1 - A Typical ECG Waveform

Design of a ECG Monitor System using Labview:

The VI to be implemented is designed to monitor the q-r-s envelope of a cardiac waveform and provide audio and visual alerts for the following conditions:

    Normal pulse amplitudes will vary among individuals. A front panel control is provided to preset an acceptable "safe" lower limit for the pulse amplitude at which an alert is activated. This limit will appear as a dashed line on the LabView display along with the waveform. A digital read-out of the maximum peak value designated "r" in Figure 1, and the minimum value, "s", is also displayed. A second control is used to provide a threshold level to detect only the systolic peaks. A LabView sub-VI used to detect the pulses also records the sample numbers at which they occur. Knowing the sampling rate, the pulse rate can be determined from this measurement. This measured pulse rate is shown by a digital read-out on the panel display.

The ECG signal is going to be generated from the HP/Agilent 34401A waveform generator. Use following steps :

Refer to the data acquisition vi that was done before 2 weeks. The data acquisition of the analog input is similar in this mini project.

Suggested Design Steps:

-Make an attempt to display the ECG signal on the waveform chart on the front panel before proceeding with the analysis and processing. Follow the flow chart on the following page for proceeding with your project.
-You  are going to use "Threshold Peak Detect.vi" and "Array Max-Min" function to detect the heart rate and peaks respectively. The Threshold control require you to set a number  above which the peaks will be counted. (since ECG contains smaller peaks which should be ignored for counting).  Array Max-Min function calculates the maximum amplitude of the ECG, above the Set Limit number  that is entered in the front panel.
-To show the Set Limit number graphically as a line, use  Initialize array  function . Use a  numeric constant of around 500 as the input
-The alarm LEDs  should light up on the front panel as the threshold and rate limits are exceeded.
    To make alarms sound externally, you have to use analog output of the board. Refer to the section at the end of this writeup to make appropriate change to your vi. Use the pin labeled DAC0 and DAC1 on the terminal board to connect the analog outputs to your circuit.  A circuit using 741 op amp is shown and it is being used as a (also as a buffer ) amplifier. Modify this circuit to output 5 volts to the relay when the input is 1 volt.  As preparation to this Labview Exercise, review the material provided describing the requirements for the cardiac monitor vi. Attempt to use the flow chart provided.

Prelab

None

In Lab Assignment

-Notebooks should be signed at the end of the experiment
-This is a 2 week exercise
-Divide the work among the group members

Report

VI diagram, printed from Labview
Print or draw the op-amp circuit you have designed in the report. Show the calculations.
Describe the flow chart of the vi, and relate your logic in choosing sub-vis to perform the specified functions.
Use plots of front panel displays to show your results.

Various Subvis and functions that will be used in this design





A Suggested Front Panel of the Cardiac Monitor VI

Try to design the VI in the following way. Remember, in Labview the execution of the vi is from left to right in the diagram. Most vis execute with input starting first. In this case, the data acquisition and array initializing will begin the execution sequence.


Adding analog output and alarms to the vi

Refer to the schematic of the board and the patch panel on your PC. The analog outputs from the boards will be used as a input for the circuit you will build on the protoboard.
To make the alarm sound you need :
-Alarm ON/OFF control signal
-Alarm sound signal.

-Alarm ON/OFF control signal is generated by following addition to your diagram:

When AO Update Channel.vi is used,  the value written at the input to the vi (voltage) is generated at Channel 0.
 

-To make the alarm sound you will add following to your vi.

 

Thus the analog outputs available from the board :
DAC0 (Channel 0) = Relay driver Signal
DAC1 (Channel 1) = Chirp Signal


 


written and compiled by Siddharth M. Deliwala and George Hunka
Copyright : Univerity of Pennsylvania