You are on page 1of 37

Android Based Heartrate Monitoring System and

Automatic Notification System


Submitted in partial fulfilment of the requirements of the degree of

BACHELOR OF COMPUTER ENGINEERING

Guide:

Department of Computer Engineering


New Horizon Institute of Technology and Management, Thane
(2021-2022)
NEW HORIZON INSTITUTE OF TECHNOLOGY AND
MANAGEMENT, THANE

CERTIFICATE
This is to certify that the project entitled “Android Based Heartrate
Monitoring System and Automatic Notification System” is a bonafide work
of “Ms. Aishwarya Palvi(IEN-11712032), Mr. Raj Patil (IEN-11712034), Ms.
Priyanka Chaudhari (IEN-11612003) submitted to the University of Mumbai
in partial fulfilment of the requirement for the award of the degree of Bachelor
of Engineering in Computer Engineering

______________
Prof. Rishikesh Nikam
Guide

_____________ _______________
Dr. Sanjay Sharma Dr. Prashant Deshmukh
Head of Department Principal
NEW HORIZON INSTITUTE OF TECHNOLOGY AND
MANAGEMENT, THANE

Project Report Approval for B.E.


This project report entitled Android Based Heartrate Monitoring System and
Automatic Notification System by Ms. Aishwarya Palvi, Mr. Raj Patil, Ms.
Priyanka Chaudhari is approved for the degree of Bachelor of Engineering in
Computer Engineering, 2020-21.

Examiner Name Signature


1.________________ _____________
2._________________ ______________

Date:
Place:

Declaration
We declare that this written submission represents my ideas in my own words
and where others' ideas or words have been included, I have adequately cited and
referenced the original sources. I also declare that I have adhered to all principles
of academic honesty and integrity and have not misrepresented or fabricated or
falsified any idea/data/fact/source in my submission. I understand that any
violation of the above will be cause for disciplinary action by the Institute and
can also evoke penal action from the sources which have thus not been properly
cited or from whom proper permission has not been taken when needed.

-----------------------------------------

Signature

-----------------------------------------

Ms. Aishwarya Palvi IEN: 11712032

-----------------------------------------

Signature

-----------------------------------------

Mr. Raj Patil IEN: 11712034

-----------------------------------------

Signature

-----------------------------------------

Ms. Priyanka Chaudhari IEN: 11612003

Date:

Abstract
In this paper, the design of an integrated portable device that can monitor heart rate (HR)
continuously and send notifications through short message service (SMS) over the cellular
network using Android application is presented. The primary goal of our device is to ensure
medical attention within the first few critical hours of an ailment of the patient with poor heart
condition, hence boost chances of his or her survival. In situations where there is an absence of
doctor or clinic nearby (e.g., rural area) and where the patient cannot realize their actual poor
heart condition, is where our implemented system is of paramount importance. This paper
proposes a methodology to measure a heart rate using photoplethysmogram (PPG) — a
technique that uses infrared light to detect changes in the blood flow volume in tissues. We
present a new application of the Android smartphone’s camera equipped with LED flash
which used for recording the intensity of light from the fingertip blood volume. The red
channel of RGB signals in each picture frame recorded by smartphone returned the
plethysmographic information. This contextual information will be converted into time domain
signal by using Fast Fourier Transform (FFT) for further used in heart rate estimation process.
The final results is the heart rate of each person recorded within 40 seconds. The designed
system shows the real time HR on the mobile screen through Android application continuously
and if any abnormal HR of the patient is detected, the system will immediately send a message
to the concerned doctors and relatives whose numbers were previously saved in the Android
application. This device ensures nonstop monitoring for cardiac events along with notifying
immediately when an emergency strikes.

CONTENTS
1 Introduction ........................……………………………………………………….…. 0

2 Literature Survey ………………...……………………………….……………….….0

3 Problem Statement, Objectives and Scope………………………..…..…….……….…0

4 Proposed System …………..……...……………………………………………….…0

5 Implementation plan………………...……………………………………………….…0

Expected Outcome .........................................................................................................0

References ......................................................................................................................0
LIST OF FIGURES

1.1 name of fig ....................................................................................................................0

2.2 name of fig ....................................................................................................................0

LIST OF TABLES

1.1 name of table ................................................................................................................0


Chapter 1

