You are on page 1of 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/308856444

Design and implementation of 3-lead ECG machine for rural medification

Conference Paper · May 2015


DOI: 10.1109/ICEEICT.2015.7307455

CITATIONS READS

2 1,263

4 authors, including:

Ali Mohammed Jobayer Md. Towhidul Islam


South Dakota School of Mines and Technology Stamford University Bangladesh
4 PUBLICATIONS   10 CITATIONS    5 PUBLICATIONS   17 CITATIONS   

SEE PROFILE SEE PROFILE

Nipu Kumar Das


Chittagong University of Engineering & Technology
49 PUBLICATIONS   118 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Mobile charger with solar pannel View project

Design and implementation of Smart E-medical Setup View project

All content following this page was uploaded by Ali Mohammed Jobayer on 22 January 2018.

The user has requested enhancement of the downloaded file.


2nd Int'l Conf. on Electrical Engineering and Information & Communication Technology (ICEEICT) 2015
Iahangirnagar University, Dhaka-I 342, Bangladesh, 21-23 May 2015

Design And Implementation of3-Lead ECG


Machine For Rural Medification

Ali Mohammed Jobayer; Shishir Bordhan; Md, Towhidul Islam; Nipu kumar Das
Department of Electrical and Electronic Engineering
Chittagong University of Engineering and Technology
Chittagong, Bangladesh
jobayer.ieee@yahoo.com; bordhanshishir@gmail.com; towhid.pappu09@gmail.com; nipu16@gmail.com

Abstract-The number of decease due to Cardiovascular Disease heart muscles such that heart pumps enough blood to the
(CVD) in low and middle-income countries has become a major whole body. Electrocardiogram is the widely used diagnostic
concern. From a clinical standpoint, electrocardiogram is an tool to test periodically the electrical and muscular functions
useful mechanism to diagnose cardiac diseases. Therefore,
of the heart. Although cardiac signal is a low amplitude signal
electrocardiogram based machine design has taken into
distorted by many artefacts. Power line interference is the
consideration to create a framework for building a simple, low
main problem and that is why low noise cable gets privileges
cost microcontroller based ECG monitoring system. However,
most of the machines in current research has high price with in designing process[II ]. Besides instrumentation amplifier
bulky shape which deprives the people of remote area to get with high common mode rejection ratio, RFI protection
benefit from it. Therefore, the paper tries to design a smart circuit, right leg drive circuit and analogue filter design can
economical diagnosis system which can maintain reliable provide better extraction. To eradicate the noise, digital low
diagnosis with better portability. This system has been pass and band stop filter have been used. Java based
implemented by instrumentation amplifier with high common Processing IDE has been used in this system to display the
mode rejection ration and right leg circuit to remove 50 Hz noise
cardiac signal graphical view on the monitor. The following
of ac main. Digital and analog filtering of the system has
fig.I shows the normal electrocardiogram with waves,
optimized the signal by removing baseline wandering and power
intervals, segments.
frequency noise. The communication between the hardware and
software is interfaced through USB port using microcontroller.
The implementation of this system shows greater benefits in
domestic health monitoring and rural area's medical camp.

Keywords- ECG machine; instrumentation amplifier; QRS


p PR QRS ST T u
-- �-
complex; RFI; rural medification; Shield driver

I. INTRODUCTION

According to World Health Organization (WHO), over 80%


of Cardiovascular Disease (CVD) deaths take place in low and
middle-income countries. In some developing countries like
Bangladesh the percentage is more than 27%[10]. To diagnose
the CVD, researchers always use electrocardiogram, which is
a key mechanism to design any system to resolve CVD.
Electrocardiography (ECG) is the recording of the bio signal
generated from the heart. This signal conducts through cardiac
conduction system or heart's electrical system. Cardiac signal
is initiated from S-A node called heart's natural pacemaker,
which has been depicted in fig. I. After spreading over the
Fig. l. Schematic representation of Normal ECG
atria, signal goes to ventricles through a bridge called A-V
node. At last, throughout the ventricles His-Purkinje system
provides the electrical signal. Cardiac signal contracts the

978-1-4673-6676-2/15/$31.00 ©2015 IEEE


