MINIATURIZED ELECTRONIC CIRCUIT FOR AMPLIFICATION AND WIRELESS TRANSMISSION OF ECG SIGNAL LIM AI JIA UNIVERSITI TEKNOLOGI MALAYSIA PSZ 19:16 (Pind. 1/07) PSZ 19:16 (Pind. 1/07) MINIATURIZED ELECTRONIC CIRCUIT FOR AMPLIFICATION AND WIRELESS TRANSMISSION OF ECG SIGNAL LIM AI JIA A thesis submitted in fulfillment of the requirements for the award of the degree of Bachelor of Engineering (Electrical-Medical Electronics) Faculty of Electrical Engineering Universiti Teknologi Malaysia JUNE 2014 v vi TO MY BELOVED PARENTS, FAMILY MEMBERS, SUPERVISOR AND FRIENDS vii ACKNOWLEDGEMENT During the period of completing my Final Year Project, I have received a lot of help, guidance and support from many people. Hence, I would like to express my heartfelt gratitude to them for helping me in completing my Final Year Project and thesis. Firstly, I would like to express my sincere appreciation and thankfulness to my Final Year Project’s supervisor, Dr. Eileen Su Lee Ming for the valuable guidance and advice. Her patience, enthusiasm and immense knowledge have motivated me and bring me to the road of success. My sincere appreciation also goes to my beloved family who has given me support, encouragement and care throughout my academic years. Besides that, I would like to thank my friends and course mates who shared knowledge with me and always supported and encouraged me to go through all the tough period. Furthermore, I also would like to thank my academic advisor, Dr. Fauzan Khairi Che Harun, who shared knowledge and always support me. He also gives me encouragement and care throughout my academic years. Lastly, I would like to express my gratitude to all the lecturers, tutors and those who have directly or indirectly helped me in completing my Final Year Project. viii ABSTRACT Some patients with cardiovascular problems have to wear ECG Holter to record their heart rhythm for a prolonged period, up to 48 hours. The Holter receives electric signals from the heart via a series of electrodes attached to the chest area. The Holter can be worn on a patient’s belt or hung around the neck, while keeping a log of the heart’s electric activity. Wearing Holter over prolonged period is burdensome and cumbersome, especially with many attached dangling wires. If the recorded data can be made available to the cardiologist via the Internet, without having the patient to move out of their home, it will be much more convenient for the patients, and reduce their waiting hours at the hospital. Detection of problems can be made earlier because reviewing of ECG by the cardiologist no longer depends on availability and agreeable time slots as it can be done conveniently anytime, anywhere. The Holter is an expensive device, limiting its use to a small group of individuals who typically rent it from the hospitals. If more individuals can monitor their heart rhythm, this may help in early detection of cardiac problems for those who would not normally have a check-up at the hospitals or who would have missed out on recordings due to limited availability of Holter. Regular screening of the heart not only to prevent heart attack, but also to prevent stroke. This project aims to improve the conventional Holter by developing a portable ECG circuit that can support up to 3 electrodes and can transmit data wirelessly to smart phone. A small-sized electrical circuitry will be fabricated to obtain data from the electrodes and transmitting them via Bluetooth to the phone. The data collected can be uploaded to cloud storage for further diagnosis. ix ABSTRAK Sesetengah pesakit dengan masalah kardiovaskular perlu memakai ECG Holter untuk mencatat rentak jantung mereka untuk tempoh yang panjang, iaitu sehingga 48 jam. Holter menerima isyarat elektrik dari jantung melalui siri elektrod yang dipasang di bahagian dada. Holter boleh dipakai pada tali pinggang pesakit atau digantung di leher , sambil mengekalkan log aktiviti elektrik jantung. Penggunaan Holter dalam tempoh yang berpanjangan adalah membebankan dan rumit, terutamanya dengan banyak wayar tergantung. Jika data yang direkodkan boleh diberikan kepada pakar kardiologi melalui Internet , tanpa pesakit melangkah keluar dari rumah mereka , ia akan menjadi lebih mudah bagi pesakit, dan mengurangkan masa mereka menunggu di hospital. Pengesanan masalah boleh dibuat lebih awal kerana analisis ECG oleh pakar kardiologi tidak lagi bergantung kepada masa yang dipersetujui kerana ia boleh dibuat dengan mudah pada bila-bila masa dan di mana-mana sahaja. Holter adalah alat yang mahal, ini menghadkan penggunaannya kepada sekumpulan kecil individu yang biasanya menyewa dari hospital. Jika lebih ramai individu boleh memantau rentak jantung mereka, ini boleh membantu dalam pengesanan awal masalah jantung bagi mereka yang biasanya tidak akan membuat pemeriksaan di hospital atau yang tidak dapat merakam rentak jantung kerana Holter adalah terhad. Pemeriksaan berkala jantung bukan sahaja untuk mencegah serangan jantung tetapi juga untuk mencegah strok. Projek ini bertujuan untuk menambah-baik Holter yang sedia ada dengan membangunkan ECG litar mudah alih yang boleh mengambil data sehingga 3 elektrod dan boleh menghantar data secara wayarles kepada telefon pintar. Satu litar elektrik bersaiz kecil akan direka untuk mendapatkan data dari elektrod dan menghantar data tersebut melalui Bluetooth ke telefon. Data yang dikumpul boleh dimuat naik ke penyimpanan awan untuk diagnosis lanjut. x TABLE OF CONTENTS CHAPTER 1 TITLE PAGE TITLE PAGE i DECLARATION ii DEDICATION iii ACKNOWLEDGEMENT iv ABSTRACT v ABSTRAK vi TABLE OF CONTENT vii LIST OF TABLES x LIST OF FIGURES xi LIST OF ABBREVIATION xiii LIST OF APPENDICES xiv INTRODUCTION 1 1.1 Background 1 1.2 Problem statement 7 1.3 Objectives 7 1.4 Scope 7 1.5 Outline of thesis 8 xi 2 3 LITERATURE REVIEW 9 2.1 Introduction 9 2.2 Existing technologies 11 2.3 Principals for digital vital signs monitoring solutions 15 2.3.1 Introduction 15 2.3.2 Sampling frequency 16 2.3.3 Resolution 16 2.3.4 Health and safety issues of Bluetooth 18 RESEARCH METHODOLOGY 20 3.1 Introduction 3.2 Circuit design 3.2.1 Wireless transmission 3.2.2 Bluetooth coding 4 20 21 30 38 RESULTS AND DISCUSSIONS 41 4.1 Introduction 41 4.2 Result and discussion of designed circuit 41 4.3 Comparison among ECG Arduino UNO shield 46 and custom-designed circuit 5 CONCLUSION AND FUTURE WORK 48 5.1 Introduction 48 5.2 Conclusion 48 5.3 Future work 49 xii 6 PROJECT MANAGEMENT 50 6.1 Introduction 50 6.2 Project schedule 51 6.3 Cost 52 REFERENCES 53 - 55 Appendices A-B 56 – 58 xiii LIST OF TABLES TABLE NO. 1.1 TITLE PAGE 10 Principal Causes of DEATH in Ministry 2 of Health, (MoH) Hospital 2011 1.2 Competitors in the market 6 2.1 Representation of measured analogue 17 values and their corresponding digital values 2.2 Comparison of digital resolution and 18 incremental resolution for an analogue signal of ±2mV 2.3 Advantage and disadvantages of competing technologies with Bluetooth 18 6.1 Project Gantt Chart (semester one) 50 6.2 Project Gantt Chart (semester two) 50 6.3 Cost Estimation for ECG Circuit 51 6.4 Cost Estimation for ECG Arduino Shield 51 xiv LIST OF FIGURES FIGURE NO. TITLE PAGE 1.1 ECG Holter 6 2.1 Overview of echocardiography 13 2.2 ECG 13 2.3 ECG Holter 14 2.4 Sampling of the analogue ECG - curve, where 16 important parameters as Sampling interval and Resolution are shown. 3.1 Flowchart of workflow 21 3.2 Concept of data transmission in ECG Holter 22 3.3 Configuration of instrumentation amplifier, chip INA 23 128 3.4 Configuration of second amplifier, chip OP27P 24 3.5 Configuration of adder 25 3.6 Configuration of notch filter 26 3.7 Circuit design by using Multism software 27 3.8 Build-up ECG circuit 28 3.9 Tested the ECG circuit with ECG module and patient 28 simulator 3.10 Soldered circuit 28 3.11 Operation flow for ECG Holter modeling uses wireless 30 system 3.12 Arduino UNO R3 31 3.13 Bluetooth module 31 3.14 Connection of BlueBee Bluetooth module with 31 Arduino UNO R3 xv 3.15 Arduino IDE 32 3.16 Connection of soldered circuit with Arduino and Test 32 3.17 Test with real subject 33 3.18 PCB designed 33 3.19 1st cover designed 34 3.20 Printed 1st cover designed 35 3.21 2nd top cover designed 36 3.22 2nd bottom cover designed 36 4.1 Result of communication between Bluebee module and 40 computer 4.2 Simulation result without adder and notch filter 41 4.3 Simulation result with adder and notch filter 42 4.4 Signal displayed on oscilloscope without adder and 43 notch filter 4.5 Signal displayed on oscilloscope with adder and notch 43 filter 4.6 Signal displayed on window phone 44 4.7 ECG Arduino Shield 45 4.8 Connection of ECG Arduino shield with Arduino and 46 Bluetooth module 4.9 Comparisons of results 46 xiii LIST OF ABBREVIATION ECG - Electrocardiograph CVD - Cardiovascular disease WHO - World Health Organization MI - Myocardial infarction MoH - Ministry of Health CHF - Congestive heart failure AHA - American Heart Association IHD - Ischaemic heart disease CMR - Cardiovascular magnetic resonance EBCT - Electron-beam computed tomography 3D - Three-dimensional CAC - Coronary artery calcification CMRR - Common-mode rejection ratio IDE - Integrated development environment xiv LIST OF APPENDICES APPENDIX A TITLE Source code for Arduino UNO R3 PAGE 51 (communication between computer and Bluebee module) B Source code for Arduino UNO R3 (communication between smart phone and Bluebee module) 53 xv CHAPTER 1 INTRODUCTION 1.1 Background Cardiovascular disease refers to any disease involving the heart and its vasculature, including heart rhythm abnormalities, coronary disease, myocardial infarctions and heart failure. It is a symptom where there are irregularities of the heart rhythm. This disease is a class of disease involving the heart, blood vessel or both (Rankin & Bhopal, 2001). Cardiovascular disease was the number killer in the world by the year 2004 and there was no way to tell unless the patient get tested at the hospital (Mathers, Fat, & Boerma, 2008). According to World Health Organization (WHO) report 2004, the number of global death due to cardiovascular diseases is approximately 17 million (30%) people per annum. In Malaysia, around 25.64%, approximately 7.4 million patients, die of cardiovascular problem. This statistic also shows that the cardiovascular disease is the major life threatening disease compared to other diseases. Hence, many technologies and diagnostic tools are developed in order to assist doctors in diagnosis and recommend patient with suitable therapy such as Electrocardiogram (ECG) Holter, pacemaker, defibrillator and others ("Health Fact 2012," JULY 2012). 2 Table 1.1 : 10 Principal cause of death in Ministry of Health Malaysia (MoH) Hospital 2011("Health fact 2012," JULY 2012) No Types of diseases Percentage of death 1 Diseases of the circulatory system 25.64% 2 Diseases of the respiratory system 19.48% 3 Certain infectious and parasitic diseases 17.02% 4 Neoplasms 11.12% 5 Diseases of the digestive system 5.18% 6 Injury, poisoning and certain other consequences 5.03% of external causes 7 Diseases of the genitourinary system 4.40% 8 Certain conditions originating in the perinatal 3.74% period 9 Endocrine, nutritional & metabolic Diseases 1.88% 10 Diseases of the nervous system 1.77% One of the common cardiovascular diseases is atrial fibrillation (AF). AF is the major cause of stroke. People with AF are 5 times more likely to have a stroke. About 15% of strokes are caused by AF ("Atrial Fibrillation," 2014). WHO reported that there were 15 million people suffer strokes worldwide every year and among this 15 million, 5 million died and another 5 million were permanently disabled ("World Health Report," 2002). 3 ECG Holter is a portable heart rhythm monitoring device used to record heart rhythm while patients conduct their daily activities. This device can continuously monitor the heart rhythm up to 24 hours or more (Leijdekkers, Gay, & Barin, 2009). Electrodes were attached to the patient’s chest during monitor their heart rhythm by using ECG Holter. Before this, the ECG data is recorded in the memory card or cassette for further diagnosis and there were limited memory spaces available in the cassette and memory card. When the storage is full, a patient has to replace it with a new one or with the current new technologies; the patient could transfer the data via telephone in order to clear the storage. Next, patients need to report to their cardiologist to obtain feedback. This means the patient has to move in and out of the hospital routinely and this could be very troublesome and inconvenient for them, especially for those who having difficulty travelling. Some patient will rent from the hospital. However, there were limited devices supplied to the hospital due to the high cost of the device. Patients who are unable to rent the device cannot get diagnosed, and they have to wait until the devices were available to rent. This is not efficient, risky and life-threatening because heart disease is a very dangerous disease. If each patient can own monitoring unit, then this may change their fate. The aim of this project is to improve the existing ECG monitoring system with the aid of wireless data transmission such as Bluetooth. With the addition of Bluetooth and phone application, emergency situation such as an onset of heart attack and fast palpitations can be identified in time. Therefore, appropriate treatment or medication can be administered immediately before it is too late. For patients with cognitive and physical disabilities, it is quite difficult for them to meet and report regularly with their cardiologist. They normally need their family member to fetch and help them to get to their hospital appointments. The wireless data transmission feature allow cardiologists to access patients’ data via internet or cloud storage, without having the patient to be physically present at the hospital. Patients can choose to upload the ECG signal recorded to their cardiologist at a specific time. This is a convenient way for them 4 because they do no need to go to hospital unless necessary. In a way, this helps to reduce hospital congestion and make medical care much more efficient. Bluetooth is implemented in this study is because it is inexpensive, wireless and easy to use. The device will pair with selected device and security aspect can be embedded in the software such as authentication and encryption. An authentication means that only the authorized sender or receiver can connect to the specific Bluetooth device. This can protect the privacy of the patients whereby their sensitive data will keep confidential. Furthermore, it is more immune to the interference from microwave ovens and other source of radio frequency (RF) as compared to other wireless technologies. All these appliances are commonly found at home and if the signal interfaces with ECG signals, the signal obtained will be less accurate. Since patients mostly spend their time at home or at work, if signal is unclear, the diagnosed result also will be inaccurate (Erasala & Yen, 2002). Another benefit of this system is the capability to log on daily activities of patients. Daily activity log available in the phone application helps in identifying the abnormal pattern of the ECG signal and a more precise inference can be made in the specific condition and to take proper precaution to avoid another occurrence. Target users for this device are: i. Healthcare professionals: Professions like physician, cardiologist and other medical staff which responsible for constantly observing the condition of the old and chronically ill patients. This range of the group can give emergency treatment in case of emergency situation. ii. Care givers: Examples of this range of the group are baby-sitters, family members of patients and as well private nursing that need to monitor the conditions of the patient regularly. iii. Elderly and chronically ill patient: This group included patient with cognitive and physical disabilities like downs syndrome, eye impairment, cerebral palsy 5 and others. Aging people with movement difficulties also included in this group. iv. Children: This range of a group is still very young and was unable to take care of themselves; for example, babies, infants, toddlers or those who are more grown up but still need continuously monitored.(Alemdar & Ersoy, 2010). The main consideration in design this ECG monitoring system is to reduce the risk faced by patients. The most essential requirement to design a bio-potential amplifier is the patient’s safety and protection against interference. There were three electrodes are used in biopotential amplifier whereby two of them are used for biopotential signal while another one is for driven right leg (DRL) feedback. The DRL greatly reduces the common mode signal from the patient caused by power line interference. However, if the feedback current induced is not reduced to a safety level, it may threaten the patient’s life (Wang, 2012). The next consideration is portability and mobility. Since a patient need to wear this ECG Holter for a long time period, hence that is essential to increase the degree of mobility of the device so that it will not limit the movement and activities carried out by patients. Bluetooth module and smart phone application is one of the ways to increase the degree of mobility. Other than that, decreasing the weight of the device also increase the portability of the device. It decreased the burden on the patients. The patients will get exhausted easily if they have to carry a heavy device while conducting their daily activities. Hence, they will prefer to rest at home instead of going out (Alemdar & Ersoy, 2010). Available Holters in the market include Omron HCG-801 Portable ECG Monitor (RM795.00)[8], SEER XT (RM1571.02) and DL 800 Braemar (5245.08). Most Holters are quite heavy and this may become the burden of the patients. For example, Omron HCG-801 Portable ECG Monitor weighs 350 gram and SEER XT weighs 439gram. Carrying a heavy device for prolonged period is a tiring task. Hence, by implementing 6 this miniaturized electronic circuit for amplification and wireless transmission of the ECG signal can help the patients solve some of the problem faced by them. Table 1.2 : Competitors in the market Products Weight Cost Able to transmit data wirelessly Omron HCG-801 Portable ECG Monitor (http://www.medisave.co.uk/om ron-hcg801-heartscan-ecgmonitor-p-7020.html) 350 grams RM795.00 No SEER XT (http://www.medwow.com/used -ecg-holter/marquette/seerxt/573138466.item) 439 grams RM1571.02 No DL 800 Braemar (http://www.braemarinc.com/di gital.html) 112 grams RM5245.08 No Figure 1.1 ECG Holter 7 1.2 Problem Statement ECG Holter is a device used to record the heart rhythm of cardiovacular patients during their daily activities. However, wearing ECG Holter causes the physical discomfort and is burdensome to users as they have to bear the weight over a prolonged period over the neck or on a belt underneath a shirt with many dangling wires. Furthermore, ECG data cannot be transmitted wirelessly. The ECG Holter in the market is expensive and it is a burden for the low income patients. 1.3 Objectives The main objective of this project is to develop a mini sized ECG circuit, which is light in weight and with few dangling wires. In addition, the circuit transmit data wirelessly via Bluetooth and is low-cost ECG Holter without affecting the data obtained. 1.4 Scope The scope of this project is to develop an ECG circuit, which can transmit data wirelessly to smart phone via Bluetooth. This project aims to design an ECG circuit with a low-cost material to make it affordable to many. In addition, this ECG circuit has to be ligh-weight and with less dangling wires. 8 1.5 Outline of Thesis Chapter 1 covers the introduction of the report, which provides an overview of the study with the background of the study, problems, objectives and scope. Chapter 2 reviews existing work and discusses about the existing technique used to detect heart disease. Besides that, various types of cardiovascular disease also will be discussed. Chapter 3 discusses about the methodology including the work flow on how the device works. In chapter 4, result and discussion are presented. A discussion based on the result was made in order to analyze the signal obtained. Chapter 5 present overall outcome of the study and recommends some future works. Chapter 6 is about the project management. In this chapter, the Gantt chart is presented. Other than that, the cost considerations are also presented in this chapter. CHAPTER 2 LITERATURE REVIEW 2.1 Cardiovascular Problems Chronic heart disease is a pathophysiological problem causing inability of the heart to pump blood at an adequate rate in order to supply blood to the organs and tissues with oxygen (D. G. Barrett, Mark Quinn, Tom, 2006). Cardiovascular disease (CVD) is a syndrome characterized by high mortality. According to the World Health Organization’s (WHO’s) Atlas of Heart Disease and Stroke (WHO 2004), approximately 17 million of people die from CVDs every year as a result of acute myocardial infarction (MI) and stroke. In 2011, Ministry of Health (MoH) Malaysia conducted a research on the ten principal causes of death in Malaysia. From the data collected, cardiovascular diseases were ranked the number one killer in Malaysia. Around 26 % ( 7.5 million) of 29 million of the populations died because of CVD (WHO 2004). Furthermore, coronary heart diseases is estimated to increase by 83% in developing countries (D. G. Barrett, Mark Quinn, Tom, 2006). Heart disease is a disease that may inflict any one of us. Its symptoms like anxiety, chest discomfort, shortness of breath and others may bring a large impact on the patient’s daily activities. There were many types of heart diseases, and the symptoms varied accordingly. Congestive heart failure (CHF) is one of the common heart diseases. It is a state of abnormality of the cardiac. According to American Heart Association (AHA), this is a disease where the heart muscle of the patient is weak or there is a defect in the heart. 10 Hence, less blood will be received at the kidney, and less fluid will be excreted from the circulation. The excessive fluids will be built up in the lungs, liver, around eyes, and sometimes in the leg. The collection of excessive fluid in specific parts of the organs may lead it to swell and it also greatly shortens patient’s life. In the US, CHF is the major burden on families and the health care system. Thom and Kannel (1997) said that about 5 million of people have CHF and it is the leading disease in hospitalizations of persons aged 65 years and over. 13% of all deaths in 1993 were due to CHF and health care expenditures amounted to USD17.5 billion in 1993. Hypertension patients attributed to the higher risk of CHF, the next is myocardial infarction patient and subsequently followed by diabetes patients. An early detection of hypertension, myocardial infarction and early treatment has been proven effective but these are not done, possibly due to little awareness among the society (Thom & Kannel, 1997). “Ischaemic” means “blood supplied reduced” where the coronary artery was blocked by plaque and blood clot. Ischaemic heart disease (IHD) greatly reduces the supply of blood to the heart muscles and hence insufficient oxygen is transferred to the body organs for metabolic purposes. When the plaques increase in size, it will clog and block the artery thereby heart attack is occurring. The main cause of getting IHD is dependent on our daily dietary habit. There was distinct of dietary habit in the different country, hence the mortality from this disease varied among distinct countries. Most of the industry increases the content of sodium and decreases the content of potassium and magnesium in processing foods. The imbalance of diet taken may cause the development of arterial hypertension. This disease is the major risk factor of IHD, hence the distorted electrolyte composition of our diet can be considered as an important cause of this disease. Diuretic-induced can be used to excrete the sodium taken. However, it will further decrease the concentration of potassium and magnesium needed. The fall of the concentration of potassium and magnesium may increase the mortality from IHD by predisposing the heart to fatal (Karppanen, 1984). Atrial Fibrillation (AF) is one of the cardiovascular problems. This is a chronic disease which may cause substantial morbidity. The main causes of getting AF include 11 myocardial infarction, diabetes, rheumatic and nonrheumatic, valve disease, hypertension, and age (Benjamin et al., 1998). AF patients have a higher chance of getting a stroke. This is due to the effect of increasing blood pressure that happens during stroke (Wolf, Abbott, & Kannel, 1991). 2.2 Existing Technologies Many equipment and technologies are currently available to detect cardiovascular diseases. One of the earliest methods to visualize the cardiac is created by using X-ray examination. However, this technique does not provide a clear image and it also may cause genetic mutation in both body cells and sex. It will cause cancer if exposed to it over a prolonged period of time. During fourties and fifties, the era of invasive and non-invasive imaging technique started (De Luna, 2008). Example of invasive imaging technique is cardiac catheterization, angiography and coronary angiography while for non-invasive imaging techniques are isotopic studies, scanner and cardiovascular magnetic resonance (CMR). Electron-beam computed tomography (EBCT) is a non-invasive imaging method used to characterize the cardiac mechanism and to inject fluid into the blood vessels of the heart. The process of injected fluid in the blood vessel is called perfusion. The harmless electron beam is used in this technique to figure out the multiple image of the heart. Then, the computer will calculate the density of deposition of calcium in the coronary artery. The deposit of calcium indicates the amount of plaque present in the artery. Due to the advanced technologies available, three-dimensional (3D) arteriography of the large epicardial coronary arteries have been implemented. This advanced technique was used to examine coronary artery bypass grafts, and to characterize abnormalities of the coronary artery. The sensitivity and specificity of EBCT are increased as compared with invasive coronary arteriography. The ability of this technique is to define coronary artery calcification (CAC) and to identify which larger epicardial vessels may be narrowed. The process of functional and perfusion 12 imaging can be conducted at the same time. In contrast, there is a limitation in examining the epicardial arteries 1 to 2 mm in diameter or larger. The details of tiny collateral vessels, tiny coronary branch arteries, and regions such as distal anastomotic sites of bypass grafts may lose. Moreover, focal coronary calcium may obscure adequate visualization of the lumen (Rumberger, 2002). Equipment used to examine heart diseases is coronary angiography. Coronary angiography is important in the acute phase for diagnosing the disease and correlating the place of occlusion with the ST- segment deviations. It’s also very useful in the chronic phase of the disease (De Luna, 2008). Nieman, Cademartiri (2002) and Rumberge (2002) stated that the direct visualization of the epicardial coronary arteries is necessary to confirm the presence and/or focal severity of coronary luminal disease. Invasive coronary arteriography was the reference standard for defining the epicardial coronary artery disease in the past 50 years. This technique was very expensive and having high risk. Hence, after undergoing coronary angiography, patients will be requested a brief hospitalization or a period of observation for several hours in a specialized monitor unit (Nieman et al., 2002; Rumberger, 2002) . Echocardiography is the first non-invasive imaging processing used to detect heart diseases. It is a very user-friendly and cost effective device. This technique plays an important role in the acute phase, detection of left-ventricular function and mechanical complications of acute myocardial infarction. It is also very useful in the study of the function of left-ventricular and detection of hypokinetic and akinetic areas in patients with chronic ischaemic heart disease(De Luna, 2008). Images detected will be permanently recorded on a videotape for analysis and playback in the future (Kisslo, Robertson, Gilbert, Von Ramm, & Behar, 1977). However, this technique tends to overestimate the area that is at risk or encores, hence this technique is not 100% reliable (De Luna, 2008). The overview of echocardiography can be seen from Figure 2.1. 13 Figure 2.1 Overview of echocardiography Nowadays, electrocardiography (ECG) is one of the most-used methods in the hospital and medical care center to diagnose heart diseases. ECG is used to identify the irregularities in the heart rhythm and to reveal the presence of injury, death or other physical changes in the heart muscle. It also used to detect the electrical current activity occurring in the heart and displays the signal on a monitor or printed on a graph. This can be done by putting two electrodes on the patient’s chest. It provides continuous monitoring of heart’s electrical activity during transportation or in the coronary care unit (Shade, 2007). Figure 2.2 shows the ECG device used in the hospitals. Figure 2.2 ECG ECG Holter is a wearable ECG monitor and can continuously monitor the patient’s heart electrical activity. It is used to monitor the patient’s heart rhythm over a long period of time, which can be up to 48 hours. A patient can record their heart rhythm when they are conducting their daily activity, thus allowing medical staff to obtain a much clearer view of the patient’s condition (Thomas Martin, 2000). A 24-hour 14 ECG Holter consists of a number of electrodes, which are fed into the recording device, either solid state or a tape recorder. Then the signal will be sent to the computer for further analysis. Furthermore, the patients can log on their daily activities when specific symptoms occur (Davey, 2004). ECG Holter is illustrated in Figure 2.3. Figure 2.3 ECG Holter An ambulatory ECG was invented by an American biophysicist, Dr. Norman J. Holter (1914–1983). He was the developer of the recording technology and the ECG monitoring procedure in 1940s. His monitor was as heavy as 75-pound backpack containing a reel-to-reel FM tape recorder, analog patient interface electronics and with big sized batteries. This device was the first ECG which could record continuously the single ECG lead-up to several hours. Furthermore, cardiac electrical activities can also be analyzed at the outside of the health care center (Buckles et al., 2004). However, due to the advancement in magnetic tape analog signal recording technology, miniaturized recorders who using standard cassette tapes running at very slow speeds for continuously recorded the ECG signal was developed (Buckles et al., 2004). Retrospective analysis required time and position interface involvement. Firstly, to gather the data recorded in the cassette, the entire tape must be converted into a digital format before downloading into the retrospective analysis system. In additional, the digits must be converted back to analog format for further graphic printout of the ECG signals. However, the accuracy of the report is highly dependent on the knowledge of the physician and technician on the ECG analysis system. Hence the results are considered to be relatively subjective (Gallant, Caron, Palmer, & Lubocki, 1994). 15 Previously cassette was used to save the data, however there was limited space for the data to be stored in the cassette hence it is necessary to either “compress” the monitoring period data into its solid state memory or to “selectively store” only abnormal signal. Normally, there is shape distortion in the graph if the compressed data is analysed because there will be gaps between the samples of ECG data when the data is printed by the real-time analysis system. In brief, this reduced the accuracy of the report and distorting the shape of the ECG waveforms. The “selectively store” option was designed to avoid the necessity of compression, but by using this technique, the full disclosure (FD) is lost, or shown only in analysis as trends, graphs, histograms, and numerical summaries, all limited to statistical data, which cannot be verified (Gallant et al., 1994). 2.3 Principals for Digital Vital Signs Monitoring Solutions 2.3.1 Introduction To design a reliable and standardized wireless data transmission ECG circuit, a research based on the global ECG recording and storage is carried out in this study. The published worldwide standards like standard communications protocol for computer assisted electrocardiography (SCP-ECG), medical waveform format encoding rules (MFER), FDA XML data format (FDADF), and digital imaging and communications in medicine (DICOM) is evaluated because many manufacturers comply with these standards. Hence, these standards have greater impact on the adoption of standards for vital sign monitoring solutions. ECG Holter is used for a long period of time, which can withstand up to 72 hours, and some units can even record for seven days. The signal is obtained by attaching several electrode pads on the patient’s chest, and most of the devices use five electrodes as a 2-lead monitoring solution. Nowadays, all ECG signals are stored in a 16 digital form so the analogue signal which is within 2mV should be amplified first before it is transformed into a digital signal. 2.3.2 Sampling frequency “ACC/AHA Guidelines for ambulatory electrocardiography” states that the minimum sample frequency used to digitize an ambulatory electrocardiograph was 125samples/sec and a minimum of 8 bit resolution of the sampled values. However, if the device is used to analyze arrhythmia, a sampling frequency of 1000s/sec (up to 2000s/sec) is set. Normally, the ECG - equipment digitizes a signal with a resolution of 10 or 12 bits. Figure 2.4 Sampling of the analogue ECG - curve, where important parameters as Sampling interval and Resolution are shown. 2.3.3 Resolution The amplified analogue signals are in the range of 0 to 4 Volts or 0 to 4095 in the decimal value (ASCII) for 12 bit resolution system as illustrated in the table below. 17 Table 2.1 : Representation of measured analogue values and their corresponding digital values Measured analogue value (mV) Amplified analogue value (V) Binary code Decimal value (ASCII-code) Hex-value +2.0 4.0 111111111111 4095 0×0FFF +1.5 3.5 111000000000 3584 0×0E00 +1.0 3.0 110000000000 3072 0×0C00 +0.5 2.5 101000000000 2560 0×0A00 0.0 2.0 100000000000 2048 0×0800 - 0.5 1.5 011000000000 1536 0×0600 -1.0 1.0 010000000000 1024 0×0400 -1.5 0.5 001000000000 512 0×0200 -2.0 0.0 000000000000 0 0×0000 +2.0 18 Table 2.2 : Comparison of digital resolution and incremental resolution for an analogue signal of ±2m V Table 2.2 shows the comparison between the digital representation of the sampled values and incremental signal resolution. For a normal ECG signal with an Rwave of 1mV magnitude, its digital incremental value (1000/1µ) is about 1000 if a 12 bit code is used. Conversely, the digital incremental value drops to 64 when an 8 bit code is used. Resolution determines the quality of signals obtained. Devices with higher resolution are of better quality as a clearer image will be displayed (Fensli, 2006). 2.3.4 Health and safety issues of Bluetooth Table 2.3 : Advantage and disadvantages of competing technologies with Bluetooth There are regulations, standards and recommendations dealing with the electromagnetic exposure in the radio frequency. Normally, these are made based on the 19 recommendation from the World Health Organization (WHO) and the International Radiation Protection Association (IRPA). Limits the radio frequency to a wide margin is to protect people from any side effect after being exposed to both short and long-term exposure to electromagnetic fields. Sometimes the safety margin is set to as high as 50, which is around 50 times lower when heating-related effect begins to occur. Due to its low output power, Bluetooth is a product where its maximum exposure levels are greatly below the prescribed safety limits. Electronic devices like ECG Holter equipped with Bluetooth have lesser electromagnetic interference compare with the devices equipped with other wireless technologies. Until today, many researchers were satisfied that Bluetooth device is a device that does not pose any health risk (Erasala & Yen, 2002). The advantages and disadvantages of Bluetooth with its competing technologies are shown in Table 2.3. CHAPTER 3 RESEARCH METHODOLOGY 3.1 Introduction This chapter discusses about the research methodology of this project. It also covers the techniques and methods used in this study. An Arduino Uno R3 was chosen in this project was because it can be used to develop many interactive objects. It takes inputs from a variety of switches or sensor to make decisions and controls a variety of outputs such as light, sound, motor and others. Arduino is a “Rapid Electronics Prototyping Platform” that consists of two main parts which included an Arduino opensource microcontroller and the free Arduino integrated development environment (IDE). This is easier for the non-technical people whose don’t have much experience in programming make their own interactive objects. In this project, Bluetooth is used for wireless transmission because it does not pose any health risk and with lesser electromagnetic interference compare to other wireless technologies. 21 Start Literature Review Integrate bluetooth module Design an ECG circuit by using multisim Implement the simulated circuit into a circuit board Test the integrated circuit Figure 3.1 Flowchart of workflow 3.2 Circuit design The electrical activity of the heart is determined by placing three electrode pads on the chest of the patient, and it is typically monitored by using the ECG Holter. An ECG Holter can record patient’s heart rhythm for a long period of time, which can be up to 48 hours. Then, the heart rhythm signal will be amplified by the embedded ECG circuit in the ECG Holter. Lastly, the amplified signal will be transmitted wirelessly to smart phone by using Bluetooth module. Figure 3.2 shows the way data are transmitted in ECG Holter. 22 Figure 3.2 Concept of data transmission in ECG Holter ECG Holter comprised an ECG circuit for amplification and to filter part of the noise. Hence, an ECG circuit was designed in this project. Information about the ways to construct an ECG circuit was gathered in order to develop a more effective circuit. Carr and Brown (2001) mention that an ECG pre-amplifier is a differential bio-electric amplifier which is used to process bio potentials. Other than that, an ECG pre-amplifier must be ac-coupled in order to eliminate the electrode offset potential DC and 50 Hz (Malaysia) AC-induced interference. These are the two components of common-mode voltage (CMV) in ECG. An instrumentation amplifier (INA 128) was used as a preamplifier. INA 128 is a chip with high common-mode rejection ratio (CMRR), at least 120dB, which can cancel some of the noise. The instrumentation amplifier output is an ECG signal that has greatly reduced the 50Hz noise. Instrumentation amplifier subtracts equal noise voltage to give approximate zero while amplifying the difference in the unequal ECG signals (Carr & Brown, 2001). It is also high precision, low power consumption, with low quiescent current chip. The most important characteristic of this chip is that its gain value are adjustable in order to fit the operation of the circuit (Su, Chen, Hung, & Lee, 2010). The electrical signal of the heart is very small which is in the range of 0.5m to 4 mV, so it will be amplified by the embedded amplifier in the ECG Holter. The signal is amplified to a readable range, which can be easily detected by the 23 oscilloscope. The signal will be further amplified by using another amplifier so that the output signal is big enough for measurement. Figure 3.3 Configuration of instrumentation amplifier, chip INA 128 So the gain calculated as below: (3.1) An ECG signal has frequency range of 0.05 to 100 Hz. Hence a low-pass filter with active R and C were used to decrease the out-of-band high-frequency noise by providing a low cutoff frequency (Su et al., 2010). The low-pass filter will further filter noise in the ECG circuit (Carr & Brown, 2001). Other than that, a high-pass filter is also used to filter out the low-frequency noise (Wong, Sudirman, Mahmood, Tumari, & Samad, 2012). The high-pass filter made the circuit will only respond to AC signals above its cutoff frequency. The cutoff frequency of the high pass and low-pass filter can be adjusted by changing the value of resistance and capacitor (Su et al., 2010). A non- 24 inverting amplifier was used to further amplify the signal of the ECG circuit (Carr & Brown, 2001). Frequency of low-pass filter and high-pass filter can be calculated as below (Floyd, 2012): (3.2) In this project, the designed ECG circuit will filter out the frequency below 0.03Hz and above 160Hz. For high-pass filter which will filter out the low cutoff frequency (0.03Hz), a 5.6kΩ of resistor and 1mF of capacitor were used. The low cutoff frequency was calculated by using equation 3.2 as shown below. ( )( ) The 3dB cutoff frequency of the low-pass filter also was calculated by using equation 3.2 as below: ( )( ) Figure 3.4 Configuration of second amplifier, chip OP27P 25 The gain of the second amplifier can be calculated by using equation below: (3.3) Calculation of gain for the adder Figure 3.5 Configuration of adder (3.4) (3.5) Substitute equation 3.4 in equation 3.5, ( ) 26 (3.6) The total gain of the ECG circuit designed was 500 and this indicates that the output signal will be amplified 500 times as compared to its input signal. Due to the limitation of the Arduino that only can sense positive value data, an adder is added in order to move the signal towards positive value. The instrumentation amplifier only reduces part of the 50Hz noise hence the power line noise still exists. Hence a notch filter was used to further reduce the 50Hz noise. In Malaysia, the power line noise is about 50Hz so the notch filter was used to eliminate the 50Hz noise. Figure 3.6 shows the notch filter designed. For obtaining cutoff values at 50Hz, the value of resistors and capacitors used also were shown in the Figure. Cutoff frequency of the notch filter is calculated as shown below: 0.1p 0.1µF 0.33. 3.82kΩ 21.8 21 265kΩ p 0.1p 265kΩ 0.1 p 0.1µF Figure 3.6 Configuration of notch filter 27 ( ( (3.7) ) )( )( )( ) adder High-pass filter Pre-amplifier Notch filter Low-pass filter Figure 3.7 Circuit designed by using Multisim software The circuit is first designed by using Multisim software as shown in Figure 3.7. After that, the circuit was implemented in the bead board for testing purposes as shown in Figure 3.8. The circuit was tested with the patient simulator device shown in Figure 3.9. Figure 3.10 shows the circuit soldered on a PCB board. 28 Figure 3.8 Figure 3.9 Build-up ECG circuit Tested the ECG circuit with ECG module and patient simulator Figure 3.10 Soldered circuit 29 3.2.1 Wireless Transmission Since the main purpose of designing this device was to provide mobility and comfort to the patient, a wireless communication is required for continuous transmission of data. Bluetooth module can be connected to the computer-based systems easily it implements Frequency Hopping in order to provide noise and interference rejection (Lucani, Cataldo, Cruz, Villegas, & Wong, 2006). An Arduino UNO R3 was used to control the communication of the signal between the Bluetooth module and the ECG circuit. Arduino UNO R3 consist an open-source micro controller, which was launched in 2005 (S. F. Barrett, 2012). Figure 3.12 shows the Arduino UNO R3 while Figure 3.13 shows the Blue Bee Bluetooth module. The Cytron Bluetooth module was used in this project. It is an important component used to transmit data from the ECG Holter to the smart phone. It must be connected to a micro controller to control the transmission speed and other features during the transmission. The connection between the microcontroller and Bluetooth module is shown in Figure 3.14. In this project, an Arduino UNO R3 micro controller was used because it is an open-source device. Then, the Arduino UNO R3 is coded in the integrated development environment (IDE) as in Figure 3.15 before it was connected to the Bluetooth module. Next, upload the programmed code into the Arduino UNO R3. While uploading the coding, the Blue Bee Bluetooth module should disconnect with the Arduino UNO R3. After that, the connection between the Bluetooth module and computer are tested by HyperTerminal software. Then the designed circuit was connected to the Arduino and Bluetooth module as shown in Figure 3.16. Figure 3.17 shows the circuit was tested with the real subject. A PCB is designed in order to minimize the size of the circuit. In this research, Eagle software was used to design the PCB board. PCB board was designed as shown in Figure 3.18 in order to minimize the size and weight of the device. 30 Furthermore, a cover is designed by using solid work software. A cover is designed is to make sure that the device come along with a nice packaging. Other than that, some features that designed on the cover can make the device can be easily carried by the users. The designed cover is shown in Figure 3.19, 3.21 and 3.22. Figure 3.19 was the first cover designed while Figure 3.21 and 3.22 was the second design. Figure 3.21 was the top cover while Figure 3.22 was the bottom cover of the second design. The first design has been printed by using a 3D printer as shown in Figure 3.20. + + ECG Circuit Electrode Pad ECG Signal Bluetooth Transmitter Bluetooth Transmission Figure 3.11 Operation flow for ECG Holter Modeling uses Wireless System 31 Figure 3.14 Figure 3.12 Arduino UNO R3 Figure 3.13 Bluetooth module Connection of BlueBee Bluetooth module with Arduino UNO R3 32 Figure 3.15 Figure 3.16 Arduino IDE Connection of soldered circuit with Arduino and Bluetooth module 33 Figure 3.17 Test with real subject Figure 3.18 PCB designed 34 (a) (b) Figure 3.19 1st cover designed (a) Top cover (b) Bottom cover 35 (a) (b) Figure 3.20 (c) Printed 1st cover designed (a) Top cover (b) Bottom cover (front view) (c) Bottom cover (back view) 36 (a) Figure 3.21 (b) 2nd top cover designed (a) Top (front view) (b) Top ( back view) Figure 3.22 2nd bottom cover designed 37 3.2.2 Bluetooth Coding The source code for Arduino UNO R3 (communication between smart phone and Bluebee module) was shown below: #include <SoftwareSerial.h> #include <stdlib.h> const int TX_BT = 2; const int RX_BT = 3; float sensorValue; SoftwareSerial btSerial(TX_BT, RX_BT); const unsigned long periodicMessageFrequency = 5000; First, initialized the variables were shown as above. The frequency to send the periodic messages to Windows Phone was set to 5000Hz. void processCommand(char* command) { if(strcmp(command,"hello") == 0) { while(btSerial.available()==0) { unsigned int y=analogRead(A0); char MSG[4]; dtostrf(y,4,0, MSG); sendMessage(MSG); } } sendMessage("NoData"); software_Reset();} 38 Source code above indicates the process of the incoming command from Windows Phone. void software_Reset() { asm volatile (" jmp 0"); } void sendMessage(char* message) { int messageLen = strlen(message); if(messageLen < 256) { btSerial.write(messageLen); btSerial.print(message); } } Then, a restarts program from beginning but does not reset the peripherals and registers was added in the source code as above. void setup() { Serial.begin(9600); btSerial.begin(9600); pinMode(13,OUTPUT); digitalWrite(13,HIGH); } Next, Arduino function setup was programed as the code above. 39 void loop() { if(btSerial.available()) { int commandSize = (int)btSerial.read(); char command[commandSize]; int commandPos = 0; while(commandPos < commandSize) { if(btSerial.available()) { command[commandPos] = (char)btSerial.read(); commandPos++; } } command[commandPos] = 0; processCommand(command); } } Last but not least, source code above shows the loop of the Arduino function. CHAPTER 4 RESULT AND DISCUSSION 4.1 Introduction This chapter shows the result and discussion of the designed circuit with the ECG Arduino UNO shield. The ECG Arduino UNO shield was taken as reference so that a better circuit can be designed. Comparisons in term of the cost, sizes, cleanliness of the signal and others were done between the two circuit boards. 4.2 Result and discussion of designed circuit Figure 4.1 Result of communication between Bluebee module and computer 41 Figure 4.1 shows the result of the communication test between Bluebee module and computer. When an alphabet “a” was pressed, “Hello” text will be sent and then it will be displayed on the Hyperterminal software, else “No” will be sent and displayed. Figure 4.2 Simulation result without adder and notch filter 42 Figure 4.3 Simulation result with adder and notch filter Figure 4.2 and 4.3 shows the simulation result by using Multisim. Figure 4.2 is the result of simulation before an adder and notch filter were added while Figure 4.3 is the simulation result after an adder and notch filter were added. From the result, it is clearly shown that the signal has been moved toward positive value as an adder was added in. The signal is shifted towards to positive value by a 66mV. If the voltage added was at least 5V, then the signal will be purely positive. However, there is no big difference in term of the cleanliness of the two signals. 43 Figure 4.4 Figure 4.5 Signal displayed on oscilloscope without adder and notch filter Signal displayed on oscilloscope with adder and notch filter Signals of the designed circuit measured using oscilloscope were shown in Figure 4.4 and 4.5. Figure 4.4 was the signal of the circuit without the adder and notch filter. The signal was full marred with high frequency noise. However a cleaner signal was obtained after a notch filter was added and this can be seen from Figure 4.5 but there are still some high frequencies in the signal. This can be further improved by do some adjustments on the notch filter or the high pass filter. Furthermore, the signal also has moved towards the positive value as an adder was added. 44 Figure 4.6 Signal displayed on window phone Figure 4.6 shows the ECG signal displayed by using an app on the smart phone. This shows that the transmission of the signal was successful as the signal peaks are prominently captured. The signal still consists of high frequency noise. The frequency range of ECG is between 0.03Hz to 100Hz but this frequency that allowed passing through the designed circuit was between 0.05Hz to 160Hz. In this circuit, the high cutoff frequency was set to 160Hz was because this value was slightly higher than 100Hz. Instead of setting the value of the high cutoff frequency to 100Hz was to prevent the loss of ECG signals. The high frequency noise maybe can be removed by lowering the cutoff frequency of the low pass filter to a value which is closer to 100Hz. 45 4.3 Comparison among ECG Arduino UNO shield and custom-designed circuit There are commercially available ECG circuits, which are compatible with the Arduino UNO R3. It is called an ECG Arduino UNO shield. A comparison between the build-up circuit and ECG Arduino UNO shield is done in order to find out which circuit is more suitable to be implemented into the ECG Holter. The cost, cleanliness of the output signal and also the circuit’s size will be taken into consideration for the comparison. The signal is obtained by using the Electric Guru software provided. The ECG Arduino shield available in the market is shown in Figure 4.7. Figure 4.8 indicates how the ECG Arduino shield connects to the Arduino and the Bluetooth module. Figure 4.7 ECG Arduino Shield 46 Figure 4.8 Connection of ECG Arduino Shield with Arduino and Bluetooth module R R T P Q S (a) Figure 4.9 T P Q S (b) Comparisons of results (a) ECG Arduino shield b (b) Designed circuit The result of the ECG Arduino shield is shown in Figure 4.9(a) while Figure 4.9(b) shows the result of custom-designed circuit. Both of the circuits still have some high frequency noise, but a prominent R-peak of the ECG signal still can be seen. In contrast, the T-peak of ECG signals of custom-designed circuit still can be seen, although it is slightly distorted by the high frequency noise. The distortion can be greatly reduced by adjusting the notch filter or the low-pass filter, and then a more prominent T-peak can be obtained. The T-peak of the ECG Arduino shield is also not prominent due to the high frequency noise. Both of the signal’s patterns look alike. CHAPTER 5 CONCLUSION AND FUTURE WORKS 5.1 Introduction This thesis aims to develop a portable ECG device with less dangling wires that can be sent wirelessly to smart phone for further diagnosis. This chapter will discuss about the objective achieved and also will state about the future works. 5.2 Conclusion An ECG circuit which is small in size was successfully built and was soldered on a PCB board. The circuit was able to send the data wirelessly to the smart phone via the Blueblee Bluetooth module. Furthermore, the cost of circuit is much cheaper than the price of similar circuit or device in the market. This circuit was successfully paired with a mobile application on Windows smartphone and was able to transmit ECG data to the smartphone. 48 5.3 Future Works There was a high frequency noise in the circuit; hence the circuit can be further improved by adjusting the high cutoff frequency of the low pass filter. Because the frequency range of the body signal is between 0.05Hz to 100Hz but in this circuit the range of the frequency was between 0.03Hz to 160Hz. Hence, the low cutoff frequency can be tuned closer to 100Hz, so that the noise can be filtered out. Then, surface mount technique or nanotechnology can be implemented in this circuit to further miniaturize the circuit. CHAPTER 6 PROJECT MANAGEMENT 6.1 Introduction This chapter explains how project goals were achieved with effective project planning, organizing, and controlling resource within a specified period. The research time, research budget, research scope, and human are the main concern in this project. Hence, project schedule had been tabulated on Gantt chart which gives a clear guideline in time management. Furthermore, the estimation of the cost is performed to ensure the project is cost effective while keeping the project to achieve the requirement set. Market survey between different electronic suppliers is done and the components price is then tabulated to compute the final cost. 50 6.2 Project schedule Table 6.1 : Project Gantt Chart (semester one) Table 6.2 : Project Gantt Chart (semester two) 51 6.3 Cost Table 6.3 : Cost estimation for custom-designed ECG circuit Item Quantity Unit price (RM) Total (RM) Resistor 14 0.05 0.70 Capacitor 4 0.70 2.80 Ina 128 1 34.36 34.36 Op 27G 1 10.57 10.57 TL072 1 5.00 5.00 UA741 1 6.00 6.00 Variable resistor 1 0.80 0.80 Arduino R3 1 75 75 Bluetooth module 1 68 68 total 203.23 Table 6.4 : Cost estimation for ECG Arduino shield Item Quantity Unit price (RM) Total (RM) Arduino R3 1 75 75 Bluetooth module 1 68 68 ECG arduino shield 1 107.25 107.25 Total 250.25 52 In order to design a cost effective device, the cost of the device has been calculated and was tabulated in a table as shown in Table 6.3. Table 6.4 shows the cost of the device by using an ECG Arduino shield. From Table 6.3, the total cost of the device for 1 channel by using the designed ECG circuit was around RM 200 and for 3 channels was about RM 320. However, the cost of the ECG Arduino shield is about RM 250. The cost of the custom-designed circuit can be reduced if it was produced in mass volume for the market. The Arduino UNO R3 and the ECG Arduino shield and the Bluebee module were the most expensive. They both play an important role in the wireless transmission. 53 References Alemdar, H., & Ersoy, C. (2010). Wireless sensor networks for healthcare: A survey. Computer Networks, 54(15), 2688-2710. doi: http://dx.doi.org/10.1016/j.comnet.2010.05.003 Atrial Fibrillation. (2014). Available from National Stroke Association AtrialFibrillation. Retrieved 29 May 2014, http://www.stroke.org/site/PageServer?pagename=afib Barrett, D. G., Mark Quinn, Tom. (2006). Cardiac care an introduction for healthcare professionals. Chichester, England John Wiley & Sons. Barrett, S. F. (2012). Arduino Microcontroller: Processing for Everyone! Synthesis Lectures on Digital Circuits and Systems, 7(2), 1-371. Benjamin, E. J., Wolf, P. A., D’Agostino, R. B., Silbershatz, H., Kannel, W. B., & Levy, D. (1998). Impact of atrial fibrillation on the risk of death the Framingham Heart Study. Circulation, 98(10), 946-952. Buckles, D., Aguel, F., Brockman, R., Cheng, J., Demian, C., Ho, C., . . . Mallis, E. (2004). Advances in ambulatory monitoring: regulatory considerations. Journal of Electrocardiology, 37, 65-67. Carr, J. J., & Brown, J. M. (2001). Introduction to biomedical equipment technology (Vol. 4): Prentice Hall New Jersey. Cytron Bluetooth Module BlueBee User's Manual. (2012). Retrieved 20 April2014, http://www.robotshop.com/media/files/pdf/manual-bluebee.pdf Davey, P. (2004). The ECG in clinical decision-making. London Royal Society of Medicine Press. De Luna, A. B. e. (2008). Electrocardiography in ischemic heart disease: clinical and imaging New York : : Wiley, 2008. Erasala, N., & Yen, D. C. (2002). Bluetooth technology: a strategic analysis of its role in global 3G wireless communication era. Computer Standards & Interfaces, 24(3), 193-206. doi: http://dx.doi.org/10.1016/S0920-5489(02)00018-1 54 Fensli, R. (2006). Evaluation of international standards for ECG-recording and storage for use in tele-medical services. Floyd, T. L. (2012). ELECTRONIC DEVICES (Vol. 9). Prentice Hall, 1 Lake Street, Upper Saddle River, New Jersey, 07458. Gallant, S. L., Caron, P. R., Palmer, W. E., & Lubocki, D. J. (1994). Ambulatory ECG analysis system: Google Patents. Health Fact 2012. (JULY 2012). Available from Department of Statistics, Malaysia Retrieved 25-10-2013, from MINISTRY OF HEALTH MALAYSIAMINISTRY OF HEALTH MALAYSIA http://www.moh.gov.my/images/gallery/stats/heal_fact/health_fact_2012_page_b y_page.pdf Karppanen, H. (1984). Ischaemic Heart Disease. Drugs, 28(1), 17-27. doi: 10.2165/00003495-198400281-00003 Kisslo, J., Robertson, D., Gilbert, B., Von Ramm, O., & Behar, V. (1977). A comparison of real-time, two dimensional echocardiography and cineangiography in detecting left ventricular asynergy. Circulation, 55(1), 134-141. Leijdekkers, P., Gay, V., & Barin, E. (2009). Trial results of a novel cardiac rhythm management system using smart phones and wireless ECG sensors Ambient Assistive Health and Wellness Management in the Heart of the City (pp. 32-39): Springer. Lucani, D., Cataldo, G., Cruz, J., Villegas, G., & Wong, S. (2006). A portable ECG monitoring device with Bluetooth and Holter capabilities for telemedicine applications. Paper presented at the Engineering in Medicine and Biology Society, 2006. EMBS'06. 28th Annual International Conference of the IEEE. Mathers, C., Fat, D. M., & Boerma, J. (2008). The global burden of disease: 2004 update: World Health Organization. Nieman, K., Cademartiri, F., Lemos, P. A., Raaijmakers, R., Pattynama, P. M., & de Feyter, P. J. (2002). Reliable noninvasive coronary angiography with fast submillimeter multislice spiral computed tomography. Circulation, 106(16), 2051-2054. Rankin, J., & Bhopal, R. (2001). Understanding of heart disease and diabetes in a South Asian community: cross-sectional study testing the ‘snowball’ sample method. Public Health, 115(4), 253-260. doi: http://dx.doi.org/10.1038/sj.ph.1900777 Rumberger, J. A. (2002). Noninvasive coronary angiography using computed tomography Ready to kick it up another notch? Circulation, 106(16), 2036-2038. 55 Shade, B. (2007). The ECG Mentor a presentations and demonstration. New York, NY McGraw-Hill. Su, Y.-C., Chen, H., Hung, C.-L., & Lee, S.-Y. (2010). Wireless ECG detection system with low-power analog front-end circuit and bio-processing ZigBee firmware. Paper presented at the Circuits and Systems (ISCAS), Proceedings of 2010 IEEE International Symposium on. Thom, M. T. J., & Kannel, W. B. (1997). Congestive Heart Failure. Disease Management & Health Outcomes, 1(2), 75-83. Thomas Martin, E. J., Dejan Raskovic. (2000). Issues in Wearable Computing for Medical Monitoring Applications: A Case Study of a Wearable ECG Monitoring Device. IEEE, 43 - 49. Wang, C.-S. (2012). A new AC-coupled amplifier for portable ECG without reference electrode. Computers & Electrical Engineering. Wolf, P. A., Abbott, R. D., & Kannel, W. B. (1991). Atrial fibrillation as an independent risk factor for stroke: the Framingham Study. Stroke, 22(8), 983-988. Wong, W., Sudirman, R., Mahmood, N., Tumari, S., & Samad, N. (2012). Study of environment based condition of electromagnetic interference during ECG acquisition. Paper presented at the Biomedical Engineering (ICoBE), 2012 International Conference on. World Health Report. (2002). Available from world health organization (WHO) World. Retrived 29 May 2014, health report http://www.who.int/whr/2002/en/ 56 APPENDIX A Source code for Arduino UNO R3 (communication between computer and Bluebee module) byte buffer = 0; void setup() Serial.begin(9600); pinMode(13,OUTPUT); } void loop() { while(!Serial.available()); buffer = Serial.read(); if(buffer == 'a') { //digitalWrite(13a,HIGH); Serial.println("Hello"); } else { //digitalWrite(13,LOW); Serial.println("No"); } } 57 APPENDIX B Source code for Arduino UNO R3 (communication between smart phone and Bluebee module) #include <SoftwareSerial.h> #include <stdlib.h> const int TX_BT = 2; const int RX_BT = 3; float sensorValue; SoftwareSerial btSerial(TX_BT, RX_BT); const unsigned long periodicMessageFrequency = 5000; //Proczzess the incoming command from Windows Phone. void processCommand(char* command) { if(strcmp(command,"hello") == 0) { while(btSerial.available()==0) { unsigned int y=analogRead(A0); char MSG[4]; dtostrf(y,4,0, MSG); sendMessage(MSG); } } sendMessage("NoData"); software_Reset(); } void software_Reset() // Restarts program from beginning but does not reset the peripherals and registers 58 { asm volatile (" jmp 0"); } void sendMessage(char* message) { int messageLen = strlen(message); if(messageLen < 256) { btSerial.write(messageLen); btSerial.print(message); } } //Setup Arduino function void setup() { Serial.begin(9600); // Serial.println("USB Connected"); btSerial.begin(9600); pinMode(13,OUTPUT); digitalWrite(13,HIGH); }//Loop Arduino function void loop() { if(btSerial.available()) { int commandSize = (int)btSerial.read(); char command[commandSize]; int commandPos = 0; while(commandPos < commandSize) { if(btSerial.available()) { command[commandPos] = (char)btSerial.read(); commandPos++; } } command[commandPos] = 0; processCommand(command); } }