Introduction
Monitoring vital parameters such as heart rate, blood pressure plays a very important role in
detection, recognition the dangerous situation and prevent of any health diseases. Heart rate is
important because the heart's function is so important. The heart circulates oxygen and
nutrient-rich blood throughout the body. An abnormal rate or rhythm may be discovered
during a physical exam, ECG, or other testing, even in healthy people who have no symptoms.
By far, the only viable diagnostic tool that could ascertain cardiac events is HR readings.
Henceforth, HR monitoring and alert system which is able to monitor the HR condition of a
patient is very effective in the detection of heart diseases and Photoplethysmogram (PPG) has
been employed to compute HR. Currently, there are some Android applications that can
monitor HR but do nothing when hearts condition is poor. It would be a breakthrough if an app
is developed that incessantly monitors HR and if detected unusual, sends messages to all saved
mobile numbers with precise GPS location of the patient and current HR. In this regard, this
literature describes a system that determines the HR per minute in real time and then sends
SMS alert to the mobile phone in face of emergency or user requirement.

1.1 Data Acquisition and Storage


A Bluetooth connection between a smartphone or a tablet and the HR monitor provides secure
data acquisition. The HR monitor used in this work transmits data packets containing
information acquired by biosensors at a frequency of 1 Hz [11]; a routine implemented in the
Android application extracts from each packet the following information: instantaneous HR,
last 15 heartbeat time stamps, and last heartbeat progressive number. Unless a test is in
progress the smartphone display shows only the HR. The test results are then saved to an
internal SQLite database and may be sent to an online MySql database via Wi-Fi or a 3G
connection of the Android device using Json format and Php web pages.

1.2
Chapter 2

Literature Survey

2.1 Literature Review


Researches are done for evaluation in Healthcare System and also in wireless sensor network.
Those are helpful in maintaining and monitoring the health of patient. The focus is on Mobile-
Phone-based Remote Patient’s Vital Signs Monitoring and Intelligent Alerts System which
involve automated functioning medical sensor device to ease human life and an intelligent data
record system that is easy communicable with patients and their Guardians. The developed
system in this paper, consists of many medical equipment which measures body temperature,
heartrate, breathing rate, activity and posture. Szakacs-Simon describes about the design of
simple heartrate monitor system based on Arduino board which displays the output on a LCD
display and simultaneously transmitting the data to a smart phone via Bluetooth. This project
is only focused on providing accurate and quick readings of patients even in the absence of a
doctor.
2.1.1 HR Detection and Processing Software Development Procedures

The application utilizes an imaging acquisition concept similar to that found in commercially
available pulse oximeters in which infrared light is used to determine oxygenated and
deoxygenated blood based on the blood opacity (i.e., oxygenated is brighter red than
deoxygenated which is blue/purple). Variable levels of opacity are illuminated by the camera
light and measured by the camera’s five-megapixel photodetecting lens, as it passes through
the pulsating capillary tissue beneath the surface of the finger. Measurements are tracked
overtime and analyzed until a pulsatile signal is properly detected. The first step was to
determine if the image captured from the light provided by original equipment manufacturer’s
(OEM) LED flash and five-megapixel camera could be passed through software image
analysis filters to detect the appropriate wavelengths for efficient pulse detection based on
variations in opacity. The next step was to determine whether the smartphone could process
frame-by-frame image analysis in a timely and consistent manner, in order to detect the small
pulsatile color changes. An nv21 YUV planar frame format was used to allow for efficient
processing of both light and color intensity changes. Real-time trials were used to determine
an optimum settings bundle of frame capture rate (20 fps), image pixel density , focus mode
(infinity), and software image analysis filters. The next step was to detect changes of blood
flow by comparing values over a series of frames. During this step, points were gathered and
graphed to help programmers visually discern changes of blood flow. Throughout this
process, the development team compared signal detection by the developed application with a
Nonin Onyx II model 9560BT oximeter (Nonin Medical, Plymouth, MN). Initial comparisons
allowed assurance of capturing opacity changes representative of accurate pulsatile readings
during the recording and graphing of data. A history system aids the detection of HR pulses as
well as accumulates the pulses to generate beats per minute HR feedback. Once the
appropriate signal-to-noise ratio was established, minor adjustments were made to ensure
noise or small changes in the user’s finger position did not disrupt the continuous monitoring
of HR. Finger movements that resulted in unobtainable HR measurement or finger removal
results in vibration-based feedback to the user to reposition the finger on the camera lens. The
smartphone HR monitor application directs each step of the process from video capture, video
processing and analysis, and feedback to the user in a graphical user interface.