P wave Indicates atrial depolarization with 80 ms time II. SYSTEM BLOCK DIAGRAM
duration. QRS complex indicates ventricular depolarization
and time duration is ranging from 80ms to lOOms. T wave A block diagram has been depicted in the following fig. 2
indicates ventricular repolarizationwith 160 ms time duration. to elucidate the complete overview of the system. The ECG
ST segment indicates early ventricular repolarization and time signal is attained from the electrical potential of the human
duration is 320ms. PR interval Indicates AV conduction time body surface (skin) which is originated by the heart's
and time duration is ranging from 120 ms to 200 ms. QT electrical activity. ECG signal typically characterized by very
interval represents ventricular depolarization and low amplitude whose maximum level is 1 mV and bandwidth
repolarization and time duration is up to 420 ms in heart rate is about 0.05 Hz to 100 Hz. Such type of signal is normally
of 60 bpm. According to these basic ECG signal concept, the subject to different types of noise [ I I, 12]. Therefore, the
main system has been developed[1l,12]. The implementation system requires a precise data acquisition module, which
of the proposed system becomes advantageous because of its includes instrumentation amplifier AD620 with right leg drive
simplicity due to the use of commercially available circuit, band pass filter, noninverting amplifier and level
microcontroller, economic manufacturing and portability, shifter. The data acquisition module is interfaced with a
which gives it a special suitability to use in remote places or computer by Arduino uno microcontroller. Finally, the
domestically with less cost. acquisition data from human body is displayed in the
computer with a specialized software window.

In strumentation
Amplifi er A D 6 2 0 . B and Pass non-inverting L evel Arduino Computer
with rig ht leg drive Filter Amplifi er S hifter uno Interface
circ u it

Fig. 2. Block diagram of 3-lead ECG machine.

much RF energy from the input lines as possible, preserve the


III. SYSTEM HARDWARE DESIGN ac signal balance between each line and ground(common) and
maintain a high enough input impedance over the
A. Instrumentation Amplifier Selection and Protection measurement bandwidth to avoid loading the signal source. In

Against RFI addition to RFI suppression, the filter provides additional


input overload protection [2,9].
The performance of the system highly depends on the
precise data acquisition and its accuracy even after mixing
B. External Protection Diodes and Shield Drivers
with lots of noises. Instrumentation amplifier with high
common mode rejection ratio reduces the common mode
Device input protection can increase with the addition of
noise, increase signal to noise ratio. Here, AD620 is used, and
external clamping diodes. As high current diodes are used,
it has 100dB min common mode rejection ratio[9].
input protection is increased, which allows the use of much
lower resistance input protection resistors which, in turn,
RF rectification occurs because even the best in-amps have
reduce the circuit's noise [2].
virtually no common-mode rejection at frequencies above 20
kHz[9]. A strong RF signal may become rectified by the
Instrumentation amplifiers AD620 offers high Ccommon
amplifier's input stage and then appear as a dc offset error.
Mode Rejection, which is a measure of the change in output
Once rectified, no amount of low-pass filtering at the in­
voltage when both inputs are changed by equal amounts.
ampoutput will remove the error[9]. If the RF interference is
These specifications are usually given for a full-range input
of an intermittent nature, this canlead to measurement errors
voltage change and a specified source imbalance. For optimal
that go undetected. The best practical solution is to provide
CMR, the reference terminal should be tied to a low
RF attenuation ahead of the in-amp by using a differential
impedance point, and differences in capacitance and resistance
low-pass filter. The filter needs to do three things: remove as
should be kept to a minimum between the two inputs. In many shows the cut-off frequency at 0.05Hz which is similar to the
applications shielded cables are used to minimize noise and theoretical value.
for best CMR over frequency the shield should be properly fd
3 order low pass filter circuit diagram has been
driven[2, 9].
depicted in the following fig. 5 and the corresponding cut off
frequency theoretical value has been calculated by the ideal
C. Driven Right Leg and DC Restorer Circuit
formula[4].
The patient's body can also act as an antenna, which picks
up electromagnetic interference, especially 50/60 Hz noise
from electrical power lines. This interference can obscure the
biological signals, making them very hard to measure. Right
Leg Driver circuitry is used to apply an inverted version of the
common-mode interference to the subject's right leg, with the
aim of canceling the interference[2].

DC restorer circuit is an auto zero circuit which is useful


