0% found this document useful (0 votes)
206 views52 pages

Thesis Patient Monitoring System (Org)

This document appears to be a thesis submitted by three students - Shamsul Hadi, Abd Ullah, and Ghayas Malik - to their supervisor Dr. Mir Hamayoun Yousaf Shahwani and co-supervisor Engr. Ali Israr. The thesis proposes a "Smart IOT based healthcare support for remote patient monitoring during COVID-19 quarantine" using wearable sensors, an IP camera, a cloud, NODE MCU, and an Android app to allow remote monitoring of patients' vital signs and live video streaming so patients can receive medical care while quarantining. An emergency feedback system is also included.

Uploaded by

Ali Israr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
206 views52 pages

Thesis Patient Monitoring System (Org)

This document appears to be a thesis submitted by three students - Shamsul Hadi, Abd Ullah, and Ghayas Malik - to their supervisor Dr. Mir Hamayoun Yousaf Shahwani and co-supervisor Engr. Ali Israr. The thesis proposes a "Smart IOT based healthcare support for remote patient monitoring during COVID-19 quarantine" using wearable sensors, an IP camera, a cloud, NODE MCU, and an Android app to allow remote monitoring of patients' vital signs and live video streaming so patients can receive medical care while quarantining. An emergency feedback system is also included.

Uploaded by

Ali Israr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 52

Smart IOT Based Healthcare

Support for Remote


Patients Monitoring During
COVID-19 Quarantine

Authors

Shamsul Hadi 43037


Abd Ullah 43337
Ghayas Malik 43987

Supervisor
Dr Mir Hamayoun Yousaf Shahwani
Co Supervisor
Engr ALI ISRAR
Department of Telecommunication Engineering

A thesis submitted in partial fulfillment of the requirements for the degree


of Bachelor of Science in Telecommunication Engineering (BS TE)

In
Department of Telecommunication Engineering, Faculty of
Information, Communication Technology, BUITEMS, Quetta,
Pakistan.

(Sep 2021)
Smart IOT Based Healthcare Support For
Remote Patients Monitoring During
COVID-19 Quarantine

Author

Shamsul Hadi 43037


Abd Ullah 43337
Ghayas Malik 43987

Supervisor

Dr Mir Hamayoun Yousaf Shahwani


Co Supervisor
Engr ALI ISRAR

Examiner Signature: ___________________________________

Thesis Supervisor Signature: ____________________________________

DEPARTMENT OF TELECOMMUNICATION ENGINEERING


FACULTY OF INFORMATION AND COMMUNICATION TECHNOLOGY
BALOCHISTAN UNIVERSITY OF IT, ENGINEERING AND MANAGEMENT
SCIENCES

Sept 2021

i
Undertaking
I certify that the research entitled "Smart IOT based healthcare support for
remote patient monitoring during COVID-19/20 quarantine" is my own. It has not been
submitted for assessment elsewhere Any material used from other resources has been correctly
acknowledged / cited. Balochistan University of Information Technology Engineering and
Management Sciences (BUITEMS), Quetta, owns this work/idea It is prohibited for any part
of this work/publication to be reproduced, distributed, or transmitted in any form or by any
means, including photocopying, recording, or other electronic or mechanical methods,
without BUITEMS' prior written permission.

Shamsul Hadi (43037)


Sept 2021

Abd Ullah (43337)


Sept 2021

Ghayas Malik (43987)


Sept 2021

ii
Approval
It is certified that the contents of the thesis entitled “Smart IOT based healthcare support for
remote patient monitoring during COVID-19/20 quarantine” submitted by

Name CMS ID
Shamsul Hadi 43037
Abd Ullah 43337
Ghayas Malik 43987

have been found satisfactory for the requirement of the degree.

Supervisor: Dr. Mir Hamayoun Yousaf Shahwani

Signature:
Date:

FYP coordinator: Dr Muhammad Bilal

Signature:
Date:

iii
Abstract
In the situation like covid -19 social distancing and quarantining are compulsory for control

of the pandemic. In 2020 and 2021 approximately in every country the lockdown occurred

for the purpose of controlling covid-19. The lockdown made it difficult for patients to visit

hospitals. Patients whose vitals require routine monitoring to improve their health status,

the patients who were COVID-19 positive and wants self-quarantine require monitoring. In

the era of technology healthcare monitoring from a distance is possible due to the

advancement in internet of things (IOT) now visits to the hospital is not necessary for health

mentoring. for the solution of the above problem” smart IOT based healthcare support for

remote patients monitoring during COVID-19 quarantine” is proposed. The proposed

solution makes that easy for the remote area’s patient health status monitoring. The patient

getting the presumptions of doctor while doctor and patient staying in its own house.in

addition to this the doctor can do diagnosis of the diseases using the received data remotely.

The proposed project consists of wearable device, which contains temperature sensor and

blood pressure, a sensor for oxygen monitoring and an IP camera for live streaming of

patient. The data is collected from the sensors and send to the cloud using NODE MCU and

the main thing for dual communication between doctor and patient is an android app. An

emergency feedback system is also a chunk of the project

iv
Dedication
Dedicated to our dear parents, beloved teachers, and dear friends whose love and
attention brought us to this height of knowledge with the blessings of Allah Almighty.

v
Acknowledgement
First, we would like to thank the ALLAH almighty for giving us this opportunity,
determination, and ability to accomplish this project.
Secondly, we would like to thank to our supervisor Dr MIR HAMAYOUN YOUSAF
SHAHWANI and our co supervisor ENGR ALI ISRAR for helping us in process of completion
of our project. They always encourage us and pushed us to the boundary of success. It was a
pleasure working with and under their supervision.
Finally, we would like to thank coordinator of our project Dr M BILAL all faculty of
department of telecommunication engineering and BUITEMS from which we had received
education and support to accomplish our project.

