0% found this document useful (0 votes)
28 views

Lesson 1 - ECG Theory - Simulation

1. The document describes a lesson on simulating an electrocardiogram (ECG) circuit using MultiSim software. Students will perform calculations to understand the circuit and compare results to simulations. 2. The circuit uses integrated circuits and a crystal oscillator to generate heartbeat frequencies of 1 Hz or 2 Hz, representing 60 or 120 beats per minute. The signal is shaped to resemble the typical ECG waveform. 3. Students will calculate frequencies at different points in the circuit and complete timing diagrams to understand its operation before simulating the full circuit in MultiSim.

Uploaded by

Thanh Tú
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Lesson 1 - ECG Theory - Simulation

1. The document describes a lesson on simulating an electrocardiogram (ECG) circuit using MultiSim software. Students will perform calculations to understand the circuit and compare results to simulations. 2. The circuit uses integrated circuits and a crystal oscillator to generate heartbeat frequencies of 1 Hz or 2 Hz, representing 60 or 120 beats per minute. The signal is shaped to resemble the typical ECG waveform. 3. Students will calculate frequencies at different points in the circuit and complete timing diagrams to understand its operation before simulating the full circuit in MultiSim.

Uploaded by

Thanh Tú
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Lesson 1: ECG Calculations and Simulation

(Total Lesson Length: 80-120 minutes total, much of this depends on


students’ ability with circuitry calculations and familiarity with MultiSim)

Learning Objectives:
● Students will perform calculations to aid their understanding of the ECG Simulator circuit
and how it replicates all of the parts of a typical heartbeat.
● Students will learn how to use Labview MultiSim in order to simulate the circuit. They
may compare the results to their calculations and to the built circuit (Lesson 2)

Materials:
● Lesson 1 Worksheet
● Access to Labview MultiSim (either in groups or individually)
○ Instructors should have access to MultiSim if they already have Labview through
their institution’s National Instruments account. If necessary, MultiSim may be
downloaded from https://www.ni.com/en-us/support/downloads
/software-products/download.multisim.html#312060.
● EWH’s MultiSim files (found in the lesson folder)

Safety Guidelines: N/A

Teacher Background:
● Instructors should be comfortable with circuit theory and should have taught (or are in
the process of teaching) the following concepts to students:
○ Circuit diagrams
○ Common logic gates and tables
○ Timing diagrams
○ Differential equations for simple circuits (e.g. RC)
○ Thevinin’s Theorem
○ Diodes
● Electrocardiograms (ECG) background
○ The ECG Simulator is a device that generates an electrical signal similar to the
pattern of the human heart. This machine allows a Biomedical Equipment
Technician (BMET) to test the performance of cardiac monitors and troubleshoot
circuit or cable problems.
○ Electrocardiography is the practice of measuring the small electrical signal
produced by the heart. An electrocardiograph allows the physician, BMET, or
other medical personnel to obtain the rate and regularity of heartbeats, as well as
the size and position of the chambers of the heart, the presence of any damage,
and the effect of cardiac drugs or devices.

○ A basic ECG requires three connections, as shown in Figure 1a:


(a) (b)

Figure 1 – (a) Einthoven's triangle. Signal II corresponds to the traditional ECG


waveform (Kychot via Wikimedia Commons). (b) The ECG circuit uses a differential
amplifier to subtract the voltages between the right and left arm (BotMultichill via
Wikimedia Commons).
○ The ECG uses a differential amplifier as the primary electrical component. It has
a high gain to be able to amplify the low input currents from the heart and
differential blocks to be able to measure singles I, II and III directly.
● A standard ECG wave is divided into five parts: P-QRS-T. The P wave represents atrial
depolarization and the QRS represents ventricular depolarization. The T wave reflects
the phase of rapid repolarization of the ventricles (Figure 2).
○ Note: This circuit produces the electrical signal of a standard ECG, which
can be measured in a variety of ways (see Testing Instructions in Assembly
Instructions). Students will not be measuring their own heartbeat.

Figure 2 – Typical heartbeat


electrocardiogram wave signal
(Blausen Medical Communications
via Wikimedia Commons).
Lesson Procedure:
The lesson will walk through the sections of the circuit roughly in order of how the heartbeat
signal is “constructed.” The theory/calculation and simulation (if applicable) steps will be
written concurrently; for clarity, all theory steps will include a “T” and simulation with an “S”.
General background information will be left unmarked.
It is left to the instructor to decide if they wish the students to finish either the theory or
simulations first, or if they wish students to explore the relevant sections concurrently. The
worksheet is meant as a place for students to record their answers for both.
This lesson procedure doubles as instructions for students and may be shared with them.