for correcting severely drifting base line.It is op-amp
integrator circuit[3].Gain resistor (RG) selection is also an
important part in circuit design. The following formula is used
for gain resistor.
Fig. 5. 3'd order active low pass filter.

49.4Kn nd
The cut- off Frequency of 2 order low pass filter is :
RG =

G -1
1
For G = 120, RG = 440n. For G = 1, the RG pins of cut. off Frequency, f =

microcontroller are unconnected (RG= oo).To minimize the (2xnxRxC )


gain error, high parasitic resistance in series with Ro should 1
avoid. To minimize the gain drift, Ro value should be low.
(2xnx 680x10f.t)

D. Band Pass Filter = 23Hz

Band pass filter consists of a passive single order high pass 5t


The cut-off Frequency of 1 order low pass filter is:
filter in fig. 3 and third order low pass filter in fig. 5. High
1
pass filter has cut-off at 0.05Hz and low pass filter cut-off at
cut. off Frequency, f =

25Hz[1, 3]. (2xnxRxC )

(2xnx1.8kx 4.7f.t)

= 33.73Hz
fd
So the Overall cut-off Frequency of 3 order low pass filter is
approximately 25-30 Hz. The following fig. 6 shows the
simulated value of the active low pass filter.
Fig. 3. First order high pass filter.
1
cut. off Frequency , f
2 π R C

= π
= 0.05Hz
μ

Fig. 6. Frequency responsee of 3rdorder low pass filter


fd
Fig. 6. shows the simulation of frequency response of 3 order
Fig. 4. Frequency response of First order low
w pass filter.
low pass filter. Here, it shows the cut-off frequency at
The following fig. 4 shows the simulation of 33.73Hz.
frequency response of first order high pass filter. Here, it
E. Noninverting Amplifier

A non-inverting amplifier IS a special case of


the differential amplifier in which the circuit's inverting
input voltage is grounded and non-inverting input voltage is
identified with Vin above, with R16> RI5 depicted in fig. 7 [1,
3].

Fig. 9. Level shifter.

Voltage at noninverting pin due to Vs

