You are on page 1of 11

BIOMEDICAL ENGINEERING

VCU School of Engineering

EGRB 307: BIOMEDICAL INSTRUMENTATION

Laboratory No./ Date 6-9 (Final Lab)


Experiment Title EGRB 307: Final Project
Name Juei-Sheng Joshua Chiu
Lab Partner’s Name
Honor Pledge:
"On my honor, I have neither given nor received unauthorized aid on this assignment. Both authors have
contributed equally to this work"
_____________________________________________________

For Official Use Only

Comments: Grade / Score:


I. INTRODUCTION
The aim of the final project was to construct a multi-part ECG circuit that can acquire and enlarge a human
ECG signal to a displayable level. Each member of the group was to acquire his own ECG signal and used it
to count the average heart rate, in beats per minute (bpm).

II. METHODS
The final ECG circuit consists of three main sub-circuits based on operational amplifiers, as well as the
auxiliary circuit used to modulate the battery power supply. The final ECG circuit is shown below.

C2

R3

+4.5V
Black (LR) R2 R4
3
+4.5V
2
- 7
Vout
Vin +
+
1
7 AD741
Ra 6
6 A 3
B Ro AD620 + 4
Ra 5
Vin - 8 C1 -4.5V

2
-- 4
R1
White (RR) -4.5V

R4

4.5V
2
- 7
6
R5
AD741
3
+ 4

-4.5V
Green (LL)

Electrodes

Figure 1. Circuit design for ECG signal acquisition.


Circuit Part I – Main Amplifier Construction and Testing
The main amplifier circuit is a band-pass AD 741 op-amp based active filter; therefore it is frequency
dependent, with the corner frequencies determined by the resistor/capacitor pairs. Overall the gain was intended
to be around 70 and the high and low pass corner frequencies were designed to be at 0.5Hz and 100Hz,
respectively.
C2

R3

+4.5V
R2 R4

2
- 7
Vout
AD741
Vin 3 6

+ 4

C1 -4.5V
R1

Figure 2. Main amplifier circuit, showing necessary resistor and capacitor components.
The following equations were used to calculate the value of resistors needed.

1 1
f c1 = fc2 =
2R1C1 2R3C 2
Fc1 was intended to be 0.5Hz, with C1 chosen to be 1uF (theoretical value). The experimental value of C1
was measured to be .997uF and the theoretical value of R1 was calculated as 319267Ω. Likewise, Fc2 was
intended to be 100Hz, with C2 chosen to be 0.01uF (actual 0.01uF), so R2 theoretical was 2327Ω. Overall gain
within the op-amp’s passing frequencies was intended to be 70:

Vout R3
G= = +1
VA R2

From actual values of R2, theoretical R3 was chosen to be 159155Ω. Finally, a bias current compensation
resistor was used, with its value based on theoretical R1, R2 and R3:

R2  R3
R4 = R1 −  R1
R2 + R3

Accordingly, R4 was chosen to be 314996Ω.


After the circuit was constructed as shown and connected to the necessary power supplies, function generator
input was set at 10Hz and 100mVpp sine wave, and the experimental gain, experimental lower and upper corner
frequencies were recorded. At the corner frequencies, the signal begins to be attenuated and gain there is
.707*Gain (at its peak).
Circuit Part II – Pre-Amplifier Construction and Testing
The pre-amplifier circuit uses an AD 620, with its gain determined by an internal 49.4kΩ resistor:

49.4 K
G= +1
RG

Gain was intended to be 12, so RG was chosen to be 4491Ω (theoretical).


+4.5V

Vi (+) 3
+ 7
1
6
RG AD620
Vo
8 5
_ 4
Vi (-) 2
Ref
-4.5V