Part 1 - Background (10-30 minutes, this will primarily depend on students’


familiarity with MultiSim)
1. (T) Review any circuit concepts from the teacher background section that the students
are still learning and/or need to review.
2. (S) Have students explore MultiSim and gain familiarity with the software. To do this,
students can build their own simple circuit or open any one of the circuits provided by
EWH. Have them pay particular attention to operating the virtual oscilloscope (found on
the right side of the screen); this can be used to explore the electrical signal at any point
within the circuit much like a scope in real life.
3. The overall ECG Simulator circuit is shown in Figure 1. The circuit has a digital block,
formed by two frequency dividers (integrated circuits IC1 and IC2) and the analog output
network, which shapes the heart electrical signal. The switch S2 selects the cardiac rate,
which can be either 1 Hz or 2 Hz (60 bpm/120 bpm).

Figure 3: Circuit diagram for the ECG Simulator.

Part 2 - Oscillator and Frequency Divider (~10 minutes)


1. The first digital block (Figure 2) corresponds to an oscillator and a 24 bits counter (IC1 -
MC14521B).

Figure 4: First frequency divider stage formed by MC14521B IC and the oscillator components.

2. This chip can generate its own clock in the inputs O2 and I2. The 4.1943 MHz crystal
oscillating frequency is suggested by the manufacturer in datasheet2 and can be used to
generate sub-frequencies such as 1 Hz and 2 Hz.
3. (T) The MC14521B is able to divide the frequency through a chain of 24 toggle (T) flip−flops.
Observe the flip−flop internal connections in Figure 3 and fill the transition table in the
worksheet:

Figure 5: Toggle flip-flop Logic diagram (a), graphical symbol (b) and transition table (c). 3

4. Each block of the circuit above divides the input frequency by 2. Since the MC14521B
has 24 T flip-flops, it is able to count until 224 (16,777,216). After this value is reached,
the circuit resets and restarts the counting. Due to the small number of pins available in
the packaging, only outputs O18 until O24 are physically available, as seen in Figure 4.
a. (T) Using the oscillator frequency, what is the lowest frequency the IC can output
(at O24 - pin 1)?
Figure 6: MC14521B block diagram; the outputs of the last seven stages are available for
additional flexibility.2

b. (T) Additionally, determine the frequencies for pins 10, 13, and 14. Note that O21
and O22 (13 & 14) will be used to select the heart rate depending on switch S2.
Part 3 - Reset Circuit (~10 minutes)
1. Between the ICs (trace from S2 to pin 15 of IC2) there is a differentiator block (Figure 5).
This circuit does not change the signal frequency, but it converts the square wave input
into an impulse signal that will be used later to reset the second stage (HCF4017B - IC2)
that produces the ECG waveform.
2. (T) Based on your previous answer, what is the expected heart rate (in bpm)?

Figure 7: Circuit that converts a


square wave input signal into an impulse that is used to reset the next IC.

3. (T) Sketch the signal in points A and B in Figure 5. Use the capacitor charging formula
for an RC circuit (Eq 1) to calculate the output voltage.

(1)
where V1 is the initial voltage and V0 is the final.
4. (S) Use the “Differentiator Reset” MultiSim to simulate the waveforms.
5. (T, S) How do the waveforms look if O22 is selected instead of O21 in S2?
6. Hint: If you don’t know where to start, think about the role of the capacitor in the circuit.
Then consider the purpose of the diode and you should be on your way.
Part 4 - Ring Counter (~10 minutes)
1. The IC2 (HCF4017B) in Figure 7 is also called a frequency divider, this component
works as a Johnson counter with 10 decoded outputs that follow a ring counter pattern.5

Figure 8: Johnson Counter (HCF4017B) pins are used to generate the Electrocardiogram wave.

2. (T) The basic circuit that can be used to simulate the HCF4017B principle is Data (D) flip−flop.
Observe the flip−flop internal connections in Figure 8 and complete the transition table in the
worksheet.

Figure 9: Data flip-flop Logic diagram (a), graphical symbol (b) and transition table (c). 3

3. The HCF4017B has a similar pattern as the chain of 10 Data (D) flip−flops in Figure 9.

Figure 10: HCF4017B counting equivalent circuit.

a. (T) Determine the frequency of the clock pulse for the flip flops. (Hint: Figure 3
and Table 1)
4. (T) Supposing that the initial/reset state of Figure 9 has the signal 9 (Q9) in logic high (9
V) and the remaining outputs are down (0 V), complete the Timing diagram (Figure 10)
in the worksheet.
Figure 11: Timing diagram of the HCF4017B counter output signals.

Part 5 - Output Signal Conditioning (~40 minutes)


1. Although there are 10 outputs available, only three (0, 3 and 5) are required to simulate
the peaks components P, R and T of the ECG wave form, as seen in Figure 11. If the
switch “S2” selects 120 bpm, which corresponds to a 2 Hz reset frequency, the
HCF4017B will reset when the output “7” is in high logic level. However, if this switch
selects 60 bpm (1 Hz), the IC will restart to count after the 10th clock cycle, causing
undesired signals in the output. This problem is solved by connecting signal “9” to the
“CLOCK INHIBIT” input, therefore freezing the outputs until the next reset signal, as
seen in Figure 11.

