2016ps79 Iot Project

Download as pdf or txt
Download as pdf or txt
You are on page 1of 50

IOT BASED PATIENT HEALTH

MONITORING SYSTEM
PROJECT REPORT
Submitted in:

PARTIAL FULFILLMENT OF THE REQUIREMENT FOR


THE DEGREE
BACHELOR OF SCIENCE
IN
APPLIED PHYSICS AND ELECTRONICS
Submitted by:

J P P GUNAWARDHANA (2016/PS/79)
BATCH-2016/2017

DEPARTMENT OF PHYSICAL SCIENCE


FACULTY OF APPLIED SCIENCE
TRINCOMALEE CAMPUS
EASTERN UNIVERCITY
SRI LANKA
RESEARCH REPORT
On

IOT BASED PATIENT HEALTH MONITORING


SYSTEM
PHY 3225: LABORATORY PHYSICS-VI
YEAR III SEMESTER II

BACHELOR OF SCIENCE
IN
APPLIED PHYSICS AND ELECTRONICS
Succeed by:
Group I
J.P.P. GUNAWARDHANA EUSL/TC/IS/2016/PS/79
J.H.G.J. KAUSHALYA EUSL/TC/IS/2016/PS/19
A.N.N. ATHUKORALA EUSL/TC/IS/2016/PS/05
W.M.N. SHANIKA EUSL/TC/IS/2016/PS/90
W.M.W.T. RAJAPAKSHE EUSL/TC/IS/2016/PS/77
G.A.H.K. WIJERATHNE EUSL/TC/IS/2016/PS/14

Under the guidance of:


Mr. M. P. M. Suhail
Department of Physical Science, Faculty of Applied Science, Trincomalee campus,
Eastern university

Under the supervise of:


Mr. S. Loheeswaran
Department of Physical Science, Faculty of Applied Science, Trincomalee campus,
Eastern university

Submitted on: December 2021


CERTIFICATION
This is to certify that the project report titled as:

“IOT BASED PATIENT HEALTH MONITORING


SYSTEM”
By

J.P.P GUNAWARDHANE
EUSL/TC/IS/2016/PS/79
Has been accepted by the Department of physical Science, Faculty of applied
Science, Trincomalee Campus of Eastern University Sri lanka for the degree of Bachelor of
Science in Applied Physics and Electronics (2016/2017).

……………………….
Mr.S Loheeswaran
Head of the Department
Department of Physical Science
Faculty of Applied Science

Date…………………….

………………………
Mr.S. Thadchanamoorthy
Dean of the Faculty
Faculty of Applied Science
Trincomalee Campus
Eastern University

Date…………………
DECLARATION

This is to certify that project titled “IOT BASED PATIENT HEALH


MONITORING SYSTEM” has been done and work completed by J.P.P
Gunawardhana (EUSL/TC/IS/2016/PS/79), in the partial fulfilment of the requirement
for the degree BACHELOR OF SCIENCE IN APPLIED PHYSICS AND
ELECTRONICS.

I hereby declare this project work is the result of my own effort. I have taken help from
various sources to gather necessary information to continue my project on the above
topic, some of the references from which information is taken are given in the reference
section in this report.

This work has not been submitted earlier at any other university or institute for the
award of the degree.

Date

……………………………

Signature of the candidate

…………………………….
ACKNOWLEDGEMENT

The success and final outcome of this project required a lot of guidance and assistance
from many people and I am extremely privileged of my project. All that I have done is
only due to such supervision and assistance and I would not forget to thank them.

A special thanks to our project coordinator Mr. M. P. M. Suhail (lecturer) for the
continuous support for my project activities, stimulating suggestions and
encouragement which were helped me to succeed in my project.

I am thankful to and fortunate enough to get constant encouragement, support, and


guidance from all Lecture staff of Department of physical science which helped me in
successfully completing our project work. Also, I would like to extend our sincere
esteems to all staff in laboratory for their timely support.

Eventually I owe my gratitude to my group members, colleagues and my parents who


have not been mentioned here personally in making this educational process a success.
Maybe I could not have made it without your support.

J.P.P GUNAWARDHANE

EUSL/TC/IS/2016/PS/79
Abstract

Healthcare is given the extreme importance now a- days by each country with the
advent of the novel corona virus. As per WHO statistics, cardiovascular diseases
(CVDs) are cause of death globally, taking an estimated 17.9 million lives each year
(31% of all deaths worldwide). Four out of 5CVD deaths are due to heart attacks and
strokes, and one third of these deaths occur prematurely in people under 70 years of
age.
Health conditions of aged people usually need to be checked more frequently, which
poses a greater challenge to existing medical systems. Therefore, how to identify human
diseases in a timely and accurate manner with low costs has been paid an increasing
attention.
So, in this aspect, an IoT based health monitoring system is the best solution for such
an epidemic. Internet of Things (IoT) is the new revolution of internet which is the
growing research area especially in the health care. With the increase in use of wearable
sensors and the smart phones, these remote health care monitoring has evolved in such
a pace. IoT monitoring of health helps in preventing the spread of disease as well as to
get a proper diagnosis of the state of health, even if the doctor is at far distance.
Smart and cost-effective healthcare has been in increasing demand to meet the needs of
growing human population and medical expenses. There is an urgent need to develop
effective health monitoring system that can detect abnormalities of health conditions in
time and make diagnosis according to the obtained data. Recent advances in mobile
technology and cloud computing have inspired numerous designs of cloud-based health
care services and devices. Within the cloud system, medical data can be collected and
transmitted automatically to medical professionals from anywhere and feedback can be
returned to patients through the network. In this project, we have designed and
developed an E-Health Monitoring System (HMS) using an IoT platform.
The patient’s temperature, heart beat rate, SpO2, ECG 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.