vi
Table of contents
Undertaking ............................................................................................................................................ ii
Approval .................................................................................................................................................. iii
Abstract ................................................................................................................................................... iv
Table of contents .................................................................................................................................. vi
Table of figure ....................................................................................................................................... ix
.................................................................................................................................................. 1
INTRODUCTION ..................................................................................................................................................... 1
1.1 Healthy life ............................................................................................................................................. 1
Healthcare...................................................................................................................................... 1
. Health monitoring .................................................................................................................... 2
1.1.3. Why remote health monitoring? ......................................................................................................... 3
1.2 Internet of things (IOT) ..................................................................................................................... 5
1.3 Problem statement.............................................................................................................................. 6
1.4 Objectives ............................................................................................................................................... 6
1.5 Thesis outlines ...................................................................................................................................... 7
.................................................................................................................................................. 8
LITRATURE REVIEW ........................................................................................................................................... 8
2.1 . Our proposed solution to the problem................................................................................... 11
................................................................................................................................................ 13
METHODOLOGY.................................................................................................................................................. 13
3.1. introduction ................................................................................................................................................. 13
3.2. Hardware ...................................................................................................................................................... 14
3.2.1. Temperature sensor.............................................................................................................................. 14
3.2.2 pulse oximeter .......................................................................................................................................... 15
3.2.3. NODE MCU ................................................................................................................................................ 15
3.2.4 ESP32 Camera .......................................................................................................................................... 18
3.3. Working principle...................................................................................................................................... 19
3.4. Circuit connection...................................................................................................................................... 20
................................................................................................................................................ 20
Temperature sensor ............................................................................................................... 20
Pulse oximeter sensor and NODE MCU ........................................................................... 21

vii
IP camera (ESP32 CAM) and power supply interconnection ................................. 22
3.5 Firebase console ............................................................................................................................... 24
3.6 . Mobile app ......................................................................................................................................... 24
3.7 ESP8266 NODE MCU basic code ................................................................................................. 25
3.8 Implementation steps and prototype ....................................................................................... 32
................................................................................................................................................ 33
RESULTS AND DISCUSSION ........................................................................................................................... 33
4.1 Arduino ide Serial monitor data ................................................................................................. 33
4.2 Firebase console ............................................................................................................................... 34
4.3 Mobile Application ........................................................................................................................... 35
4.4 ESP 32 Cam ......................................................................................................................................... 36
Reference ....................................................................................................................... 40

viii
Table of figure
FIGURE 1-1 REMOTE MONITORING HEALTHCARE SYSTEM [1] .............................................................................. 4
FIGURE 2-1 BLOCK DIAGRAM OF [16] .................................................................................................................. 11
FIGURE 3-1. FLOW CHART OF THE SYSTEM ........................................................................................................... 13
FIGURE 3-2 DS18B20 TEMPERATURE SENSOR .................................................................................................. 14
FIGURE 3-3 PULSE OXIMETER SENSOR .................................................................................................................. 15
FIGURE 3-4 NODE MCU ....................................................................................................................................... 16
FIGURE 3-5 NODEMCU PIN OUT ......................................................................................................................... 17
FIGURE 3-6 ESP 32 CAM ...................................................................................................................................... 18
FIGURE 3-7 .............................................................................................................................................................. 20
FIGURE 3-8 BLOCK DIAGRAM ................................................................................................................................. 20
FIGURE 3-9 CONNECTION OF DS18B20 AND NODE MCU .............................................................................. 21
FIGURE 3-10 INTERCONNECTION OF MAX30102 AND NODE MVCU BOARD ............................................. 22
FIGURE 3-11 PROTOTYPE ...................................................................................................................................... 33
FIGURE 4-1 SERIAL MONITOR ................................................................................................................................ 34
FIGURE 4-2 REAL TIME DATA BASE RESULTS ....................................................................................................... 35
FIGURE 4-3 UPLOADED DATA GRAPH .................................................................................................................... 35
FIGURE 4-4 APP DISPLAY ........................................................................................................................................ 36
FIGURE 4-5 IP CAM APP STARTUP MENU AND VIDEO DISPLAY ........................................................................... 37

ix
INTRODUCTION
In the introduction section we will talk about what is IOT all around. What is healthy living.

How vital is health intensive care in the new period of healthcare? Most importantly

introduction of remote health monitoring using IOT. In conclusion of the chapter there are

thesis outlines.

1.1 Healthy life


Healthy living is the way you live, helps you enjoy more aspects of your life. A healthy lifestyle

does not just mean avoiding a disease or illness. It also involves physical, mental, and social

well-being. It is the target of any human being no matter their gender, age, color, country, or

health status. But unfortunately, there are restrictions due to disability, age, treatment,

hospitalization, pandemics, and other situations. Health monitoring is required during the

above limitation to assist appropriate healthy living.

Healthcare

Healthcare has been defined as the maintenance of and recovery of health through all stages

of disease, injury, and other impairment of physical and psychological health on human

beings. Health care is handled by health specialists and associated health fields. Medicine,

occupational therapy, dentistry, midwifery, nursing, optometry, pharmacy, nursing,

psychology, athletic training, and other health professions are part of health care. This

involves the efforts done in primary, secondary, and tertiary care, but also in public health.

1
Health care may be day care or long-term care [1]. a day care is describing as Patients who

are formally admitted for diagnosis or treatment with the intention of being discharged on

the same day receive medical and paramedical services.

Similarly, long term care is describing as A person who is chronically disabled requires a

wide variety of help with their daily needs for a sustained period. long term care mainly

concerned for the improvement or maintenance in the ability of elder or disable person to

move freely as long as possible.

During the era of technologies health care also became advanced. The new inventions in the

field of health made easy to diagnose different disease.

. Health monitoring

Monitoring health of patient is to identify variation in their health condition due to different

diseases, illness, or pandemic. Health monitoring is handled by a medical expert may be

doctor or experienced nurse. It has some stages like interview, counseling, medical

examination, checking of different effects happen due to disease.in interview stage medical

experts ask question according to patient health condition, personal life, work etc. to know

about patient and the disease of patient. Second is the counseling in this stage doctor must

educate the patient .in this stage doctor give advises to the patient how live healthy, and how

to prevent himself for different diseases and pandemics. The 3rd stage is medical

examination. In this stage the doctor must use advance techniques to check the present and

future effects of the diseases. The last stage is checking of body tissues, skin, eyes, blood and

urine etc. tests to know about the disease effects upon the patient body.

Monitoring health is done easily in the presence of health monitoring systems. Health

monitoring systems includes sensor like temperature, blood pressure, ECG, oximeter etc. It

2
shows the patients’ health status. Using this system health experts can monitor patient’s wo

are hospitalized or living normal life . Now adays modern systems are present in hospitals

