i
SMART HEALTH ALERT SYSTEM VIA SMARTPHONE
WONG TZE MEI
This report is submitted in partial fulfillment of the requirements for The Bachelor Degree of Electronics Engineering (Wireless Communication)
Faculty of Electronics and Computer Engineering Universiti Teknikal Malaysia Melaka (UTeM)
ii
UNIVERSTI TEKNIKAL MALAYSIA MELAKA
FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER
BORANG PENGESAHAN STATUS LAPORAN PROJEK SARJANA MUDA II
Tajuk Projek : Smart Health Alert System via Smartphone Sesi
Pengajian
: 1 2 / 1 3
Saya WONG TZE MEI mengaku membenarkan Laporan Projek Sarjana Muda ini disimpan di Perpustakaan dengan syarat-syarat kegunaan seperti berikut:
1. Laporan adalah hakmilik Universiti Teknikal Malaysia Melaka.
2. Perpustakaan dibenarkan membuat salinan untuk tujuan pengajian sahaja.
3. Perpustakaan dibenarkan membuat salinan laporan ini sebagai bahan pertukaran antara institusi
pengajian tinggi.
4. Sila tandakan ( √ ) :
SULIT*
*(Mengandungi maklumat yang berdarjah keselamatan atau kepentingan Malaysia seperti yang termaktub di dalam AKTA RAHSIA RASMI 1972)
TERHAD** **(Mengandungi maklumat terhad yang telah ditentukan oleh
organisasi/badan di mana penyelidikan dijalankan)
TIDAK TERHAD
Disahkan oleh:
__________________________ ___________________________________
(TANDATANGAN PENULIS) (COP DAN TANDATANGAN PENYELIA)
iii
“I hereby declare that this report is of my own work except for the summaries and excerpts which have been acknowledged.”
Signature :
Name : WONG TZE MEI
iv
“I hereby acknowledge that I have checked this project and in my opinion, this project is sufficient in scope and quality for the award of Degree of Bachelor of
Electronics Engineering (Wireless Communication) With Honors.”
Signature :
Name : ENGR. VIGNESWARA RAO GANNAPATHY
v
vi
ACKNOWLEDGEMENT
I would like to express my deepest gratitude to all those who provided me the ability to complete this project successfully. I would like to thank my supervisor, Engr. Vigneswara Rao a/l Gannapathy for the support of my study and research. His guidance helped me in the research and writing of this thesis.
I would also like to express my sincere gratitude towards my team mates, James Teo Jiun Jye and Lim Jia Yin for all the hard works and patience that makes this project successfully done. Besides, I would like to thanks all my friends and course mates for their help and suggestions that assisted me to complete this project too.
vii
ABSTRACT
Heart disease has always been ranked number one killer of Malaysians and still counting. The statistics does not show any decrement but instead, they are showing increment in a shocking rate. Most of the heart disease patient are facing the same problems, which is worrying the condition of their heart and do not know when they will be facing a heart attack. Besides, family members and friends are not able to be by their side all the while to look out for them. This project aims to develop a health alert system via smartphone that is able to alert the patient itself and predefined numbers by sending Short Message Service (SMS) when the heart is in abnormal condition. This project will be using the Bluetooth technology. The Short Message Service (SMS) sent contains important information that show the patient needs immediate help with provided exact location of patient in the form of Longitude and Latitude from the Global Positioning System (GPS) in the smartphone. Immediate help from predefined numbers for example medical teams can be dispatched as soon as possible to the patient. There will also be an alarm system in
the patient’s smartphone that acts to alerts the people nearby when the patient is
viii
ABSTRAK
ix
CONTENT
CHAPTER TITLE PAGES
PROJECT TITLE i
STATUS REPORT FORM ii
SUPERVISOR’SDECLARATION iii
STUDENT’SDECLARATION iv
DEDICATION v
ACKNOWLEDGEMENT vi
ABSTRACT vii
ABSTRAK viii
CONTENT ix-xi
LIST OF TABLES xii
LIST OF FIGURES xiii
LIST OF ABBREVIATIONS xiv-xv
1 INTRODUCTION 1
1.1 Project Background 1
1.2 Problem Statement 2
1.3 Project Objectives 3
1.4 Scope of Study 4
1.5 Brief Methodology Explanation 5
x
2 LITERATURE REVIEW 7
2.1 Human Heart 7
2.2 Sensor 9
2.3 Smartphone 11
2.4 PIC16F877A Microcontroller 14
2.5 Bluetooth Bee Module 18
2.6 LM1117 Voltage Regulator 25
2.7 LM7805 Voltage Regulator 26
2.8 Short Message Service (SMS) 27
2.9 Global Positioning System (GPS) 29
2.10 Bluetooth Technology 32
2.11 Existing Project 33
2.11.1 Baptist Heart Institute Investigates Early Heart Detection Device
(United States, February 2008) 33
2.11.2 Portable Device Can Detect Heart Attacks
(Arab, 10thSeptember 2002) 34
2.11.3 New Device Can Detect Heart Attacks Early
(Miami, 9thApril 2012) 35
2.11.4 Tiny Implant Chip Could Detect Heart Attacks Before They Happen
(Switzerland, 21stMarch 2013) 36
3 METHODOLOGY 37
3.1 Methodology 37
3.2 Project Flowchart 39
3.2.1 Development of Hardware 40
xi
4 RESULTS AND DISCUSSION 41
4.1 Results 41
4.1.1 Description of Project 41
4.2 Hardware 44
4.2.1 Controller Unit 44
4.3 Software 47
4.3.1 C Compiler Written in C Language 47
4.3.2 Eclipse Written in Java 47
4.4 Outcome 49
4.4.1 Prototype 49
4.4.2 Application in Smartphone 51
4.5 Comparisons Among Existing Inventions 56
5 CONCLUSION AND RECOMMENDATION 58
5.1 Conclusion 58
5.1.1 Why Smart Health Alert System (SHAS) is
important? 58
5.2 Achievements 60
5.3 Recommendations 61
5.3.1 Potential of Commercialization 61
5.3.2 Research Advancement 62
xii
LIST OF TABLES
TABLE TITLE PAGE
2.1 List of Android versions 13
2.2 Monitor station command codes 15
2.3 Monitor station message codes 16
2.4 Internal interrupts used in PIC16F877A program 17
2.5 The specifications of the Bluetooth Bee module used 19 2.6 Status ofLight Emitting Diode (LED) 20
2.7 Pin function 20
2.8 Test 22
2.9 Reset 22
xiii
LIST OF FIGURES
FIGURE TITLE PAGE
2.1 Metria patch-based wearable sensor 10
2.2 Datasheet of PIC16F877A 14
2.3 Bluetooth Bee module 18
2.4 Bluetooth Bee module on SKXBee-board 21
2.5 Bluetooth Bee module and dongle communication 23
2.6 LM1117 voltage regulator 25
2.7 LM7805 voltage regulator 26
2.8 Signals from multiple satellites to calculate a position 30
2.9 AngelMed Guardian device 35
3.1 Flowchart of the project 39
4.1 Flow diagram of the project 42
4.2 Circuit design of controller unit 44
4.3 Circuit design of controller unit PCB 45
xiv
LIST OF ABBREVIATIONS
SHAS - Smart Health Alert System
SMS - Short Message Service
GPS - Global Positioning System SDK - Software development kit
OS - Operating system
bpm - beats per minute
MI - Myocardial Infarction
AMI - Acute Myocardial Infarction
GND - Ground
ADC - Analog to digital converter PDA - Personal Digital Assistant
LAN - Local Area Network
apps - Applications
A/D - Analog-to-Digital
SPI - Serial Peripheral Interface I C - Inter-Integrated Circuit
USART - Universal Asynchronous Receiver Transmitter
LED - Light Emitting Diode
SME - Small and medium enterprises
GSM - Global System for Mobile Communications ETSI - European Telecommunications Standards Institute
1G - First generation
2G - Second generation
GPRS - General Packet Radio Services
xv
3G - Third generation
UMTS - Universal Mobile Telecommunication System
4G - Fourth generation
LTE - Long Term Evolution
SMSC - Short Message Service Center HLR - Home location register
DoD - Department of Defense
SS - Space segment
CS - Control segment
US - User segment
DGPS - Differential Global Positioning System
RF - Radio frequency
ISM - Industrial, Scientific and Medical SIG - Special Interest Group
EPFL - Swiss Federal Institute of Technology in Lausanne
xvi
APPENDIX
NO TITLE PAGE
A Android Manifest of ACN Application 66
B “Menu.java” 69
C “SMS.java” 74
CHAPTER 1
INTRODUCTION
This chapter discussed about the project background, the problem statements of
the project, objective of the project and scope of work.
1.1 Project Background
Smart Health Alert System (SHAS) functions as an intelligent system that works
together with a smartphone. The Smart Health Alert System (SHAS) via smartphone
creates a system that has a sensor to sense any irregular condition of the patient’s heart
and will automatically send Short Message Service (SMS) to predefined numbers such
as the patient itself, family members and medical teams to alert them about the patient
heart’s condition.
The exact location of where the patient is currently at, in the form of Longitude
and Latitude provided by the Global Positioning System (GPS) will also be included into
the Short Message Service (SMS) to aid the medical team to reach to the patient within
the golden time.
The Smart Health Alert System (SHAS) via smartphone is a cost effective and
2
eventually helps to prevent the gradual decline in quality of life of the people. This smart
system will be established by using the Bluetooth technology. Through this system,
patients will be alert about their heart’s condition anytime and anywhere.
With this system, patient can be independent as their family members, friends
and health consultants do nothave to worry for not being by patient’s side all the time to
make sure that patient is fine. This Smart Health Alert System (SHAS) is beneficial as it
decreases the risk of death in people’s life.
1.2 Problem Statement
For more than three decades of periods, the heart problem has been the number
one killer of Malaysians. The statistics shows no signs of decrement of the numbers of
people died because of heart problem. Unfortunately, the numbers are actually
increasing at a quite shocking rate. In Malaysia, there are 10 million of people who have
unhealthy cholesterol level in their body, one out of five Malaysian will be suffering
from diabetic and about 50% of the Malaysians are suffering from obesity. All of these
people are exposed to high risks of having heart problem[1].
Patients who had heart problem are worried about their heart condition almost
every minute. Some of them might need to spend most of their time in the hospitals and
most of them could not enjoy their daily routine. They need more attention and care for
their heart’s condition. Heart problem attacks its victims suddenly but sometimes
“silently”. There is no proper system to help patients to understand the condition of the
heart by themselves.
Most of the patients do not know when the heart will be having problems again
that may cause damages to the heart muscle or even lead to death. There are no special
devices or anyone to tell them about how the current condition of their heart. Therefore,
heart attack patients with history should go for regular check-up for their heart but they
usually forget or missed the appointment. This might caused their heart to become worse
3
It is hard for the family members, friends or the health care providers to know
the exact condition of the patient’s heart as they are not besides them all the time to
check on their condition.
Besides, there is no proper way to identify the location of the patient who is
suffering from a heart attack so no help can be sent to them as soon as possible. The
patient itself is also unable to notify those around them that he is suffering from heart
attack and unable to get immediate help within golden hour which is the first hour after
the onset of heart attack[2].
1.3 Project Objectives
a) To develop a health alert system via smartphone that monitors the condition of
the heart.
b) To study Short Message Service (SMS) functionality and create a system that
will automatically send the Short Message Service (SMS) to predefined numbers
when the sensor detectsany irregular condition of the patient’s heart.
c) To study on Global Positioning System (GPS) and create a system that is able to
locate the exact location of patients who is suffering a heart attack.
d) To study on an alarm system that alerts the people around patient through
4
1.4 Scope of Study
The scope of this project comes in a few categories as stated:
a) Develop an Android software program for the smart health alert system by using
the Eclipse software development kit (SDK) written in Java. This software
program will be used by modern smartphones with Google’s Android mobile
operating system (OS).
b) Create the pairing of BlueBee with smartphone through Bluetooth technology
where users need to activate the system before using it and once system is
triggered, it will automatically sends Short Message Service (SMS) to predefined
numbers.
c) Global Positioning System (GPS) that will provide the exact location of the
patient in Longitude / Latitude and be included in the Short Message Service
(SMS).
d) Short Message Service (SMS) that will be automatically sent to predefined
numbers which can be easily changed or updated, functions to remind about
heart’s condition and alerts if any medical help is needed.
e) Alarm system that is able to catch people’s attention through audible and visible
5
1.5 Brief Methodology Explanation
The methodology will begin with the start process. Then, it flows to the literature
review process where the studies on the human heart, sensors, smartphone, PIC16F877A
microcontroller, BlueBee device, Short Message Service (SMS), Global Positioning
System (GPS) in Longitude/Latitude and Bluetooth technology are done.
Next, it will continue with the software and hardware development in parallel.
On the software part, the studies on Eclipse software development kit (SDK) written in
Java, Short Message Service (SMS), Global Positioning System (GPS) in
Longitude/Latitude and Bluetooth technology concept will be done while on the
hardware part, the sensors, PIC16F877A microcontroller, BlueBee device and Android
smartphone will be reviewed.
These software and hardware will undergo the integration process to check for
compatibility. If the compatibility is successful, it will proceed to the next process which
is the testing and troubleshooting process. If the compatibility is unsuccessful, the
integration process will be repeated until it succeeded.
In the testing and troubleshooting part, test runs will be conducted to check for
stability and functionality. It will then proceed to the verification process where the
6
1.6 Structure of Report
In Chapter 1, the introduction is a brief overview of the whole project that has
been carried out. The importance of the projects and the main perspectives of the
researches are explained too. As for the objectives of the project, the list to be achieved
are listed and described in detail. The problem statements will discuss about the issues
related to the project conducted in order to find the suitable solutions to solve and
improve the existing situation. The scope of study of the project are well stated which
includes limitations or restrictions of the project, other materials or equipments that
covers software and hardware.
In Chapter 2, the literature review of the researches made for the project were
explained in order to consider the critical points of the current knowledge of the findings
which includes theoretical studies. Studies on the existing projects which have some
similarity with the proposed project were briefly explained too.
In Chapter 3, the methodology of the proposed project will be used as the
guideline system to help to solve the problems faced while handling this project.
Specific ways and ideas in order to make this project successful were implemented.
In Chapter 4, the final output from the project was explained and discussed. The
analysis of the software and hardware were also discussed too. The Graphic User
Interface (GUI) of the project was shown in the result part. Comparisons between the
existing projects and the proposed project were made.
In Chapter 5, the conclusion of the proposed project was discussed and
7
CHAPTER 2
LITERATURE REVIEW
This chapter will discuss about the reviews of the researches done which is
related to this project. There are project reviews on the human heart, sensors,
smartphone, PIC16F877A microcontroller, BlueBee device, Short Message Service
(SMS), Global Positioning System (GPS) in Longitude/Latitude, Bluetooth technology
concept and existing project.
2.1 Human Heart
The heart is one of the most valuable organs in the human body. It functions as a
pump, hollow muscle that pumps blood throughout the blood vessels by repeated and
rhythmic contractions. A heart is principally composed of cardiac muscle and connective
tissue. Cardiac muscle is an involuntary striated muscle tissue found only in this organ
and responsible for the ability of the heart to pump blood.
The walls of a human heart are made up of three layers while the cavity is
divided into four parts. The two upper chambers are called the left and right atria while
8
blood from the lungs and other parts of the body while the ventricle is the one that pump
it to the lungs and other parts of the body.
Heart beats approximately 72 times per minute to pumps blood which carries all
the vital materials that helps human bodies function and removes waste materials that
the body does not need. With the average heart rate of 72 beats per minute (bpm), the
heart is able to pump about 5 liters of blood per ventricle or about 10 liters of blood total
per minute. If the heart ever discontinues to pumps blood, the body will start to shut
down and after a very short period of time the human will die[3].
The human heart as one of the most important organs in the human body
provides a continuous blood circulation through the cardiac cycle. Heart pumps about
80cc of blood per heart beat. A normal heart rate is 60 to 100 heart beats per minute
(bpm) [4]. During a heart attack, the heart rate becomes slow; below 60 heart beats per minute (bpm).
Heart disease could be silent in the early stage. Heart attack occurs when the
blood supply could not reach to a part of the heart, causing heart cells to die: usually due
to blockage of coronary artery. There are a few symptoms of a heart attack that includes
discomfort or pain in the chest and arm, heartburn, sweating or vomiting, shortness of