2.1.2 Data Analyses

The ECG-derived average HRs per minute from the BioZ bioimpedance cardiograph system
using the 4 beats rolling average served as the criterion measure. HR values recorded from the
cell phone and the Nonin pulse oximeter were averaged and compared to the ECG at their
respective time periods. Pearson correlation coefficients and standard errors of estimate (SEE)
were calculated. As devices are expected to be highly correlated measuring the same signal
agreement of the 3 devices was assessed for each activity using Bland Altman plots for
repeated measures with 95% limits of agreement
Chapter 3

Problem Statement, Objectives and Scope

3.1 Problem Statement


To develop a user-friendly heart rate monitoring system on Android platform that is able to
detect the possibility of heart disease in real-time basis based on reasoning and computational
algorithms.

3.2 Objectives
 To be able to calculate the Heart Rate by calculating the blood change volume in the
fingertip.
 To suggest the user a diet according to his Heart Rate and to maintain to good health
for his heart

3.3 Scope
 This application will provide the user function to monitor his Heart Rate instantly.

 It will suggest the user diet according to his health of heart.

 The application would help to calculate the BMI of the user, using the input of weight
and height.

 According to the BMI, the user will also be suggested with the diet he should follow to
maintain the BMI .

 The Application also provide the user any specific diet if he needs one. For E.g. For
Weight loss or weight gain.

 It would also help the user to create a SOS alarm and send SMS to his selected
contacts.

 This Application would also suggest the user any nearby hospitals if he needs one.
Chapter 4

Proposed System

4.1 Software Requirements

4.1.1 Java

Java is a popular programming language. Java is used to develop mobile apps, web apps,
desktop apps, games and much more.

4.1.2 MATLAB

MATLAB is a programming and numeric computing platform used by millions of engineers


and scientists to analyze data, develop algorithms, and create models.

4.1.3 Android Application Framework

An Android application framework is a software toolkit that enables app developers to piece
together a finished product that meets the requirements of its proprietor. A framework
provides the bones of an application, to be fleshed out with graphics, animation, special
features and functionality.

4.1.4 Android SDK

Android Studio provides the fastest tools for building apps on every type of Android device.
Download Not Available.

4.1.5 Android Studio

Android Studio provides the fastest tools for building apps on every type of Android device.
4.2 Hardware Requirements

4.2.1 Smartphone Camera

A camera phone is a mobile phone which is able to capture photographs and often record
video using one or more built-in digital cameras. It can also send the resulting image
wirelessly and conveniently.

4.2.2 Processor

The processor of your smartphone is the component that converts all your actions into visual
changes on the screen. For this project we require dual core of above processor.

4.2.3 Memory

Internal memory is the manufacturer-installed storage space, usually 16, 32 or 64GB, where
the operating system, pre-installed apps, and other system software is installed. Here we need
2gb or more RAM.

4.3 Project Architecture

Fig 4.1- HRM Architecture


4.3.1 Working Algorithm

The working algorithm begins with sensing raw IR sensor output voltage that is collected and
processed (amplify, noise cancellation) by amplifier, filter and Arduino. The calculated BPM
value is then received in smart phone by Bluetooth module transmission. Once our app is
installed, run and paired with HC06 Bluetooth module, it will continuously perform the
following steps:

 Read the incoming real time BPM. Using android application of our GUI interface
anybody can check his/her BPM value anytime when he/she wants.
 If BPM is out of the normal range (60-140) it will start a countdown of 10 seconds.
 If all BPMs are out of normal range within this countdown the app will assume
emergency condition.
 An SMS will be sent to all saved numbers in app. The SMS will contain: precise
location co-ordinates (using GPS built in smart phone), approximate location

4.4 Analysis Diagram


4.4.1 ER Diagram
Fig 4.2- ER Diagram

4.4.2 DFD Diagram

Fig 4.3- Level 0 DFD

Fig 4.4- Level 1 DFD


Fig 4.5- Level 2 DFD
Chapter 5

Implementation Plan

5.1 Project Schedule

Task Start Date End Date Total Days