like an ICU etc.

Health monitoring system may be single or multiple parameter system. Single parameter

system is a system which only consist of one parameter like electrocardiogram (ECG). from

ECG some different result can be achieved lite heart rate, saturation of oxygen etc.

multiparameter systems have many parameters through which we can monitor many

parameters it the equivalent time.it includes blod pressure, respiration, heartbeat,

temperature etc. it is mainly available it ICU, high dependency units (HDU) and in operation

theater.

1.1.3. Why remote health monitoring?

In the era of advance technologies now it is possible to help patient and health worker throw

remote health monitoring system. It is a system which can monitor the health condition

throw sensors and collect the data to cloud and the cloud data can access doctor and patient

remotely through web side or app.in remote health monitoring the doctor can diagnose the

disease of the patient from the received data. Doctor can take decision to give presumptions

to the patients remotely. Emergency alert system also is a part of remote health monitoring

system.

3
Figure 1-1 remote monitoring healthcare system [1]

Reasons of remote health monitoring


• long term hospitalization for patients not an easy task. A patient cannot want to stay in

wards for log period because it is more expensive and boring process. main problem is

doctor must be present in ward.2nd the patient must enrolled for a period in hospital with

biomedical instruments [2].

• Increase occurring in the population of senior citizen similarly their also exponentially

increase occur in health monitoring of these persons. In 2045 it is predicted that the

figure of old person will be increased. the no of old citizens will be increase than the no

of young person. A limitation will occur in no of health care nurses, helpers etc. It will

make the health monitoring expensive for those people so a remote health monitoring

system will be required [3].

4
• All those patients who are in remote areas where hospital is not available, and they have

internet connection in their area. To provide a standard healthcare support for those

remote area’s patients a remote health monitoring stem is required.

• The situation of pandemic like qovid-19 a person who wants to self-quarantine require

health monitoring after specific time.it is necessary to have look upon the patient who

had covid-19 positive for physiological and mental health of that person [4].

1.2 Internet of things (IOT)

Internet of things (IOT) can be described as an open and wide-ranging network of objects

with the capability to auto-organize, analyze and share data, information, and resources.

reacting accordingly to situations and environment changes [5]. Internet of Things is a

technological revolt that will truly change global computing and communications, requiring

technological innovation in many fields, including wireless sensors and nanotechnology.

The role of IOT in health care is very huge. It reduces the difficulties occurred to doctor and

patient.

Remote health care which is IOT based reduce expenses [6]. Long term hospitalization is

very expensive for patients and fees of home nurse also very huge. Patients in remote areas

where hospitals are not available, and internet facility is available if emergency occurred so

in that situation use of remote health monitoring system can help them .Due to IOT this

problem is solved using remote health monitoring system. IOT made possible smart home,

school, hospital, industries etc. and reduced the human effort.

5
1.3 Problem statement

In the situation like COVID -19 social distancing and quarantining are compulsory for control

of the pandemic. In 2020 and 2021 approximately in every country the lockdown occurred

for the purpose of controlling covid-19. The lockdown made it difficult for patients to visit

hospitals. Patients whose vitals require routine monitoring to improve their health status,

the patients who were COVID-19 positive and wants self-quarantine require monitoring. In

the era of technology healthcare monitoring from a distance is possible due to the

advancement in internet of things (IOT). We had proposed a system” smart IOT based

healthcare support for remote patients monitoring during COVID-19 quarantine” for the

solution of the above problem.

1.4 Objectives
• To make a remote health monitoring system for Monitoring of patient’s health status and

receiving of doctor presumption while both doctor and patient staying it home.

• To make a system which gains real time medical data of patient using different sensors

like temperature BP blood pressure etc.

• To make a system which can monitor patient live through IP camera and an oxygen

monitoring sensor for monitoring oxygen.

• Using IOT for connection of all components of the system and sending of data to the cloud.

• Making of an android application for real time communication between doctor and

patient.

• Making of emergency alarm system in form of SMS or email.

6
1.5 Thesis outlines
2nd Chapter: In this chapter there are description of literature review for the project. It

discusses the related work, and which are the parameters in which we are differ from them.

3rd Chapter: in this chapter there are discussion of methodology.

4th chapter: in chapter 4 there are results of the project.

7
LITRATURE REVIEW
In the study led by Mehmet Taştan proposed a monitoring system which monitor the heart

rate body temperature and heart rate variability of the cardiovascular patient through an

android app [7].in the proposed system the sensors are in wearable device which measure

the health parameter of patient regularly. It sends the data to the android interface

wirelessly.it has also emergency feedback system.in case of increase in the body

temperature, heart rate or heart rate variability it shows the real location of the patient also

send to the family and to doctor through email and twitter notification. There is also a

warning sound for the near person to hear it and help the patient as along as possible. The

main determination of the study is to monitor and help the cardiovascular patient an any

emergency.

The study conducted by Prajoona Valsalan, Tariq Ahmed Barham Baomar,and Ali Hussain

Omar Baabood shows that a health monitoring system which is IOT based was designed [8].

The system can monitor the temperature of the body, heartbeat, humidity, and room

temperature through sensors. The checking of health status occurs regularly after some time

and displayed it on lcd. similarly, the data is sent to the server wirelessly. The server data

accessibility is given to the authorized persons, doctors through IOT platforms. Doctor

receives the data and diagnose the disease of the patient remotely. The main goal paper is to

achieve the remote health monitoring and healthy lifestyle, but there is no emergency

feedback system which reduce the value of the paper.

8
Proposed work by Melisa Pereira, Nagapriya Kamath K is a handy health monitoring system

which can monitor the heart rate and body fat of the patient using LPC 2129 Arm processer

[9].it also have included temperature, ECG sensors for monitoring of patient. In the given

system proposal, the data of patient is sent to the web server which can accessed anywhere

in the world. similarly doctor access the data from web and diagnose the disease for the

received data. The data is changing regularly after some time.so the main goal of the paper

is to develop a system which can be transportable anywhere. To decrease the visits of patient

to doctor for small issues in health status. Also, to reduce the wastage of doctor and patient

time.

Body sensor network (BSN) is a network which is made for the collecting data from human’s

body it may be located within or beside of the human’s body [10].in the study led by Vikas

Vippalapall and Snigdha Ananthula suggested to design a smart and advance health

