Professional Documents
Culture Documents
Ecg Project Report
Ecg Project Report
Ecg Project Report
PURPOSE OF PROJECT 5
WHAT IS ECG 6
4.1. Electrodes 7
4.3. Derivations 8
LTSPİCE 9
MULTIPLEXER 9
DC TEST CIRCUIT 14
OSCILLATOR(CLOCK) CIRCUIT 15
COUNTER CIRCUIT 16
DEMULTIPLEXER 19
VIRTUAL GROUND 22
BUFFER CIRCUIT 28
The ECG device is the tool that measures the electrical activity of the heart, which is
used to diagnose heart rhythm and heart disease. The biological signals received are the
voltage value of activity of the hearth against time in ECG. We designed it to analyze the
input and output signals of the ECG signals in the ECG circuit. We have seen the internal
structure and properties of the components of the ECG circuit. We worked step by step on the
development of the ECG Project and how the design processes were designed. We completed
the ECG circuit and observed the heartbeat in seconds to analog simulation.
1. PROJECT GANTT CHART
Our aim is to analyze the electrical activity produced by the heart cells and how hearth to
work and see the information of the output of the ECG data in Ltspice by analog it on the
simulation.
Our goals are designing ECG circuit on the Ltspice analog simulation. Seeing and
examining the properties of ECG circuits elements and formation of internal structures.Also,
we will understand the function of the outputs of the ECG circuit ;Calibration, Lead I, Lead II
and Lead III outputs.
ECG is a graphical recording of the rhythm, spread, frequency, and reaction disappearance of
the heart through electrodes attached to the body. The name of the method is
Electrocardiography. The recordings of the device are Electrocardiograms.
It is the electrical activity that occurs during the contraction and relaxation of the auricles and
ventricles of the heart. It is a picture of the electrical map of the heart.
The ECG has a waveform in response to each heartbeat. These are a complex of P, Q, R, S, T
waves.
In this figure, there are several waveforms and intervals.Let’s explain them.
4.1. Electrodes
Electrodes are connected to three limbs in total, two arms and one leg. These are the right
arm(RA), left arm(LA), and left leg(LL). (The right leg(RL) is used as a reference, because
this is the farthest point to the heart.)
4.3. Derivations
For measure ECG signals there are three types of derivation:
When the recording of potentials between individual limb leads and this central terminal is
made, an alternative triangle similar to the original Einthoven’s triangle but rotated by 30
degrees is obtained.
Since the measurement is with respect to a reference point that has zero potential all the time,
the new configuration is called the unipolar limb leads abbreviated as VR, VL and VF for
right arm, left arm and left foot respectively. Three new configurations thus obtained as aVR,
aVL and aVF. “a” stands for “augmented”.
6. LTSPİCE
LTspice is an analog electronic circuit simulator. It is a simulator that draws circuit diagrams,
feeds them as ac and dc, simulates and displays the output waveforms and eliminates the
noise that occurs in the real.
https://www.analog.com/en/design-center/design-tools-and-calculators/ltspice-simulator.html
With this simulator, we can draw and run all our circuits and add and use the necessary
libraries from the outside.
7. MULTIPLEXER
Multiplexer literally means multiplexer. In other words, it is used to reduce more than one
input to the system to a single output. For example, we want to get 1 output from the system
where we give 4 inputs. In order to do this, we need the selective ends of the system. We need
a 2-bit selective bit to convert 4 inputs into one output. So, 2 selective tips are required. In
order to convert 8 inputs into a single output, we need 3 bits, that is, 3 selective bits.
Figure 5. Multiplexer Structure
S1 S2 OUT
0 0 a
0 1 b
1 0 c
1 1 d
In this project, our aim is to use the multiplexer structure to make 4 different signals (RA, LA,
LL and calibration signal) that we receive from the body with electrodes selectable with the
multiplexer. In other words, we want to obtain the signal of the limb or derivation by selecting
it from the multiplexer.
As a multiplexer, we used the CD4052 integration. However, this is not among the integrated
LTspice libraries. We used this component by adding it to our project file that prepared by Dr
Orhan Özhan and shared with us.
The purpose of the capacitors C1 and C2 that connected to the outputs is to prevent
fluctuations at the output.
We chose X channels positive and Y channels negative in the 8x2 Multiplexer. Values of the
starting and ending parts of the leads are shown on the Eindhoven triangle. We edited the
Mux inputs according to this chart.
MUXP and MUXN outputs give us leads. The positive side of the calibration mark is
connected to X3 because the negative side goes to Y3 and the negative side goes to Virtual
Ground. The outputs of MUXP and MUXN give us all leads.
After connecting the electrodes to operate the multiplexer, we designed a 1000 Hz oscillator
for the selective tips. We also connected a counter circuit to the output of the oscillator. This
counter circuit allows the selective tips to be changed with a different combination at each
pulse. At the output of this circuit, we obtained MUXP and MUXN outputs from the
multiplexer.
Figure 10. V(muxp) signal
For all these measurements we designed the following circuit. This circuit includes dc test
circuit, ecg generator, mux, counter and oscillator circuits. The necessary steps will be
explained in the following sections.
Figure 13. Mux Circuit and Its Necessary Connections
8. DC TEST CIRCUIT
We fed this test circuit with a 10V DC voltage. By placing 2k resistors after each limb, we
achieved 2V voltage drop. So we divided the voltage.
Figure 9 shows us that the voltage measured from RA, LA, LL and CAL electrodes,
respectively is 8V, 6V, 4V and 2V. That means the dc test circuit is working successfully.
A B MUXP A B MUXN
0 0 8V 0 0 2V
1 0 6V 1 0 4V
0 1 4V 0 1 6V
1 1 2V 1 1 8V
9. OSCILLATOR(CLOCK) CIRCUIT
The system that we use to produce square, sine, triangle or sawtooth waves required for
electronic circuits is called oscillator. Oscillators take back the output that they produce as
input with the help of an amplifier. In this way, positive feedback is provided.
Figure 16. Oscillator Circuit
Counter circuits are circuits formed by the proper connection of flip flops. Depending on the
input pulse, they are logic circuits that repeat certain states at the output. Counter circuits are
separated into 2 groups according to the way the connection of flip flops. These are
synchronous and asynchronous circuits. And we need a 2-bit counter, so we will use 2 flip
flops.
10.1 Asynchronous Circuits
If the signal that used counting is applied to only input of the first flip flop, and other flip
flops use the output (Q or Q’) of the previous flip flop as the clock input, this circuit is an
asynchronous counter circuit.
In this project, we will used a synchronous counter circuit. Because, in asynchronous meters,
only the first flip flops are given to the first flip flops, the subsequent flip flops being
connected to the output of the previous flip flops cause time delay. To avoid this time delay,
we will use a synchronous circuit with a clock signal to all inputs simultaneously.
Figure 20. D -type Flip Flop, Logic Diagram and Truth Table
So, with this counter circuit we feed the selective tips of multiplexer circuit. And counter
circuit receiver the clock signal from the oscillator circuit. It is an 1kHz square signal.
11. DEMULTIPLEXER
CD4052 used in simulation can be used both as multiplexer and demultiplexer because
it is analog integrated. If we built the circuit ourselves, different integrations would be
required for multiplexer and demultiplexer. Ltspice being an analog simulator helped
us with this. For instance, when S0=0 and S1=0, the data input is connected to output
X0. X0 output shows Lead I.
The CD4052 integration we use in real life has a Vdd, Vss, Vee terminal. Vss goes to ground
(0V), Vdd value is -5V and Vee value is + 5V. However, our Mux design in the simulation
does not have Vee and instead has Virtual Ground and its value is 5V. When looking at the
Right / Left arm output graphs, it is seen that the values revolve around the Virtual Ground
value. When the difference of the two is taken, it is seen that the signal is low voltage and is
around 0 V.
Figure 31. VGND
13. ECG GENERATOR CIRCUIT
The purpose of the ecg generator circuit is to generate real signals for our circuit. It generates
real ecg waves by reading the signal values of RA, LA, LL and CAL written in a text file.
Using the waves from these limbs, we can also measure for the leads we need.
The circuit that shown at Figure 32, our electrot thats mean ecg generator circuit. The limb
values given from the texts are given to the LA, RA and LL tips. We create 3 different leads
using these values and amplifier them 1000(1e3) times. So lead values increas to V levels
from mV levels.
Figure 33. RA, LA and LL Signals From Texts( mV)
Figure 34. LEAD-I, LEAD-II and LEAD-III Signals with Text Signals(V)
Instrumentation Amplifier is a circuit consisting of opamps and resistors that increase the
difference of two signals. The most important feature of the Instrumentation Amplifier is that
they have high CMRR (common mode rejection ratio), so the signals of the same feature do
not take this signal into account when both ends are applied. As a result, instrumentation
amplifiers eliminate noise as much as possible. . Our main use in the circuit is to increase the
ECG signals we obtain and to increase their differences.
Figure 35. Instrumentation Amplifier Circuit Created Using AMP01 Integration
We use Instrumentation Amplifier to amplify this signal. That's why we connected the MUXP
and MUXN outputs and Virtual Ground to the input of the amplifier. The gain of the
Instrumentation Amplifier is found with this formula:
G= 20 x Rs/Rg
The amplifier's input is divided into two: Common Mode signal and differential signal.
Common mode signal is a signal that revolves around 1kHz Virtual Ground with a peak value
of 1V. Differential signal, however, has a peak value of 1Mv of 400Hz.
15. CALIBRATION OSCILLATOR CIRCUIT
Oscillators are used in radio systems to produce sine signal oscillators, carrier signals and to
convert one frequency to another in the mixing floors. There will be two oscillator circuits in
the circuit, one will be connected to the calibration oscillator and the other will be connected
to the multiplexer input. NE555 integration consists of Trigger, Threshold, Discharge, Reset,
Input, Output and Ground terminals.
The period of the sign formed on the capacitor is equal to the sum of the charging time of the
capacitor and the discharge time. While the capacitor in charge is charged over 𝑅1 + 𝑅2
resistance, it discharges over üzerinden2 resistance. In this case, the charging time constant is
𝑅1 + 𝑅2X𝐶, the discharge time constant is 𝑅2X𝐶 seconds. Since the capacitor is charged and
discharged between 1/3 𝑉𝐶𝐶 and 2/3 𝑉𝐶𝐶 voltages, the charging time T𝐻 and discharge time
T𝐿:
T𝐻=0,693R1+R2 X C
T𝐿=0,693R2 X 𝐶
and frequency
𝑓=1,44/ (𝑅1+2𝑅2) 𝐶
Figure 39. Inverse and Non-Calibrated Outputs of the Calibration Oscillator Output
By connecting the Inverter to the pulse end, we obtained the inverse and non-inverse states.
The output we obtained is shown in Figure 35. This oscillator represents our heart rate in
seconds and the pulse in simulation.
Buffer circuit, also multiple outputs without disrupting the characteristics of a signal. It can be
used in the distribution to the terminal. Since there is no voltage difference between the Op
amp inputs, the output voltage and input voltage are the same. There is no voltage gain.
The output from demultiplexer has entered the buffer circuit. The buffer circuit prevents
demultiplexer from working extra. It is important for the signals not to be lost. It is an
important step before filtering.
Figure 42. ECG Simulator Outputs from CAL, Lead-, Lead-II and Lead-III tips