13.07.2015 Views

design of wireless ecg transmitter - Faculty of Electrical Engineering

design of wireless ecg transmitter - Faculty of Electrical Engineering

design of wireless ecg transmitter - Faculty of Electrical Engineering

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

DESIGN OF WIRELESS ECG TRANSMITTERMUHAMMAD ASHRAF BIN MD. JAAFARA thesis submitted in fulfillment <strong>of</strong> therequirement for the award <strong>of</strong> the degree <strong>of</strong>Bachelor <strong>of</strong> <strong>Engineering</strong> (<strong>Electrical</strong> – Medical Electronics)<strong>Faculty</strong> <strong>of</strong> <strong>Electrical</strong> <strong>Engineering</strong>Universiti Teknologi MalaysiaJuly 2012


iiiTo my beloved parentsMd. Jaafar Bin Litan and Rokiah Binti SalehMy siblings,Muhammad Fasha Bin Md. Jaafar and Ain Shuhada Binti Md. JaafarDedicated in thankful appreciation for your Doa, support and encouragementI could not have done this without any one <strong>of</strong> you.


ivACKNOWLEDGEMENTIn the name <strong>of</strong> Allah most gracious most merciful. First <strong>of</strong> all I would like toconvey my thousand <strong>of</strong> thanks to Dr. Akram Gasmelseed as my final year projectsupervisor for always guiding, supporting and giving very helpful comments to me inthe project.I also would like to dedicate my appreciation especially to M. Amzatul AqmalMohd Jupri for the helpful suggestions and knowledge on the project. Also not to beforgotten special thanks to all <strong>of</strong> <strong>Electrical</strong> <strong>Engineering</strong> <strong>Faculty</strong> lecturers that have beenhelping me in this project directly or indirectly.Not to be forgotten, dedication to my family who always stand on my side nomatter how life turns out to be. Thanks for all the support and love I had been receivingsince I was born.Last but not least, thousands <strong>of</strong> appreciation to my friends who had been with meduring the years in UTM. Together we experience all the joy and hardship without anysingle thought <strong>of</strong> giving up. Also thanks to any <strong>of</strong> my colleagues and anybody who everprovide me with any kind <strong>of</strong> assistance. Thank You.


viiTABLE OF CONTENTCHAPTER TITLE PAGEDECLARATIONiiDEDICATIONiiiACKNOWLEDGEMENTSivABSTRACTvABSTRAKviTABLE OF CONTENTSviiLIST OF FIGURESixLIST OF ABREVIATIONSxi1 INTRODUCTION 11.1 Research Background 11.2 Heartbeat 31.3 ECG (Electrocardiogram) 51.4 Problem Statement 71.5 Objective 81.6 Scope <strong>of</strong> Project 82 LITERATURE REVIEW 92.1 Introduction 92.2 Electrocardiogram Nodes 102.3 Wireless Network 11


ixLIST OF FIGURESFIGURE NO. TITLE PAGE1.1 Actual Scenario <strong>of</strong> the Project 21.2 Normal Human Heart 41.3 Typical ECG Waveform 51.4 Heart Condition and ECG Nodes 62.1 ECG Periods P-QRS-T 112.2 IEEE Wireless Networks 123.1 Overview <strong>of</strong> the Transmission Part 153.2 Hardware Development 163.3 Example m<strong>of</strong> the noise reduction in the cascaded system 173.4 ECG Circuit 183.5 Arduino Duemilanove 193.6 XBee RF Modules 203.7 S<strong>of</strong>tware Development 213.8 Arduino S<strong>of</strong>tware 233.9 X-CTU S<strong>of</strong>tware 253.10 X-CTU S<strong>of</strong>tware 264.1 ECG Simulator 284.2 ECG circuit 1 294.3 ECG circuit 2 294.4 ECG Signal at Oscilloscope 1 304.5 ECG Signal at Oscilloscope 2 314.6 XBee (Transmitter) 32


x4.7 XBee (Receiver) 324.8 Pairing the XBee 33


xiLIST OF SYMBOLS AND ABBREVIATIONSWBSN - Wireless biomedical sensor networkECG - ElectrocardiogramEMG - ElectromyogramEEG - ElectroencephalogramWHOWorld Health OrganizationBPMBits per minuteBANBody area network-


