You are on page 1of 98

ARDUINO BASED HEART RATE MONITORING AND

HEART ATTACK DETECTION SYSTEM

By

DUAA ELSAYED IDRIS BABIKER

INDEX NO. 124046

Supervisor

Prof. Sami Sharif

A REPORT SUBMITTED TO

University of Khartoum

In partial fulfillment of the degree of

B. SC (HONS) Electrical and Electronic Engineering

(COMMUNICATION ENGINEERING)

Faculty of Engineering

Department of Electrical and Electronic Engineering

October, 2017
DECLARATION OF ORGINALITY

I declare this report entitled “ARDUINO BASED HEART RATE MONITORING AND HEART ATTACK

DETECTION SYSTEM” is my own work except as cited in references. The report has been not
accepted for any degree and it is not being submitted currently in candidature for any degree or
other reward.

Signature: ____________________
Name: _______________________
Date: ________________________

ii
ACKNOWLEDGMENT
I would like to express my gratitude to my supervisor Prof. Sami Sharif for his dedication and
guidance through this journey.

I would also like to thank my colleagues and everyone who helped me and wished for the project
success.

Finally, many thanks to my project partner NOON MOHAMMED. I could haven’t ask for a
better partner.

iii
DEDICATION
To my father, my mother, my sisters and brothers; without you I would not have been here.

To all the great friends who won’t hesitate in surrounding me with love and support
whenever needed, I’m blessed.

Special dedication to my friend, Serien Hashim without whose never failing encouragement,
this thesis wouldn’t have been finished.

To me five years ago. I MADE IT.

iv
Abstract
Heart rate is affected by body temperature, heat is an important indicator that needs to
be .monitored so that any abnormality can be detected early enough to allow treatment

The need for a portable device of a suitable size for the daily activities of the measurement and
control of vital indicators.

The aim of this project is to design and develop a device that continuously monitors the vital
indicators, as it periodically measures heart rate and temperature. It also triggers an alarm in
case the signal has been measured above or below predetermined values. In addition, it sends
this information via Bluetooth technology to be displayed in the Andoroid application interfaces
to be saved in the database files and retrieved upon request.

In addition, the project aims to develop a common platform to provide a means of


communication between the doctor and patient, where the doctor can see the patient's daily
records.

v
‫المستخلص‬
‫ً‬ ‫ً‬
‫ألن نسبة و القلب ضربات في خلل أو تسارع لحدوث عرضة أكثر أنهم حيث الحيوية لمؤشراتهم دائمة ومراقبة خاصة عناية يحتاجون القلب مرضى‬
‫‪.‬بالعالج يسمح مبكر وقت في خلل أي إكتشاف نستطيع حتى مراقبته يجب مهم مؤشر الحرارة فإن ‪،‬الجسم حرارة بدرجة يتأثر القلب ضربات معدل‬

‫‪.‬الحيوية المؤشرات ومراقبة قياس بعملية يقوم اليومية للنشاطات مناسب حجم ذو محمول لجهاز الحاجة ظهرت عليه‬

‫كما ‪.‬دورية بصورة والحرارة القلب ضربات معدل بقياس يقوم حيث ‪،‬الحيوية للمؤشرات مستمر بمراقبة يقوم جهاز تطوير و تصميم إلى المشروع هذا يهدف‬
‫البلوتوث تقنية عبر المعلومات هذه بإرسال يقوم أنه إلى باإلضافة ‪.‬مسبقا محددة قيم من أقل أو أعلى قياسها تم الي اإلشارة كانت حالة في إنذار بإطالق يقوم أنه‬
‫‪.‬الطلب عند وإسترجاعها البيانات قواعد ملفات في حفظها ليتم األندوريد تطبيق واجهات في عرضها ليتم‬

‫المريض سجالت على اإلطالع من الطبيب يستطيع حيث والمريض الطبيب بين تواصل وسيلة لتوفير مشتركة منصة لتطوير يهدف المشروع أن إلى باإلضافة‬
‫‪.‬اليومية‬

‫‪vi‬‬
Table of Contents

DECLATION OF ORIGINALITY
CHAPTER ONE: INTRODUCTION: ............................................................................................ 1

1.1. Background: ......................................................................................................................... 1

1.2. Problem Statement: .............................................................................................................. 1

1.3. Objectives: ........................................................................................................................... 2

1.4. Motivation:........................................................................................................................... 2

1.5. Project Scope: ...................................................................................................................... 3

1.6. Thesis Layout: ...................................................................................................................... 3

CHAPTER TWO LITREATURE REVIEW .................................................................................. 4

2.1. Overview: ............................................................................................................................. 4

2.2. Heart:.................................................................................................................................... 4

2.3. Electrocardiograph: .............................................................................................................. 9

2.4. Photoplethysmograph: ....................................................................................................... 10

2.5. Heart Attack: ...................................................................................................................... 11

2.6. Microcontrollers:................................................................................................................ 13

2.7. Bluetooth: ........................................................................................................................... 14

2.8. Related Work: .................................................................................................................... 14

CHAPTER THREE IMPLEMENTATION AND DESIGN ........................................................ 20

3.1. Overview: ........................................................................................................................... 20

3.2. High Level Project Design: ................................................................................................ 20

3.3. Detailed Level Project Design: .......................................................................................... 22

3.3.1. Hardware Design: ....................................................................................................... 22

3.3.2. Software Design: ......................................................................................................... 28

vii
3.4. Hardware Implementation: ................................................................................................ 36

3.5. Conclusion: ................................................................................................................. ....... 36

CHAPTER FOUR: RESULTS AND DISCUSSION ................................................................... 38

4.1. Results: ............................................................................................................................... 38

4.1.1 Heart Rate Results in Serial Plotter: ............................................................................ 38

4.1.2 Body Temperature Results in Serial Monitor: ............................................................. 39

4.1.3 Bluetooth Response in Android Application: .............................................................. 40

4.1.4 GPS Response in Android Application: ...................................................................... 41

4.2. Discussion: ..................................................................................................................... 43

CHAPTER FIVE: CONCLUSION............................................................................................... 44

5.1. Conclusion: ........................................................................................................................ 44

5.2. Challenges and Limitations: .............................................................................................. 44

5.3. Accomplishments:.............................................................................................................. 45

5.4. Future Work: ...................................................................................................................... 46

APPENDENCIES ........................................................................................................................... 1

Appendix A: C code for Nano Arduino. ..................................................................................... 1

Appendix B: Java code for Anrdoid Studio. ............................................................................... 1

Appendix C: PHP code for DB. .................................................................................................. 1

Appendix D: Cost Analysis. ..................................................................................................... 47

viii
List of Figures
Figure 2.1 Structure of the heart and blood flow…………………. ............................................................. 5