In case of any abrupt changes in patient heart-rate or body temperature alert is sent
about the patient using IoT. This system also shows patients temperature and heartbeat
tracked live data with timestamps over the Internetwork. Thus, Patient health
monitoring system based on IoT uses internet to effectively monitor patient health and
helps the user monitoring their loved ones from work and saves live

1
TABLE OF CONTENTS

Topic Page No.


1. Introduction 2

2. Objective and Aim of the Project 3

3. Literature Survey 3-4

4. Background Theory 4-19

 Working Principle 4-8


 Components Used 8
 Circuit Diagram 9
 Schematic Diagram 9
 PCB Diagram 10
 Working Principle of various sensors used 11-16
 Individual circuit diagram 17-19
5. Hardware Model 19

6. Flow Chart 20

7. Software Programme 21-29

8. Uploading Data to Cloud 30-32

9. Observation and Results 33-38

10. Discussions 38-41

11. Conclusions 42

12. Reference 43-44

2
Introduction

Health monitoring is the major problem in today’s world. Due to lack of proper health
monitoring, patient suffer from serious health issues. Also, most humans live a busy
life in which going to a doctor for weekly or even monthly check up is an impossible
task. In traditional method, doctors play an important role in health check-up. This
process requires a lot of time for registration, appointment and then check-up or
postpone. Also, reports are generated later. Due to this lengthy process, working people
tend to ignore the check-ups or postpone Without monitoring your health, it is not
possible to whether you are a healthy or sick person. As a solution to this, remote
monitoring enables medical professionals to monitor a patient remotely using various
technological devices. These services can provide comparable health outcomes to
traditional in-person patient encounters, supply greater satisfaction to patients, and can
also prove to be cost-effective.

With increasing popularity of mobile internet and usage of Wireless Sensor Networks
(WSNs) it is now possible to have wearable/portable health monitoring systems which
can monitor and record long term health parameters cost effectively without the need
to visit any hospitals or diagnostic centres frequently. The two driving factors of this
technology are the IoT-based data collection and cloud-based analytics.

There are lots of IOT devices now days to monitor the health of patient over internet.
Health experts are also taking advantage of these smart devices to keep an eye on their
patients. With tons of new healthcare technology start-ups, IoT is rapidly
revolutionizing the healthcare industry.

In this project, a prototype has been designed and developed for real time health
monitoring using Internet of Things (IoT). This system facilitates the process of
performing diagnosis and treatment of patients suffering from heart diseases.
Nonintrusive sensors DS18B20, MAX30100, and AD8232 are used for recording
patient’s health parameters like body temperature, heart rate, and ECG signals
respectively. The data gathered is transmitted to the IoT cloud which can be visualized
using a web-based server or any android based application. Using this system, the
physician can use the cloud platform to diagnose patients at remote locations (like
home). The patients can also access their medical records via this cloud service. These
data can be analysed by a doctor at remote location or can be saved and retrieved later
for analysis.

3
OBJECTIVES AND AIM OF THE PROJECT

In order to overcome the aforesaid problems in health monitoring, the goal of this
project has been to implement an IOT based E-health monitoring system which
monitors the patient’s body parameters such as body temperature, pulse rate, oxygen
level in blood and ECG of the heart regularly, room temperature, humidity and also
send the data over the internet which will be retrieved by the doctors for diagnosis and
close family members, receiving regular updates as well. Thus, the patients will be able
to manage the task of taking care of their health simultaneously along with their busy
life schedule. The system is also cost-effective, portable, and easy to operate with no
complex circuitry involved which adds to its advantages, being highly user friendly for
the common and elderly people.

LITERATURE SURVEY

The project prototype has been developed after a systematic survey on the reviews of
some previous work in the wireless sensor network area and the use Internet of Things
in cardiac health monitoring.

• Many applications are now-a-days available where use of smart phones in health
monitoring is experimented. Such system consisted of a wearable device
comprising of Temperature and Pulse sensors. The device will send its data to
the server through the android application. This data will be available to the
doctor using his android application.

• Some of the authors proposed a remote mobile health monitoring system with
mobile phone and web service capabilities. It provides doctors and family
members with necessary data through a web interface and enables authorized
personnel to monitor the patient’s condition and to facilitate remote diagnosis

4
• While few authors presented the development of a microcontroller-based
system for wireless heartbeat and temperature monitoring using ZigBee. The
system is developed for home use by patients that are not in a critical condition
but need to be constant or periodically monitored by clinician or family. In any
critical condition the SMS is send to the doctor or any family member. So that
we can easily save many lives by providing them quick service.

• In some papers, a Smartphone based remote health monitoring system using