monitoring system. The system has a wearable device which had consist of several sensors.it

achieves real time data of the patient and at also have a proper system for analyzation of the

human physiological constraints. The device collects and share data of the patient and also

store the data. Data may be accessed form the web site remotely. through this proposed

system a huge no of patients can be monitored and only requirement is the home-based lab

view application which is installed in home pc.

Similar work is done by Punit Gupta, Deepika Agrawal, Jasmeet Chhabra, Pulkit Kumar

Dhir in their proposed work. Proposed solution is all about to reduce the doctor and patients’

difficulties [11]. They made a monitoring system which consists of heartbeat, blood pressure,

temperature, and electrocardiogram sensors. The system has an emergency alert system

both for doctor and patient.

9
In the study led by Binu P K, Akhil V, Vinay Mohan is about the child behavior and health

monitoring [12]. The proposed solution as an smart application and system which can

monitor the health status of the child and mind condition of the child. There are use of

wireless sensors occurred in proposed solution. The new thing they adopted is the android

games for the reason of involving the children.

In the study led by Maryem Neyja, Shahid Mumtaz, Kazi Mohammed Saidul Huq, Sherif Adeshina

Busari, Jonathan Rodriguez and Zhenyu Zhou describes a health care system which is mainly consists

of hidden Maroe model(HMM) and ECG sensors [13]. The goal of the paper is to help the

cardiovascular diseases patients. There are monitoring occur of ECG signals through IOT for real time

monitoring of data. Through this system the real data which is accurate will be received and it is will

be very helpful for CVD patients .

Smart health monitoring for active and assisted living is most important part where use of

IOT can make the elderly life comfortable [14]. the proposed study by Ahmed Abdelgawad,

Kumar Yelamarthi , Ahmed Khattab present a health care support system which collect the

data and send it to the cloud where it is analyzed and processed. There are a feedback system

is available after analyzation of data the data returns to the user.

In the study led by Olutosin Taiwo a , Absalom E. Ezugwu discuss the issue occurred due to

COVID-19 [15]. They proposed a system which can monitor patients remotely. The proposed

system can achives the data from the patent through sensors and send the data to the cloud.

Doctor can receive the data from cloud through ana android app and web site and give

presumption to the patient in situation of staying it owns house. The sensors automatically

receive the data after some time and update the cloud data. In this paper also a home

automation is discussed for the patient who wants a comfortable life.

10
The paper written by E. N. GANESH describe a health monitoring system which is all about

receiving patient data through different sensors [6]. here the system consists of raspberry pi

3 model b installed in a method to to communicate with doctor through smart phone and

internet access. Here heartbeat, heart rate camera and temperature sensor is used for

achieving data of patient. An emergency feedback system is available for situation when the

server values are increasing form its threshold values.

Figure 2-1 block diagram of [16]


2.1 . Our proposed solution to the problem

In our project we want to give a best solution of remote patient’s health monitoring. Our

proposed solution consists of four parts. 1st part consists of temperature sensor, blood

pressure, oxygen monitoring sensor, IP camera and a NODE MCU controller. 2nd part is the

sending of data to the cloud from NODE MCU and interfacing of data to the app. 3rd part

consist of an android application which is the mean of communication between the doctor

and patient. and the last part as an emergency feedback system for any trauma.

11
The overview of the proposed system working is that the sensors check the health condition

of patient. These sensors are in a wearable device form. They step forward the received data

from human body to the NODE MCU. IP camera is also attached with NODE MCU it monitors

the health condition of patients through live streaming. An oximeter sensor also in working

which is attached to the NODE MCU for monitoring the oxygen conveying to the patient.

NODE MCU is coded in way to convey the data to the cloud. Also, the NODE MCU analyze the

sensors data.

The analyzed data is sent to the cloud and an interfacing of data is performed which allow

the android app to access the data. Application will be in use of doctor and patient. Doctor

can diagnose the data and send feedback to the patient through the app. Patient can receive

the doctor prescriptions through app also see his health status. Doctor can see lively the

patient through IP camera which is a part of the system for better diagnoses.

A situation when the normal values of the sensors increasing from threshold values an alert

SMS/call will generate by the doctor to the relative of the patient.

12
METHODOLOGY
3.1. introduction

The system comprises of few sensors as temperature sensor, pulse sensor. Spo2 oximeter

sensor to detect the patient pulse rate temperature and oxygen level in body. Here also in IP

camera will be used to monitor patient lively. For this we need sensors, NODE MCU

controller, sp32 IP camera and power source. The system has two parts one sensors

controlling and IP camera controlling. When the sensors part receive data from the patient

it forward the data to the NODE MCU. NODE MCU send data to the data base. IP camera is

placed on sp32 controller which send data through IP address to the data base. Both the

doctor and patient can see the sensors data through mobile application. Through the

application doctor will see the patient using IP address of the camera. In this overall process

internet is compulsory.

The sensors receive data while there is IP camera


interconnection of sensors with patient Receive live potage

NODE MCU receive the sensors data SP 32 controller send


and send the data to the data base the data to web server

Data base store the data

Application demonstrates the


results through the webserver

Figure 3-1. flow chart of the system

13
3.2. Hardware

To conduct our project, we need sensors controllers and power sources to achieve the

patient data. In our project there are two hardware units, 1st the sensors and controller and

the 2nd IP camera and controller. the following sensors and controller we chose for our

prototype.

3.2.1. Temperature sensor

We had selected the DS18B20 model temperature sensor for receiving the temperature data

of patient. It provides 9-12 bits Celsius temperature extents [16]. It communicates only it

one wire bus with central controller. it gives result in Celsius. DS18B20 can be used for body

or any object temperature. When the patient touches the sensor the sensor collect the patient

temperature. It can take the measurement in range of -55 to +125°c with ±5°C accuracy

which to descent.

Figure 3-2 DS18B20 temperature sensor

14
3.2.2 pulse oximeter

The MAX 30102 is a combine pulse oximetry and heart rate monitoring sensor. Having LEDs,

photodetectors, optical elements, and electronics with low noise and ambient light rejection,

it includes these components. MAX30102 offers an easy-to-implement system solution for

mobile devices and wearable technology. Max30102 is operated by a single 1.8V supply and

