ECG Saikrishna Bharat

download ECG Saikrishna Bharat

of 12

Transcript of ECG Saikrishna Bharat

  • 7/29/2019 ECG Saikrishna Bharat

    1/12

    ECG CIRCUIT REPORT Page 1

    ECG PROJECT REPORT

    Mentor: R. Sai Krishna (200701168)

    Prof. Subhajit Sen P. Bharath Reddy (200701179)

  • 7/29/2019 ECG Saikrishna Bharat

    2/12

    ECG CIRCUIT REPORT Page 2

    Table of Contents

    1)Introduction2)The design of the Detection circuit3)Results of the simulation of Design circuit4)The Monoshot Circuit Design5)Results of simulation of Monoshot circuit6)The Hardware Implementation

  • 7/29/2019 ECG Saikrishna Bharat

    3/12

    ECG CIRCUIT REPORT Page 3

    Introduction

    Objective:

    The objective is to design a sensitive amplifier circuit that can detect ECG (Electrocardiogram)

    signals obtained from metal electrodes applied at the left arm (LA), Right arm (RA) and right leg(RL).

    Brief description of the circuit:

    The circuit basically amplifies the difference between the right-arm (RA) lead and the left-arm

    (LA) lead with the right-leg (RL) lead as the ground or reference node (i.e. the RA or LA common mode

    should be about the same as RL). The circuit consists of a difference amplifier which is essentially a 2-

    stage instrumentation amplifier (IA) followed by another amplifier/filter stage followed by a filter stage .

    The sharp R wave pulse needs to be detected using a circuit composed of a comparator and a

    monoshot (mono-stable multivibrator) that enables an oscillator to drive a speaker. A distinct beep

    sound is to be detected. The mono-shot may be required because the pulse is very narrow with respect

    to the period of the waveform typically 1 Hz or a heartbeat rate of 60 per minute.

    Specifications:

    Total Gain= 1000 to 3000 Signal lower cutoff freq.= 0.05 Hz Upper cutoff freq. = 150 Hz CMRR= Should be high (say 1000) R-wave pulse height = 1 mV

    Desired Outputs:

    Plots from spice simulation of the design. Outputs from oscilloscope at different points in the circuit.

  • 7/29/2019 ECG Saikrishna Bharat

    4/12

    ECG CIRCUIT REPORT Page 4

    Our design can be split into two parts:-

    Detection of R wave. Producing the beep sound with the signal.

    The Detection Circuit design

    Sub-circuit-1:

    This part of the circuit has an amplification of approximately 12 and has a difference amplifier to remove

    the common-mode noise. The opamps used in the circuit are AD741. The high-pass filter with 16nf

    capacitor and 100k resistor is used to filter the dc voltage. V1 and V2 are the inputs from the right arm

    and left arm respectively. The reference voltage i.e., the right leg is grounded.

    Sub-circuit-2:

    This part of the circuit is for amplification of the output of sub-circuit-1. The opamp used here is AD741.

  • 7/29/2019 ECG Saikrishna Bharat

    5/12

    ECG CIRCUIT REPORT Page 5

    Sub-circuit-3:

    The above circuit is a Sallen-Key low pass filter with bandwidth 159Hz. The opamp used here is AD741.

    The use of low-pass filter in the circuit is to ensure that the AC noise is also removed if it remains during

    the stage of difference amplifier. The bandwidth of the main output signal will be less than 150Hz and

    greater than 5Hz. Hence the low pass filter successfully removes the remaining AC noise if at all it is

    present in the circuit.

    The combined circuit:

  • 7/29/2019 ECG Saikrishna Bharat

    6/12

    ECG CIRCUIT REPORT Page 6

    Spice Code:

    .subckt opamp in+ in- out

    R01 3 0 200k

    RO4 3 5 1K

    D1 3 4 DMODEL

    G1 3 0 in+ in- 1M

    CC 5 6 5P

    G2 6 0 3 0 1M

    R02 6 0 200K

    D3 6 7 DMODEL

    D4 0 7 DMODEL

    G3 0 out 6 0 0.1

    R03 out 0 10

    D5 out 9 DMODEL

    D6 out 9 DMODEL

    .MODEL DMODEL D(VREV =

    12)

    .ends

    .subckt First v1 v2 vout

    X1 v1 2 5 opamp

    X2 v2 3 4 opamp

    R1 2 3 1K

    R2 2 5 1K

    R3 3 4 1K

    R4 5 6 24K

    R5 4 7 24K

    X3 6 7 8 opamp

    R6 6 0 100K

    R7 7 8 100k

    C 8 vout 1u

    R vout 0 1Meg

    .ends

    .subckt Second v1 vout

    X1 v1 2 vout opamp

    R1 2 0 1k

    R2 2 vout 100k

    .ends

    .subckt Sallen vin vout

    X1 3 4 vout opamp

    r1 vin 2 10k

    r2 2 3 24k

    c1 2 vout 15n

    c2 3 0 15n

    r3 4 0 24k

    r4 4 vout 10k

    .ends

    X5 3 4 5 First

    X6 5 6 Second

    X7 6 7 Sallen

    v1 1 0 pulse(0 0.5m 10m 5m

    5m 0 800m)

    v2 2 0 pulse(0 -0.5m 10m 5m

    5m 0 800m)

    v3 1 3 sine(300m 1m 150 0 1

    0 10)

    v4 2 4 sine(300m 1m 150 0 1

    0 10)

    .tran 1m 1000m 0.01

  • 7/29/2019 ECG Saikrishna Bharat

    7/12

    ECG CIRCUIT REPORT Page 7

    Results of spice simulation:

  • 7/29/2019 ECG Saikrishna Bharat

    8/12

    ECG CIRCUIT REPORT Page 8

  • 7/29/2019 ECG Saikrishna Bharat

    9/12

    ECG CIRCUIT REPORT Page 9

    Monoshot circuit for sound

    The opamp acts as a comparator and first 555 timer is in monostable mode. The input to the circuit is

    the output of the detection circuit. The output of the first 555 timer is sent to the second 555 timer

    which is configured to work in astable mode. This works as an oscillator of frequency of appx. 200Hz.

    Extension of previous spice code:

    .subckt Monoshot vin vout

    X1 vin vout 4 5 6 6 8 UA555

    vcc 8 0 12

    r1 6 8 500k

    c1 6 0 1u

    r 3 0 10k

    .ends

    .subckt oscill vin reset vout

    X1 vin vout reset 5 vin 7 8 UA555

    vcc 8 0 12

    c 2 0 15n

    r1 vin 7 100k

    r2 7 8 100k

    r 3 0 10k

    .ends

    X4 11 7 8 opamp

    X5 8 9 monoshot

    v6 12 0 pulse(0 12 0 0m 0m 10m 2m)

    X6 12 9 10 oscill

  • 7/29/2019 ECG Saikrishna Bharat

    10/12

    ECG CIRCUIT REPORT Page 10

    Results of Simulation:

    Comparator output:

    555 timer output:

  • 7/29/2019 ECG Saikrishna Bharat

    11/12

    ECG CIRCUIT REPORT Page 11

    The input and output currents for the 555 timer circuits are controlled by load resistances applied w.r.t

    the 555 timer chip characteristics.

    Hardware Implementation:

    The effecting factors:

    The input resistance of the human body is very high. The offset voltage of the opamp. The resistors are not ideal which affect the gain and CMRR.

    The signals passed from the hands to the circuit are generally very low because of the high

    impedance of the body. Hence a small amplification is required before the removal of the common

    mode noise by the differential amplifier. Hence a small amplification of 3 was designed before the

    difference amplifier of a amplification 4.

    The output of the sub-circuit-1 of the detection circuit was not able to remove the dc offset when

    the circuit was switched on. The signal got at the output of the high pass filter gave a negative dc offset.

    The problem we noticed was the input offset current of the opamp which is around 1nA created a

    negative offset of 20mV in presence of 1Mega resistor of the high pass filter. This affected the overall

    output as the amplification in next stage was around 100. To solve this problem, we connected a

    potentiometer across the offset terminals of AD741 opamp i.e, across the 1 and 5 terminals. At a

    particular point the DC offset was nullified.

  • 7/29/2019 ECG Saikrishna Bharat

    12/12

    ECG CIRCUIT REPORT Page 12

    Also, initially we used we connected the wires directly to the hands and right leg and tested the

    signal. The signal strength was very low and the result was not clearly visible. So, we used the AgCl

    (silver chloride) electrodes which are actually used with the ECG machines. Using the electrodes the

    signal strength was pretty good and the result was clearly visible.

    The output had two frequencies, one, the output of 2nd

    555 timer circuit and the other the inputfrequency signal. The output signal frequency was more significant.