body temperature and heart beat sensors to continuously monitor body
parameters of cardiac patients, has been proposed using GPS to track location
and wireless communication. The link is established between the patient’s
Bluetooth enabled Mobile device and sensors via a Bluetooth modem, this helps
in continuous monitoring

• In some papers, the authors have proposed an initial prototype development for
wireless transmission of ECG signals using AD8232 sensor and raspberry pi
based on IoT.

Background Theory

Working Principle

This project works on the main principles of IoT and sending acquired data over Cloud.
All the wearable sensors used to measure the body parameters of the patient are
centrally connected to a NodeMCU (ESP32) which collects the data and sends the same
over cloud and displays the respective outputs remotely on an application. The data is
transferred using TCP/IP communications securely

5
Internet of Things (IoT)
IoT in Healthcare is a heterogeneous computing, wirelessly communicating system of
apps and devices that connects patient and health providers to diagnose, monitor, track
and store vital statistics and medical information

IoT is a combination of hardware and software technology that produces trillions of


data through connecting multiple devices and sensors with the cloud and making sense
of data with intelligent tools.

It is an ecosystem of connected physical objects that are accessible through the


internet. The ‘thing’ in IoT could be a person with a heart monitor or an automobile
with built-in-sensors, i.e. objects that have been assigned an IP address and have the
ability to collect and transfer data over a network without manual assistance or
intervention. The embedded technology in the objects helps them to interact with
internal states or the external environment, which in turn affects the decisions taken. It
enables devices/objects to observe, identify and understand a situation or the
surroundings without being dependent on human help.

It can connect devices embedded in various systems to the internet. When


devices/objects can represent themselves digitally, they can be controlled from
anywhere. The connectivity then helps us capture more data from more places, ensuring
more ways of increasing efficiency and improving safety and IoT security. IoT is
basically categorized into 6 major layers. They are:

1. Smart devices and Controllers


2. Connectivity and protocol Communication
3. Cloud Server
4. Data Storage and Accumulation
5. Data analysis and Computing
6. User Application and Report Generation

Remote Health Monitoring System


Remote health monitoring is growing in popularity as both patients and healthcare
professionals want health to be monitored outside of clinical settings. Remote health
monitoring, also referred to as remote patient monitoring, is the process of using
technology to monitor patients in non-clinical environments, such as in the home.

6
IoT Platform (Blynk)
In our project, we have used Blynk as our IoT platform. It is specifically designed for
the development and implementation of smart IoT devises quick and easily. Blynk is a
Platform with IOS and Android apps to control Arduino, Raspberry Pi and similar
microcontroller boards over the Internet. It’s a digital dashboard where we can build a
graphic interface for our project by simply dragging and dropping widgets. Blynk
supports the connection types like Wi-Fi, Ethernet, Bluetooth, Cellular, Serial to
connect our microcontroller board (hardware) with the Blynk Cloud and Blynk's
personal server. The Blynk platform includes the following components.

Blynk app builder: Allows building apps for our projects using various widgets. It is
available for Android and iOS platforms. Blynk server: Responsible for all the
communications between our mobile device that's running the Blynk app and the
hardware. We can use the Blynk Cloud or run our private Blynk server locally. Its open
source, could easily handle thousands of devices, and can even be launched on a
Raspberry Pi. Blynk libraries: Enables communication with the server and processes all
the incoming and out coming commands from our Blynk app and the hardware. They
are available for all the popular hardware platforms. All the aforementioned
components communicate with each other to build a fully functional IoT application
that can be controlled from anywhere through a preconfigured connectivity type. We
can control our hardware from the Blynk app running on our mobile device through the
Blynk Cloud or Blynk's personal server. It works the same in the opposite direction by
sending rows of processed data from hardware to our Blynk app.

Electrocardiogram (ECG)
An ECG is a paper or digital recording of the electrical signal in the heart. It is also
called an electrocardiogram. The ECG is used to determine heart rate, heart rhythm and
other information regarding the heart’s condition. ECG are used to help diagnose heart
arrhythmias, heart attacks, pacemaker function and heart failure. The normal cardiac
cycle begins with spontaneous depolarization of the sinus node, an area of specialized
tissue situated in the high right atrium (RA). A wave of electrical depolarization then
spreads through the RA and across the inter-atrial septum into the left atrium (LA). The
atria are separated from the ventricles by an electrically inert fibrous ring, so that in the
normal heart the only route of transmission of electrical depolarization from atria to
ventricles is through the atrioventricular (AV) node. The AV node delays the electrical
7
signal for a short time, and then the wave of depolarization spreads down the
interventricular septum (IVS), via the bundle of His and the right and left bundle
branches, into the right (RV) and left (LV) ventricles. Hence with normal conduction
the two ventricles contract simultaneously, this is important in maximising cardiac
efficiency. After complete depolarization of the heart, the myocardium must then
repolarise, before it can be ready to depolarize again for the next cardiac cycle. The
ECG is measured by placing a series of electrodes on the patient’s skin – so it is known
as the ‘surface’ ECG.

An essential feature of the ECG is that the electrical activity of the heart is shown as it
varies with time. In other words, we can think of the ECG as a graph, plotting electrical
activity on the vertical axis against time on the horizontal axis. Standard ECG paper
moves at 25 mm per second during real-time recording. This means that when looking
at the printed ECG a distance of 25 mm along the horizontal axis represents 1 second
in time.