Figure 3. Diagram of equivalent pre-amplifier circuits. RG is the equivalent resistance of two series Ra which are
in parallel with Ro; in actual circuit construction, three resistors were used to form the RG equivalent resistance.
Ra was chosen as 33kΩ; based on experimental values of Ra, theoretical Ro was chosen to be 4815Ω.
After the circuit was constructed as shown and connected to the necessary power supplies, function generator
input was set at 10Hz and 100mVpp sine wave, and the experimental gain was recorded. The gain was also
recorded at 0.5, 100 and 200Hz signal inputs. Finally, a cardiac signal with 1Hz and 100mVpp was input and
the output recorded. (For this step our group substituted the sinusoidal output by accident).
Circuit Part III Connection and testing of ECG Amplifier (Pre-amplifier + Main Amplifier)
The output node (Vo) of the pre-amplifier was connected to the input node (Vin) of the main amplifier. A 100:1
voltage divider using (theoretical values) 99kΩ and a 1kΩ resistors was constructed and tested using a higher
Vpp so that the output would be measurable (10Hz frequency). After verifying the function of the voltage
divider, the Vpp was lowered to 100mVpp, maintaining a 10Hz frequency; gain of the entire circuit was re-
measured and verified to be over 800. The frequency response in terms of corner frequencies and band pass
functionality was recorded. Finally, the function generator output was set to cardiac signal, with 1Hz frequency,
and amplitude either 100mVpp, 200mVpp or 300mVpp. Calibration parameters based on output V per input
mV was calculated.
Circuit Part IV Connection and testing Battery Power Supply and Driven-Right-Leg Circuit
For safety reasons a battery must be used; to modify the battery power to suit the circuit’s need the following
circuit was constructed as shown below. In addition, to provide grounding resistance a driven-right-leg-circuit
was constructed as shown below.
+4.5 V

Rp

0V or ground 9V Battery

D 1N5229B

-
-4.5 V

Figure 4 Battery Power supply


Figure 5. Driven-right-leg circuit
The circuits were connected as appropriate, according to Figure 1. The calibration parameter (ratio of output
mV/input mV) was re-calculated and verified to ensure the correct integration of these additional circuits into
the ECG amplifier.
Circuit Part V – Measure human ECG Signal
After connecting all components and verifying correct function of the ECG circuit, human signal detection leads
were connected (according to Figure 1) where black was left arm, white was right arm, and green was right leg.
ECG signal was observed for over 20 seconds, its regularity observed, and analyzed (and recorded). Data of
importance was the amplitude, the time intervals between subsequent QRS complexes (measured 4-5 times),
and the total time period for 4-5 beats. The average, maximum and minimum heart rates were calculated.
Finally, any changes in the output signal with the disconnecting of the right-leg-driven-circuit were observed.
III. RESULTS
Circuit Part I – Main Amplifier Construction and Testing
Table 1. Circuit component and properties: theoretical/experimental values, and percent error.

Component Theoretical Experimental Error Percentage


C1 (uF) 1 0.997 0.3
R1 (Ω) 319268 317300 0.616
C2 (uF) 0.01 0.01 0
R3 (Ω) 159155 160550 0.877
R2 (Ω) 2327 2368.9 1.809
R4 (Ω) 314996 311870 0.992
Fc high pass (Hz) 0.5031 0.5 0.616
Fc low pass (Hz) 99.131 99 0.132
Gain 68.774 64.528 6.174

All theoretical values were either explicitly chosen (C1, C2) or calculated from experimental values of other
components (all resistors, frequencies and gain). The experimental corner frequencies were unable to be
determined very accurately since the output did not change measurably with changes of tenths of a Hz so their
error could be an artifact of low instrument sensitivity. If overall circuit gain had been too low, the gain of the
main amplifier would’ve been increased, but the overall ECG circuit gain turned out to be sufficient. Since the
gain of the pre-amplifier was higher than needed, it acted to negate the slightly lower gain of the main amplifier
circuit when the two were used in conjunction.
The theoretical output at 10Hz, 100mVpp where the input voltage was actual 106mVpp is calculated as:

Vout R3
G= = + 1 ; Vo = G*Vi = 68.774*106mVpp = 7.29Vpp
VA R2