Figure 2.2 Radial Method .................................................................................................................................... 7


Figure 2.3 Carotid Method ................................................................................................................................... 8
Figure 2.4 Heart Rate Monitors Method ..........................................................................................................9
Figure 2.5 Normal ECG………………………………...............................................................................9
Figure 2.6 PPG of different conditions .......................................................................................................... 10

Figure 3.1 Overall system’s illustration ....................................................................................................... .21

Figure 3.2 System’s block diagram. .............................................................................................................. 21

Figure 3.3 Project’s system classification of units. ................................................................................... 22

Figure 3.4 Pulse Sensor ..................................................................................................................................... 23


Figure 3.5 Interface between Pulse sensor and MCU. .....................................……………………...24
Figure 3.6 LM35 Temperature Sensor ......................................................................................................... .25
Figure 3.7 Interface between LM35 and MCU .......................................................................................... 26

Figure 3.8 Nano Arduino .................................................................................................................................. 26

Figure 3.9 HC-05 Bluetooth Module ......................................................... ……………………………27

Figure 3.10 Buzzer ………………………………………………………………………………28

Figure 3.11 Login Interface..…………………………………………………………………….31

Figure 3.12 Registration Interface……………………………………………………………….31

Figure 3.13 Patient Registration Interface……………………………………………………….32

Figure 3.14 Doctor Registration Interface……………………………………………………….32

Figure 3.15 Patient View Interface………………………………………………………………33

Figure 3.15 Doctor View………………………………………………………………………...33

Figure 3.16 Patient’s ID Registration……………………………………………………………34

Figure 3.17 Patient’s ID…………………………………………………………………………34

ix
Figure 3.18 Enable Bluetooth and GPS Services………………………………………………...35

Figure 3.19 Implementation of the Overall System……………………………………………...36

Figure 4.1 HR Wave Output in Serial Plotter……………………………………………………38

Figure 4.2 HR Values Output in Serial Monitor…………………………………………………39

Figure 4.3 Temperature Output in Serial Monitor……………………………………………….40

Figure 4.4 Bluetooth Enabling Notification……………………………………………………...41

Figure 4.5 Bluetooth Pairing With HC-05……………………………………………………….41

Figure 4.6 GPS Enabling………………………………………………………………………...42

Figure 4.7 Coordinates obtained by GPS………………………………………………………...42

x
List of Tables
Table 2.1 Heart Rate and Respiratory Rate for Different Ages…………………………………...6

Table 2.2 Heart Rate and Respiratory Rate for Different Age .............................................................. 16

xi
List of Abbreviations
ADC Analog-to-Digital Converter

AS Android Studio

CVD Cardiovascular Disease

DB Database

DC Direct Current

ECG Electrocardiogram

GND Ground

GPS Global Positioning System

GUI Graphical User Interface

HR Heart Rate

IBI Inter-Beats Interval

IC Integrated Circuit

IDE Integrated Development Environment

LED Light Emitting Diode

MCU Microcontroller Unit

OS Operating System

PCB Printed Circuit Board

PIO Programmable Input/Output Line

PPG Photoplethysmogram

SMS Short Message Service

xii
SPP Serial Port Protocol

UART Universal Asynchronous Receiver-Transmitter

USB Universal Serial Bus

WHO World Health Organization

WWW World Wide Web

xiii
CHAPTER ONE INTRODUCTION

CHAPTER ONE

INTRODUCTION

1.1. Overview:
Telemedicine is the use of medical information exchanged from one site to

another via electronic communications to improve patient's health status. Telemedicine

is a newest technology which combining telecommunication and information technology

for medical purposes [1]. It gives a new way to deliver health care services when the

distance between the doctor and patient is significantly away. Rural area will get the

benefit from this application. Patient monitoring is one of the telemedicine, which

always needs improvement to make it better. It is vital to care in operating and

emergency rooms, intensive care and critical care units. It is also important for

respiratory therapy, recovery rooms, out-patient care, radiology, ambulatory, home and sleep
screening applications.

The advantages of a patient monitoring system are it can reduce the risk of

infection and other complication in order to make the patients comfortable.

Furthermore, implement of patient monitoring in hospitals might reduce the costs in

terms of installation and also maintenance of wiring

1.2. Problem Statement:


According to WHO, 17 million people die from CVD Which makes up to 31% of the deaths
worldwide. Hence a method to prevent or to help in reducing the losses of people's lives..

1
CHAPTER ONE INTRODUCTION

1.3. Objectives:
The goal of this thesis is design low-cost device which measures the heart rate

of the subject by clipping sensors on one of the fingers and then displaying the result on a

android application interface.. Miniaturized heart rates monitor system based on a


microcontroller. It

offers the advantage of portability over tape-based recording systems. The thesis explains

how a single-chip microcontroller can be used to analyze heart beat rate signals in realtime.

the Hardware and software design are oriented towards a single-chip

microcontroller-based system, hence minimizing the size.

1.4. Motivation:
Cardiovascular disease is one of the main causes of death in the many countries, it accounted for
over 15 million deaths worldwide. In addition, several million people are disabled by
cardiovascular disease. The delay between the first symptom of any cardiac ailment and the call
for medical assistance has a large variation among different patients and can have fatal
consequences.

One critical inference drawn from epidemiological data is that deployment of resources for early
detection and treatment of heart disease has a higher potential of reducing fatality associated with
cardiac disease than improved care after hospitalization.

Hence new strategies are needed in order to reduce time before treatment. Monitoring of patients
is one possible solution.

This project can be used in hospitals (Calling Ambulance.) and also for patients who can be
under continues monitoring while traveling from place to place (using heart rate band).

2
CHAPTER ONE INTRODUCTION

Since the system is continuously monitoring the patient and in case of any abnormal in the heart
beat rate of the patient the system will immediately send message to the concerned doctors and
relatives about the condition of the patient and abnormal details..

1.5. Project Scope:


The scopes in this project include the hardware and software parts. For the hardware part, ECG
circuits have been designed in order to interpret data from ECG simulator, which act as a patient.
Then, a temperature sensor was developed to measure

the temperature of human being. Both systems are controlled by Arduino Nano board,

which connected to the Bluetooth module and need some programming works. For the software
part As and Arduino IDE software have been used.

1.6. Thesis Layout:


This thesis is made up of five main chapters:

Chapter One: provides an overview of this project as a whole containing a background about the
project, objectives, motivation, scope of the project and finally the thesis layout.

Chapter Two: contain brief introduction about the heart and heart rate as well as literature review
discussion about remote health monitoring systems.

Chapter Three: specify the design methods used, system operations, implementation
techniques and a description on the components used.

Chapter Four: present the results obtained from the system implementation and a brief discussion
on these results.

Chapter Five: includes a final conclusion of the project and possible future work
and enhancements on the project performance