1CHAPTER 1INTRODUCTION1.1 Research BackgroundThe transmission network <strong>of</strong> biomedical signal through <strong>wireless</strong> is notimpossible anymore with the rapid advances in <strong>wireless</strong> communication network. Manyresearch have been done in <strong>wireless</strong> biomedical sensor network (WBSN) to monitorphysiological signal. Furthermore, telemedicine and remote monitoring <strong>of</strong> patients’physiological data have received increasing attention in recent years.Some <strong>of</strong> the physiological signals are electromyogram (EMG) for monitoringmuscle activity, electroencephalogram (EEG) for monitoring brain electrical activity andelectrocardiogram (ECG) which can be used to monitoring heart activity. Among these


2physiological signal, ECG and heart rate are the most important to be measured. WorldHealth Organization (WHO) had revealed, it is estimated that each year more than 16million people around the world died <strong>of</strong> cardiovascular disease where this figurerepresent 30 percent <strong>of</strong> global cause <strong>of</strong> deathECG machine that use <strong>wireless</strong> sensor network as a medium <strong>of</strong> transmissionneed to be developed. By this, we can monitor patient’ heart beat outside hospitalenvironment such as at home. The <strong>wireless</strong> link is implemented in the ECG machine forpatient’s mobility and to transmit the real time medical information. Figure 1.1 belowshows the actual scenario <strong>of</strong> this project.Figure 1.1 Actual Scenario <strong>of</strong> the Project


31.2 HeartbeatHeart is one <strong>of</strong> the five vital organs. Heart can be found in all animals with acirculatory system including all vertebras. Human heart basically a hollow, cone shaped10cm in length and just about the size <strong>of</strong> subject fist. Human heart lies in the thoraciccage, in the middle <strong>of</strong> chest area, just left <strong>of</strong> the center. Heart is responsible for pumpingblood throughout the blood vessels by repeated rhythmic contractions.Deoxygenated blood enters heart through superior vena cava and the heart willpump the blood to lungs through pulmonary trunk. Exhalation process in lungs removescarbon dioxide from blood and inhalation process absorb oxygen into blood.Oxygenated blood returns from lung enter heart through pulmonary veins and will bepumped throughout the body through aorta.Whether a person is awake or asleep, the heart will never stop pumping. Heartcontracts and relaxes in a rhythmic cycle. When it contracts, it pumps blood. When itrelaxes, its chambers filled with blood. One complete sequence <strong>of</strong> pumping and filling iscalled cardiac cycle. The volume <strong>of</strong> blood per minute that the left ventricle pumps intothe systemic circuit is called a cardiac output. Heart rate and stroke volume willdetermine cardiac output. Heart rate is the number <strong>of</strong> heart beat per r unit <strong>of</strong> time usuallyin unit <strong>of</strong> beats per minute (BPM). It is measured from the artery pulse in the body(chest, wrist fingerprints, etc).Heart rate can be measured by using heart rate monitoring system. Stroke volumeis the amount <strong>of</strong> blood pumped by left ventricle in each contraction. In human heart,average stroke volume is about 75 ml. at rest, a person heart beats about 70 beats perminute has cardiac output <strong>of</strong> 5.25 L/min. this is equivalent to the total volume <strong>of</strong> blood


4in human body. During heavy exercise, cardiac output will increase. Figure 1.2 showsnormal human heart with is chambers.Figure 1.2 Normal Human Heart


51.3 ECG (Electrocardiogram)When the heart muscle cells contracts to make heart pumps the blood, itgenerates an action potential which spread currents throughout the body. In various parts<strong>of</strong> the body, different electrical potential were produced and this differences can berecorded by using surface electrodes attached to the skin. These waveforms are calledelectrocardiogram (ECG)Figure 1.3 : Typical ECG WaveformTypically, ECG signal is measured from left arm to right arm and the waveformmeasured usually as shown in Figure 1.3 ECG signal consist <strong>of</strong> P wave, QRS complex,and a T wave which is normally visible in every ECG signal measured. P wave occurduring normal atrial depolarization when the main electrical vector is directed from the