The experimental output at 10Hz, 100mVpp (actual 106mVpp) was 6.84V.


‘Corner gain’ (the gain expected at the corner frequencies) was calculated as the 0.5 * square root of 2 * Gain.
Corner gain = .707 * 64.528 = 45.628 (using experimental gain, 6.84V/.106V = 64.528).
Table 2. Recorded input, output and gain near and at the high-pass and low-pass corner frequencies. Corner
frequency data are highlighted, where the gain was near the expected corner gain.

Frequency (Hz) V_i (V) V_o (V) Gain


0.49 0.108 4.88 45.19
0.5 0.108 4.92 45.56
0.512 0.108 4.96 45.93
0.7 0.108 5.64 52.22
0.9 0.108 6.04 55.93
9 0.106 6.84 64.53
10 0.106 6.84 64.53
90 0.106 5.08 47.92
95 0.106 4.92 46.42
97 0.106 4.88 46.04
98 0.106 4.88 46.04
99 0.106 4.84 45.66
100 0.106 4.8 45.28

Figure 6. Plot of gain vs frequency (logarithmic scale) in the main amplifier circuit.
Circuit Part II – Pre-Amplifier Construction and Testing
Table 3. Circuit component and properties: theoretical/experimental values, and percent error. The theoretical
value of RG was calculated based on the experimental values of Ra top/bottom and Ro. Theoretical gain was
calculated based on experimental RG.

Component Theoretical Experimental Percent Error


RG (Ω) 4477.347 4485.6 0.18
Ra top (Ω) 33000 32800 0.61
Ra a bottom (Ω) 33000 32991 0.03
Ro (Ω) 4814.6 4804.3 0.21
Gain (10Hz) 12.013 17.2 43.178
Since the gain in the main amplifier was lower than needed, the gain in the pre-amplifier was intentionally left
higher, to offset the decreased gain at the main amplifier.
Figure 7. Screenshot of oscilloscope screen at approximately 60mV, 100Hz. This image was taken instead of
the 1Hz, 100mVpp cardiac input by mistake.
Table 4. Measure of pre-amplifier circuit gain at the required frequencies.

Frequency (Hz) Vi (V) Vo (V) Gain


0.5 0.109 1.85 16.97
10 0.107 1.84 17.20
20 0.103 1.8 17.48
100 0.0712 1.2 16.85
200 0.092 1.62 17.61

Circuit Part III Connection and testing of ECG Amplifier (Pre-amplifier + Main Amplifier)
The voltage divider was verified to work with a 2 Vpp 10Hz sine wave, where the expected output of the
voltage divider (20mV) was close to the actual output; however at small amplitudes the inaccuracy of the
oscilloscope makes exact numbers hard to obtain.

Figure 8. Screenshot of oscilloscope screen


at 100mVpp function generator output.
Assuming the voltage divider did output
1/100 of the function generator input, the
gain is 1.24V/(.109/100) = 1137.615.
The ‘turning gain’ was calculated as max gain * .707 = 804.415
Table 5. Voltage divider circuit component and properties: theoretical/experimental values, and percent error.
The theoretical gain of the entire circuit is equal to the gain of the pre-amplifier * gain of the main amplifier; so
gain = 17.2 * 64.528.

Component Theoretical Experimental Percent Error


R99Ω (Ω) 99000 98400 0.61
R1Ω (Ω) 993.94 978 1.60
Gain 1109.88 1137.615 2.50

Table 6. Frequency response of combined pre-amplifier and main amplifier (100mVpp, variable frequency). VD
is the assumed voltage divider output, which is the theoretical voltage potential at the input node of the pre-
amplifier. The approximate corner frequencies are highlighted.

Frequency (Hz) Vi (V) VD (V) Vo (V) Gain