Rl1 II RIO
VI = O.5 V
(Rl1 II RIO) + RI4
Voltage at noninverting pin due to V/N
Fig. 7. Noninverting amplifier.
RI4 II RiO
V2 =
V/N
(R14 II RiO) + R11
The close loop gain (ACL) of the noninverting amplifier can be
calculated by the following formula. 0.5 * V/N
R13
- VOUT _ 1 RI6 So the output Voltage, Vout= (VI + V2)
A CL - - + R12
V/N RIS
[f the R16= 560k and R15 = [Ok, then the close loop gain is,
ACL = 57. Close loop gain is responsible to amplify the signal.

Fig. 10. Simulation of level shifter.

Fig. 8. Amplification of Noninverting Amplifier. Fig. 10 shows the simulation of level shifter. Here, level
shifter shifts the signal by 1 volt
Fig. 8 shows the simulation of amplification of noninverting
amplifier. Here, noninverting amplifier amplifies signal by 5 7.

F. Level Shifter IV. DATA ACQUISITION AND DIGITAL FILTER DESIGN


It shifts the voltage level from one point to another point. ECG analog signal from hardware part is converted into
As signal contains negative portion of voltage, therefore to digital signal using 10-bit analog to digital (ADC) converter
display the negative portion signal must be shifted. Otherwise, of AVR microcontroller with having resolution of 4.88m V per
the negative portion will cut from the output signal. A level bit and sampling rate 9.6kHz. Although Analog filter has
shifter circuit has been designed in the following circuit fig. bandwidth of 0.05- 33Hz, but still it is affected by 50Hz
9[5]. electrical noise. So, real time IIR bandstop and lowpass digital
filter with Butterworth algorithm are essential to extract the
accurate ECG signal. Microcontroller firmware contains this
algorithm to get filtered signal prior to PC interface. [t keeps
signal overall bandwidth between 0.05-25Hz. The difference
equation of IIR filter is:
y[n] � :, (t, b,x[n - ;]- t ajy[n - j] )
Where P is the feed forward filter order, Q is the feedback
filter order, aj is the feedback filter coefficients, hi is the feed
forward filter coefficients, x[n] is input signal and y[n] is the
output signal[6].

Magnitude Response (dB)


0
utterw orth
Low pass Bu
-20
Fig. 13. Designed Window to display ECG signal.
Magnitude (dB)

-40
VI. SYSTEM OUTPUT

The following fig. 14 shows the ECG signal obtained from


-60
a person by using the designed system. It shows every peak
such as P, Q, R, S and T clearly. Here, ECG signal represents
-80
voltage with respect to time. Fig. 14 shows P segment, QRS
complex and T segment clearly and by using these
-100
0 50 100 150 information it is easy to detect disease of a person.
Frequency (Hz)

Fig. 11. Frequency Response of low paass filter.


Magnitude Response (dB)
0

-10 Bandstop Bu
utterw orth
Magnitude (dB)

-20

-30

-40

0 50 100 150
Frequency (Hz)

Fig. 12. Frequency Response of bandstoop filter. Fig. 14. Measured ECG Signal.

Fig. 11 and 12 shows the frequency response of low pass filter VII. CONCLUSION
and bandstop filter respectively. Fdatool, which comes with Thus this ECG machine, provides user friendly operation
Matlab, facilitates to determine IIR filter order, section, and on windows based operating system and can be connected to
coefficient for implementation in filter coding. any PC easily with automatic and instantaneous interpretation.
[t includes noise free ECG acquisition and works as storage of
V. INTERFAClNG AND SOFTWARE DESIGN ECG signal.This setup can be useful to doctor as well as mass
people. However, ECG signals are to be prepared at actual
Arduino Uno communicates with PC through Serial
state after some time delay because of the processing of digital
interface using RS232 protocol. In firmware, data rate is
filter which is necessary to improve more. This machine can
28800bps[7]. It gives baud rate 320Bd, and is enough for ECG
provide Lead I, Lead II, Lead III electrode placement
bandwidth. For displaying ECG signal, GUI window is
facility[II ]. Use of both analog and digital filter enhances
designed using processing software depicted in fig. 13 [8]. It is
noise reduction. Using laptop/computer monitor as a
an open source programming language and integrated
displaying system reduces cost of this device.
development environment for visual design and builds on the
java language. The software has some capabilities such as
zoom in, zoom out, hold on, data saving in.txt format. As
every analog and digital filter has unity gain, calibration
provides approximate O.75mV per box after calculating
amplifier gain and instrumentation amplifier gain.
REFERENCES ported-files/tutorials/MT-070.pdf
10 World Health Rankings Live Longer Better,[Online].
Available: http: //www.worldlifeexpectancy.comlbangla
David A. Bell."Operational Amplifiers and Linear Ics."
desh-coronary-heart-disease.
2nd edition, Prentice Hall of India Private Limited '
New Delhi - 110001,2005, pp. 120-123.
II Abdullah AI-Amin, A K M Bodiuzzaman, Ahmed
2 Charles Kitchin and Lew."A Designer's Guide to
Imtiaz Khan, K Siddique-e Rabbani. "Design and
Instrumentation Amplifiers." 2nd edition, Printed In
Development of a PC based ECG Equipment",
U.S.A, 2005, pp. I 23-130.
Bangladesh Journal of Medical Physics, Vol. 6, No.1,
3 Albert Malvino, David J Bates."Electronic principles."
2013.
7th edition, Tata McGraw-Hili Publishing Company
12 EI Mimouni EI Hassan and Karim Mohammed.
Limited, New Delhi, 2010-2011, pp. 203-223.
"Design andImplementationof an Embedded
4 Sallen-Key Low-pass Filter Design Tool, [Online].
Systemfor Ambulatory Cardiac Monitoring."
Available:
University Sidi Mohammed Ben Abdellah ' F'es,
http://sim.okawadenshijp/en/OPseikiLowkeisan.htm
Morocco.
5 Non-Inverting Op-Amp Level Shifter. [Online].
Available: http: //www.daycounter.cOlnJCircuits/OpAmp
-Level-Shifter/OpAmp-Level- Shifter.html
6 John G. Prokis."Digital Signal Processing Principles,
Algorithms And Applications." 4th edition, Ed. Pearson
Educationlnc., 2007, pp-214-233.
7 Arduino, [Online]. Available: http://www.arduino.cc

8 Processing, [Online]. Available:


http: //www.processing.org

9 In-Amp Input RFI Protection, Analog


Devices, [Online].Available:www.analog.com/static/im

View publication stats

You might also like