ECG paper is marked with a grid of small and large squares. Each small square
represents 40 milliseconds (ms) in time along the horizontal axis and each larger square
contains 5 small squares, thus representing 200 ms. Standard paper speeds and square
markings allow easy measurement of cardiac timing intervals. This enables calculation
of heart rates and identification of abnormal electrical conduction within the heart.

8
• P-waves represent atrial depolarization.
• PR interval- It represents the time taken for electrical activity to move between
the atria and ventricles.
• QRS complex- The QRS-complex represents depolarization of the ventricles.
• ST segment- The ST segment is an isoelectric line that represents the time
between depolarization and repolarization of the ventricles (i.e. contraction).
• T-wave -The T-wave represents ventricular repolarization.
• QT-interval- It represents the time taken for the ventricles to depolarize and then
repolarise.

COMPONENTS USED

Hardware Requirements
 NodeMCU – ESP32
 Temperature sensor – DS18B20
 Heart rate and SPO2 sensor- MAX30100
 ECG sensor- AD8232 sensor
 Temperature and Humidity sensor – DHT22
 LCD display 16*4 with I2C model
 Breadboard
 Jumper wires
 Power source

Software Requirements
 Arduino IDE
 FRITZING
 Blynk

9
CIRCUIT DIAGRAM

Schematic Diagram

10
PCB Diagram

11
Working Principle of various sensors used

1) Temperature Sensor DS18B20

 This is a pre-wired and waterproofed version of the DS18B20 sensor. Handy


for when you need to measure something far away, or in wet conditions.
 This sensor basically works on the one wire communication protocol which
places a resistor in between the VCC and the signal pin of DS18B20 to make it
by default in the high state.
 This is a digital sensor with 12-bit of ADC embedded.
 The usable temperature range is from -55 to 125 degree Celsius (-67°F to
+257°F) as well as it has a temperature limit alarm system.
 These 1-wire digital temperature sensors are fairly precise, i.e ±0.5°C over
much of the range
 The only downside is they use the Dallas 1-Wire protocol, which is somewhat
complex and requires a bunch of code to parse out the communication.

12
2) Pulse Oximeter MAX30100

 This sensor works on the protocol of I2C communication which enables the
SCL and SDA pin of the sensor to communicate with the microcontroller.

 This sensor particularly has two mode- infrared and red LEDs. For pulse rate,
only the infrared light is needed. Both the red light and infrared light is used
to measure oxygen levels in the blood.

 So whenever we are trying to inhale the oxygen which subsequently increases


the oxygenated blood into our body results in the absorption of the more infrared
signal than that of red lights so in common terminology the SPO2 increases.

 And vice versa when we exhale, the deoxygenated blood is more than that of
oxygenated blood which particularly absorbs more of the red lights and pass the
infrared lights.

 The sensor is integrated pulse oximetry and heart-rate monitor sensor


solution. It combines two LED’s, a photodetector, optimized optics, and low-
noise analog signal processing to detect pulse and heart-rate signals.

13
 And in course of time the interval in between the two basic functioning which
are oxygenated and deoxygenated blood results in calculating of the heart rate
in BPM.

 It operates from 1.8V and 3.3V power supplies and can be powered down
through software with negligible standby current, permitting the power
supply to remain connected at all times.

14
3) DHT22 Humidity & Temperature Sensor

 The DHT22 is a basic digital temperature and humidity sensor. It uses a


capacitive humidity sensor and a thermistor to measure the surrounding air, and
spits out a digital signal on the data pin, no analog input pins needed.

 It’s fairly simple to use, but requires careful timing to grab data. The only real
downside of this sensor is you can only get new data from it once every 2
seconds, so when using the library, sensor readings can be up to 2 seconds old.

 The usable temperature range is from -40 to 80 degree Celsius and humidity
range 0 to 100%

 It operates from 3V and 6V DC power supplies

15
4) ECG Sensor Module AD8232

 This sensor is a cost-effective board used to measure the electrical activity of


the heart. This electrical activity can be charted as an ECG or
Electrocardiogram and output as an analog reading.

 ECGs can be extremely noisy, the AD8232 Single Lead Heart Rate Monitor
acts as an op amp to help obtain a clear signal from the PR and QT Intervals
easily.

 Whenever the body is connected with the electrodes of the ECG sensor, it
conducts electrical signals from the skin surface with the help of gel present in
the electrodes.

 With every oxygenated and deoxygenated blood pump in and out, there happens
to be an electrical energy spreading around the body but that is of very low
power which in turn is not felt by us.

 In this case the conductive gel present inside the electrodes conducts that low
power electrical signal and finally amplifies the signal in order to get the analog
values of the ECG which is later on plotted on the ECG paper.

16
3 lead Placement (I, II, or III)

 RA: electrode: Placed under right clavicle near right shoulder, within the rib
cage frame.
 LA: electrode: Placed under left clavicle, near left shoulder, within the rib cage
frame.
 LL: electrode: Placed on the left side, below pectoral muscles, lower edge of
left rib cage.

17
Individual Connection Diagram

1)

 NodeMCU 3.3V ------ -- 3.3V pin


 NodeMCU Digital Pin ------ D4
 NodeMCU Gnd ----------- Gnd