6SA node towards the AV node and spreads from right atrium to left atrium. It usuallyoccurs within 80 ms.PQ intervals are measured from beginning <strong>of</strong> P wave to the beginning <strong>of</strong> QRScomplex. This interval shows the time required for electrical impulse to travel to sinusnode through AV node and entering ventricles. The duration is between 120 to 200ms.QRS complex shows rapid depolarization <strong>of</strong> right and left ventricles. It usually occursbetween 80 to 1120 ms. Lastly, T wave represent the repolarization, in other word arecovery phase <strong>of</strong> ventricles. Figure 1.4 shows the condition <strong>of</strong> the heart during the fullcycle and the nodes <strong>of</strong> ECG.Figure 1.4 Heart Condition and ECG Nodes


71.4 Problem StatementThe number <strong>of</strong> people in the world that faced with illness such as heart isincreasing year by year based on the estimation by the World Health Organization(WHO). Hence, we should take serious about the issue <strong>of</strong> health care with monitoringfor medical purposes. Currently, body area network (BAN) is usually attached to thepatient’s body using cables. Thus, patients are usually required to lie down or sit in placewith the ECG machine. The doctors that monitor the patient’s health through signal fromthe ECG machine also need to be close with the machine. So, <strong>wireless</strong> system thattransfer the ECG signal for health monitoring is need to be developed.Another problem that arises is the signal that will be sent to the doctor throughthe <strong>wireless</strong> medium is only for a patient. Thus, more display unit or monitor is neededfor more patients. This will increase the cost for the patient health monitoring. To solvethis problem, the <strong>wireless</strong> multichannel <strong>transmitter</strong> has to be <strong>design</strong>ed. This means thatthe monitor that display the ECG signal is received from many different patients. Inother word, a doctor can monitor many different patients that use the device from adisplay unit.


81.5 ObjectiveThe objective <strong>of</strong> the project is to <strong>design</strong> a <strong>wireless</strong> multichannel ECG <strong>transmitter</strong>.Each ECG <strong>transmitter</strong> will transmit one signal and each ECG receiver will receive oneECG signal. After that, the signals that come from many different <strong>transmitter</strong> andreceiver will be displayed on one monitor.1.6 Scope <strong>of</strong> ProjectThe scope <strong>of</strong> the project is the <strong>transmitter</strong> <strong>design</strong> for home use and the patient isconsidered to be in static condition. The <strong>design</strong> consists <strong>of</strong> hardware <strong>design</strong> and s<strong>of</strong>tware<strong>design</strong>. For the hardware <strong>design</strong>, the ECG circuit will be developed. The <strong>wireless</strong>module that will be used is XBee.For s<strong>of</strong>tware <strong>design</strong>, the Arduino S<strong>of</strong>tware and X-CTU s<strong>of</strong>tware is used tosetting the Arduino board and XBee transceiver respectively.


9CHAPTER 2LITERATURE REVIEW2.1 IntroductionThis chapter will discuss about electrocardiogram and nodes that represent theheart aactivation. Next, this chapter also discusses about <strong>wireless</strong> network that availablefor the <strong>design</strong>..


102.2 Electrocariogram NodesAn electrocardiogram is device that records the electrical current moving throughthe heart during a heartbeat. The current’s movement is divided inti few parts. Theillustration <strong>of</strong> an ECG period can be seen in Figure 2.1.Each heartbeats begins with an impulse from the heart’s pacemaker; sinoartrialnode. The impulse activates the upper chambers <strong>of</strong> the heart (atria). The P wave showsactivation <strong>of</strong> the atriaAfter that, the electrical current flows down to the lower chambers <strong>of</strong> the heart(ventricles). The QRS complex shows activation <strong>of</strong> the ventricles.The electrical current then spreads back over the ventricles in the oppositedirection. This activity is called the recovery wave, which is represented by the T wave.


11Figure 2.1 ECG Period P-QRS-T2.3 Wireless NetworkThere are many <strong>wireless</strong> sensor networks that exist. Each <strong>of</strong> the can becharacterized by their data rates and power consumption requirements. Figure 2.2 belowprovide an overview <strong>of</strong> the <strong>wireless</strong> networking standards which are currently available.