0.49 0.113 0.00113 0.896 792.92
0.5 0.113 0.00113 0.904 800.00
0.512 0.113 0.00113 0.912 807.08
0.7 0.113 0.00113 1.04 920.35
0.9 0.113 0.00113 1.11 982.30
9 0.111 0.00111 1.25 1126.13
10 0.109 0.00109 1.24 1137.61
90 0.109 0.00109 0.944 866.06
95 0.11 0.0011 0.92 836.36
97 0.11 0.0011 0.916 832.73
98 0.11 0.0011 0.908 825.45
99 0.11 0.0011 0.904 821.82
100 0.11 0.0011 0.9 818.18
101 0.11 0.0011 0.896 814.55
102 0.11 0.0011 0.888 807.27
103 0.11 0.0011 0.884 803.64
Table 7. Table of calibration parameters at required amplitudes. The Vi for the calibration parameter is based on
measured function generator input, since the output of the voltage divider is essentially unmeasurable (1mV),
using cardiac signal from the function generator.

Vi (mV) Vo (mV) Calibration parameter


0.108 1.2 11.11111111
0.21 2.48 11.80952381
0.308 3.68 11.94805195

Circuit Part IV Connection and testing Battery Power Supply and Driven-Right-Leg Circuit
Table 8. Battery power circuit component and properties: theoretical/experimental values, and percent error.
Component Theoretical Actual Percent Error
Rp (Ω) 460 452.4 1.65
Table 9. Driven right-leg circuit component and properties: theoretical/experimental values, and percent error.
Component Theoretical Experimental Percent Error
R4 (MΩ) 5.4 5.478 1.44
R5 (MΩ) 5.4 5.58 3.33

Circuit Part V – Measure human ECG Signal


Table 10. Measured gain/calibration parameters of full ECG circuit, including driven-right-leg circuit and
battery power supply. Observed is a decreased gain; when the function type was changed from sine wave to
cardiac wave the gain exhibited this decrease. The decrease was solely a result of changing the function
generator output, as nothing else in the circuit was changed in order to observe the decrease.

Vi (mV) Vo (mV) Gain Calibration Parameter


106 792 747.17 7.47
202 1600 792.08 7.92
304 2380 782.89 7.83

Figure 9. ECG output waveforms for both lab members; Josh on the left and Emil on the right.
Table 11. Summary of heart beat time intervals (5 trials), averages, minimums and maximums for both partners;
the maximum heart rate is based on the minimum beat time interval, while the minimum heart beat rate is based
on the maximum beat time interval, since the heart beat rate is inversely proportional to the beat time interval.

Josh Heart Emil Heart


Beat time (s) Heart Rate (bpm) Beat time (s) Heart Rate (bpm)
Trial 1 0.86 69.77 0.66 90.91
Trial 2 0.98 61.22 0.76 78.95
Trial 3 0.92 65.22 0.84 71.43
Trial 4 1.04 57.69 0.84 71.43
Trial 5 0.98 61.22 0.84 71.43
Average 0.956 62.76 0.788 76.14
Maximum 1.04 69.77 0.84 90.91
Minimum 0.86 57.69 0.66 71.43
Josh’s ECG amplitude was 888 mV, while Emil’s ECG amplitude was 976 mV.
IV. DISCUSSION
The electrocardiogram is a medical diagnostic tool that measures the electrical activity of the patient by
placing electrodes on the body. It is a simple test to perform, and simple data such as heart beat interval and
heart rate can be easily observed; irregularities and interpreting the current patterns is more difficult and
requires training.

