13. Electronics - IJECEIERD - DESIGN AND - Sapna Katiyar - Unpaid

Page 1

International Journal of Electronics, Communication & Instrumentation Engineering Research and Development (IJECIERD) ISSN 2249-684X Vol.2, Issue 3 Sep 2012 121- 129 Š TJPRC Pvt. Ltd.,

DESIGN AND DEVELOPMENT OF LOW COST MICROCONOLLER BASED ECG SYSTEM FOR REALTIME ANALYSIS ARPITCHOUDHARY, MOHIT KUMAR, KUNDAN KUMAR, RACHANA SINGH & SAPNAKATIYAR A.B.E.S. Institute of Technology, NH-24, Vijay Nagar, Ghaziabad ,UP, India

ABSTRACT The ElectroCardioGram (ECG), a set of graphs of electrical heart activity, is the principle toolused in diagnosis of different heart conditions. This paper illustrates the design andimplementation of a low-cost ECG monitor using microcontroller and MATLAB. The objective of this system is to acquire the analog ECG signal in digitized form which is observed on a PC for storage and further analysis. This is achieved by a embedded system based hardware acquisition unit synchronized with MATLAB software for automatic data storage in files. The ECG signal is captured using disposable ECG electrodes and the heart rate in beats per minute will be displayed on a LCD. The ECG signal is sampled at a rate of 941KHz and after digitization, fed to a microcontroller-based embedded system to convert the ECG data to a RS232 formatted serial bit-stream.This serial data stream is then transmitted to a Personal Computer at a rate of 9600 kbps. In addition to this the ECG signal can also be viewed on a digital storage oscilloscope (DSO).

KEYWORDS: ECG, Microcontroller, MATLAB,

ADC, Serial Communication, Bio-Potential

Amplifier

INTRODUCTION In the era where technology kept changing our course of life, improvement in medical field have become most needed and developed as people concern about their health above all.Electrocardiogram (ECG) is widely used low cost and non-invasive tool for cardiac investigations in a clinical set-up. It shows the plot of surface bio-potentials caused due to electrical activity of the heart. This electrical information provides sufficient detail to identify a number of cardiac abnormalities. In 1887 A.D. Weller first published his work on human ECG recording. However, W. Einthhoven is considered as thepioneer of standardizing the ECG lead system followedtoday [1]. The various applications of ECG monitoring are in the areas like health-care, sports, military, space-programmes, and home-care services, patient monitoring. With the advancement of communication technologies, it is possible to monitor a patient from remote point[2].


122

Arpitchoudhary, Mohit Kumar, Kundan Kumar, Rachana Singh & Sapnakatiyar

Major Parts in the Design of an Ecg System are •

ECG electrodes unit

Analog amplifier and filtering unit

Microcontroller and processing unit

Analysis unit

Storage unit

Display devices

FIRST UNIT The first and the main unit of this systemis to sense the weak bio-potential signal generated inside the human body due to activities of the heart. To capture this weak electrical signal ECG unit is used. This unit makes the interface between the patients heart’s electrical activity and thefurther electric circuitry. The ECG lead unit may be 12 lead, 6 lead,5 lead or 3 lead one. Depending on the clinical application and real time complexity of the placement of electrodes any of these lead systems is employed. For this circuit 3 disposable ECG electrodes system areemployed [13].

SECOND UNIT This unit ofthe system is analog bio-potential amplifier and filtering unit. This unit is very important due to weak values of the electrical signal itself as well the environment and the apparatus in which the measurement is done. The weak electrical signal is amplified using an instrumentation amplifier and filtered using a passive band pass filter. The signal is further amplified using a noninverting amplifier which provides an additional gain. The main characteristics of the instrumentation amplifier are high Common Mode Rejection Ratio (CMRR) to reject interference from mains, low-noise for high signal quality, and ultra-low power dissipation for long-term power autonomy, configurable gain and filter characteristics that suit the needs of different bio-potential signals under different applications [4-9]. After this unit the ECG signal can be seen on the DSO. After this a pulse is generated with the help of a comparator. Whenever the signal crosses a certain reference voltage the comparator generates a high to low pulse to indicate a beat, which is used as an interrupt source for microcontroller. With the help of time duration between two pulses beats/minute is calculated and displayed on the LCD with the help of Microcontroller. Meanwhile the signal is also converted into digital using ADC and transferred to the PC via RS232 interface. The signal is received at the USB port using USB to serial converter, where it is read by the MATLAB and plotted in real time.