a distinct 3.3V supply for the LEDs. It communicates through a standard I2C interface. The

device keeps a very small solution size without sacrificing optical or electrical performance.

It can be easily integrated into a wearable system with few external component [7].

Figure 3-3 pulse oximeter sensor

3.2.3. NODE MCU

The NODE MCU is a bank card-sized microcontroller with the functionality of a small PC and

is extremely popular for development tasks since it includes a Linux platform server and

15
peripherals connectivity on a single chip and is extremely cost-effective. NodeMCU is a

development board which contains the popular ESP8266 Wi-Fi chip. ESP8266s are

programmable just like any other microcontrollers the breakout board has limited pins,

while the chip itself has many output ports. However, the ESP8266 breakout board has

limited pins although the chip itself has a lot of output ports. The NodeMCU offers ten GPIO

pins for the user to use, each of which can be operated using PWM, I2C, and 1-wire protocols.

The Node MCU has 128 KB of RAM and 4MB of Flash memory for storing data and programs.

Its high processing power with in-built Wi-Fi / Bluetooth and Deep Sleep Operating features

make it ideal for IoT projects. Node MCU Development Board can be programmed with

Arduino IDE [18].

Figure 3-4 NODE MCU

16
Figure 3-5 NODEMCU pin out
Class Name Explanation

Control RST, EN Resets the NODEMCU

pin

GPIO Pins GPIO1-GPIO 16 It has 16 GPIOS(general purpose input output ) pins

on board

Analog A0 Used for measurement of analog voltage from 0-3.3V

pin

SPI pins SD0,CLK,CMD,SD0 NODEMCU have four pins for spi communication

UART RXD0,TXD0 It has two UART UART0 and UART1 used to upload

PINS TXD2,RXD2 program or firmware

12c pin You have to find 12c pin

Table 3-1 PINS EXPLANATION

17
3.2.4 ESP32 Camera

ESP32-CAM is a 27x40mm development board module. The ESP32 module and camera can

be integrated into a camera system. ESP32-CAM can be widely used in various IoT

applications It is suitable for use with smart home devices and industrial wireless control

and monitoring systems as well as for QR wireless identification, wireless positioning system

signals, and other IoT applications.

In order to manufacture ESP32, TSMC uses its 40-nanometer manufacturing process, which

was created by Espressif Systems. It is a successor to the ESP8266 microcontroller

Figure 3-6 ESP 32 CAM

18
3.3. Working principle

In the sensors part temperature sensor DS18B20 and pulse oximeter sensor is connected to

the Node MCU through GPIO pins. After powering the circuit through a USB cable These

sensors collect data from the patient forward it to the Node MCU. According to the design

code It show the pulse oximeter data on a 1.2-inch lcd and send data to the firebase console

which is the storage for the device. The sensors data is stored in firebase. The firebase

console is interlinked with mobile application. Through mobile doctor can read the sensors

data. After analyzation of data doctor can send SMS or make call to the patient similarly

patient can call and SMS to the doctor from the mobile application.

In 2nd IP camera part, we are using ESP 32 cam. Here is ESP 32 Cam there a camera and

controlling module are in one circuit. There are charging module also attached with

esp32cam through which it powers of. There is rechargeable battery used which provide

19
power to the circuit. According to the design code it provides live streaming through IP

address. Through designed mobile application doctor can see the patient lively.

Cloud

Temperat
ure Web
browser

MOBILE
NUDEMCU
Pulse

APP
oximeter
sensor

MODULE

ESP32 IP
CAMERA
LCD
Figure 3-7

Figure 3-8 block diagram


3.4. Circuit connection

Temperature sensor

DS18B20 temperature sensor have 3 pins ground, Vcc and output pin. NODE MCU have two

ground pins and 10 GPIOs pin. Here Ground pin of DS18B20 is connected to the ground pin

of NODE MCU. Vcc of DS18B20 is connected to the 3v pin of the NODE MCU. The output pin

of DS18B20 is connected to D5 pin of NODE MCU. Through output pin DS18B20 covert the

received data to the NODE MCU board. Here a 4.7k ohm resister is used. One side of the

resister is connected with the Vcc line and other connected with the output line. Through

this sensor data line or out put line is powered. In case of overpower this resister protect

DS18B20 from any destruction.

20
Figure 3-9 connection of DS18B20 and NODE MCU

Pulse oximeter sensor and NODE MCU

Pulse oximeter sensor MAX30102 is combined sensor of pulse oximeter and Pulse rate

sensors. It has four general input output pins which are ground, Vcc and two SDA pin which

is output data pins. I had declared in NODE MVCU topic that it has to general input output

pins which are used for different purposes. Here the ground pin of MAX30102 is connected

with ground of NODE MCU board. Vcc pin is connected with power supply line of the NODE

MCU because sensor require more power than 3 volt. Through this pin sensor is powered.

Both SDA pins are connected with D1, D2 pins of NODE MCU. Through SDA pin sensor send

data to the NODE MCU. Here a 1.2 inch screen is used for display of MAX30102 data. The lcd

has four output input pins. The data pins connected with D1, D2 of the NODE MCU to display

pulse rate and pulse oximeter data.

21
Figure 3-10 interconnection of MAX30102 and NODE MVCU board

IP camera (ESP32 CAM) and power supply interconnection

ESP 32 cam is a controller plus camera module. It has 10 general input output (GPIO) pins. It

has three ground and three power pins of 5 and 3.3 v. Here GPIO 32 is specially used for

camera. During uploading of code ESP 32 CAM is connected with FTDI module. Has

connection is given below in figure.

22
Figure 3-11 FTDI CONNECTION WITH ESP 32 CAM
After uploading code the FTDI module is removed and for powering the circuit ESP 32 cam

is connected with battery and charging module tf4056.

Figure 3-12 charging module

The charging module can charge the battery and power of the ESP32 cam. The ground and

5v pin of ESP 32 cam is connected to the negative and positive of the charging module.

23
3.5 Firebase console

Firebase is an open-source platform for building Web, iOS, and Android apps. It provides

real-time data, a variety of APIs, multiple authentication methods, a host of other features,

and much more. Firebase allows developers to focus on crafting great user experiences.

Server management, API development and data storage are all handled by Firebase, which

is written so generically that you can modify it to fit most needs. Focus on creating amazing