The ECG circuit consists of three op-amp circuits connected with one another. In this construction, it also
includes a battery power supply to provide safe power (as opposed to the benchtop DC power supply. The
pre-amplifier serves to calculate the potential of the cardiac vector based on the values of the three leads,
which are black (left arm), white (right arm) and green (right leg). One of the inputs to the pre-amplifier
comes from the driven-right-leg circuit, which provides a grounded reference point on the patient. The
output of the pre-amplifier goes to the main amplifier, which was two main functions: it greatly amplifies
the ECG signal to the point that it can be visualized on the recorder (oscilloscope in this case), and it carries
out bandpass filtering to remove interference outside of the needed range, so that the range of signal
processing is just enough as needed; this improves the signal-to-noise ratio (SNR).

The circuit achieved all of its main functions, albeit with some unexpected caveats. The main amplifier
achieved its needed characteristics, with near-70 gain and frequency-dependent active bandpass filtering.
The gain was slightly lower than required, and we admittedly should’ve chosen new components based on
this observation. On the other hand, the pre-amplifier correctly interpreted and amplified the cardiac signal
by a factor greater than 12. Overall, when the pre-amplifier and main amplifier were connected together, the
circuit functioned as expected, having the needed gain and frequency dependence (the higher gain of the
pre-amplifier made up for the slightly lower gain of the main amplifier.

The purpose of the voltage divider circuit was to test the circuit’s ability to amplify tiny signals (~1 mV)
and assess its gain without saturating the output of the entire circuit. If a 100mV input was used at the input
pin of the pre-amplifier, with a gain of 1000+ which we observed for sine waves, the output would have
been well saturated before the theoretical 100V output. Therefore, shrinking the input signal amplitude to 1
mV simultaneously allowed testing of whether the ECG amplifiers were sensitive to such small amplitudes,
as well as assessing its gain before output signal saturation (based on the power source of the circuit, 9V
battery).

There were three ECG electrodes, which are black (left arm), white (right arm) and green (right leg). The
three leads used in vector analysis of the cardiac signal are 1 (left arm – right arm), 2 (right leg – right arm),
3 (right leg – left arm), based on Einthoven’s triangle; only two of the leads are mathematically independent
(lead 2 = lead 1 + lead 3). The ground reference on the patient body is provided by the driven-right-leg
circuit, and which is processed with the other two electrodes by the pre-amplifier to yield the ECG vector.

In the final calculation of gain using the voltage divider circuit, the gain was calculated to be 792 at its
highest when using a cardiac function output from the function generator. The output amplitude of the ECG
for my heart beats was 888 mV. This means that my heart exhibits a maximum of around 1.12 mV. From a
previous study, the maximum amplitude of the QRS wave in the frontal plane (which we measured in this
lab) is 1.38 mV (Castini et al., 1996). Allowing for some signal noise and inaccuracy, my ECG amplitudes
are within normal ranges. My heart minimum, maximum and average heart rates were approximately 58, 63
and 70 beats per minute. These are within healthy ranges (60 – 80 beats per minute).
V. CONCLUSION
In this lab, we learned about how to build a complex electrical circuit by breaking down the work into
compartmentalized modules, and ensuring the correct completion of each part before moving on, is an
important framework for approaching the construction of electrical circuits. In addition, we learned about
the important considerations when constructing biomedical instruments, such as filtering, high gain, high
input impedance, safety considerations, and how to interpret basic ECG data pertaining to signal amplitude
and heart beats per minute.
Building on experience gained in previous lab, we correctly chose component values based on the actual
measured values of other components, ensuring that the values were close as possible. We compensated for
undershooting the target gain of the main amplifier by overshooting the target gain of the pre-amplifier; this
produced the necessary overall gain. However, we contend that we should’ve tested using the cardiac signal
earlier, since that might have given more of an indication of the final circuit gain than did the sinusoidal
signal. The gain exhibited a marked decrease in gain when the function type was simply changed from
sinusoidal to cardiac; the reason for this is perplexing. However the gain still hovered around 800 and the
results were sufficient, so we did not need to change components near the end of the experiment, which
would have been quite the arduous task.
In a way, this lab represents the mirror image of ECG circuitry built in freshman year; then we built a circuit
to generate a simulated heart beat electric potential pattern complete with three output electrodes; now we
have constructed an ECG circuit to analyze such a signal.
VI. REFERENCES
Castini, D., Vitolo, E., Ornaghi, M., Gentile., F. (1996). Demonstration of the relationship between heart
dimensions and QRS voltage amplitude. Journal of Electrocardiology. Volume 29, Issue 3, July 1996, Pages
169-173.

You might also like