Topic selection by the team 17-09-2021 22-09-2021 07
Research and Discovery 23-09-2021 29-09-2021 07
Scope and Goal Finalization 30-09-2021 04-10-2021 05
Gathering Requirements 05-10-2021 12-10-2021 08
Requirement Analysis 13-10-2021 19-10-2021 07
Feasibility Analysis 20-10-2021 30-10-2021 11
Planning and Scheduling 01-11-2021 19-11-2021 19
System Design 1-12-2021 21-12-2021 21
Coding 22-12-2021 15-02-2021 56
Testing 16-02-2021 28-02-2021 13
Feedback 01-03-2021 08-03-2021 08
Debugging 09-03-2021 17-03-2021 09
Updation 18-03-2021 28-03-2021 11
Fig 5.1-Gantt Chart
Expected Outcome
Our objective with the present work is to put forward a continuous HR monitoring and
automatic notification system over the cellular network. The monitoring system is mainly
based on an Android platform, which not only continuously displays the real time HR on the
mobile screen but also generates SMS and sends it to the saved mobile numbers when
abnormal HR is detected. Application of this system includes providing medical attention
within the initial stage of determination of unorthodox HR of patients who may be at distant
locations with no doctors or when the patient is illiterate. In this paper, a review of existing
algorithms for heart rate measuring using mobile phones will be evaluated. The objective of
this proposed algorithm is to develop Android application to measure HR in real time with
duration about 10 seconds that optimizes for any smartphones. Thus, this method will propose
a simple moving average filter with only 7 coefficients to reduce complexity when developing
on Android platform and is expected to achieves affordable accuracy with classification stage
with distant constraints and RGB threshold that outperformed some previous works with the
same 400 video samples as input data and work stably on different android mobile devices
with 50 sample tests. We are also going to use the statistical method, the paired samples test,
to calculate the difference between the heart rate result from a digital blood pressure monitor
and one from our application which uses PPG technique.
References
[1] Pulse Rate Measurement using Android Smartphone(2019 IEEE/WIC/ACM International
Conferences on Web Intelligence and Intelligent Agent Technology).

[2] Android Based Heart Rate Monitoring and Automatic Notification System(2017 IEEE
Region 10 Humanitarian Technology Conference (R10-HTC)).

[3] Heart Rate Measurement System Using Mobile Devices to Alert Arrhythmias(2015 12th
International Conference on Electrical Engineering, Computing Science and Automatic
Control (CCE)).

[4] Real-time Heart Rate Measurement based on Photoplethysmography using Android


Smartphone Camera.

[5] Development of Android Based Pulse Monitoring System.

[6] Heart Rate Measurement on Android Platform(2016 IEEE Faculty of science).

[7] A. M. Islam and A. Majumder, “Coronary artery disease in bangladesh: a review,” Indian
heart journal, vol. 65, no. 4, pp. 424–435, 2013.

[8] S. K. Surya Prakash, SuyashKushwaha, “Heart beat monitoring by gsm technology,”


Glacier Journal of Scientific Research, 2016.

[9] M. T. Islam, S. T. Ahmed, I. Zabir, C. Shahnaz, and S. A. Fattah, “Cascade and parallel
combination (cpc) of adaptive filters for estimating heart rate during intensive physical
exercise from photoplethysmographic signal,” Healthcare Technology Letters, 2017.

[10] M. T. Islam, I. Zabir, S. T. Ahamed, M. T. Yasar, C. Shahnaz, and S. A. Fattah, “A time-


frequency domain approach of heart rate estimation from photoplethysmographic (ppg)
signal,” Biomedical Signal Processing and Control, vol. 36, pp. 146–154, 201.
Acknowledgement
The making of the B.E project needs co-operation and guidance of a number of people. We,
therefore consider it as our prime duty to thank all those who helped us during this venture.

We would like to thank Dr. Prashant Deshmukh (Principal), for his kind co-operation,
guidance and for providing necessary facilities during the working on this report. We express
our sincere thanks to Dr. Sanjay Sharma, (Head of Computer Department) for his support
and co-ordination.

It is our immense pleasure to express our gratitude to Mr. Rushikesh Nikam as our Guide for
providing us with constructive and positive feedbacks during the preparation of this project.
We express our gratitude to Ms. Aarthi Kamle for her valuable insights and co-operation.

Last but not least , we are thankful to all other staff members of Computer Department and
our friends whose encouragement and suggestions helped us to enhance our ongoing B.E
Project. We are also thankful to our parents for their constant support and best wishes.

Thank You!

-------------------------------------

Ms. Aishwarya Palvi (IEN – 11712032)

-----------------------------------

Mr. Raj Patil (IEN – 11712034)

----------------------------------

Ms. Priyanka Chaudhari (IEN - 11612003)

Date:

You might also like