3
CHAPTER TWO LITERATURE REVIEW

CHAPTER TWO

LITERATURE REVIEW

2.1. Overview:
Vital signs derive its significance from the fact that they can be considered as an indication of the
person’s health. Any change in the measurements of these signs indicates an abnormality in the
physical condition of the patient. A considerable number of medical conditions can be detected
from variations in one or more of the vital sign. The specialized devices for measuring the vital
signs are not portable and can’t be found anywhere. Hence, in this thesis, the concept of using an
arm band (potable heart rate monitor) and mobile phone as a diagnosing tool. [1]

There are four vital signs which are standard in most medical settings:

1. Pulse rate.
2. Respiratory rate.
3. Blood pressure.
4. Body temperature.

2.2. Heart:
The heart is the main organ within the human body, which responsible for pumping blood
throughout the body. It is located in the middle of the thorax, slightly offset to the left and
surrounded by the lungs.

The heart is made up of two separate pumps: a right heart that pumps blood through the lungs,
and a left heart that pumps blood through the peripheral organs as shown in Figure 2.1. At the
same time, each of these hearts is a pulsatile two chamber pump composed of an atrium and a

4
CHAPTER TWO LITERATURE REVIEW

ventricle. Each atrium is a pump helps in moving blood into the ventricle. Then the ventricles
supply the main pumping force that propels the blood either through the pulmonary circulation
by the right ventricle or through the peripheral circulation by the left ventricle.

That blood passes through the right ventricle and is pumped to the lungs where it is oxygenated
and goes back to the heart through the left atrium, and then the blood passes through the left
ventricle and is pumped again to be distributed to the entire body through.

The heart also consists of three major types of cardiac muscle: atrial muscle, ventricular muscle,
and specialized excitatory and conductive muscle fibers. The atrial and ventricular types of differ
from the specialized excitatory muscles in the method of contraction. The latter muscles exhibit
either automatic rhythmical electrical discharge or conduction of the action potentials through
the heart, providing an excitatory system that controls the rhythmical beating of the heart.

The cardiac events that occur from the beginning of one heartbeat to the beginning of the next
are called the cardiac cycle. [2], [3], [4]

Figure 2.1 Structure of the heart and blood flow.

5
CHAPTER TWO LITERATURE REVIEW

Heart Rate:

HR is the rate at which the heart beats and affected by the expansion of the arterial wall with
each every beat. The most prominent areas for the pulses are wrist (Radial artery), neck (Carotid-
artery), inside of the elbow (Brachial artery), behind the knee (Popliteal artery) and ankle joint
(Posterior artery).

The HR changes according to age and the physical and psychological impacts on the body.
Higher pulse rate indicates the presence of abnormality in the body which can also be caused by
other reasons such as anxiety, anger, excitement, emotion, and heart disorders. The pulse rate of
an individual can help in determining various problems within the body, but it cannot be used
lone to diagnose an abnormality. [2], [5]

The average heart rate is about 72 bpm for sedentary males and 80 bpm for sedentary females
but these rates are often significantly different for trained athletes.

Table 2.1 Heart Rate and Respiratory Rate for Different Ages

Heart
Age Rate Respiratory
Rate
(BPM)
(Breathes/min)

0-5 months 90-150 25-40

6-12 months 80-140 20-30

1-3 years 80-130 20-30

3-5 years 80-120 20-30

6-10 years 70-110 15-30

6
CHAPTER TWO LITERATURE REVIEW

11-14 years 60-105 12-20

14+ years 60-100 12-20

Effect of Temperature on Heart Function:

Variations in body temperature can cause a greatly variations in heart rate in a proportional
relationship. Decreased temperature can cause the HR to fall as low as a few beats per minute
when a person is near death when the body temperature range of 60° to 70°F. These effects
assure the fact that heat increases the permeability of the cardiac muscle membrane to ions that
control heart rate, resulting in acceleration of the self-excitation process.

Heart Rate Measurements Methods:

There are several methods to measure the heart rate, the most used methods:

Radial:

It is taking the Pulse on the Wrist. By holding the palm of theright hand facing upwards, placing
the tips of the middle three fingers from the left hand on the wrist joint and count the number of
beats for six seconds. If we multiplied this number by ten it gives the BPM.

Figure 2.2 Radial Method

7
CHAPTER TWO LITERATURE REVIEW

Carotid:

It is taking the pulse on the Throat. By placing two fingers (first and second) lightly on the side
of the throat just below the angle of the jaw. A pulse would be felt from the jugular vein. Count
the number of beats for six seconds. Multiplying this number by ten will give the BPM.

Figure 2.3 Carotid Method

Heart Rate Monitors:

Many heart monitoring devices ensure a more accurate measure of heart rate than manual
methods. In most physical training situations they are the preferred method. These devices
advantages:

1. Far more accurate than finger tests.


2. Give continuous and real-time readings that can be viewed via digital display.
3. When the heart rate is measured a simple formula can be used to work out whether the
individual is training at the right intensity:
220 - Age = Maximum Heart Rate
4. Small and lightweight to carry. Some can be programmed to sound an alarm or warning
when set heart rate ranges are breached. [5], [6]

8
CHAPTER TWO LITERATURE REVIEW

Figure 2.4 Heart Rate Monitors Method

2.3. Electrocardiograph:
Electrical current flows from the heart and a small fraction of it makes it way to the body surface
as the cardiac impulse go through the heart. Electrocardiograph or ECG for short detects and
records these electrical signals that are responsible for pumping blood by the heart all around the
body.

A normal electrocardiogram is shown in Figure.

Figure 2.5 Normal ECG.

ECG is an indication of the patient’s heart health by recording the electrical activity to be read by
specialized doctors which able to extract vital signs from it. Hence, HR can be calculated from
ECG. [7]

9
CHAPTER TWO LITERATURE REVIEW

2.4. Photoplethysmograph:
The PPG is a low-cost and portable technique that for measuring blood volume changes by
collecting the variations in reflected or transmitted light. The blood pressure, blood oxygen
saturation, HR, cardiac output recently and information of the cardiovascular system can be
supplied with this technique. PPG experiences developments continuously, some researchers
have used digital cameras and others a smart phone to detect HR by PPG technique.

However, overcoming the motion artifact is a huge challenge for PPG as it is sensitive it.
Adaptive noise cancellation (ANC), which uses accelerometers as a noise reference, is proposed
in order to help in reducing the affection of motion artifact. [7].

Figure 2.6 PPG of different conditions.

10
CHAPTER TWO LITERATURE REVIEW

2.5. Heart Attack:


Cardiovascular diseases (CVDs) are disorders of the heart and blood vessels which they include:

1. Coronary heart disease which is a disease of the blood vessels supplying the heart
muscle;
2. Cerebrovascular disease which is a disease of the blood vessels supplying the brain;
3. Peripheral arterial disease which is a disease of blood vessels supplying the arms and
legs;
4. Rheumatic heart disease which is a damage to the heart muscle and heart valves from
rheumatic fever, caused by streptococcal bacteria;
5. Congenital heart disease which is malformations of heart structure existing at birth;
6. Deep vein thrombosis and pulmonary embolism which is blood clots in the leg veins,
which can dislodge and move to the heart and lungs.

Heart attacks and strokes are usually acute events and are mainly caused by a blockage that
prevents blood from flowing to the heart or brain. The most common reason for this is a build-up
of fatty deposits on the inner walls of the blood vessels that supply the heart or brain. Strokes can
also be caused by bleeding from a blood vessel in the brain or from blood clots. The cause of
heart attacks and strokes are usually the presence of a combination of risk factors, such as
tobacco use, unhealthy diet and obesity, physical inactivity and harmful use of alcohol,
hypertension, diabetes and hyperlipidaemia.

The most important behavioral risk factors of heart disease are unhealthy diet, physical
inactivity, tobacco use and harmful use of alcohol. These risks affect raised blood pressure,
raised blood glucose, raised blood lipids, and overweight and obesity.

Symptoms of Heart Attacks:

Often, there are no symptoms of the underlying disease of the blood vessels. A heart attack or
stroke may be the first warning of underlying disease. Symptoms of a heart attack include:

11
CHAPTER TWO LITERATURE REVIEW

- Pain or discomfort in the centre of the chest;


- Pain or discomfort in the arms, the left shoulder, elbows, jaw, or back.

In addition the person may experience difficulty in breathing or shortness of breath; feeling sick
or vomiting; feeling light-headed or faint; breaking into a cold sweat; and becoming pale.
Women are more likely to have shortness of breath, nausea, vomiting, and back or jaw pain.

The most common symptom of a stroke is sudden weakness of the face, arm, or leg, most often
on one side of the body.

Rheumatic heart disease is caused by damage to the heart valves and heart muscle from the
inflammation and scarring caused by rheumatic fever. Rheumatic fever is caused by an abnormal
response of the body to infection with streptococcal bacteria, which usually begins as a sore
throat or tonsillitis in children.

Rheumatic fever mostly affects children in developing countries, especially where poverty is
widespread. Globally, about 2% of deaths from cardiovascular diseases is related to rheumatic
heart disease.

At least three quarters of the world's deaths from CVDs occur in low-and middle-income
countries. That is due to people in these countries often does not have the benefit of integrated
primary health care programs for early detection and treatment compared with high-income
countries.

People in low- and middle-income countries who suffer from CVDs have less access to effective
and equitable health care services which respond to their needs. As a result, many people are
detected late in the course of the disease and die younger from CVDs.

At macro-economic level, CVDs place a heavy burden on the economies of low-and middle-
income countries.

12
CHAPTER TWO LITERATURE REVIEW

To reduce the burden of CVD in low-income implemented even in low-resource settings have
been identified by WHO for prevention and control of cardiovascular diseases. They include two
types of interventions: population-wide and individual.

According to WHO, population-wide interventions that can be implemented to reduce CVDs


include:

1. Comprehensive tobacco control policies


2. Taxation to reduce the intake of foods that are high in fat, sugar and salt
3. Building walking and cycle paths to increase physical activity
4. Strategies to reduce harmful use of alcohol
5. Providing healthy school meals to children.

At the individual level, for prevention of first heart attacks and strokes, individual health-care
interventions need to be targeted to those at high total cardiovascular risk or those with single
risk factor levels above traditional thresholds, such as hypertension and hypercholesterolemia.
The former approach is more cost-effective than the latter and has the potential to substantially
reduce cardiovascular events. This approach is feasible in primary care in low-resource settings,
including by non-physician health workers. [8], [9]

2.6. Microcontrollers:
A microcontroller (MCU) is a small computer on a single IC. The program loaded in it specifies
its functions. Like all computers microcontrollers are equipped with a central processing unit or
CPU, a memory system, an input/output system, a clock or timing system, and a bus system to
interconnect constituent systems. The bus system includes an address bus, a data bus, and a
control bus. The MCU consists of many systems that are usually integrated single integrated
circuit package.

13
CHAPTER TWO LITERATURE REVIEW

2.7. Bluetooth:
A Bluetooth technology is a high speed low powered wireless technology link, designed to
connect portable devices together. It is a specification (IEEE 802.15.1) for the use of low power
radio communications to link these devices over short distance up to 10 meters only without
using cables. It is achieved by embedded low cost transceivers into the devices.

Bluetooth can connect up to 8 devices simultaneously with each device offers a unique 48 bit
address from the IEEE 802 standard with the connections being made either point to point or
multipoint.

Bluetooth Principle:

Bluetooth Network includes a Personal Network Area which consists of a minimum of 2 - 8


Bluetooth peer devices. It often includes a single master, which is a device responsible for
initiating and controlling the communication with other devices and seven slaves, which are the
devices that has a response to the master. Synchronization of transmitting and receiving timing
between a master and its slaves is required for the communication to take place.

2.8. Related Work:


Today, there are many people suffering from heart problems, and therefore there is a need for
follow-up on a daily basis and sometimes periodic. Since it’s impractical to go to the hospital
every day , there are many applications were developed to be used to follow a patient , but each
application is different from the other in terms of accuracy so we need to know which application
is more accurate than the rest.

The purpose of the survey we did was to determine the specific accuracy of randomly chosen
heart rate android applications against digital heart rate monitor.

This study analyzes different behaviors of existing heart rate monitoring applications for
suggestion of future improvement in the accuracy.

14
CHAPTER TWO LITERATURE REVIEW

The society as a whole will benefit from this study as it provides an easy and portable way for
measuring the daily heart rate especially for cardiovascular disease patients and other heart
diseases. This study was conducted on university students their ages range from and the size of
the sample is 20. Data used for this study was collected from measuring the heart rate of a group
of students at University Of Khartoum Faculty Of Engineering.

The heart rate was measured first using the manual method and the digital heart rate monitor
under the supervision of certified doctor .Then using five different heart rate monitoring android
applications all for the same person to compare the resulting heart rate from each method.

The used android applications:

- Instant Heart Rate .


- Runtastic Heart Rate.
- Cardiograph.
- Pedometer And Heart Rate Monitor.

Sample of size twenty (10 female and 10 male) students was selected randomly from the first to
fifth year students. This study may be limited to the locally conducted experiment using specific
android applications (stated above).

Also, the randomness of the sample do not take into account the medical history of the student
(consider the normal heart rate).