12This project focus on low rate <strong>wireless</strong> personal area networks, shown on thebottom left <strong>of</strong> Figure 2.2.Figure 2.2 IEEE Wireless NetworksThere are many low rate <strong>wireless</strong> networking standards available today. Some <strong>of</strong>them focus on specific application areas, such as industrial automation, environmental,monitoring, home automation and more recently, healthcare monitoring.The <strong>design</strong> is using this network module, IEE 802.15.4 because its scalability todata rates, longer range, and lower power consumption and cost.


13For the project, XBee is chosen because it is in the same range <strong>of</strong> powerconsumption and data rates for IEE 802.15.4.


14CHAPTER 3METHODOLOGY3.1 IntroductionTo fulfill the objectives, the process is accomplished through the <strong>design</strong>ation andimplementation. The project start by gathering all the information needed for thehardware development and s<strong>of</strong>tware development. Figure below show the overview <strong>of</strong>the transmission part. After the data have been transmitted, the ECG signal will displayon the LABView for each <strong>of</strong> the signals on one monitor.


15Figure 3.1 : Overview <strong>of</strong> the Transmission Part3.2 Hardware DevelopmentFigure 3.2 below shows the flow chart <strong>of</strong> the hardware development on the<strong>design</strong> <strong>of</strong> the <strong>wireless</strong> ECG <strong>transmitter</strong>.


16Figure 3.2 Hardware Development3.2.1 ECG CircuitTo meet the requirement <strong>of</strong> the ECG circuit, a cascaded circuit has been<strong>design</strong>ed, which consists <strong>of</strong> a Differential Amplifier, a Low Pass Filter and a gain stage.The order <strong>of</strong> these stages is based on the consideration <strong>of</strong> reducing noises.


17Figure 3.3 Example <strong>of</strong> the noise reduction in cascaded systemFigure 3.3 is the placement <strong>of</strong> the cascade <strong>design</strong>, which is on the basis <strong>of</strong>placing high gain stages early in the signal path. However, the High Pass filter stageshould be placed immediately after the differential amplifier to chop <strong>of</strong>f the DCcomponent <strong>of</strong> its output. Otherwise, this DC component will be amplified by thefollowing op-amps.Figure 3.4 below shows the full ECG circuit <strong>design</strong> for the system.


18Figure 3.4 ECG Circuit3.2.2 Arduino DuemilanoveThe Arduino Duemilanove is a microcontroller board based on the ATmega168or ATmega328. It has 14 digital input and output pins <strong>of</strong> which 6 can be used as PWMoutputs, 6 analog inputs, a 16 MHz crystal oscillator, USB connection, a power jack, anICSP header, and a reset button. It contains everything needed to support themicrocontroller by simply connect it to a computer with a USB cable or power it with aAC-to-DC or battery to get started.


19The Arduino Duemilanove has a number <strong>of</strong> facilities for communicating with acomputer, another Arduino, or other microcontroller. The ATmega328 and ATmega168provide UART TTL (5v) serial communication, which is available on digital pins (RX)and 1 (TX). An FTDI FT232RL on the board channels this serial communication overUSB and FTDI drivers provide a virtual com port to s<strong>of</strong>tware on the computer. The RXand TX LEDs on the board will flash when data is being transmitted via the FTDI chipand USB connection to the computer.Figure 3.5 shows the Arduino Duemilanove that has been used for the project.Figure 3.5 Arduino Duemilanove


203.2.3 XBeeXBee RF modules are embedded <strong>wireless</strong> end-point connectivity to devices.These modules use the IEE 802.15.4 networking protocol for fast point to multipoint orpeer to peer networking. They are <strong>design</strong>ed for high throughput application requiringlow latency and predictable communication timing. The feature <strong>of</strong> XBee are 2.4 GHzoperating frequency, 1Mw output power, can achieved up to 100m range, advancednetworking and operates with supply voltage between 2.8V to 3.4V. Figure 3.6 showsXBee modules that have been used.Figure 3.6 XBee RF Modules


213.3 S<strong>of</strong>tware DevelopmentFigure 3.7 below shows the s<strong>of</strong>tware development <strong>of</strong> the project using Arduinos<strong>of</strong>tware and X-CTU s<strong>of</strong>tware.Figure 3.7 S<strong>of</strong>tware Development