2)

18
 NodeMCU 3.3V----------- Vin of MAX30100
 NodeMCU pin D1--------SCL
 NodeMCU Pin D2-------- SDA
 NodeMCU Pin D0-------- INT
 NodeMCU Analog (A0)-----Output
 NodeMCU Gnd----------- Gnd

3)

 NodeMCU 3.3V ------ -- 3.3V pin of AD8232


 NodeMCU pin D7---------L0+
 NodeMCU Pin D6---------L0-
 NodeMCU Analog (A0)-----Output
 NodeMCU Gnd----------- Gnd

4)

19
 NodeMCU 3.3V ------ -- 3.3V pin of DHT22
 NodeMCU Digital Pin ------ D18
 NodeMCU Gnd ----------- Gnd

HARDWARE MODEL

20
FLOW CHART

START

NODE-MCU INTERFACED WITH ALL SENSORS

Readings from Readings from Readings from Readings from


DS18B20 DHT22 MAX30100 AD8232

UPLOADING TO CLOUD

Visualizing in Blynk
server

STOP

21
SOFTWARE PROGRAM

1. Code for ESP32 Module 1

#include <Blynk.h>

#include <DHT.h>

#include <DHT_U.h>

#include <Wire.h>

#include <WiFi.h>

#include <OneWire.h>

#include <DallasTemperature.h>

#include <LiquidCrystal_I2C.h>

#include <BlynkSimpleEsp32.h>

char auth[] = "Tysf6XbQ8Uoi1mIJ6TTRBybWBR65H6vj";

char ssid[] = "Dialog"; .

char pass[] = "12345678";

#define REPORTING_PERIOD_MS 1000

#define DHTPIN 18

#define DS18B20 5

#define SENSOR A0

#define DHTTYPE DHT22

#define BLYNK_PRINT Serial

22
DHT dht(DHTPIN,DHTTYPE);

OneWire oneWire(DS18B20);

DallasTemperature sensors(&oneWire);

BlynkTimer timer;

int lcdColumns = 16;

int lcdRows = 4;

LiquidCrystal_I2C lcd(0x27, lcdColumns, lcdRows);

float temperature;

float humidity;

float bodytemperature;

float ecg;

uint32_t tsLastReport = 0;