user experiences. Firebase will handle the rest. You’ll be able to use data storage,

authentication, static hosting, and more. Firebase's Android, IOS, and JavaScript SDKs allow

you to build native mobile and web apps across platforms. You can also integrate Firebase

with your existing backend through server-side libraries or the REST API.

Firebase Realtime Database is a cloud-hosted database. Data is stored as JSON and

synchronized in realtime across all connected clients. If you use our SDKs for iOS, Android,

and JavaScript, all of your clients will share the same Realtime Database instance and be

automatically updated with the latest data.

Here we use firebase is our storage and API for our project. Through NODE MCU we send the

data to the firebase and the data can be seen in realtime data base.

3.6 . Mobile app

We use mobile application for communication in our project. Through app the data of

sensors and IP cam is accessed. Mobile app and firebase is interconnected through firebase

API. We had designed our app in MIT. App Inventor is MIT's web-based development

platform where anyone can build mobile applications targeting Android and iOS smartphone

operating systems with its interactive "What you see is what you get" (WYSIWYG) editor. It

24
uses a block-based programming language inspired by languages like StarLogo TNG, Scratch,

and Google Blockly. It provide a platform to any one to create their app. We had design our

application in MIT for camera and sensors.

3.7 ESP8266 NODE MCU basic code


Required Libraries
1. #include <ESP8266WiFi.h>
2. // node mcu liberary .
3. #include <FirebaseArduino.h>
4. //fire base library.
5. #include <Wire.h>
6. #include "MAX30105.h"
7. #include "spo2_algorithm.h"
8. #include <Adafruit_GFX.h>
9. #include <Adafruit_SSD1306.h>
10. #include <OneWire.h>
11. #include <DallasTemperature.h>
12.
13. #define ONE_WIRE_BUS 5
14.
15.
16. OneWire oneWire(ONE_WIRE_BUS);
17. DallasTemperature sensors(&oneWire);
18. DeviceAddress insideThermometer;
19.
20. #define SCREEN_WIDTH 128 // OLED display width, in pixels
21. // display setteing
22. #define SCREEN_HEIGHT 64 // OLED display height, in pixels
23.
24. MAX30105 particleSensor;
25. Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);
26.
27. #define MAX_BRIGHTNESS 255

Assigning of Wi-Fi, password and firebase link

28. #define FIREBASE_HOST "pulso-meter-default-rtdb.firebaseio.com" //https://pulso-


meter-default-rtdb.firebaseio.com// link
29. #define FIREBASE_AUTH "2hxvONubthQyQIMdgSfsA0KIM2y20c7LWuWKSmrK"//
authentication
30. #define WIFI_SSID "nlink"
31. #define WIFI_PASSWORD "11223344"
32.

25
33. float tempC=0;
34. float Hum = 0;
35. float Temp = 0;
36. uint32_t redBuffer[100];
37. uint32_t irBuffer[100];
38. uint32_t ir;
39. int32_t bufferLength; //data length
40. int32_t spo2; //SPO2 value
41. int8_t validSPO2; //indicator to show if the SPO2 calculation is valid
42. int32_t heartRate; //heart rate value
43. int8_t validHeartRate; //indicator to show if the heart rate calculation is valid
44. bool Fing=LOW;
45. unsigned long HR=0,SPO2=0;
46.
47. void initTemp()
48. {
49. sensors.begin();
50. delay(100);
51. Serial.print("Found ");
52. Serial.print(sensors.getDeviceCount(), DEC);
53. Serial.println(" devices.");
54. if (!sensors.getAddress(insideThermometer, 0)) Serial.println("Unable to find address for
Device 0");
55. Serial.println("Device 0 Address: ");
56. delay(1000);
57. }
58. void initOled()
59. {
60. if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C))
61. {
62. Serial.println(F("SSD1306 allocation failed"));
63. for(;;);
64. }
65. delay(2000);
66. display.clearDisplay();
67. display.setTextColor(WHITE);
68. }
69. void setup()
70. {
71. Serial.begin(115200);
72. WiFi.begin(WIFI_SSID,WIFI_PASSWORD);
73. Serial.print("Connecting to :");
74. Serial.print (WIFI_SSID);
75. while (WiFi.status() != WL_CONNECTED)
76. {
77. Serial.print("..");
78. delay(500);

26
79. }
80. Serial.println();
81. Serial.print("connected: ");
82. Serial.println(WiFi.localIP());
83. initOled();
84. initTemp();
85. if (!particleSensor.begin(Wire, I2C_SPEED_FAST)) //Use default I2C port, 400kHz speed
86. {
87. Serial.println(F("MAX30105 was not found. Please check wiring/power."));
88. while (1);
89. }
90. byte ledBrightness = 60; //Options: 0=Off to 255=50mA
91. byte sampleAverage = 4; //Options: 1, 2, 4, 8, 16, 32
92. byte ledMode = 2; //Options: 1 = Red only, 2 = Red + IR, 3 = Red + IR + Green
93. byte sampleRate = 100; //Options: 50, 100, 200, 400, 800, 1000, 1600, 3200
94. int pulseWidth = 411; //Options: 69, 118, 215, 411
95. int adcRange = 4096; //Options: 2048, 4096, 8192, 16384
96.
97. particleSensor.setup(ledBrightness, sampleAverage, ledMode, sampleRate, pulseWidth,
adcRange); //Configure sensor with these settings
98.
99. Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
100. }
101.
102. int n = 0;
103.
104. void loop()
105. {
106. checkFinger();
107. if(Fing)
108. {
109. Spo2();
110.
111. }
112.
113. delay(1000);
114. }
115. void err_handle()
116. {
117. if (Firebase.failed())
118. {
119. Serial.print("sending firbase data failed: ");
120. Serial.println(Firebase.error());
121. return;
122. }
123. }
124. void checkFinger()