223.3.1 Arduino S<strong>of</strong>twareArduino can sense the environment by receiving input from a variety <strong>of</strong> sensorsand can affect its surroundings by controlling lights, motors, and other actuators. Themicrocontroller on the board is programmed with the Arduino s<strong>of</strong>tware. Select “ArduinoDuemilanove w/ATmega328” from the Tools > Board menu. The ATmega328 on theArduino Duemilanove comes preburned with a bootloader that allows to upload newcode to it without the use <strong>of</strong> an external hardware programmer. Arduino projects can bestand-alone or they can communicate with s<strong>of</strong>tware running on a computer.Rather than requiring a physical press <strong>of</strong> the reset button before an upload, theArduino Duemilanove is <strong>design</strong>ed in a way that allows it to be reset by s<strong>of</strong>tware runningon a connected computer. The bootloader can have a shorter timeout, as the lowering <strong>of</strong>DTR can be well-coordinated with the start <strong>of</strong> the upload.set 10.Basedd on Figure 3.8, the baud rate that have been used is 9600 and the delay is


Figure 3.8 Arduino S<strong>of</strong>tware23


243.3.2 X-CTU S<strong>of</strong>twareX-CTU s<strong>of</strong>tware is the s<strong>of</strong>tware that used to program the XBee transceiver. Byusing this s<strong>of</strong>tware, we can set two XBee module to communicate by setting the samePAN ID. For this project, there are four XBee transceiver module that have been used,so there are two different PAN ID.For display the data at the receiver part, the COM also have to be set. Since forthe project only transmit two ECG signals, so there’s only two different serial USB port(COM) to be set. Figure 3.9 and Figure 3.10 shows the X-CTU s<strong>of</strong>tware to set thePan ID and serial USB port (COM) respectively.


Figure 3.9 X-CTU S<strong>of</strong>tware25


Figure 3.10 XCTU S<strong>of</strong>tware26


27CHAPTER 4RESULT AND DISCUSSION4.1 IntroductionThis chapter discusses on some <strong>of</strong> the important results and analysis highlightingthe capability <strong>of</strong> the s<strong>of</strong>tware and hardware built. For any project that is to be declaredworking, accurate and ready for release, several tests or run through have to beperformed. Once confirmed for its capability and reliance, then only a project validatedas complete. Thus, in the highlight <strong>of</strong> this ECG <strong>transmitter</strong>, the device has been throughsome test and evaluation.


284.2 Circuit DesignThe ECG simulator is used in this project to produce the same signal as if it camefrom human heartbeat. Figure 4.1 shows the ECG simulator that has been used for theproject. After that, the signal needs to be amplified and filtered using ECG circuit.Figure 4.2 and Figure 4.3 shows the implementation <strong>of</strong> the ECG circuit for the project.Figure 4.1 ECG Simulator


29Figure 4.2 ECG Circuit 1Figure 4.3 ECG Circuit 2


304.3 Hardware ImplementationFigure 4.3 shows that the ECG signals before it went to the <strong>transmitter</strong>. Theoutput <strong>of</strong> the ECG circuit is fed into oscilloscope for checking. Based on the result, bothsignals picture the real ECG signal because we can see all PQRST nodes.Figure 4.4 ECG signal at Oscilloscope 1


31Figure 4.5 ECG Signal at Oscilloscope 2Figure 4.6 and Figure 4.7 are showing the connection between XBee andArduino Duemilanove for the <strong>transmitter</strong> and receiver respectively. For the project, t<strong>of</strong>ulfill the project objective which <strong>design</strong>ing multichannel <strong>transmitter</strong>, there are 2 pairs <strong>of</strong>XBee (<strong>transmitter</strong> and receiver) and both pairs have identical connection with ArduinoDuemilanove and computer.


32Figure 4.6 XBee (Transmitter)Figure 4.7 XBee (Receiver)


334.4 S<strong>of</strong>tware ImplementationTo make sure that two XBee can communicate, the Pan ID need to be set andFigure 4.8 shows the result after the Pan ID have been set. The data that have been typedon the right side can transmit to the left side and vice versa. It shows that the connectionbetween 2 XBee is successful.Figure 4.8 Pairing the XBee