The resulting accuracies are limited to the size of the sample. For better results, the experiment
should be conducted on a larger scale

Results are listed as shown in the Table 2.2 below which contains the measurement results for
each application on its own:

15
CHAPTER TWO LITERATURE REVIEW

Table 2.2 Heart Rate and Respiratory Rate for Different Ages

Application/ Digital Instant Runtasti Cardiograp Pedometer Age Gender


Heart Heart c h
Number And Heart
Rate Rate Heart Rate
Monitor Rate Monitor

1 93 89 89 72 89 22 F

2 72 73 73 58 71 22 F

3 72 78 76 69 72 19 F

4 104 97 - 58 99 18 F

5 121 107 - 85 110 18 F

6 111 112 - 54 109 20 F

7 79 80 - 84 89 18 F

8 84 86 - 54 85 22 F

9 101 87 - 80 88 18 M

10 102 89 - 54 90 19 M

11 77 76 - 65 89 18 M

12 77 73 - 57 77 22 M

13 92 77 - 50 94 22 M

16
CHAPTER TWO LITERATURE REVIEW

14 103 106 - 50 108 21 M

15 87 76 - 77 76 22 F

16 72 67 - 58 78 19 M

17 86 82 - 81 87 20 M

18 108 103 - 84 95 19 M

19 102 104 - 79 92 22 F

20 87 91 - 80 84 19 M

Note: for Runtastic heart rate monitor, it does not allow more than three attempts per day.

Table 2.3 Heart Rate and Respiratory Rate for Different Ages

Application/ Instant Runtastic Cardiograph Pedometer


Heart
Number Heart And Heart
Rate Rate Rate
Monitor

1 4.3% 4.3% 22.5% 4.3%

2 1.3% 1.3% 19.4% 1.3%

3 8.3% 5.5% 4.1% 0%

4 6.7% - 44.2% 4.8%

17
CHAPTER TWO LITERATURE REVIEW

5 11.5% - 29.7% 9%

6 0.9% - 51.3% 1.8%

7 1.2% - 6.3% 12.6%

8 2.3% - 35.7% 1.1%

9 13.8% - 20.7% 12.8%

10 12.7% - 47.0% 11.7%

11 1.2% - 15.5% 15.5%

12 5.1% - 25.9% 0%

13 16.3% - 45.6% 2.1%

14 2.9% - 51.4% 4.8%

15 12.6% - 11.4% 12.6%

16 6.9% - 19.4% 8.3%

17 4.6% - 5.8% 1.1%

18 4.6% - 22.22% 12.0%

19 1.9% - 22.5% 9.8%

20 4.3% - 8.0% 3.4%

18
CHAPTER TWO LITERATURE REVIEW

We found that “Instant Heart Rate Monitor” received the highest accuracy and “Cardiograph”
received the lowest accuracy. From this study we can conclude that “Instant Heart Rate Monitor”
is more accurate application compared to the digital heart rate monitor and other applications.

Depending on the findings and conclusions we found that:

- The patient should know the types of applications and how they are used.
- The patient should know which applications give accurate results compared to other
applications.
- The doctor should advise his patients to use the appropriate application according to the
patient’s condition.

19
CHAPTER THREE PROJECT DESIGN

CHAPTER THREE

PROJECT DESIGN

3.1. Overview:
The project design is considered the most important stage in the development process of each
projects, hence this step takes considerable time of the overall project lifecycle.

In this chapter the high level design followed by the detailed design of the project is being the
center of attention for detailed discussion. Both hardware and software designs are being
discussed here intensively, describing their components, algorithms and their circuit diagrams.
As well as specifying the detailed functions of the project’s units and interfaces implemented
between them.

3.2. High Level Project Design:


The overall project aim is taking continuous measurements of the patient vital signs in order to
detect a heart attack before it occurs so it can be treated immediately.

The pulse sensor converts the blood pulse into electrical signals which will be next processed
using the Arduino board according to the algorithm applied to it. Then output the measured data
in the android application interfaces via serial port Bluetooth communication. Finally the android
application will receive data from Arduino via serial port Bluetooth communication to be
displayed within its interfaces. While Android application offers communication between
patients and doctors through , measured data will be recorded and uploaded to our database from
within the patient’s accounts. In addition, the application provides a GPS feature to locate the
patient’s specific location.

20
CHAPTER THREE PROJECT DESIGN

At the same time, Arduino will keep monitoring the real-time HR henc the buzzer will peeps if
the heart rate exceeds a pre-defined maximum value or goes below a minimum to alert
surrounding people.

Figure 3.1 Overall system’s illustration.

Figure 3.2 System’s block diagram.

21
CHAPTER THREE PROJECT DESIGN

3.3. Detailed Level Project Design:


If we consider the project as a system containing several parts, the proposed system can be
divided into two main units, the hardware and the software units.

For further simplification, each one of these units is classified into categories based on their
functions as illustrated in Figure 3.3.

Figure 3.3 Project’s system classification of units.

3.3.1. Hardware Design:

Hardware of this project can be considered as integration of three units: the data acquisition, the
MCU, communication and alarm unit.

3.3.1.1. Data Acquisition Unit:

This unit is mainly responsible for obtaining patient’s vital parameters utilizing sensors.

22
CHAPTER THREE PROJECT DESIGN

Sensors are devices that detect the variations and mainly are two types of them, Optical and solid
state sensors. Optical sensors are while solid state sensors are

The two sensors used here are pulse sensor and the temperature sensor.

a. Pulse sensor:

It is an Open Source heart rate monitor which considered as a PPG device used to monitor
the non-invasive heart rate. It measures the real-time heart beats and calculates BPM with the
aid of algorithms implemented by Arduino.

This sensor has two sides, the front one which has a heart shape is the side to be attached to
the skin. The pins of the pulse sensors are three as shown in Figure 3.4 below.

If the frond side is facing you, then the most left pin is the GND while the middle one is the
input voltage which will be connected to the +5v of the Arduino. The last one for outputting
the electrical and will be wired with the analog bins of the Arduino.

Figure 3.4 Pulse Sensor

The Pulse sensor converts the physical PPG into electrical signals. The sensor outputs a raw
signal of analog voltage fluctuations, amplifies it and normalize the wave at V/2.

With every beat of the heart, a pulse wave travel along all arteries to the tissues where the Pulse
Sensor is attached.

23
CHAPTER THREE PROJECT DESIGN

When this pulse wave goes under the sensor, the signal experiences a rapid upward rise in its
value. It falls back down toward the normal point and before the next pulse sensor goes under the
sensor, the signal stabilizes to the ambient noise.

Due to the repetitive characteristic of the pulse wave, the peak is chosen as a reference point
because it’s recognizable. By applying calculation algorithm on the time between each two
successive peaks the heart rate is measured. Ideally we want to find the instantaneous moment of
the heart beat for accurate measurements.