Figure 12: Outputs 0, 3 and 5 from HCF4017B compared with an ECG signal.

2. The third stage in the simulator corresponds to a network of resistors that sums their
current to shape the ECG wave. Since the HCF4017B has CMOS technology, whenever
the logic level is zero, one can consider the outputs as open, which allow the analysis of
each circuit branch separately. Only the P, R, S and T sections are generated.
P Wave
3. Figure 13 shows the P wave circuit.

Figure 13: P wave output circuit.

4. (T) In order to calculate the signal in the outputs LL and LA, one needs first to analyze
the voltage in the capacitor C5. Use Thevenin’s theorem4 to calculate the equivalent
voltage and resistance during the capacitor charge by removing C5.
a. (T) Draw the equivalent circuit for the capacitor with ETH and RTH in the
worksheet. Use eq 1 to determine the voltage across the capacitor.
b. (T) Calculate the voltage in LL and LA when pin 3 of HCF4017B is logic “1.”
5. (T) The maximum voltage (ETH) will not be reached because the logic in pin 3 will opened
before the capacitor charges completely (think back to the clock pulse and Timing
Diagram in Part 3/4). Determine the resulting maximum voltage in C5 and LA/LL.
6. (T) When the logic of pin 3 flips to “0,” draw the capacitor discharge circuit and
determine the voltage in the LA/LL.
a. (T) Putting together the answers from 5 and 6, draw the resulting P wave output
in the LA in relation to the RA (GND) and the square wave input.
7. (S) Open the MultiSim file for “Pin 3 - P wave.” Obtain the P wave output in the LA and
the square wave input. Record your result in the worksheet. How does it compare to the
theoretical calculations made in part 6?

R and S Wave
8. Figure 14 shows the R and S wave circuit.
Figure 14: R and S wave output circuit.

9. The resistor R5 and the LED X1 are placed parallel to the output 3 to allow for a visual
control from the signal frequency and do not interfere in the R waveform.
10. (T) As with the P wave, simplify the circuit for capacitor charging with pin 7 in logic “1”
and draw it in the worksheet. Calculate VLL. This is the R wave.
11. (T) When pin 7 opens, the capacitor will discharge, creating the S wave. The two diodes
in series (D1 + D2 = 1.2 V) will generate a small negative voltage, limiting the size of the
S wave. Draw the equivalent circuit and determine VLL.
a. (T) Putting together the answers from 10 and 11, draw the resulting R and S
wave outputs in LA and the square wave input in relation to the RA (GND).
12. (S) Open the MultiSim file “Pin 7 - RS Waves.” Obtain the R and S wave output in LA
and record your results in the worksheet. How does it compare to part 11?
T Wave
13. Figure 15 shows the T wave circuit.

Figure 15: T wave output circuit.

14. (T) Notice that this circuit is similar to that of the P wave, with the exception of the first
resistor. What is the effect of the lower resistance on the charging time and amplitude?
15. (T) In the same manner as the P wave (step 4), use Thevenin’s theorem to calculate E TH
and RTH and draw the equivalent circuit. Use eq 1 to determine the voltage across the
capacitor when pin 1 of the HCF4017B chip is logic “1.” What is the voltage across the
LA/LL?
16. (T) As in the P wave circuit, the input signal will drop to 0 before the capacitor completely
charges. Using this knowledge, determine the voltage across the capacitor and at LA/LL
when pin 1 of the HCF4017B chip opens to logic “0.”
a. (T) Combining your results from 15 and 16, draw the resulting R wave output in
the LA with relation to RN (GND) and the square wave input.
17. (S) Open the MultiSim file “Pin 1 - T Waveform.” Obtain the T wave output in the LA and
the square wave input. Record your result in the worksheet. How does it compare to the
theoretical calculations made in part 16?
Final Waveform
18. (T) Using your results from 6a, 11a, and 16a and your knowledge of the clock output,
draw the final waveform. How does it change with the position of S2?
19. (S) Open the MultiSim file “Complete Schematic with similar ICs.” Obtain the final ECG
signal. How does it compare to part 18?
Conclusion:
Consider how your calculations compared to the simulation results. Which took longer for
you to obtain? What does this say about the ability and usefulness of simulation tools such
as NI’s MultiSim to explore circuitry, and how could it be used to troubleshoot circuits such
as EWH’s ECG Simulator circuit? Are there other uses for similar simulations?
Assessing Student Learning:
Have students turn in the worksheet on which they recorded their answers. If they were
unable to get their calculations to match the simulation results, identify which area they
struggled with and guide them to understand their mistakes.
References:

You might also like