27
125. {
126. while (particleSensor.available() == false) //do we have new data?
127. particleSensor.check(); //Check the sensor for new data
128. ir = particleSensor.getIR();
129. particleSensor.nextSample(); //We're finished with this sample so move to next
sample
130. if(ir >=10000)
131. {
132. Displayreadings(String(HR),String(SPO2));
133. Serial.println("Finger Placed...");
134. Fing=HIGH;
135. delay(500);
136. }
137. else
138. {
139. Displaymsg("PLace Finger...");
140. Serial.println("PLace Finger to Begin..");
141. Fing=LOW;
142. delay(2000);
143. }
144. }
145. void Spo2()
146. {
147. bufferLength = 100; //buffer length of 100 stores 4 seconds of samples running at
25sps
148. Serial.println("Please wait...");
149. Serial.println("Scanning...");
150. //read the first 100 samples, and determine the signal range
151. for (byte i = 0 ; i < bufferLength ; i++)
152. {
153. while (particleSensor.available() == false) //do we have new data?
154. particleSensor.check(); //Check the sensor for new data
155.
156. redBuffer[i] = particleSensor.getRed();
157. irBuffer[i] = particleSensor.getIR();
158. particleSensor.nextSample(); //We're finished with this sample so move to next
sample
159. }
160.
161. // calculate heart rate and SpO2 after first 100 samples (first seconds of samples)
162. maxim_heart_rate_and_oxygen_saturation(irBuffer, bufferLength, redBuffer, &spo2,
&validSPO2, &heartRate, &validHeartRate);
163. int c=0;
164. //Continuously taking samples from MAX30102. Heart rate and SpO2 are
calculated every 1 second
165. while (c<2)
166. {

28
167. c++;
168. //dumping the first 25 sets of samples in the memory and shift the last 75 sets of
samples to the top
169. for (byte i = 25; i < 100; i++)
170. {
171. redBuffer[i - 25] = redBuffer[i];
172. irBuffer[i - 25] = irBuffer[i];
173. }
174.
175. //take 25 sets of samples before calculating the heart rate.
176. for (byte i = 75; i < 100; i++)
177. {
178. while (particleSensor.available() == false) //do we have new data?
179. particleSensor.check(); //Check the sensor for new data
180.
181. redBuffer[i] = particleSensor.getRed();
182. irBuffer[i] = particleSensor.getIR();
183. particleSensor.nextSample(); //We're finished with this sample so move to next
sample
184.
185. if(irBuffer[i]<10000 && irBuffer[i-1]<10000 && irBuffer[i-3]<10000)
186. {
187. Fing=LOW;
188. i=101;
189. c=11;
190. }
191. else
192. {
193. if(validHeartRate==1 && validSPO2==1)
194. {
195. HR+=heartRate;
196. SPO2+=spo2;
197. }
198. }
199. }
200.
201. //After gathering 25 new samples recalculate HR and SP02
202. maxim_heart_rate_and_oxygen_saturation(irBuffer, bufferLength, redBuffer,
&spo2, &validSPO2, &heartRate, &validHeartRate);
203. }
204. if(Fing)
205. {
206. HR=HR/50.0;
207. SPO2=SPO2/50.0;
208. Serial.println();
209. Serial.print(F("HR= "));
210. Serial.print(HR, DEC);

29
211. Serial.print(F(", SPO2= "));
212. Serial.println(spo2, DEC);
213. Displayreadings(String(HR),String(SPO2));
214. delay(700);
215. getTemp();
216. Postdata();
217. }
218. else
219. {
220. Displaymsg("Finger Removed ....");
221. }
222.
223. }
224. void getTemp()
225. {
226. sensors.requestTemperatures();
227. printData(insideThermometer);
228. Displaytemp();
229. }
230. void printAddress(DeviceAddress deviceAddress)
231. {
232. for (uint8_t i = 0; i < 8; i++)
233. {
234. if (deviceAddress[i] < 16) Serial.print("0");
235. Serial.println(deviceAddress[i], HEX);
236. }
237. }
238. void printTemperature(DeviceAddress deviceAddress)
239. {
240. tempC = sensors.getTempC(deviceAddress);
241. Serial.print("Temp C: ");
242. Serial.println(tempC);
243. // Serial.print(" Temp F: ");
244. // Serial.print(DallasTemperature::toFahrenheit(tempC));
245. }
246. void printData(DeviceAddress deviceAddress)
247. {
248. printTemperature(deviceAddress);
249. }
250. void Postdata()
251. {
252. Firebase.setFloat("HR", HR);
253. err_handle();
254. Firebase.setFloat("SPO2", SPO2);
255. err_handle();
256. Firebase.setFloat("TEMP", tempC);
257. err_handle();

30
258. }
259. void Displaytemp()
260. {
261. display.clearDisplay();
262. display.setTextSize(1);
263. display.setCursor(0,0);
264. display.print("TEMP = ");
265. display.setTextSize(2);
266. display.setCursor(0,10);
267. display.print(tempC);
268. display.print(" C");
269. display.setTextSize(1);
270. display.cp437(true);
271. display.write(167);
272. }
273. void Displayreadings(String D1,String D2)
274. {
275. display.clearDisplay();
276. display.setTextSize(1);
277. display.setCursor(0,0);
278. display.print("HR= ");
279. display.setTextSize(2);
280. display.setCursor(0,10);
281. display.print(D1);
282. display.print(" ");
283. display.setTextSize(1);
284. display.cp437(true);
285. display.write(167);
286.
287. display.setTextSize(1);
288. display.setCursor(0, 35);
289. display.print("SPO2= ");
290. display.setTextSize(2);
291. display.setCursor(0, 45);
292. display.print(D2);
293. display.display();
294. }
295. void Displaymsg(String m)
296. {
297. display.clearDisplay();
298. display.setTextSize(2);
299. display.setCursor(0,0);
300. display.print(m);
301. display.display();
302. }

31
3.8 Implementation steps and prototype

1. Power of the sensors circuit and IP cam circuit.

2. Connect with wifi.

3. Sensors individually collect data.

4. Sensors send collected data to the NODE MCU.

5. NODE MCU board send the sensors data to firebase.

6. Mobile application accesses the data of firebase and anyone who had the app can see the

data of sensors.

7. Camera send data to ESP 32 module.

8. ESP 32 had given an IP address in its given code.

9. Through application IP camera can be started using IP address of the camera.

The prototype is our design overall system. In below figure protype cam be seen.

32
Figure 3-13 prototype

RESULTS AND DISCUSSION


In this chapter there are discussion of results which are produce after installation of code,

creation of firebase account and uploaded data to firebase, the obtain results at application

etc.

4.1 Arduino ide Serial monitor data


After uploading of code to the NODE MCU the data sensors data is also seen in serial