void setup() {

Serial.begin(115200);

pinMode(DHTPIN, INPUT);

dht.begin();

Blynk.begin(auth, ssid, pass);

lcd.begin();

lcd.backlight();

23
void loop()

Blynk.run();

timer.run(); // Initiates SimpleTimer

ecg = analogRead(SENSOR);

sensors.requestTemperatures;

temperature = dht.readTemperature();

humidity = dht.readHumidity();

bodytemperature = sensors.getTempCByIndex(0);

ecg = analogRead(SENSOR);

if (millis() - tsLastReport > REPORTING_PERIOD_MS)

Serial.print("Room Temperature: ");

Serial.print(temperature);

Serial.println("°C");

Serial.print("Room Humidity: ");

Serial.print(humidity);

Serial.println("%");

24
Serial.print("Body Temperature: ");

Serial.print(bodytemperature);

Serial.println("°C");

Serial.print("ECG Value: ");

Serial.println(ecg);

Serial.print("*********************************");

Serial.println();

Blynk.virtualWrite(V3, temperature);

Blynk.virtualWrite(V4, humidity);

Blynk.virtualWrite(V5, bodytemperature);

Blynk.virtualWrite(V6, ecg)

lcd.clear();

lcd.setCursor(0, 0)

lcd.print("RoomTemp-");

lcd.print(temperature);

lcd.print(" C");

lcd.setCursor(0, 1);

lcd.print("RoomHumi-");

lcd.print(humidity);

lcd.print(" %");

25
lcd.setCursor(-4, 2);

lcd.print("BodyTemp-");

lcd.print(bodytemperature);

lcd.print(" C");

tsLastReport = millis();

26
27
2. Code for ESP32 Module 2

#include <Wire.h>
#include "MAX30100_PulseOximeter.h"
#define BLYNK_PRINT Serial
#include <Blynk.h>
#include <WiFi.h>
#include <BlynkSimpleEsp32.h>

#define REPORTING_PERIOD_MS 1000

char auth[] = "w2yoZ3qIQpfq1DmTMYUcEB1Nd3s_HnwO";


char ssid[] = "Dialog";
char pass[] = "12345678";
PulseOximeter pox;

float BPM, SpO2;


uint32_t tsLastReport = 0;

void onBeatDetected()
{
Serial.println("Beat Detected!");
}

void setup()
{
Serial.begin(115200);

pinMode(19, OUTPUT);
Blynk.begin(auth, ssid, pass);

Serial.print("Initializing Pulse Oximeter..");

28
if (!pox.begin())
{
Serial.println("FAILED");
for(;;);
}
else
{
Serial.println("SUCCESS");
pox.setOnBeatDetectedCallback(onBeatDetected);
}

pox.setIRLedCurrent(MAX30100_LED_CURR_7_6MA);

void loop()
{
pox.update();
Blynk.run();

BPM = pox.getHeartRate();
SpO2 = pox.getSpO2();
if (millis() - tsLastReport > REPORTING_PERIOD_MS)
{
Serial.print("Heart rate:");
Serial.print(BPM);
Serial.print(" bpm / SpO2:");
Serial.print(SpO2);
Serial.println(" %");

Blynk.virtualWrite(V3, BPM);
Blynk.virtualWrite(V4, SpO2);

tsLastReport = millis();
}

29
}

30
UPLOADING DATA TO CLOUD

 Blynk application has very easy user interface and hence can prove to be useful
for family members as well as doctors to monitor the data easily and give
medication accordingly.

 It uses the TCP/IP protocol which securely communicates with the respective
known device and transfers the data in real time.

 Blynk application has different widgets which can be used limitedly and most
importantly can be used with different microcontrollers such as Arduino,
NodeMCU, Raspberry pi and the like.

 The interfacing of adding different widgets and creating its functionality is


really very simple for non-tech people as well. Moreover, for long term
application, one can also take the values in the csv files which can be used in
the machine learning algorithm to predict and also analyse the data.

 There are two major ways of displaying sensor data in the app: PULL: In this
case, Blynk app will request the data only when the app is open; PUSH: In this
case the hardware will be constantly sending data to the Blynk Cloud. And when
we open the app, it will be there waiting

31
The process to collect and display the data on the Blynk application can be stated in the
following simple steps:

1. Create a New Project after creating an account or log in using Facebook.

2. Add Value Display Widget such as gauge and super chart

3. After clicking the widgets go to particular widget Settings.

4. Set PIN to Virtual Pin or analog/digital based on your sensor.

5. Set a Frequency of interval or set it to PUSH.

32
6. Open the coding sketch. Change pin respectively as mentioned in Blynk .

7. Send the auth taken to your email by clicking here.

8. Insert your Auth Token in the sketch.

9. Flash the code to your microcontroller.

10. Go to the Blynk app - press Play button.

11. . Hurray! The Real time data is updating and can be seen on the application.

33
OBSERVATIONS AND RESULTS

 Observation in BLYNK APP: The body parameters (body temperature, heart


beat in BPM, oxygen rate in blood and ECG of the heart) of the patient are
visible remotely on the Blynk app from any location.

1. ECG Measurement by AD8232

34
 Analysis of the ECG: Body parameters of a healthy volunteer were obtained
using our E-Health monitoring system. ECG plot parts were traced out and
compared with normal range of ECG parameters.

Fig -Normal parameter ranges of ECG wave

Studying the plot obtained, we come to the following analysis:


REPORT

RR interval – Normal (0.8s)


PR interval – Normal (0.14s)
QT interval – Normal (0.32s)
QRS Duration – Normal (0.10s)

35
Hence, the ECG is normal without any abnormal parameters.

ABNORMAL PARAMETERS:-

1. Increased or decreased P waves can indicate problems with the potassium ion
concentration in the body that will alter nerve activity.

2. A missing P wave indicates atrial fibrillation, a cardiac arrhythmia in which the heart
beats irregularly, preventing efficient ventricular diastole.

3. Abnormalities in the QRS complex may indicate cardiac hypertrophy or myocardial


infarctions.

4. An elevated ST segment is the classic indicator for myocardial infarctions, though


missing or downward sloping ST segments may indicate myocardial ischemia.

2. Body Temperature measurement by DS18B20 Sensor

The DS18B20 Sensor and a Thermometer are used to determine the body
temperature of a 25 years old male person who was chosen as the test subject.
The body temperature of the subject was measured. The measurement was repeated
three times, and the average of three data was calculated. Five readings were taken
within five hours (hour by hour) and the total average value was calculated.

Table 1: Body Temperature measured by DS18B20 Sensor

No Temperature reading in Celsius(◦C) Average


1 35.31 34.66 34.93 34.97
2 34.89 35.01 34.91 34.94
3 35.49 35.32 35.51 35.44
4 34.78 34.54 33.96 34.43
5 35.61 34.89 35.65 35.38
Total Average 35.03

36
Table 2: Body Temperature measured by Thermometer

No Temperature reading in Celsius(◦C) Average


1 35.25 34.68 34.97 34.97
2 35.32 35.12 34.85 35.10
3 35.51 35.27 35.47 35.42
4 34.85 34.23 33.87 34.32
5 35.46 34.92 35.71 35.36
Total Average 35.03

Body temperature measured by the thermometer is stable, while the body temperature
measured by the DS18B20 Sensor shows some small changes. Temperature readings
are based on the voltage output of the DS18B20 Sensor. Thus, a better temperature
sensor with IoT capabilities can be used in the future improvements. Accuracy of
DS18B20 Sensor is ±0.5 0C

3. Humidity Measurement of DHT22 Sensor

The Environmental humidity measure in percentage by the DHT22 Sensor and


determine the accuracy by comparing with android readings within five hours on 27th
of December 2021.
Table 3: Comparison table of Humidity in percentage

DHT22
Time Sensor Reading Android Reading
11:30:00 65% 67%
12:30:00 64% 64%
13:30:00 67% 66%
14:30:00 65% 66%
15:30:00 67% 69%

The Room Temperature measure in Celsius by the DHT22 Sensor and determine the
accuracy by comparing with android readings within five hours on 27th of December
2021.

37
Table 4: Comparison table of Room Temperature in Celsius

Sensor Android
Time Readings (◦C) readings (◦C)
11:30:00 31 30
12:30:00 30 30
13:30:00 29 30
14:30:00 30 29
15:30:00 29 29

By comparing the two observations, can be determined that the DHT22 Sensor is
working with a better accuracy.

4. Measurements of Pulse Oximeter (MAX30100)

Accuracy of the Pulse Oximeter was determined by comparison with the android
reading and with the manual pulse rate measurement.
The pulse rate (BPM) and the blood oxygen level (SpO2) of a healthy person of 25
years old (male) was measured and five readings were taken for each method.

Table 5: Comparison table of Pulse rate in BPM

BPM recorded by BPM recorded by BPM recorded by


No pulse oximeter Android wrist

1 66 67 67

2 65 66 66

3 66 66 64

4 64 65 65

5 65 66 66

38
Table 4: Comparison table of Blood Oxygen level (SpO2) in percentage

Sensor Android
No Readings Readings

1 98% 99%

2 97% 98%

3 99% 98%

4 98% 99%

5 99% 100%

Any movement of the test subject will affect the BPM value and SpO2 value and led
to the fluctuations. The results of the experiment show that the MAX30100 sensor is
capable of measuring the heart rate and Blood oxygen level with high accuracy since
the fluctuations were small and insignificant

Discussion
The project provides the opportunity for the doctors to monitor the health of the patients
even outside the hospital or apart from the duty hours using IoT the health of the patients
is monitored remotely. This project is cost effective and provides timely response to
improve the patients’ health it avoids the patients to have long stays in hospital it helps
them to move freely and walk happily with the help of wireless sensors. This are the
measurable bents which avoids the patients from daily regular visits to hospitals which
is extremely painful for chronically ill, elderly and bedridden patients in home. Hence
in total by using the project we can solve many of the healthcare problems which the
society is facing and improve the quality of better human life.

The people in the rural areas or the people in the under developed countries face the
lack of treatment and health care services in time. Essentially the elderly patients face
the barriers of regularly attending the clinic or to have the long stay in the hospitals
some of the chronically ill or bedridden patients undergoes the tough life of wearing
the wired sensor every time and not able to move and easily walk with the wires on
39
their body all time. In addition to that travelling is one of the burdens hence our project
is cost effective and reduces all the barriers which the patients are facing it saves the
time and edibility

The Internet of Things is considered now as one of the feasible solutions for any remote
value tracking especially in the eld of health monitoring. It facilitates that the individual
prosperity parameter data is secured inside the cloud, stays in the hospital are reduced
for conventional routine examinations and most important that the health can be
monitored and disease diagnosed by any doctor at any distance. In this project, an IoT
based health monitoring system was developed. The system monitored body
temperature, pulse rate, ECG, blood oxygen level and room humidity and temperature
using sensors, which are also displayed on a Screen. These sensor values are then sent
to a medical server using wireless communication. These data are then received in an
authorized personals smart phone with IoT platform. With the values received the
doctor then diagnose the disease and the state of health of the patient

IoT-based remote healthcare monitoring systems represent a platform of medical


devices which can collect and share data among each other for the distribution of
different healthcare applications and services. Healthcare professionals are now
accepting IoT-based wearable technology to accelerate the diagnosis and health
recovery process. However, certain limitation complexities and relevant factors which
really complicate its continuous improvement. Therefore, some challenges and
development issues are addressed as the following:

• Decision Support
Artificial Intelligence and machine learning enable the interdisciplinary
development and processing of analytical techniques that are crucial for the
growth of future smart healthcare including monitoring and decision support. A
significant quantity of research efforts is currently being conducted on artificial
intelligence and machine learning to support decision-making. Such studies
provide considerable opportunities to resolve plenty of the challenges identified.
Recent artificial intelligence and machine learning technologies may not replace
physicians but improve their opportunities to carry crucial important knowledge
that a patient needs to care about and deliver in a succinct, easily understandable
way. Such technologies would not only enhance decision-making support, but

40
also ensure the integrity and reliability of all the components that comprise the
ecosystem of smart healthcare monitoring.

• Usability

The purpose of remote healthcare monitoring systems would be to make


diagnosis and treatments much easier. Usability is always the significant
functionality consideration in order to improve safety of patients and health
care delivery. Usability is generally evaluated through feedbacks from users
and performance problems are reported. Although the IoT represents a
complex cooperation among healthcare equipment, requirements must be
adjusted in order to bring the components in the network together and further
improve remote healthcare monitoring systems usability. The IoT technology
is going to achieve the era of remote healthcare monitoring systems that would
predict and interact with the growing requirements for patient experiences.

• Accuracy and reliability

Remote healthcare monitoring systems are critical to the accuracy and


reliability of healthcare information. The accuracy and reliability mechanisms
must be assured over everyday utilization because misleading information
might become unreliable and disruptive to patients. The IoT technology has a
really powerful vested interest, for example to incorporate and interpret
different forms of clinical information in professional decision-making
processes in remote healthcare monitoring systems. In this manner, physicians
will have an analysis of the state of health for every patient and hence more
effective interventions can be done. This has all achieved with diagnostic tests,
where progress accuracy remained essential to the rescue the patient.

• Security and Privacy

A highly secure health technology assessment process is very important in


smart healthcare. As remote healthcare monitoring systems are more widely
spread, confidentiality of patient data must be guaranteed. Security
vulnerabilities allow hackers to access personal data which result to
misdemeanours including Fraud and identity theft, exposure of unauthorized
substances and fake payroll records. A major concern of remote healthcare
41
monitoring systems has now been the stable protection from infections,
vitality and data obtained from embedded sensing devices. Security
vulnerabilities in the healthcare services can then lead to severe, and even in
some cases fatal, mass casualties to the patients. Authentication of the network
is one of the essential aspects for ensuring the structure of remote healthcare
monitoring systems. Some healthcare monitoring systems do not support
advanced encryption algorithms due to inadequate computing capacity and
resources. Therefore, efficient and low-power processing with modern
authentication mechanisms is important for addressing security risks.

• Energy Efficiency

Typical remote healthcare monitoring systems include smart sensors and


devices that able to operate continuously onsite using perceived energy. A new
challenge seems to be the consumption of renewable energy for sustainable
healthcare monitoring practices. In order to minimize the power consumption
of numerous connected smart sensors and devices, the IoT has empowered
researchers to conduct emerging innovations. Therefore, numerous routing
protocols, algorithms, and techniques have already been proven minimize total
consumption of energy needed for operating the network. However, the
volume of produced data must also be controlled for further decrease the
power being used for processing and transmission. Energy-efficient remote
healthcare monitoring systems can significantly minimize the energy usage in
healthcare facilities and produce substantial power savings. The effect of these
mechanisms also is environmental optimistic by decreasing electromagnetic
impact.

42
CONCLUSION

In this project, we designed and developed an E-Health Monitoring System using IoT.
This prototype was designed keeping in mind the problems faced by most of the people
who deal with tight daily schedules and tend to postpone or miss their required health
check-ups. This system can also provide assistance to the elderly people who find it
inconvenient and difficult to visit clinics or diagnostic centres for their regular check-
ups. With the help of the remote monitoring system provided by our prototype, health
monitoring can be done by the doctors or health care providers at any time from any
location in a cost-effective manner. As this system size is quite small so it can be carried
at various locations with ease. Through the use of small circuitry, the heartbeat and
ECG signals of a patient can be viewed rather than using large machines for it.

Doctors can see data remotely and analyse the health parameters of patients. This is the
most important advantage of this system. The persons living in remote locations who
have no access to a doctor can be helped through a greater extent through this system,
as this system sends all the values and signals on the website and the doctors which are
far away can get an accurate idea of heart condition of a person. Furthermore, this
system can be used in ambulance which saves a lot of time and can save a life of a
person because every second counts. It is evident that the implementation of such a
system will help in early detection of abnormal conditions of cardiovascular diseases
and prevention of its serious consequences.

43
Reference

1. Nancy Fernando E, “A Survey on Android Based Patient Monitoring System”


GRD Journals | Global Research and Development Journal for Engineering |
International Conference on Innovations in Engineering and Technology
(ICIET) - 2016 | July 2016eISSN: 2455-5703

2. Manisha Shelar, Jaykaran Singh, Mukesh Tiwari, “Wireless Patient Health


Monitoring System”, International Journal of Computer Applications (0975 –
8887) Volume 62– No.6, January 2013

3. Yunzhou Zhang1, Huiyu Liu, Xiaolin Su, Pei Jiang and Dongfei Wei1, “Remote
Mobile Health Monitoring System Based on Smart Phone and Browser/Server
Structure” 2013 International Conference on Electronic Engineering and
Computer Science

4. Uttara Gogate, Jagdish Bakal, “Smart Healthcare Monitoring System Based on.
Wireless Sensor Networks.” Computing Analytics and security trends, 2016.
5. Mehak Chhabra, Manik Kalsi, “Real Time ECG monitoring system based on
Internet of Things (IoT)”. International Journal of Scientific and Research
Publications, Volume7, Issue 8, August 2017

6. Uttara Gogate, Manali Marathe, Jay Mourya, Nipunya Mohan, “Android Based
Health Monitoring System for Cardiac Patients”. International Research Journal
of Engineering and Technology (IRJET), Volume: 04 Issue: 04 | Apr -2017.

7. Uttam U. Deshpande, Milan A. Kulkarni , “IoT based Real Time ECG


Monitoring System using Cypress WICED”. International Journal of Advanced
Research in Electrical, Electronics and Instrumentation Engineering, Vol. 6,
Issue 2, February 2017.

8. Zhe Yang, Qihao Zhou, Lei Lei, Kan Zheng, Wei Xiang, “An IoT-cloud Based
Wearable ECG Monitoring System for Smart Healthcare”, February 2018.

44
9. Ms.Gauravi.A.Yadav, Prof. Shailaja.S.Patil, “RASPBERRY PI BASED ECG
DATA ACQUISITION SYSTEM”. International Journal of Advance Research
in Science and Engineering, April 2017.

10. Shivleela Patil, Dr. Sanjay Pardeshi, “Health Monitoring system using IoT.”
International Research Journal of Engineering and Technology (IRJET) ,
Volume: 05 Issue: 04 | Apr-2018.

45

You might also like