According to heart researchers, the instantaneous moment is when the signal gets 25% or 50% of
its amplitude. This pulse sensor first measures the IBI when the signal gets 50% of the
amplitude, which from the BPM is derived from average of 10 IBI times. [10]

This is implemented by interfacing the pulse sensor with the Arduino board as shown in Figure
below.

Figure 3.5 Interface between Pulse sensor and MCU.

b. LM35 Temperature Sensor:

It is considered as a solid state sensor. The precision integrated-circuit temperature sensor output
a voltage linearly proportional to the centigrade temperature. With LM35, temperature is
measured more accurately than using a thermistor.

24
CHAPTER THREE PROJECT DESIGN

For accurate readings, the sensor’s package required to be in contact directly with the patient arm
tissues along with the Pulse Sensor. It comes as a molded package or plastic package which is
used in this project.

It has many features, some of them are:

1. Guarantee accuracy at +25 C.


2. Wide range (-55 to +150 C).
3. Suitable for use for remote applications.
4. Operation voltage from 4 to 30 volts.
5. Low self-heating and output’s impedance.

As the pulse sensor, LM35 three has three pins except that the left pin is for the input voltage,
while the middle one output the signal. Therefore, the pin on the right is the GND. [11]

Figure 3.6 LM35 Temperature Sensor

To output the measured temperature we use an Arduino. The interface between the LM35 and
Nano Arduino is explained in the following Figure 3.7.

25
CHAPTER THREE PROJECT DESIGN

Figure 3.7 Interface between LM35 and MCU

3.3.1.2. Microcontroller (MCU):

The filtration of the measured signals, apply calculation on it and prepare it for transmission to
the next unit mainly done by the microcontroller unit.

In this project, the microcontroller chosen is a Nano Arduino board which is based on
ATMEGA328 controller.

Nano Arduino is a small and complete board with the same functionality of Arduino
Duemilanove just in different package. The only difference is that Nano Arduino doesn’t have a
power jack instead it works with mini-B USB.

It fits perfectly for this project as it’s easy to use as well as it provides mobility feature due to its
suitable size for a wearable device. Furthermore its ability to communicate with android
applications via Bluetooth module as it supports serial port Bluetooth communication.

Figure 3.8 Nano Arduino


26
CHAPTER THREE PROJECT DESIGN

3.3.1.3. Communication between MCU and Android Application:

The Bluetooth serial port module is responsible the communication. It sends data from the
MCU to be displayed in the Android application interfaces

HC-05 Bluetooth to Serial Port Module:

HC05 is a serial port protocol (SPP) designed for wireless serial connection setup. It was
chosen for it its ability to simplify the circuit design Send measured data to android application
and due to its compatibility with the Nano Arduino. In addition, it was chosen over HC-06
module because it has the ability to operate as both as master and slave modules rather than just
a slave in the case of HC-06.

The HC-05 has six pins, four of them are programmable input/output lines. While the
three others, one is GND and the other is for Vcc. [12]

Some of the HC-05 features:

1. Integrated antenna and edge connecter within it.


2. UART interface and PIO control.
3. Requires low power (1.8 – 3.6v).
4. Supports variety of baud rates.
5. Supports auto-pairing and auto-reconnection.

Figure 3.9 HC-05 Bluetooth Module

27
CHAPTER THREE PROJECT DESIGN

3.3.1.4. Alarm Unit:

This unit is composed of a 5v DC buzzer which will peep if the heart rate increased or went
below the specified threshold. The values of the threshold are 150 for maximum HR and 30 for
the minimum.

Buzzer 5v DC:

Buzzer is an audio signaling device that has many applications includes timers and alarm
devices. Many types of buzzers are available mainly they are electromechanical, mechanical and
electrical buzzers. [13]

Figure 3.10 Buzzer

Buzzer important features are:

1. Operation power (3-6 DC)


2. No electrical noise
3. Low consumption of current.

3.3.2. Software Design:

Several software tools were used throughout the entire development procedures of this project
in order to program the Arduino board which is considered the core of this project besides
developing the android application which will detect and alert when suspecting a heart attack.

28
CHAPTER THREE PROJECT DESIGN

3.3.2.1 Arduino IDE:

Is the required software environment to program the Arduino by writing a code and upload it
to the Arduino. It also outputs the results for analysis using both serial monitor and serial
plotter. The version used in this project is 1.8.3 (Genuino) which supports both serial monitor
to print the HR wave while the serial monitor to print the temperature values.

The Arduino IDE used to write a code to the Nano Adruino that has three main functions.
These functions are: measuring BPM, measuring body temperature, sending measured data
and alert when detect an abnormality. [14]

Measuring BPM:

The algorithm for measuring BPM and IBI is:

1. Initialize Arduino configurations.

-Baud Rate = 9600.

2. Apply input signals to A1.


3. Obtain data from reading A1.
4. Perform Calculations on the data.
5. Print it to the Serial Plotter.
6. Wait 1000ms until the next reading.
7. Repeat from step 3.

Measuring Body Temperature:

Since the output voltage (Vout) of LM35 is connected to ADC channel (A1), the ADC converts
the analog readings into digital values according to the following formula:

ADC value = Sample* 1024 / Reference Voltage.

From a previously illustrated interface between Arduino and LM35 (Figure), the reference
voltage is +5v.

As a result, the algorithm for measuring temperature is:

29
CHAPTER THREE PROJECT DESIGN

1. Initialize Arduino configurations.

-Baud Rate = 9600.

2. Apply input signals to A1.


3. Obtain data by reading A1.
4. Perform Calculations on the data.
5. Print it to the Serial Monitor.
6. Wait 1000ms until the next reading.
7. Repeat from step 3.

The digital output values were printed to the Serial Monitor of the Arduino IDE to validate the
algorithm before sending the data over Bluetooth. [15]

3.3.2.2 Android Studio:

An IDE as well but it is an environment for applications development that will run on Android
OS. It’s an alternative for the Eclipse Android Development Tools.

Android Studio has been used to develop an android application that is compatible with the
project’s components. The developed application enables creation of two different types of
accounts. One for doctors and the other is for patients. Doctors account grants access to the
doctor’s patient records while patients account receives measured data via Bluetooth module,
track patient’s location using GPS and keeps records uploaded in the database.

Following figures show the interfaces of the application accounts:

The first interface enables users (patients and doctors) to login to their accounts using username
and password in case they have already created accounts.

30
CHAPTER THREE PROJECT DESIGN

Figure 3.11 Login Interface

However, if you don’t have an account, a registration interface asks you to specify the type of the
account you want to create.

Figure 3.12 Registration Interface

In case choosing a Patient account in the registration interface, the following interface will
request the required information for account creation.