34CHAPTER 5CONCLUSION5.1 IntroductionEvery project must come with the conclusion. In this last chapter, we will seethe conclusion <strong>of</strong> Design <strong>of</strong> Wireless ECG Transmitter. Next, the recommendation forfurther work <strong>of</strong> this project also being discussed.


355.2 ConclusionAs conclusion, the project is successful because the ECG <strong>transmitter</strong> is capable<strong>of</strong> transmit ECG signal. Different user can use different ECG can use different<strong>transmitter</strong> and the signal from different people can be display on one monitor. The ECGcircuit able to detect the ECG signal from RA and RL and combine it to single, normalECG signal as seen on the oscilloscope.5.2 Recommendation for Future WorkThis project can be improved by using other method as well.I. By using transceiver that can receive more than one signal such as XBee series 2which is called star network topology.II. By using cheaper transceiver module that cheaper for saving the cost such asNordic nRF24Lo1 module.III. Improve the ECG circuit because there’s a lot <strong>of</strong> noise during the transmission.


36REFERENCES1. H. Fariborzi, M. Moghavvemi, S. Mehrkanoon (2007). Design <strong>of</strong> a Low-powerMicrocontroller-based Wireless ECG Monitoring System. The 5th Student Conference onResearch and Development (SCOReD). 11-12 December. University <strong>of</strong> Malaya, Malaysia.2. Thomas J. Nowak, A. Gordan Handford (2004). Pathophysiology : Concept andApplications for Health Care Pr<strong>of</strong>essionals. (3rd ed.). New Work, America: The Mc Graw-Hill Companies, Inc.3. Haslinah binti Mohd Nasir (2008). Home Based Medical Care Through WirelessBiomedical Sensor Network (WBSN). B. <strong>Electrical</strong> <strong>Engineering</strong> Thesis. Universiti TeknologiMalaysia, Skudai.4. Brenda M. Beasley, Michael C. West (2003). Understanding 12-lead EKGs. (2nd ed.).Upper Saddle River, New Jersey: Prentice Hall.5. Patrick O. Bobbie, Chaudary Zeeshan Arif, Hema Chaudhari, Sagar Pujari,Electrocardiogram (EKG) Data Acquisition and Wireless Transmission, SouthernPolytecnic State Universiti.6. Joseph Dubovy (1978), Introduction Biomedical Electronics. United State, America.McGraw-Hill, Inc7. P.E. Ross, “Managing care through the air,” IEEE Spectrum, vol.41, no.12, pp. 26- 31,dec.2004


378. Nor Syahidatul Nadiah Ismail, Sharifah H. S. Ariffin and Mohd Rozaini Abd Rahim,Norsheila Fisal, TRG Wireless ECG Sensor for Medical Healthcare Application, 2008Student Conference on Research and Development (SCOReD 2008), 26-27 Nov. 2008,Johor, Malaysia.9. Rodriguez, J. Goni, A. Dranca, L. Burgos, A. Illarramendi, A., MOLEC: anywhere and atany time arrhythmia classification, Computers in Cardiology, 25-28September, 2005 pp 607– 610.10. C. Rodriguez, S. Borromea, R. de la Prieta, J. A Hernandez, N.Malpica. Wireless ECGBased on Bluetooth Protocol: Design and Implementation, Universidad Rey Juan Carlos.11. Rozeha A. Rashid, Nur Hija Mahalin, Mohd Rozaini Abd Rahim ,Mohd. Adib Sarijari,“Home-based Healthcare Monitoring over Wireless Biomedical Sensor Network”,Department <strong>of</strong> Telecommunication and Optics, <strong>Faculty</strong> <strong>of</strong> <strong>Electrical</strong> <strong>Engineering</strong>.Unpublished.14. Ahmad Shahrin Ramli, “Design Of Wireless Sensor Network For EnvironmentalMonitoring (Wisnem)”, B. <strong>Electrical</strong> <strong>Engineering</strong> Thesis. Universiti Teknologi Malaysia,Skudai.


38APPENDIXSource Code for Wireless ECG Transmitter (Arduino)const int BPM = A1;void setup(){Serial.begin(9600);pinMode (BPM, INPUT);delay (1000);}void loop(){int BPM = analogRead(A1);delay (10);Serial.println(BPM);}

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!