Professional Documents
Culture Documents
USING RASPBERRY PI
A PROJECT REPORT
Submitted by
DHIWAHAR.C.V (2016504009)
ARUN KUMAR.S (2016504005)
RAMAN.G (2016504030)
BACHELOR OF ENGINEERING
IN
ELECTRONICS AND COMMUNICATION ENGINEERING
i
BONAFIDE CERTIFICATE
Certified that this project report “TELE-ECG MONITORING SYSTEM
USING RASPBERRY PI” is the bonafide work of
DHIWAHAR.C.V (2016504009)
RAMAN.G (2016504030)
who carried out the project work under my supervision. Certified further that to
the best of my knowledge the work reported herein does not form part of any
other project report on the basis of which a degree or award was conferred on
this or any other candidate.
SIGNATURE SIGNATURE
ii
ACKNOWLEDGEMENT
We sincerely thank all the Panel members for the valuable suggestions which
took our project to greater heights. We also thank our Project Coordinator,
Mr.E. Konguvel and all the teaching and nonteaching staff members of the
Department of Electronics Engineering for their support in all aspects
iii
ABSTRACT
The healthcare monitoring systems has emerged as one of the most vital
system and became technology oriented from the past decade. Humans are
facing a problem of unexpected death due to various illness which is because of
lack of medical care to the patients at right time. The primary goal was to
develop a reliable patient monitoring system using IoT so that the healthcare
professionals can monitor their patients, who are either hospitalized or at home
using an IoT based integrated healthcare system with the view of ensuring
patients are cared for better. A mobile device based wireless healthcare
monitoring system was developed which can provide real time online
information about physiological conditions of a patient mainly consists of
sensors, the data acquisition unit, microcontroller (i.e., Raspberry pi), and
programmed with a software (i.e., python). The patient’s heart rate data are
monitored, displayed and stored by the system and sent to the doctor’s mobile
containing the application. Thus, IoT based patient monitoring system
effectively monitor patient’s health status and save life on time.
iv
TABLE OF CONTENTS
ABSTRACT iv
LIST OF FIGURES vii
1. INTRODUCTION
1.1 INTRODUCTION 1
2.1 INTRODUCTION 8
DATA 10
2.3.1 AUTHENTICATION 13
v
3. REAL TIME HARDWARE IMPLEMENTATION
3.1.2 RASPBERRY PI 16
CONVERTER 17
AD8232 TO MCP3008 19
5 CONCLUSION 27
REFRENCES 28
vi
LIST OF FIGURES
1. INTRODUCTION
1.3CAROTID METHOD 4
2. SOFTWARE WORKFLOW
2.3USER ACTIVITY 10
ECG DATA 12
3.2 AD8232 16
3.3 RASPBERRY PI 17
3.4 MCP3008 17
vii
(B) PIN DIAGRAM OF HARDWARE MODEL 19
AND ADC 22
TO ANDROID APP 24
ECG DATA 25
viii
CHAPTER 1
INTRODUCTION
1.1 INTRODUCTION
Heart diseases have become one of the leading causes of human fatalities
around the world and patient care demands on hospitals are on the rise in
parallel with the growth of the world population and the accompanying rise in
chronic diseases.. For instance, approximately 2.8 million people die each year
as a result of being overweight or obese as obesity can lead to adverse metabolic
effects on blood pressure and cholesterol which ultimately increases the risks of
coronary heart disease, is chemic stroke ,diabetes mellitus ,and a number of
common cancers . According to WHO, it has been estimated that heart disease
rate might increase to 23.3% worldwide by the year 2030. The treatment of such
chronic diseases requires continuous and long term monitoring to control threat.
Instrumentation and measurement (I and M) are a keystone to diagnose each
disease.
Wireless technology is ruling worldwide and has invaded the medical area with
wide range of scope and capabilities. Patient Health monitoring using IoT is a
technology to enable monitoring of patients outside of conventional clinical
settings (e.g. in the home), which may increase access to care and decrease
healthcare delivery costs. This can significantly improve an individual's quality
of life. It allows patients to maintain independence, prevent complications, and
minimize personal costs.
This system facilitates these goals by delivering care right to the home. In
addition, patients and their family members feel comfort knowing that they are
being monitored and will be supported if a problem arises.
1
The ubiquitous social connectivity can be used in telemedicine for remote
monitoring and offsite diagnoses. It should be noted that over 94% of the world
population, that is, 6.8 billion people, are the subscribers of cell phone and
about 2.7 billion subscribers are using Internet. Cell phone subscription is
increasing rapidly and might reach the level of 8.5 billion by the end of 2016
with 70% of smart phone users from developing countries. In addition, smart
phones technology comprises various services such as location tracking, short
message service, and access of WLAN/GPRS/3G which provide subiquitous
connectivity. There are extensive studies on use of mobile phones in health care
and clinical practices illustrating the use of inbuilt applications of smart phones
like GPS and location enabled services which offer independent survival of old
age patient with fragilities . Existing studies have also highlighted the uses of
inbuilt apps in continuous monitoring and maintaining individual records .For
instance, in another study, the authors discussed the benefits of existing smart
phone health apps considering their credibility for continuous dataflow,
feasibility, portability, and power consumption. Nevertheless, the discrepancies
such as battery consumption, calibration, and generation of false alarms have
challenged the capabilities of smart phone apps in the implementation of real-
time health monitoring and diagnosis.
An alternative to inbuilt smart phone sensors is wearable sensors that have been
used for continuous monitoring, storing, and sending medical data to healthcare
givers over distance.
2
becoming promising due to the fact that these sensors are low cost , easily
available, user friendly, accurate, and reliable.
Electrocardiograph:
There are several methods to measure the heart rate, the most used methods:
Radial:
3
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.
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.
4
1.2 LITERATURE SURVEY
5
devices and suitable for large environments. Smart phones between two
terminals are used for making initial communication. The initial communication
is performed by synchronization phase.
a.) These sensors are put on human body which are screens the wellbeing
condition without irritating the day by day timetable of the patient and
Wellbeing observing framework comprises of sensors, microcontroller,
LCD show and GSM modem to transmit or get wellbeing related
information to or from the specialist. Thus, at doctor's facility same GsM
modem is utilized. It takes small amount of time to tell the patients and
6
their loved ones about the results and delivers the report directly with no
interruption.
b.) The second one uses similar technique to monitor the parameters.
Monitored parameters are sent by utilizing RFID per user, Bluetoothv2,
GSM and UMTS. This framework offers office to screen the circulatory
strain of patient. The wellbeing parameter straightforwardly sends to the
specialist utilizing GSM and UMTS. This framework comprises of three
sections: Touch-pad, remote level server and perusing of the Tag-ID and
BPM. For perusing the Tags ID and BPM, utilize a microcontroller unit
(MCU) as a part. The customer touch-pad get the BPM information a
RFID through Bluetoothv2. Customer touch-pad send the information to
the wellbeing parameter. Likewise, these wellbeing parameters are
specifically send to remote server farm and remote server farm to the
specialist utilizing GSM and UMTS remote innovation. Information
gets transmitted as the bundles. This framework stores past information.
c.) The third one is similar to the First system but it instead it uses Atmega-
328 micro-controller and the wifi module is employed to transmit the
data to the doctor and the loved ones of the patient. The Wi-Fi module
fetches the parameters and uploads it in the php server that can be easily
monitored by the doctor. It shows the value of Bpm , Temp and Ecg in a
table with their timestamps.
7
CHAPTER 2
2.1 INTRODUCTION
To obtain the health status of the patient, we are using wearable sensors to
obtain the biological health conditions of the patients in terms of electrical
pulses. It can generate a lot of data. So, we need a storage space to store the data
And as well as update the data from the sensor to the storage space
simultaneously. For this purpose, we are using an online database that can store
and update the data simultaneously. And also create an android application
where the Electrocardiograph is displayed.
8
with the data in the firebase authentication window. If the given data
mismatches with the data in the firebase, then it proceeds with a toast (error)
message. Otherwise, it proceeds to next activity. The login activity page shown
in fig.2.2
9
Fig.2.3 User Activity
This page shows the values of the selected patient ECG data. It
retrieves the ECG data from the database and updated simultaneously in
this activity. If you select the graph icon in the top right corner page is
shown in fig.2.4, it will show the ECG values of the selected patient in
the graphical format.
10
Fig.2.4 ECG readings of the patient
This activity shows the ECG data in form of graph. So, the
specialist can visualise and analyse the graphical response of the patient’s ECG
data.
11
Fig.2.5 Graphical representation of ECG data.
12
2.3.1 AUTHENTICATION
This window checks the data from the android app with the
available data to confirm whether the user is one of our patient or not.
If it matches with the available information in the authentication page, it allow
access to the patient details.
13
Application Programming Interface (API) Key:
An application programming interface key is a unique identifier used to
authenticate a user, developer, or calling program to an API. API keys provide
project authorization. By identifying the calling project, you can use API
keys to associate usage information with that project.
14
CHAPTER 3
The AD8232 is a 4mm x 4mm single lead heart rate monitor that is
operational at 3.3 volts, between -40 and 85 degrees Celsius and with low
current supply of about 170 µA. The circuit is designed to extract, amplify, and
filter small bio-potential signals in the presence of noisy conditions, such as
those created by motion or remote electrode placement. It has an integrated
filter coupled with an amplifier that produces a high gain signal (G=100) and a
15
high pass filter in a single stage, thus allowing the AD8232 to recover quickly
so that it takes valid measurements after connecting the electrodes to the
subject, thus saving cost and space. Three electrodes are connected to the body
as shown in Fig. 3.2, with a 3.5mm jack for the Biomedical Pad Connection on
the other end connected to the heart rate monitor through which analog readings
are read continuously and sent to the output pin. On the board, we also have an
LED indicator that will simulate the rhythm of heart beat
Fig.3.2 AD8232
3.1.2 RASPBERRY PI
16
Fig.3.3 Raspberry pi
Fig.3.4 MCP3008
17
3.2 HARWARE DESIGN
18
Fig.3.5 b) Pin diagram of hardware model
19
Fig.3.6 Einthoven triangle
SPI uses four separate connections to communicate with the target device.
These connections are the serial clock (CLK), Master In Slave out (MISO),
Master Out Slave In (MOSI) and Chip Select (CS).
20
The clock pin sense pulses at a regular frequency, the speed at which
the Raspberry Pi and SPI device agree to transfer data to each other.
For the ADC, clock pulses are sampled on their rising edge, on the
transition from low to high.
The MISO pin is a data pin used for the master (in the case of
Raspberry Pi) to receive data from the ADC. Data is read from the
bus after every clock pulse.
The MOSI pin sends data from the Raspberry Pi to the ADC. The
ADC will take the value of the bus on the rising edge of the clock.
This means the value must be set before the clock is pulsed.
Finally, the Chip Select line chooses which particular SPI device in
use. If there are multiple SPI devices, They can all share the same
CLK, MOSI, and MISO. However, only the selected device has the
Chip Select line set low, while all other devices have their CS lines
set high. A high Chip Select line tells the SPI device to ignore all of
the commands and traffic on the rest of the bus.
The following formula is used to calculate the digital output from the
analog input
Then, the Raspberry Pi sends the digital ECG data to the online firebase
database where the collected ECG data is stored.
21
Fig.3.7 Connection between Raspberry Pi and ADC
22
CHAPTER 4
IMPLEMENTATION AND RESULTS
The user who needs to see the patient’s ECG data enter the login details in the
android mobile app. Each patient is given by private login details. Whenever the
user enter the individual login id and password, it checks the data with database
authentication window.
23
After logging in to the android app, it asks to select the name of the patient in
the next activity page. If you select the name of the patient, it starts showing the
ECG values of the selected patient (i.e., it receives the data from the database
and displays the values in the android app in both numeric and graphical
format)
24
The patient’s obtained ECG data is displayed in graphical representation
25
4.1 MERITS AND DEMERITS
4.1.1 MERITS
Patient monitoring can be done in real-time.
Drastically cutting down the need for doctors going out and making
visits.
Connected home care facilities will also help reduce hospital stays
and re-admissions.
With real-time data healthcare providers can continuously monitor
patients and they can spot any disease before it spreads and becomes
serious.
It allows patients to be monitored in the comfort of their own homes.
Sensors are installed onto various pieces of medical apparatus (e.g.
heart rate monitors) by the bedside of a patient.
The data gathered is sent to the hospital where a qualified member of
staff analyses it for any abnormalities.
4.1.2 DEMERITS
The leak of sensitive information about the patient’s health and
location and meddling with sensor data can have grave consequences,
which would counter the benefits of IoT.
Failure or bugs in the hardware or internet failure or even power
failure can impact the performance of sensors and connected
equipment placing healthcare operations at risk.
And also skipping a scheduled software update may be even more
hazardous than skipping a doctor check up.
26
There’s no consensus regarding IoT protocols and standards, so
devices produced by different manufacturers may not work well
together. The lack of uniformity prevents full-scale integration of
IoT, therefore limiting its potential effectiveness.
CONCLUSION
Increasing rate of chronic diseases in aging population is becoming a
serious concern due to lack of sufficient facilities and extremely high cost. The
situation is even worse for the people residing in remote areas far from medical
facilities as delay in diagnosis and treatment may lead to death. Timely
diagnosis and treatment can solve these issues to a great extent. The
advancements in wireless communications and wearable sensor technology
open up the opportunity of real time healthcare monitoring systems. In this
study a real time heart monitoring system for heart patients located in remote
areas has been proposed. The developed system is comprised of wearable
sensors, Android handheld device, and database. The proposed system of patient
health monitoring can be highly used in emergency situations as it can be daily
monitored, recorded and stored as a database. In future the IOT device can be
combined with the cloud computing so that the database can be shared in all the
hospitals for the intensive care and treatment.
27
REFERENCES
[1]. Haydar Ozkan , Orhan Ozhan, Yasemin Karadana, Muhammed Gulcu ,
Samet Macit, and Fasahath Husain,” A Portable Wearable Tele-ECG
Monitoring System “ IEEE Instrum. Meas. VOL. 69, NO. 1, JANUARY
2020”
28
[7]. A.M.Johansson,I.Lindberg,andS.S¨oderberg, “Patients’ experiences with
specialist care via video consultation in primary healthcare in rural areas,
”International Journal of Telemedicine and Applications, vol.2014,
ArticleID143824, 7pages, 2014.
[10]. P. Pierleoni, L. Pernini, A. Belli, and L. Palma, “An android based heart
monitoring system for the elderly and for patients with heart disease,”
International Journal of Telemedicine and
Applications,vol.2014,ArticleID625156,10pages,2014.
29