THIRD UNIT This unit is Microcontroller and processing unit. This unit is used for the digitization of the ECG signal [1–3]. To convert the available analog signal into digital we have used an ADC. Also RS232 interface is used to interface microcontroller and PC. Microcontrollers are low-cost, low-power, programmable, cheap and high-speed data acquisition systems. Microcontroller generates the


Design and Development of Low Cost Microconoller Based ECG System for Realtime Analysis

123

communication protocol for transmission to a PC. This enables a direct connection between the ‘compact’ front-end and the Host[12].HereMicrocontroller is used for calculating the beats/minute and displaying it on LCD and to send the data to the computer. MATLAB is one of the most powerful data processing platforms and is used to plot the data in real time situation using serial port interface [4-6].

SYSTEM BLOCK DIAGRAM The Figure (1) shows the block diagram of the system for microcontroller based heart beat monitor [13].The heart pulse received on the skin by electrodes is a result of traveling electrical activity from the heart. At the skin, this signal has a relative potential in the range of about ~2mV. The desired components of a typical ECG signal lies in the frequency range 0.5 Hz to150 Hz. Three disposable ECG electrodes are used to sample the desired signal from human body. The bio-potential electrical signal is the input to differential amplifier. It takes the difference of received signal from the left and right arm. Left leg is used as ground reference. The difference of the signals is amplified for further processing.The received electrical signal from the body contains a large amount of noise. To separate the desired signal from the noise a passive band pass filter is used. Output of the filter is connected to additional gain amplifier and then amplified output may be display or store in DSO [7-11]. For further analysis output from additional gain amplifier may also be digitalized using ADC. The output of comparator is used as a source of interrupt for microcontroller. Further Microcontroller is used to calculate heart beat rate, to display it on LCD, to control the analog to digital conversion and to transmit them serially. TTL to RS-232 is used for converting TTL standard to RS-232 standard.

Figure 1: System Block Diagram


124

Arpitchoudhary, Mohit Kumar, Kundan Kumar, Rachana Singh & Sapnakatiyar

HARDWARE IMPLEMENTATION Instrumentation amplifier is used as a differential amplifier, which is implemented using four 741 op-amp ICs. The over all gain of instrumentation amplifier is 940. A band pass filter of cut-off frequency 0.5 Hz to 150 Hz is used for removing the noise. To further amplify the desired signal an additional gain amplifier of gain 5.1 is used, which leads to an over all gain of 4794. The output of additional gain amplifier is around 4 volt peak-to-peak. This signal is displayed on DSO. Comparator is implemented using 741 op-amp IC. AT89C51 microcontroller has been used for the measurement of heart beat rate. LCD and ADC0804 are interfaced with microcontroller. MAX-232 IC is used for TTL to RS232 conversion. Serial data is received on USB port of PC with the help of serial to usb converter, which is read by MATLAB for plotting the signal in real time. Fig (3.1) shows the actual circuit that has been implemented.

Figure 2. Implemented Circuit

SOFTWARE IMPLEMENTATION •

The programming of the microcontroller 89c51 is done in assembly language[12].

Editor

Assembler

Programmer: VPL UPROG VX universal programmer

: Programmer’s Notepad : 8051 IDE


Design and Development of Low Cost Microconoller Based ECG System for Realtime Analysis

125

To achieve the goals of the project following steps are taken for programming the microcontroller[12]. 1.

Initialize the LCD

2.

Number of clock ticks is recorded between two successive pulses coming from the comparator.

3.

Beats per minute is calculated every second with the help of clock pulses recorded in step 1.

4.

These are displayed on the LCD by converting them to ASCII.

5.

Simultaneously the microcontroller controls the ADC0804 for converting the analog signal into digital

6.

This digital data received at the PORT0 is sent serially to the PC via MAX232.

STEPS USED TO VISUALIZE WAVEFORM The digital data coming on serial port (or USB port) is plotted with respect to time and Figure 3 shows the steps being performed:

Created a serialobject in MATLAB

Customized the figure window

Created a while loop

Read the data from input serial data

Plot received data against time

Figure 3: Steps used to receive data on PC


126

Arpitchoudhary, Mohit Kumar, Kundan Kumar, Rachana Singh & Sapnakatiyar

RESULTS The results at various stages are shown in the following figures: Figure 4: Filtered ECG signal on DSO Figure 5: Comparator output with ECG signal. Figure 6: Heart Beat Rate on LCD Figure 7: ECG signal on MATLAB

Figure 4. Filtered ECG signal on DSO

Figure 5. Comparator output with ECG signal.


Design and Development of Low Cost Microconoller Based ECG System for Realtime Analysis

Figure 6. Heart Beat Rate on LCD

Figure 7. ECG signal on MATLAB

127


128

Arpitchoudhary, Mohit Kumar, Kundan Kumar, Rachana Singh & Sapnakatiyar

CONCLUSIONS The prototype of the low cost microcontroller based heart beat monitor was efficiently designed and verified. This prototype has facilities to display ECG signal on computer screen or on DSO. It accepts weak ECG signal coupled with high power noise and effectively amplifies the signal for further processing. Received ECG signal has been effectively used for the calculation of heart beat rate per minute with a very small error. In addition to DSO the amplified ECG signal has been successfully received on computer screen by using MATLAB and RS232.Therefore all objectives perceived in the project have been successfully realized and implemented. This system can be upgraded for the detection of disease states of the heart of the patients who are located in the remote areas and are not in a position to report to the doctor for immediate treatment. The ECG signal can be transmitted using the internet to the doctors and advises can be sought for saving the life of the patient.

REFERENCES [1] R. Gupta, J.N. Bera, M. Mitra*, Development of an embedded system and MATLAB-based GUI for online acquisition and analysis of ECG signal, Measurement 43 (2010) 1119–1126. [2] K Krishna bai, S. C. Prasanna Kumar, Design of a Low Cost ECG system: Review, Canadian Journal on Biomedical Engineering & Technology Vol. 3 No. 2, February 2012. [3] M. Bertrand, R. Guardo, F.A. Roberge, P. Blondeau, Microprocessor application for numerical ECG encoding and transmission, Proceedings of IEEE 65 (5) (1977) 714–722. [4] O. Orlov, Dmitri V. Drozdov, et al., Wireless ECG monitoring by telephone, Journal of Telemedicine E-Health 7 (1) (2001) 33–38. [5] M. Engin, E. Caglav, E. ZekiEngin, Real-time ECG signal transmission via telephone network, Measurement 37(2) (2005) 167–171. [6] C.J. Yen, W.Y. Chung, M.C. Chi, Micro-power low-offset instrumentation amplifier IC design for biomedical system applications, circuits and systems I: regular papers, IEEE Transactions on Circuits Systems I 51 (4) (2004) 691–699. [7] M. Burke, D. Gleeson, A micropower, dry-electrode ECG preamplifier, IEEE Transactions on Biomedical Engineering 47 (2) (2000) 155–162. [8] R. Pallas-Areny, J. Webster, AC instrumentation amplifier for bioimpedance measurements, IEEE Transactions on BiomedicalEngineering 40 (8) (1993) 830–833. [9] E. Spinelli, R. Pallas-Areny, M. Mayosky, AC-coupled front-end for biopotential measurements, IEEE Transactions on Biomedical Engineering 50 (3) (2003) 391–395. [10] R. Coughlin, F. Driscoll, OPAMP and linear integrated circuits, sixth ed., Pearson Education Asia, India, 2002.


Design and Development of Low Cost Microconoller Based ECG System for Realtime Analysis

129

[11] E. Spinelli, N. Martinez, M. Mayosky, R. Pallas-Areny, A novel fully differential biopotential amplifier with DC suppression, IEEE Transactions on Biomedical Engineering 51 (8) (2004) 1444–1448. [12] M. A. Mazidi, J.G. Mazidi& R.D. McKinlay: The 8051Microcontroller And Embedded System, 2nd ed. [13] R.S. Khandpur: Biomedical Engineering. [14] VPL UPROG VX manual.


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.