31
CHAPTER THREE PROJECT DESIGN

Figure 3.13 Patient Registration Interface

The same works in case choosing a Doctor, you will be redirected to an interface that will
request the required information for account creation.

Figure 3.14 Doctor Registration Interface

A look inside the patient account, the interface would be as the following Figure 3.15

Three buttons will appear to choose from them: Measure, Health Records and Medical ID.
32
CHAPTER THREE PROJECT DESIGN

Figure 3.15 Patient View Interface

For the doctor account, it will consist of list view of patients along with ADD and REMOVE
buttons to manage patients.

Figure 3.15 Doctor View

After completing registration for patient account, additional information must be entered to
create a medical ID.

33
CHAPTER THREE PROJECT DESIGN

Figure 3.16 Patient’s ID Registration.

Recorded ID information will appear in this interface when ‘Medical ID” in “Patient view”
interface is pressed.

Figure 3.17 Patient’s ID.

34
CHAPTER THREE PROJECT DESIGN

This interface enables access to GPS and Bluetooth on mobile, which is important in order to
utilize the full features of the application. It appears after completing registration for new
account.

Figure 3.18 Enable Bluetooth and GPS Services

3.3.2.3 PHP:

PHP is a scripting language used in order to develop and create web pages and often internet
applications. PHP files are files written using PHP language for usage by remote servers.

A Web Hosting service is a type of internet hosting service that allows individuals and
organizations to make their website accessible via the WWW. This service has been used to store
and retrieve the required data to and from the application using PHP files.

The web service implemented here is an online free webhosting website known as
www.webhost.com. A very easy webserver to deal with, just creating an account using an email
and password then you can start creating you tables, upload the PHP files and it is ready to use.
The created tables used to record data supplied by doctors and patients when they first create
accounts in the Android application. [16]
35
CHAPTER THREE PROJECT DESIGN

3.4. Hardware Implementation:


Is done to test the overall system functionalities, the hardware is implemented as it was
discussed throughout this chapters with aid of figures including all components and using the
software codes.

The final system’s circuit is shown below in Figure 3.19.

Figure 3.19 Implementation of the Overall System

3.5. Conclusion:
In this chapter, the proposed system design was demonstrated in details for both the hardware
and software units of the project. This design was proposed in such a way to make it available
and suitable for use by most people.

36
CHAPTER THREE PROJECT DESIGN

Furthermore, there are many arm-bands today that people actually buy and use. Hence this
project’s function can be simply added to one of these bands along with the main services it
offers such as: Monitoring Fitness and calculate steps walked daily.

37
CHAPTER FOUR RESULTS AND DISCUSSION

CHAPTER FOUR

RESULTS AND DISCUSSION

4.1. Results:
Once the circuit has been built as discussed in Chapter 3, codes have been uploaded into the
Nano Arduino then the project is ready for testing. When we carried out implementations and
testing the following results were obtained.

4.1.1 Heart Rate Results in Serial Plotter:

The heart rate was obtained using two methods, the manual method and using the pulse sensor to
determine the accuracy of the project’s circuit. The circuit is supplied by 5V power. For accurate
reading as much as possible, the finger or the wrist needs to be placed close to sensor. The
output result as an ECG in the Serial Plotter was represented to a certified doctor to determine its
accuracy.

The certified doctor examined the signal shown in Figure 4.1. She stated that the signal is noisy
and it is hard to determine the HR from it as it is measured from at least three successive peaks
which are not existed within these signal.

Figure 4.1 HR Wave Output in Serial Plotter


38
CHAPTER FOUR RESULTS AND DISCUSSION

After that, the same experiment was repeated but this time results were outputted via the Serial
Monitor as shown in Figure 4.2 below.

Figure 4.2 HR Values Output in Serial Monitor

The pulsed calculated manually, to determine the accuracy by comparing the manual with Serial
Monitor value.

Error was calculated to be:

e = (91 – 88) / 91 = 0.032, which means an accuracy of 96.8%.

4.1.2 Body Temperature Results in Serial Monitor:

Body temperature was obtained by interaction between the fingertip and the LM35. First we
measured the temperature using thermometer then we measured it again using LM35 to
compare the results.

At the time of testing, the measured temperature was almost 27C and Figure 4.2 showed the
body temperature measured by the sensor and displayed in the serial monitor continuously.

In order to calculate the error in this reading, we took the most stable value which is 27.83 and
subtracted it from the value obtained from the thermometer divided by the latter value.

39
CHAPTER FOUR RESULTS AND DISCUSSION

Error was calculated to be:

e = (27.83 – 27) / 27.83 = 0.0298

Then the accuracy is almost 97% which is very acceptable accuracy.

Figure 4.3 Temperature Output in Serial Monitor

4.1.3 Bluetooth Response in Android Application:

When we powered the circuit, the Bluetooth module was set to ON automatically. As in the
android application there’s an interface with button for enabling Bluetooth, when pressed a
notification popped up asking the user for permission to enable Bluetooth as shown in the
next Figure 4.3.

40
CHAPTER FOUR RESULTS AND DISCUSSION

Figure 4.4 Bluetooth Enabling Notification

After granting permission for Bluetooth, a list of available devices appears and we found HC-05
among these devices. By clicking on it, pairing is successfully completed.

Figure 4.5 Bluetooth Pairing With HC-05

4.1.4 GPS Response in Android Application:

In the same interface where the Bluetooth enable button resides, there’s similar button for
enabling GPS in the Android application. Hence, when this button was pressed it redirected the
GUI to the mobile phone settings where it asked for permission to enable Bluetooth as shown
in the next Figure 4.3.
41
CHAPTER FOUR RESULTS AND DISCUSSION

Figure 4.6 GPS Enabling.

After successful enabling for GPS, it returned the GUI of the mobile phone to the
application interface and displayed the following coordinates in Figure 4.5.

Figure 4.7 Coordinates obtained by GPS

42
CHAPTER FOUR RESULTS AND DISCUSSION

4.2. Discussion:
According to the specialized doctor, the heart rate ECG is not measurable, in other words the
signal is noisy and has to be filtered first in order to be able to extract heart rate value from it.

The ambient noise maybe generated from improper holding of pulse sensor or the component
is defected.

On the other hand, the temperature was much better which outputted data with accuracy
of almost 97%.

The Bluetooth and GPS were implemented correctly and performed their supposed functions
successfully which is detection the HC-05 Bluetooth and pairing with it as well as receiving
data from Arduino and determining the location of the patient repectively.

43
CHAPTER FOUR RESULTS AND DISCUSSION

44
CHAPTER FIVE CONCLUSION

CHAPTER FIVE

CONCLUSION

5.1. Conclusion:
A pulse sensor which considered as an infrared sensor that has a response to variations in light
intensity instead was used.

