ECG Amplifier - DAIICT Intranet
ECG Amplifier - DAIICT Intranet
ECG Amplifier - DAIICT Intranet
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>ECG</strong> PROJECT REPORT<br />
Mentor: R. Sai Krishna (200701168)<br />
Prof. Subhajit Sen P. Bharath Reddy (200701179)<br />
<strong>ECG</strong> CIRCUIT REPORT Page 1
1) Introduction<br />
Table of Contents<br />
2) The design of the Detection circuit<br />
3) Results of the simulation of Design circuit<br />
4) The Monoshot Circuit Design<br />
5) Results of simulation of Monoshot circuit<br />
6) The Hardware Implementation<br />
<strong>ECG</strong> CIRCUIT REPORT Page 2
Objective:<br />
Introduction<br />
The objective is to design a sensitive amplifier circuit that can detect <strong>ECG</strong> (Electrocardiogram)<br />
signals obtained from metal electrodes applied at the left arm (LA), Right arm (RA) and right leg(RL).<br />
Brief description of the circuit:<br />
The circuit basically amplifies the difference between the right-arm (RA) lead and the left-arm<br />
(LA) lead with the right-leg (RL) lead as the ground or reference node (i.e. the RA or LA common mode<br />
should be about the same as RL). The circuit consists of a “difference” amplifier which is essentially a 2stage<br />
instrumentation amplifier (IA) followed by another amplifier/filter stage followed by a filter stage .<br />
The sharp “R wave” pulse needs to be detected using a circuit composed of a comparator and a<br />
monoshot (mono-stable multivibrator) that enables an oscillator to drive a speaker. A distinct beep<br />
sound is to be detected. The mono-shot may be required because the pulse is very narrow with respect<br />
to the period of the waveform typically 1 Hz or a heartbeat rate of 60 per minute.<br />
Specifications:<br />
Total Gain= 1000 to 3000<br />
Signal lower cutoff freq.= 0.05 Hz<br />
Upper cutoff freq. = 150 Hz<br />
CMRR= Should be high (say 1000)<br />
R-wave pulse height = 1 mV<br />
Desired Outputs:<br />
Plots from spice simulation of the design.<br />
Outputs from oscilloscope at different points in the circuit.<br />
<strong>ECG</strong> CIRCUIT REPORT Page 3
Our design can be split into two parts:-<br />
Detection of R wave.<br />
Producing the beep sound with the signal.<br />
Sub-circuit-1:<br />
The Detection Circuit design<br />
This part of the circuit has an amplification of approximately 12 and has a difference amplifier to remove<br />
the common-mode noise. The opamps used in the circuit are AD741. The high-pass filter with 16nf<br />
capacitor and 100k resistor is used to filter the dc voltage. V1 and V2 are the inputs from the right arm<br />
and left arm respectively. The reference voltage i.e., the right leg is grounded.<br />
Sub-circuit-2:<br />
This part of the circuit is for amplification of the output of sub-circuit-1. The opamp used here is AD741.<br />
<strong>ECG</strong> CIRCUIT REPORT Page 4
Sub-circuit-3:<br />
The above circuit is a Sallen-Key low pass filter with bandwidth 159Hz. The opamp used here is AD741.<br />
The use of low-pass filter in the circuit is to ensure that the AC noise is also removed if it remains during<br />
the stage of difference amplifier. The bandwidth of the main output signal will be less than 150Hz and<br />
greater than 5Hz. Hence the low pass filter successfully removes the remaining AC noise if at all it is<br />
present in the circuit.<br />
The combined circuit:<br />
<strong>ECG</strong> CIRCUIT REPORT Page 5
Spice Code:<br />
.subckt opamp in+ in- out<br />
R01 3 0 200k<br />
RO4 3 5 1K<br />
D1 3 4 DMODEL<br />
G1 3 0 in+ in- 1M<br />
CC 5 6 5P<br />
G2 6 0 3 0 1M<br />
R02 6 0 200K<br />
D3 6 7 DMODEL<br />
D4 0 7 DMODEL<br />
G3 0 out 6 0 0.1<br />
R03 out 0 10<br />
D5 out 9 DMODEL<br />
D6 out 9 DMODEL<br />
.MODEL DMODEL D(VREV =<br />
12)<br />
.ends<br />
.subckt First v1 v2 vout<br />
X1 v1 2 5 opamp<br />
X2 v2 3 4 opamp<br />
R1 2 3 1K<br />
R2 2 5 1K<br />
R3 3 4 1K<br />
R4 5 6 24K<br />
R5 4 7 24K<br />
X3 6 7 8 opamp<br />
R6 6 0 100K<br />
R7 7 8 100k<br />
C 8 vout 1u<br />
R vout 0 1Meg<br />
.ends<br />
.subckt Second v1 vout<br />
X1 v1 2 vout opamp<br />
R1 2 0 1k<br />
R2 2 vout 100k<br />
.ends<br />
.subckt Sallen vin vout<br />
X1 3 4 vout opamp<br />
r1 vin 2 10k<br />
r2 2 3 24k<br />
c1 2 vout 15n<br />
c2 3 0 15n<br />
r3 4 0 24k<br />
r4 4 vout 10k<br />
.ends<br />
X5 3 4 5 First<br />
X6 5 6 Second<br />
X7 6 7 Sallen<br />
v1 1 0 pulse(0 0.5m 10m 5m<br />
5m 0 800m)<br />
v2 2 0 pulse(0 -0.5m 10m 5m<br />
5m 0 800m)<br />
v3 1 3 sine(300m 1m 150 0 1<br />
0 10)<br />
v4 2 4 sine(300m 1m 150 0 1<br />
0 10)<br />
.tran 1m 1000m 0.01<br />
<strong>ECG</strong> CIRCUIT REPORT Page 6
Results of spice simulation:<br />
<strong>ECG</strong> CIRCUIT REPORT Page 7
<strong>ECG</strong> CIRCUIT REPORT Page 8
Monoshot circuit for sound<br />
The opamp acts as a comparator and first 555 timer is in monostable mode. The input to the circuit is<br />
the output of the detection circuit. The output of the first 555 timer is sent to the second 555 timer<br />
which is configured to work in astable mode. This works as an oscillator of frequency of appx. 200Hz.<br />
Extension of previous spice code:<br />
.subckt Monoshot vin vout<br />
X1 vin vout 4 5 6 6 8 UA555<br />
vcc 8 0 12<br />
r1 6 8 500k<br />
c1 6 0 1u<br />
r 3 0 10k<br />
.ends<br />
.subckt oscill vin reset vout<br />
X1 vin vout reset 5 vin 7 8 UA555<br />
vcc 8 0 12<br />
c 2 0 15n<br />
r1 vin 7 100k<br />
r2 7 8 100k<br />
r 3 0 10k<br />
.ends<br />
X4 11 7 8 opamp<br />
X5 8 9 monoshot<br />
v6 12 0 pulse(0 12 0 0m 0m 10m 2m)<br />
X6 12 9 10 oscill<br />
<strong>ECG</strong> CIRCUIT REPORT Page 9
Results of Simulation:<br />
Comparator output:<br />
555 timer output:<br />
<strong>ECG</strong> CIRCUIT REPORT Page 10
The input and output currents for the 555 timer circuits are controlled by load resistances applied w.r.t<br />
the 555 timer chip characteristics.<br />
Hardware Implementation:<br />
The effecting factors:<br />
The input resistance of the human body is very high.<br />
The offset voltage of the opamp.<br />
The resistors are not ideal which affect the gain and CMRR.<br />
The signals passed from the hands to the circuit are generally very low because of the high<br />
impedance of the body. Hence a small amplification is required before the removal of the common<br />
mode noise by the differential amplifier. Hence a small amplification of 3 was designed before the<br />
difference amplifier of a amplification 4.<br />
The output of the sub-circuit-1 of the detection circuit was not able to remove the dc offset when<br />
the circuit was switched on. The signal got at the output of the high pass filter gave a negative dc offset.<br />
The problem we noticed was the input offset current of the opamp which is around 1nA created a<br />
negative offset of 20mV in presence of 1Mega Ω resistor of the high pass filter. This affected the overall<br />
output as the amplification in next stage was around 100. To solve this problem, we connected a<br />
potentiometer across the offset terminals of AD741 opamp i.e, across the 1 and 5 terminals. At a<br />
particular point the DC offset was nullified.<br />
<strong>ECG</strong> CIRCUIT REPORT Page 11
Also, initially we used we connected the wires directly to the hands and right leg and tested the<br />
signal. The signal strength was very low and the result was not clearly visible. So, we used the AgCl<br />
(silver chloride) electrodes which are actually used with the <strong>ECG</strong> machines. Using the electrodes the<br />
signal strength was pretty good and the result was clearly visible.<br />
The output had two frequencies, one, the output of 2 nd 555 timer circuit and the other the input<br />
frequency signal. The output signal frequency was more significant.<br />
<strong>ECG</strong> CIRCUIT REPORT Page 12