monitor of Arduino ide. Here in serial monitor the code output is showed .In below figure

the sensor data is shown in Arduino ide.

33
Figure 4-1 serial monitor

4.2 Firebase console

After code segment uploading to NODE MCU the data is first displayed it lcd screen and
then send to the firebase console the data displayed in below figure.

34
Figure 4-2 real time data base results

Figure 4-3 uploaded data graph

4.3 Mobile Application


We had interfaced MIT developed app to the firebase console. The application want

password to open. Once the display open it shows the data which is available it firebase

35
console. When update occur in firebase data the app data automatically changes. In below

figure the display is shown.

Figure 4-4 app display

4.4 ESP 32 Cam


When the ESP 32 cam is powered of and the circuit is on. Through ip address we can control

the camera. We can live stream through that camera. Through searching the IP address in

36
mobile app there a menu is open. In menu there are start stream button. After pressing the

button, the stream became start.

Figure 4-5 IP cam app startup menu and video display

4.5 Cost analysis


The actual cost for our project was the cost of hardware part. As compared to other projects

conduction require more cost for hardware, also it has limited features. So, we can say that

our project is cost effective is compared to another project. With more features.

37
Future work
In this project a health monitoring system were design. Using this system, the patient’s temp,

pulse rate and spo2 data can be received and send to firebase and had accessed through

mobile application. Also, with sensors there are an IP camera system had designed through

this camera doctor can monitor patient lively and send feedback to the patient.

In future work below areas wore suggested.

▪ Use more sensors for different health acquisition and analyzation.


▪ Will be used for old citizen health care.
▪ Create big database for doctor to make diagnoses of patients health issues
from different area.

▪ Provision of healthcare support for patients of remote area in low cast.


▪ Create public mobile application for data access.
In future our project can be taken is platform to design healthcare system. In the country like
Pakistan which are in stage of developing, this type of projects can improve the future of
technologies.

38
conclusion
In the situation like covid -19 social distancing and quarantining are compulsory for control

of the pandemic. The lockdown made it difficult for patients to visit hospitals. Patients whose

vitals require routine monitoring to improve their health status, the patients who were

COVID-19 positive and wants self-quarantine require monitoring. We had designed the

system for solution of the problem. The system has sensors section which receive the patient

temperature, pulse rate and spo2 data than send to the data to the web-based storage which

is firebase, and the data is accessed by the doctor also patient from the mobile application

which are interconnected. In the system there are live streaming system through which the

doctor can see the patient lively through IP camera. And sed his or her feedback in form of

SMS or call which can be generated from the application.

39
References
[1] Safety, W. P., & World Health Organization. (2009). WHO guidelines on hand hygiene in

health care (No. WHO/IER/PSP/2009/01). World Health Organization.Mrs.G.

[2] Prabha, M. G. M. (2018). Automatic Health Monitoring System Using Raspberry

Pi. International Journal of Pure and Applied Mathematics, 118(8), 613-619

[3] .Zikali Z. 22 august 2018 "Health-E news "No suitable care for SA’s elderly," 22 august

2018

[4] Taiwo, O., & Ezugwu, A. E. (2020). Smart healthcare support for remote patient

monitoring during covid-19 quarantine. Informatics in medicine unlocked, 20,

100428.Somayya

[5] Madakam, R. Ramaswamy, Siddharth ‘Tripathi Internet of Things (IoT)’: A Literature

Review .2015

[6] Ganesh, E. N. (2019). Health Monitoring System using Raspberry Pi and IOT. Oriental

journal of computer science and technology, 12.

[7] Taştan, M. (2018). IoT based wearable smart health monitoring system. Celal Bayar

University Journal of Science, 14(3), 343-350.

[8] Valsalan, P., Baomar, T. A. B., & Baabood, A. H. O. (2020). IoT based health monitoring

system. Journal of critical reviews, 7(4), 739-743.

[9] Pereira, M., & Nagapriya, K. K. (2017, May). A novel IoT based health monitoring system

using LPC2129. In 2017 2nd IEEE International Conference on Recent Trends in

Electronics, Information & Communication Technology (RTEICT) (pp. 564-568). IEEE.

40
[10] Vippalapalli, V., & Ananthula, S. (2016, October). Internet of things (IoT) based smart

health care system. In 2016 International Conference on Signal Processing,

Communication, Power and Embedded System (SCOPES) (pp. 1229-1233). IEEE.

[11] Gupta, P., Agrawal, D., Chhabra, J., & Dhir, P. K. (2016, March). IoT based smart healthcare

kit. In 2016 International Conference on Computational Techniques in Information and

Communication Technologies (ICCTICT) (pp. 237-242). IEEE.

[12] Binu, P. K., Akhil, V., & Mohan, V. (2017, September). Smart and secure IOT based child

behaviour and health monitoring system using Hadoop. In 2017 International Conference

on Advances in Computing, Communications, and Informatics (ICACCI) (pp. 418-423).

IEEE.

[13] Neyja, M., Mumtaz, S., Huq, K. M. S., Busari, S. A., Rodriguez, J., & Zhou, Z. (2017, December).

An IoT-based e-health monitoring system using ECG signal. In GLOBECOM 2017-2017

IEEE Global Communications Conference (pp. 1-6). IEEE.

[14] bdelgawad, Ahmed & Yelamarthi, Kumar & Khattab, Ahmed. (2017). IoT-Based Health

Monitoring System for Active and Assisted Living. 11-20. 10.1007/978-3-319-61949-1_2

[15] Taiwo, O., & Ezugwu, A. E. (2020). Smart healthcare support for remote patient

monitoring during covid-19 quarantine. Informatics in medicine unlocked, 20, 100428.

[16] https://www.google.com/search?q=temperature+sensor+ds18b20&source=lnms&tbm=isc

h&sa=X&sqi=2&ved=0ahUKEwik4eD_4aHTAhUIsY8KHaKPAKYQ_AUIBigB&biw=1366&bih

69#imgrc=Iq8FIecPDinPqM

[17] https://www.datasheet4u.com/datasheetpdf/MaximIntegrated/MAX30102/pdf.php?id=1

349970

[18] Al Dahoud, Ali & Fezari, Mohamed. (2018). NodeMCU V3 For Fast IoT Application Development.

41
42

You might also like