The key objective of developing this project with the help of Android Open Source platform is to
immediately alert Medical Emergency and the patient’s emergency contacts about the health
condition of patient.

We are developing prototype of this application using the continuous monitoring of parameters
to detect and predict the heart attack and generate an alarm. The buzzer will turn ON when body
temperature and heart rate exceeds or goes below specified threshold level. This objective is met
with measuring the heart rate and body temperature. It is helpful where continuous monitoring is
required under critical condition. In addition it is very usable device due to its portability which
means the patients can carry it with him therefore no need to stay at hospitals because the Heart
Rate Monitor is applicable almost everywhere.

Along with the Heart Rate Monitor, we developed an Android Application that allows both
doctors and patients to interact with each other, records the data received from the heart monitor
via Bluetooth as well as enable access to these records by the doctor.

5.2. Challenges and Limitations:


Several challenges were faced throughout the entire life cycle of the project. The first one was
with the pulse sensor. It didn’t detect accurate readings if it was placed with excessive or loose
pressure on the body.

44
CHAPTER FIVE CONCLUSION

Although the pulse sensor amplifies and filters the ECG signal, there will be a noise disturbance
in the ECG signal. The wires attached to the patient’s body play an important role in order to get
a good ECG signal. This noise can be slightly reduced by grounded all the connection properly.
Therefore, the ECG signal displayed will still have a noise.

Similar challenge was with the temperature outputs inaccurate measures because it takes a time
to respond with the heat produced by the human body. However, LM35 is a suitable component
to use in the project to reduce the cost in hardware implementation.

In order to have accurate data to some extent, a number of repeated measurements are required.
Hence both challenges were overcome.

The next challenge was the fact that some of the purchased components were provided without
datasheet, specifically the pulse sensor used for this project which made it difficult to fully
understand the sensor specifications. Hence, we depended on the basic information supplied by
the vendors on their website.

Another challenge was with the Android development environment, which took considerable
time for installation and setting up. In addition to the time spent fixing inconvenient Gradle
errors that seemed never ending keeping in mind it was working correctly after it has been
installed. However working with AS was much better when i tried it on Ubuntu OS instead of
windows.

5.3. Accomplishments:
On the other hand, this project succeeded in achieving many of its proposed goals. These
accomplishments can be summarized as:

- Reading vital signs signals.


- Process these vital signs signals.
- HR measuring and monitoring system.
- Implementing alarm system.
- Providing platform for communication between doctor and patient.

45
CHAPTER FIVE CONCLUSION

- Use of relatively low cost and low power hardware components.

5.4. Future Work:


Further improvements can be applied to this project to enhance its performance:

- Design robust system to improve measuring efficiency even in the presence of noise. In
addition to propose a new method for efficient transmission of data between the MCU
and the Android application.
- To ensure the accuracy of heart rate monitor device, more testing can be performed to
larger number of people with different ages and weights.
- Replace the LM35 with specific temperature sensor of body measurement in order to
make it more accurate and more functional to use.
- More vital signs parameters should be added to increase the value of the project to the
patients. These can include: Blood Pressure, Respiratory Rate and other parameters.
- Implement pulse and other parameters measurements using the mobile phone camera
along with other built-in sensors in order to obtain these parameters on demand if the
patient started experiencing some symptoms or abnormalities.
- The MCU should send a control signal along with the measured data when detect a heart
attack and the buzzer is turned ON. The control signal should enable GPS, instruct the
application to send an SMS containing the measured data and the patient’s location to the
medical emergency and emergency contacts of the patient in order to get an ambulance
and notify his relatives.
- The device should be miniaturized into a PCB making its weight lighter in order to make
the device commercial for public use.
- Portable battery unit for the device to provide required power by the sensors and MCU.

46
REFERENCES

[1] Joyce Smith, Rachel Roberts, Vital Signs for Nurses: An Introduction to Clinical
Observations, WILEY-BLACKWELL, June 2011

[2] Arrthur c Guyton ,Text Book of Medical Physiology, ELSEVER SAUNDERS

[3]Medical Instrumentations, available [online], http://ww.webmed.com, October 2016

[4] American Heart Association, available [online], http://ww.heart.org, November 2016

[5] Measuring Heart Rate, available [online], http://ww.ACS.co.uk, November 2016

[6 ] Sudanese Association for Heart Diseases, available [online], http://ww.heart.org, February


2017

[7] Rana Biswarup ,Analysis of PPG and ECG, LAP Lambert Academic Publishing, September
2015

[8] Braunwald’s, heart disease a text book of cardiovascular medicine, ELSEVER SAUNDERS

[9] World Health Organization, available [online], http://ww.who.int, May 2017

47
[10] Pulse Sensors, available [online], http://www.pulsesensor.com, June 2017

[11] LM35 datasheet, available [online], http://www.alldatasheets/lm35.com, June 2017

[12] HCO5 datasheet, available [online], http://www.alldatasheets/lm35.com, June 2017

[13] 5V Buzzer Datasheet, available [online], http://www.alldatasheets/lm35.com, June 2017

[14] ARDUINO, available [online], www.ardunio.cc, August 2016

[15] Massimio Banzi ,Getting Started With Arduino 2nd Edition, Mc Gill, October 2008

[16] Beginning Android, , available [online], http://www.gettingstartedwithandroid.com, April


2016

48
APPENDENCIES

Appendix A: C code for Nano Arduino.

1. HR monitoring and measuring:

A-1
A-2
A-3
A-4
A-5
2. Heart Attack Detection:

A-6
A-7
Appendix B: Java code for Anrdoid Studio.

1. Log in interface:

B-1
2. Log in Request(connection with DB):

B-2
3. Registration interface:

B-3
4. Patient Registration:

B-4
B-5
B-6
5. Patient Registration Request:

B-7
6. Patient View:

B-8
7. Patient ID:

B-9
B-10
8. ID Request:

B-11
9. Doctor Registration:.

B-12
B-13
10. Doctor Registration Request(connection with DB):

B-14
11. Doctor View:

12. Bluetooth Connection and Setup:

B-15
B-16
B-17
B-18
B-19
B-20
B-21
13. GPS Setup:

B-22
B-23
B-24
Appendix C: PHP code for DB.

1. Patients Registration:

2. Patients ID Information:

C-1
3. Patients Log in:

C-2
4. Doctors Registration:

5. Doctors Log in:

C-3
Appendix D: Cost Analysis.

Unit Total
Cost
Part Quantity Cost
(SDG)
(SDG)

Nano 1 300 300


Arduino

Pulse 1 275 275


Sensor

LM35 1 50 50

HC-05 1 300 300


Module

Buzzer 1 15 15

Bread 1 45 45
Board

TOTAL - - 985

C-47

You might also like