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

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/361183013

"PATIENT HEALTH MONITORING SYSTEM"

Article · May 2022

CITATIONS READS
0 1,492

1 author:

Kushal Poudel
Western Regional Campus, Pokhara, Nepal
6 PUBLICATIONS 1 CITATION

SEE PROFILE

All content following this page was uploaded by Kushal Poudel on 09 June 2022.

The user has requested enhancement of the downloaded file.


TRIBHUVAN UNIVERSITY

INSTITUTE OF ENGINEERING

PASHCHIMANCHAL CAMPUS, POKHARA

Lamachaur, Pokhara-16

[Subject Code: EX755]

A MAJOR PROJECT REPORT ON

“PATIENT HEALTH MONITORING SYSTEM”

Submitted by

Aayush Pandit [PAS074BEX002]

Asmin KC [PAS074BEX006]

Kushal Poudel [PAS074BEX020]

Parmeshwar Sah [PAS074BEX024]

Submitted to

Department of Electronics and Computer Engineering


Pashchimanchal Campus
May, 2022

i
TRIBHUVAN UNIVERSITY
INSTITUTE OF ENGINEERING
PASHCHIMANCHAL CAMPUS, POKHARA
DEPARTMENT OF ELECTRONICS AND COMPUTER ENGINEERING

A Major Project Report


On
“PATIENT HEALTH MONITORING SYSTEM”
(As a partial fulfillment of B.E. in Electronics and Communication Engineering)

Project Supervisor:
Mrs. Smita Adhikari
Asst. Professor

Project Member:
Aayush Pandit PAS074BEX002
Asmin KC PAS074BEX006
Kushal Poudel PAS074BEX020
Parmeshwar Sah PAS074BEX024

May 2021

ii
COPYRIGHT

The author has agreed that the library, Pashchimanchal Campus, may make this report freely
available for inspection. Moreover, the author has agreed that permission for extensive copying of
this project report for scholarly purpose may be granted by the lecturers, who supervised the project
works recorded herein or, in their absence, by the Head of Department wherein the project report
was done. It is understood that the recognition will be given to the author of the report and to the
Department of Computer and Electronics, Pashchimanchal Campus in any use of the material of
this project report. Copying or publication or other use of this report for financial gain without
approval of the Department and author’s written permission is prohibited. Request for permission
to copy or to make any other use of the material in this report in whole or in part should be
addressed to:

Head of Department
Department of Electronics and Computer Engineering
Pashchimanchal Campus, Institute of Engineering
Lamachaur, Pokhara-16
Nepal

iii
ACKNOWLEDGEMENT

It gives us immense pleasure to express our deep sense of gratitude to our supervisor Mrs Smita
Adhikari for her invaluable guidance, motivation, constant inspiration and above all for her ever-
co-operating attitude that enabled us in bringing up this project in the present form. We are
extremely thankful to Mr. Ramesh Thapa, Head of the Department of Electronics and
Communication Engineering for all kinds of possible help and advice during the course of this
work.
We are greatly thankful to Mr. Amrit Aryal, Mr. Saurav Lamichhane, and Mr. Sijan Neupane for
their inspiration and help.
We solely take the responsibility of any possible mistakes that may have occurred in preparing this
report and we would like to welcome comments and queries during the submission of this report.

iv
ABSTRACT

Every year, a large number of people die as a result of a lack of interaction with medical staff.
Even in rural locations of our country, many hospitals lack communication capabilities in the
emergency ward, and the corresponding health workers are unable to maintain close contact with
the patients' vital signs and take timely corrective action. Given these circumstances, our project,
"Patient Health Monitoring System," is meant to track the patient's vital physiological
characteristics throughout a critical stage of their health. Their monitoring is required to determine
the real value or change trend. The proposed system measures the value of a patient's systemic
body temperature, pulse rate, and blood oxygen level constantly and automatically, and these data
can be checked remotely by health workers. The vitals are constantly compared to the threshold
value, and if there is a significant change, an alert is sent to the medical staff, together with the
data via Wi-Fi module.
Key Words: Arduino, BPM, SpO2, ThingSpeak

v
TABLE OF CONTENTS
COPYRIGHT .................................................................................................................................. ii
ACKNOWLEDGEMENT ............................................................................................................. iv
ABSTRACT .................................................................................................................................... v
LIST OF FIGURES ..................................................................................................................... viii
LIST OF TABLES ......................................................................................................................... ix
ABBREVIATION AND ACRONYMS ......................................................................................... x
CHAPTER ONE: INTRODUCTION ............................................................................................. 1
1.1 Background ........................................................................................................................... 1
1.2 Statements of Problems ......................................................................................................... 2
1.3 Objectives .............................................................................................................................. 2
CHAPTER TWO: LITERATURE REVIEW ................................................................................. 3
2.1 Previous Works ..................................................................................................................... 3
2.2 Related Theory ...................................................................................................................... 4
2.2.1 Temperature measurement ......................................................................................................... 4
2.2.2 Heart Rate .................................................................................................................................... 5
2.3 Hardware components ........................................................................................................... 5
2.3.1 Arduino UNO ................................................................................................................................ 5
2.3.2 Liquid Crystal Display (LCD) .......................................................................................................... 6
2.3.3 Max30100 Pulse Oximeter Sensor ............................................................................................... 7
2.3.4 LM35 Temperature Sensor .......................................................................................................... 7
2.3.5 ESP8266 Wi-Fi Module ................................................................................................................. 8
2.4 Software Implementation ...................................................................................................... 8
2.4.1 Arduino IDE .................................................................................................................................. 8
2.4.2 ThingSpeak ................................................................................................................................... 9
2.4.3 Kotlin Programming Language ..................................................................................................... 9
CHAPTER THREE: METHODOLOGY ..................................................................................... 10
3.1 Circuit Diagram ................................................................................................................... 10
3.2 Block Diagram .................................................................................................................... 11
3.3 Flowchart............................................................................................................................. 12
3.4 Working Principle ............................................................................................................... 13
CHAPTER FOUR: RESULT AND DISCUSSION ..................................................................... 16
4.1 Result................................................................................................................................... 16

vi
4.2 Discussion ........................................................................................................................... 17
CHAPTER FIVE: CONCLUSION AND RECOMMENDATION ............................................. 18
5.1 Conclusion........................................................................................................................... 18
5.2 Future Works ....................................................................................................................... 18
REFERENCES ............................................................................................................................. 19
APPENDIX ......................................................................................................................................a

vii
LIST OF FIGURES

Figure2.1: Arduino Uno…………………………………………………………………............6


Figure2.2: LCD…………………………………………………………………………….........6
Figure2.3: Max30100………………………………………………………………………........7
Figure2.4: LM35………………………………………………………………………….…......7
Figure2.5: ESP8266 module………………………………………………………………........ 8
Figure3.1: Circuit Connection of Patient Health Monitoring System………………………… 11
Figure3.2: Block Diagram of Arduino Based System………………………………………… 12
Figure3.3: Flowchart………………………………………………………………………....... 13
Figure3.4: Photoplethysmograph………………………………………………………….........14
Figure3.5: Heart rate measurement…………………………………………………………......15
Figure3.6: Absorption spectrum of oxygenated and deoxygenated hemoglobin………….........15
Figure4.1: Result on Serial Monitor …………………...………………………………….........16
Figure4.2: Chart representing patient's vitals measured by the sensors used …………….…… 17
Figure A: LCD Output results …………….…………………………………………………..... a
Figure B: ThingSpeak IoT Cloud Output results ………………………………………….….... b
Figure C: Oxygen level and Pulse Rate shown by Max30100 in ThingSpeak ……….……...… c
Figure D: BPM and SpO2 being displayed in Serial Monitor ………………………………..... c
Figure E: Vitals measured by sensors exported in Excel file ………………………....……...… d

viii
LIST OF TABLES

Table 2.1: Age and temperature relationship………………………………………………...4


Table 2.2: Types of temperature measurement………………………………………………5

ix
ABBREVIATION AND ACRONYMS

BPM Beats per Minute


ECG Electrocardiograph
HR Heart Rate
ICU Intensive Care Unit
LCD Liquid Crystal Display
LED Light Emitting Diode
S-A Sinoatrial
SpO2 Saturation of Peripheral Oxygen
UART Universal Asynchronous Receiver Transmitter

x
CHAPTER ONE: INTRODUCTION

1.1 Background

Human health is one of the most widely held public concerns. If one falls ill or dies, everything
else becomes irrelevant. As a result, people spend a lot of money to maintain good health.
Unfortunately, when things are non-invertible, people always discover that it is too late to receive
serious medical care.
A large number of people can be cured if prompt intervention is done. However, many medical
devices are inconvenient and costly to obtain. Heart rate and body temperature are two of the most
important indicators of human health, and they are also the easiest to measure. Furthermore, unlike
X-rays, measuring heart rate and body temperature has no impact on human health.
Although there are various devices on the market that can deliver raw medical measurement data
to patients and clinicians, patients with minimal medical background may be unable to interpret
the data into meaningful diagnoses. On the other hand, delivering raw medical data to the doctor
wastes a lot of time and may cause problems, but time is never wasted in an emergency. Sharing
data over a big area in a short period of time is difficult. The majority of goods on the market today
have these key flaws, such as limited flexibility and portability.
Critical care and life support are provided in an Intensive Care Unit (ICU) for critically ill and
injured patients. Biomedical instruments were employed to measure their physiological signs.
However, the usage of wireless communications in healthcare systems allows for more mobility
and patient comfort. Easy access and high-quality health care can be delivered to those living in
rural locations thanks to advanced wireless technologies [1]. Recent advancements in the fields of
sensor technology, wireless communications, and information technology, in general, have created
enormous opportunities to design new models for providing health care and wellness or disease
management tools, allowing for longer periods of independence at home and improving the quality
of life for all people.
The Arduino microcontroller, sensors, power supply, and liquid crystal display comprise the bio-
medical monitoring system that we built. The state of the patients may be continuously monitored,
and in the event of an emergency or dangerous situation, the system will send an alarm message
to the doctor immediately, indicating heart rate, and body temperature. In the event of an
emergency, the system will automatically send a notification via Wi-Fi. This sort of
communication is similar to the topology of the Bluetooth network and the GSM network [2]. This
module will be delivered to each patient, and it will be used to continuously monitor and store data
about the patient's health. If the status of the physiological parameters changes, it communicates
the updated data via Wi-Fi to the local monitoring system to which the main module is linked. A
computer can be used to monitor the patient's condition.

1
1.2 Statements of Problems

In Nepal's current situation, most doctors are unavailable to patients at all times, which can result
in trauma or death. People are ignorant of their health concerns due to a lack of frequent checkups.
People become aware of their health only when it deteriorates. When better accuracy in continuous
reading and recording of vitals is required, traditional thermometry is less important. Instruments
and gadgets for measuring bio-physiological processes are hard to come by. The cost of such tools
is too expensive. In general, doctors in underdeveloped nations like Nepal do not have enough
time to devote to their patients. A monitoring system is required to alert the physician if the
patient's condition deteriorates.
1.3 Objectives

The main objective of this project is to enhance the healthcare of patient during the absence of
doctor and alerting in case of emergency.
Following are the objectives of this project:
1) To develop a system for monitoring the patient’s vitals.

2
CHAPTER TWO: LITERATURE REVIEW

2.1 Previous Works

Our project entitled “Patient Health Monitoring System” is not truly original in itself from the very
scratch. At different times in the past, many attempts were continuously made by researchers at
different areas.
Mihat, N.M. Saad et.al have proposed a report on project titled "Smart Health Monitoring System
Utilizing Internet of Things (IoT) and Arduino". The project aims to design a reliable health
monitoring system utilizing the IoT, Arduino, and Android applications. It can be used to measure
body temperature, heart rate, and level of oxygen in the blood in both hospitals and homes. The
system is also capable to verify that the transmission of the sensor’s data to the host computer is
done in real-time. Therefore, doctors and family members can now monitor and track the patient’s
health anywhere through this smart health monitoring system [3].
R. Anandh and G. Indirani aims to develop a system which gives body temperature and heart rate
using sensors LM35 and AD8232 heart rate monitor sensor respectively. These sensors are
incorporated and interfaced with Arduino UNO board, ESP8266 for wireless data transmission to
Thing Speak. The outcome of result on Thingspeak is Data visualization. So that record of the data
can be stored and accessed over a period of time [4].
C. Senthamilarasi, B. Vidhya et.al have presented a report on the project entitled, "A SMART
PATIENT HEALTH MONITORING SYSTEM USING IOT". They developed a reliable patient
monitoring system using IoT so that the healthcare professionals can monitor their patients, who
are either hospitalized or at home using an IoT based integrated healthcare system with the view
of ensuring patients are cared for better. A mobile device based wireless healthcare monitoring
system was developed which can provide real time online information about physiological
conditions of a patient mainly consists of sensors, the data acquisition unit, microcontroller (i.e.,
Arduino). The patient’s temperature, heart beat rate, EEG data are monitored, displayed and stored
by the system and sent to the doctor’s mobile containing the application [5].
Srinivasan, C. R., Charan, G., & Babu, P. C. S. (2020) have presented a report on "An IoT based
Smart patient health monitoring system". This paper sheds some light on the current methods
accessible in the Internet of Things (IoT) domain for healthcare applications. The proposed
objective is to design and create a healthcare system centered on Mobile-IoT by collecting patient
information from different sensors and alerting both the guardian and the doctor by sending emails
and SMS in a timely manner. It remotely monitors the physiological parameters of the patient and
diagnoses the illnesses swiftly [6].
The research and projects on “Blood pressure measuring transducer” in June, 1962 at Kompelien
et al, “Pulse rate transducer” in January, 1966 Fitter et al, “Apparatus for Photoelectric
Dermachromography” in August, 1971 at Howell et al, “Heart rate and Respiratory Monitor” in
December, 1972 at Falkner et al, “Blood Pulse Measurement Employing Reflected Red Light” in
November, 1973 Smart et al and “Biomedical Monitoring System” in October 2005 were some of

3
the projects in the field of biomedical instrumentation for the detection of the heart beats,
respiratory rate and so on.
“Heart rate and Respiratory Monitor” was the similar project to measure the heart beat using the
optical transducer formed from the combination of the high intensity led and the LDR. Even the
respiratory rate can be displayed. Both the sensors single monitor placed near the patient.
“Blood Pulse Measurement Employing Reflected Red Light” was the project which uses the light
that is transmitted from the high intensity LED reflecting from the flowing blood stream in the tip
of the finger, and the change in the intensity of the light is detected by the light dependent resistor
or the photo transistor acting as the switch.
2.2 Related Theory

2.2.1 Temperature measurement

Two basic types of temperature measurements can be obtained from the human body: Systemic
and skin surface measurement.
Systemic temperature measurement
The temperature of the body's interior areas is known as systemic temperature. This temperature
is maintained by a carefully managed balance between the heat created by the body's active tissues,
namely the muscles and organs, and the heat lost to the environment.
Temperature sensor devices implanted in the mouth, beneath the armpits, or in the rectum are used
to measure systemic temperature. A healthy person's usual mouth temperature is around 37 degrees
Celsius. Systemic temperature measurement is done with a mercury thermometer, an electronic
thermometer, a thermocouple, and a thermistor.
Age and Temperature Relationship
Table 2.1 Age and temperature relationship
Age Temperature(0f)
0-3 months 99.4
3-6 months 99.5
6months-1years 99.7
1-3 years 99
3-5 years 98.6
5-9 years 98.3
9-13 years 98
>13 years 97.8-99.1

4
Types of Temperature Measurement
When summarizing studies with strong or fairly strong evidence there are mainly ofur types of
temperature measurement, the main types correspond the normal oral, rectal, tympanic and
auxiliary body. The value of the temperature varies at different parts of the body which is shown
by the table below:
Table 2.2: Types of temperature measurement
Parts Men(oC) Women(oC) Overall(oC)
Oral 35.7-37.7 33.2-38.1 33.2-38.2
Rectal 36.7-37.5 36.8-37.1 34.3-37.8
Armpit 35.5-37.5 35.7-37.5 35.5-37.0

2.2.2 Heart Rate

It is derived from the ECG or the arterial blood pressure waveform or the photoelectric
plethysmograph. Generally, the normal heart rate of the human lies between the range of 60 to 100
beats per minute. Normal foetal rate lies between the range 110 to 175 bpm
Techniques for heart rate measurement
Different techniques are used to calculate the heart rate which includes:
1) Average calculation: This is the oldest and the most popular technique. An average
rate(beats/min) is calculated by counting the number of pulses in a given time. The average
method of calculation does not show changes in the time between beats and thus does not
represent the true picture of the heart’s response to exercise, stress and environment.
2) Beat to beat calculation: This is done by measuring the time (T) in seconds between two
consecutive pules, and converting this time into beats/min, using the formula beats/min-60/T.
This technique accurately represents the true picture of the heart rate.
3) Combination of beat to beat calculation with averaging: This is based on a four or six beats
average. The advantage of this technique over the averaging techniques is its similarity with
the beat to beat monitoring system. The normal heart rate measuring range is 0-250 beats/min.
Limb or chest ECG electrodes are used as the sensors.
2.3 Hardware components

2.3.1 Arduino UNO

The Arduino Uno, Arduino Due, Arduino Mega, and Arduino Leonardo are examples of
commercially accessible Arduino boards. 20 I/O pins, 14 digital I/O pins, and six analog I/O pins
make up the Arduino Uno. There are 54 digital I/O pins, 12 analog input pins, and two analog
output pins on the Arduino Due. There are 54 digital I/O pins, 16 analog inputs, and zero output
pins on the Arduino Mega. There are 20 digital I/O pins, 12 analog inputs, and zero output pins on
the Arduino Leonardo. We used the Arduino Uno to build the system since the pin configuration

5
of this module meets our requirements and it is the system's principal controller. It's one of the
most well-known ATmega328p-based open-source microcontroller boards. The Arduino IDE can
be used to program this microcontroller. It is critical in this system and serves as an interface
between the sensors and other IoT devices. The Arduino Uno model is shown in the diagram.

Figure2.1: Arduino UNO


2.3.2 Liquid Crystal Display (LCD)

Liquid crystal display (LCD) screens are by far the most popular screens for electronics today. If
you look around you, you’re likely to see at least one or two, possibly on your microwave or
landline caller ID box. Your LCD has a total of 16 pins. Here’s what each pin is designed to do:
Pins 1 and 16: These are your power and ground. Pin 3: Used to adjust the brightness of the LCD.
Pins 4–6: Used to operate the LCD. Pins 7–14: Used as data lines. Pins 15–16: Used to power the
LCD’s backlight.

Figure2.2: LCD
6
2.3.3 Max30100 Pulse Oximeter Sensor

MAX30100 is a sensor that can measure blood oxygen saturation level and pulse rate.
Figure shows the prototype of the SpO2 Pulse Sensor (MAX30100). Saturation of peripheral
oxygen (SpO2) is a calculation of blood vessel oxygen saturation, which refers to the amount of
oxygenated hemoglobin in the blood. In a human body, ordinary SpO2 values range from 90to
100%. In this system, a MAX 30100 pulse oximeter was suitable. It is a coordinated beat oximeter
and heart rate sensor arrangement, which provides precise values. This sensor combines two LEDs,
a photo detector, optimized optics, and low-noise analog flag handling to identify beat oximetry
and heart rate signals; hence, it is suitable for this system.

Figure2.3: Max30100
2.3.4 LM35 Temperature Sensor

The LM35 is one kind of commonly used temperature sensor that can be used to measure
temperature with an electrical o/p comparative to the temperature (in °C). It can measure
temperature more correctly compare with a thermistor. This sensor generates a high output voltage
than thermocouples and may not need that the output voltage is amplified. The LM35 has an output
voltage that is proportional to the Celsius temperature. The scale factor is .01V/°C.

Figure2.4: LM35

7
2.3.5 ESP8266 Wi-Fi Module

The ESP8266 Wi-Fi Module is a self-contained SOC with integrated TCP/IP protocol stack that
can give any microcontroller access to your Wi-Fi network. The ESP8266 is capable of either
hosting an application or offloading all Wi-Fi networking functions from another application
processor. Each ESP8266 module comes pre-programmed with an AT command set firmware,
meaning, you can simply hook this up to your Arduino device and get about as much Wi-Fi-ability
as a Wi-Fi Shield offers (and that's just out of the box)! The ESP8266 module is an extremely cost
effective board with a huge, and ever growing, community. This module has a powerful enough
on-board processing and storage capability that allows it to be integrated with the sensors and other
application specific devices through its GPIOs with minimal development up-front and minimal
loading during runtime. Its high degree of on-chip integration allows for minimal external
circuitry, including the front-end module, is designed to occupy minimal PCB area. The ESP8266
supports APSD for VoIP applications and Bluetooth co-existence interfaces, it contains a self-
calibrated RF allowing it to work under all operating conditions, and requires no external RF parts.

Figure2.5: ESP8266 module


2.4 Software Implementation

2.4.1 Arduino IDE

The Arduino IDE is an open-source software, which is used to write and upload code to the
Arduino boards. The IDE application is suitable for different operating systems such as Windows,
Mac OS X, and Linux. It supports the programming languages C and C++. Here, IDE stands for
Integrated Development Environment.
The program or code written in the Arduino IDE is often called as sketching. We need to connect
the Genuino and Arduino board with the IDE to upload the sketch written in the Arduino IDE
software. The sketch is saved with the extension 'ino.'
8
2.4.2 ThingSpeak

Thingspeak is a web-based open API IoT source information platform that can store sensor data
from a variety of 'IoT applications' and display the sensed data in graphical form on the web.
Thingspeak communicates with the help of an internet connection, which acts as a "data packet"
carrier between the connected "things" and the Thingspeak cloud. The Thingspeak cloud retrieves,
saves/stores, analyzes, observes, and works on the sensed data from the connected sensor to the
host microcontroller, such as a "Arduino, Raspberry-pi, and so on. Thingspeak enables the creation
of mesmerizing sensor-based logging applications, location/place tracing applications, and a
‘social network' of objects/things with updated status, as well as the control of 'Home automation'
products connected to the public domain network (via Internet) from their point of origin. The
word 'Channel,' which has fields for data, location, and status for various sensed data, is the most
important component of ThingSpeak functioning. Data may be implemented when channels are
built in 'Thingspeak,' or the data can be processed and visualized using MATLAB, and the data
can be responded to with tweets and other forms of notifications. Thingspeak also has a function
that allows you to construct a public-based channel to examine and estimate it.
2.4.3 Kotlin Programming Language

Kotlin is a cross-platform, statically typed general-purpose programming language. The JVM


version of Kotlin's standard library relies on the Java Class Library, and Kotlin is meant to work
seamlessly with Java. However, type inference provides for more compact syntax. Kotlin primarily
targets the JVM, although it can also compile to JavaScript or native code via LLVM (for example,
for frontend web projects using React) (e.g., for native iOS apps sharing business logic with
Android apps). JetBrains pays for language development, while the Kotlin Foundation safeguards
the Kotlin trademark.

9
CHAPTER THREE: METHODOLOGY

3.1 Circuit Diagram

Figure3.1: Circuit Diagram of Patient Health Monitoring System


The Arduino UNO, one of the first and most popular prototyping boards was used to create this
project is the Arduino. To connect to an internet network and access the cloud server, the Arduino
is connected to an ESP8266 Wi-Fi module. The Arduino is connected to an LM-35 temperature
sensor for detecting temperature and a MAX30100 pulse oximeter sensor for reading pulse rate
and SpO2 levels. The measured parameters are displayed on a character LCD connected to the
Arduino, and data is transmitted to the ThingSpeak cloud platform via a Wi-Fi access point. The
health state of a severely ill patient can be continuously checked using this simple yet effective
equipment. It can be used to keep track of the health of aged people who frequently have heart or
blood pressure issues.
The ThingSpeak platform is updated and logged with health-related data such as pulse rate, SpO2,
and temperature on a regular basis. That information can be used to maintain track of the patient's
medical history. ThingSpeak is used as a dashboard to display the captured data graphically.
The Arduino Sketch that runs on the device executes the project's numerous functionalities, such
as reading sensor data, converting it to strings, sending it to the IoT platform, and displaying the
observed pulse rate and temperature on a character LCD. The Arduino IDE is used to write,
compile, and load the sketch.

10
3.2 Block Diagram

Figure3.2: Block Diagram of Arduino Based BPM, SpO2 and temperature monitoring device
The above figure shows the block diagram for the patient health monitoring system. The Arduino
UNO is used as the main microcontroller. MAX30100 Pulse Oximeter Sensor and LM35 sensor
are connected to the pins of Arduino. The analog output of these sensors are fed to the Arduino,
where the signals are converted to the digital forms by the internal ADC. The data being processed
are shown in the 16*2 LCD display. An ESP8266 Wi-Fi module is also connected to the Arduino
to write to the ThingSpeak server. So the data being displayed in the LCD are also shown visually
and graphically in the ThingSpeak Platform from where the vitals can be constantly monitored.
The Arduino is powered by the external supply.

11
3.3 Flowchart

Figure3.3: Flowchart

12
The figure shows the flow of the processes in the project. When the Arduino is powered up, the
sensors and the components connected to it gets initialized. A pre-defined greeting message is
displayed in the LCD display. The Arduino then reads the data from the LM35 temperature sensor
and display it in the LCD display. However, the pulse reading happens in multiple processes.
Whenever the pulse oximeter detects a pulse, it sends an interrupt signal to the microcontroller.
Arduino checks if the interrupt from the MAX30100 pulse sensor if available or not. If the interrupt
is available, it waits for the next interrupt to happen. Using the time interval between the two
interrupts, it calculates the BPM (Beats per Minute). After calculating the BPM, it is displayed
through LCD. The measured Pulse and Temperature is then sent to the ThingSpeak server through
ESP8266 Wi-Fi module. The transmitted data are displayed visually in ThingSpeak from where it
is constantly monitored.
3.4 Working Principle

MAX30100 Pulse Oximeter and Heart Rate Sensor


The MAX30100, or any optical pulse oximeter and heart-rate sensor for that matter, consists of a
pair of high-intensity LEDs (RED and IR, both of different wavelengths) and a photodetector. The
wavelengths of these LEDs are 660nm and 880nm, respectively.

Figure3.4: Photoplethysmograph

The MAX30100 works by shining both lights onto the finger or earlobe (or essentially anywhere
where the skin isn’t too thick, so both lights can easily penetrate the tissue) and measuring the
amount of reflected light using a photodetector. This method of pulse detection through light is
called Photoplethysmogram.
The working of MAX30100 can be divided into two parts: Heart Rate Measurement and Pulse
Oximetry (measuring the oxygen level of the blood).

13
Heart Rate Measurement
The oxygenated hemoglobin (HbO2) in the arterial blood has the characteristic of absorbing IR
light. The redder the blood (the higher the hemoglobin), the more IR light is absorbed. As the
blood is pumped through the finger with each heartbeat, the amount of reflected light changes,
creating a changing waveform at the output of the photodetector. As you continue to shine light
and take photodetector readings, you quickly start to get a heart-beat (HR) pulse reading.

Figure3.5: Heart rate measurement


Pulse Oximetry
Pulse oximetry is based on the principle that the amount of RED and IR light absorbed varies
depending on the amount of oxygen in your blood. The following graph is the absorption-spectrum
of oxygenated hemoglobin (HbO2) and deoxygenated hemoglobin (Hb).

Figure3.6: Absorption spectrum of oxygenated and deoxygenated hemoglobin


As you can see from the graph, deoxygenated blood absorbs more RED light (660nm), while
oxygenated blood absorbs more IR light (880nm). By measuring the ratio of IR and RED light
received by the photodetector, the oxygen level (SpO2) in the blood is calculated.

14
LM35
The LM35 is a low power, low cost high precision temperature sensor designed and manufactured
by Texas instruments. This IC provides a voltage output that is linearly proportional to change in
temperature. The ambient temperature is detected using the temperature sensitive IC part. The
ambient temperature is converted into electrical voltage by a circuit in the IC, where the
temperature change is proportional to the output voltage changes.
In the series LM35

Every change of 1 °C would produce a change in output voltage of 10mv.


Vout is a scalable sensor output voltage linearly with the measured temperature, which is 10
millivolts per 1 degree Celsius. So if Vout = 530mV, then the measured temperature is 53 degrees
Celcius then if Vout = 320mV, then the measured temperature is 32 degrees Celsius. The output
voltage can be directly fed as input to the signal conditioning circuit such as the operational
amplifier circuit and filter circuits, or other circuits such as voltage comparator circuit and circuit
Analog-to-Digital Converter.

15
CHAPTER FOUR: RESULT AND DISCUSSION

4.1 Result

In the project, vital parameters that are detected are the patient's heart rate, temperature and blood
oxygen level. The sensors are interfaced with Arduino. When the sensor detects a heartbeat rate
and temperature, the processors process the data acquired by the sensor and transfers it to
ThingSpeak cloud server via Wi-Fi module. If the parameter data exceeds a certain threshold value,
the system is designed to send a notification to the medical personnel.
As a result, it is vital to monitor the heart rate of patients who are undergoing surgical treatment,
and our technology will be of great use to them.
The sensors are connected to the patient and the reading of the sensors are displayed on the LCD
using the Arduino microcontroller.
The values of the sensors are transmitted to the cloud and the mobile application. Figure4.1 shows
the output of serial monitor of Arduino with the sensors values.

Figure4.1: Result on Serial Monitor

16
Figure4.2 Chart representing patient's vitals measured by the sensors used

Temperature, BPM and SpO2 measured by the respective sensors are sent to the ThingSpeak server
where the vitals measurement are shown graphically. The systemic human body temperature in
Fahrenheit is 98, Beats per Minute (BPM) is 60-100 and the Oxygen saturation in blood is above
95%.

To monitor the real-time parameters of the patients, a simple app was built in kotlin programming
language. Android Studio Software was used to create the app. The real-time data is shown on the
mobile app using the API key from the ThingSpeak channel and the retrofit library. The medical
staff can see the sensor values in the mobile application and can go and visit the patient soon

4.2 Discussion

This project aims to provide continuous patient monitoring so that, in the event of an emergency,
the patient can receive an immediate health checkup from medical personnel. Because the sensors
are linked to the patient's body, more caution is required to avoid any harm to the patient. Because
the microprocessor and sensor are both extremely sensitive, a constant power supply is required.

17
CHAPTER FIVE: CONCLUSION AND RECOMMENDATION

5.1 Conclusion

This research presents the design and execution of a health monitoring system. This method allows
users to determine their health metrics, which may aid in the long-term management of their health.
If the need arises, the patient may eventually seek medical help. They might effortlessly
communicate their health parameter data with the doctor using a single application. As we all
know, the Internet of Things is becoming one of the most popular methods for health monitoring.
It ensures that parameter data is securely stored in the cloud, and the most significant aspect is that
any doctor can remotely monitor the health of any patient.
The paper details the development of an IoT-based health monitoring system based on Arduino.
The system will use a Wi-Fi module to provide data to the server about a patient's body
temperature, heartbeat, and blood SpO2 levels. This information is also sent to the LCD panel,
allowing patients to quickly see their current health status.
5.2 Future Works

It's a prototype model. It might be made into a watch or an ear plug. The character LCD can be
omitted in a wearable design, and the entire circuit can be relocated to a micro controller board or
System on Chip.
In the future, the system could be modified and adjusted in a variety of ways. A Raspberry Pi can
be used in place of the system's microcontroller. When additional sensors are added, the system's
sensors can be upgraded, and we can measure a variety of health metrics. New algorithms may be
incorporated with the entire system for system security.

18
REFERENCES

[1]L. Cromwell, Biomedical instrumentation and measurements, 2nd ed. USA: Englewood Cliffs,
N.J, 2018, pp. 173-212.
[2]K. Fowler, Electronic instrument design. New York: Oxford University Press, 1996.
[3]A. Mihat, N. Mohd Saad, E. Shair, A. Aslam and R. Abdul Rahim, "SMART HEALTH
MONITORING SYSTEM UTILIZING INTERNET OF THINGS (IoT) AND ARDUINO", Asian
Journal Of Medical Technology, vol. 2, no. 1, pp. 35-48, 2022. Available:
10.32896/ajmedtech.v2n1.35-48
[4]R. Anandh and G. Indirani, "Real Time Health Monitoring System Using Arduino with Cloud
Technology", Asian Journal of Computer Science and Technology, vol. 7, no. 1, pp. 29-32, 2018.
Available: 10.51983/ajcst-2018.7.s1.1810.
[5]V. Soppimath, A. Jogul, S. Kolachal and P. Baligar, "Human Health Monitoring System Using
IoT and Cloud Technology - Review", International Journal of Advanced Science and
Engineering, vol. 5, no. 2, p. 924, 2018. Available: 10.29294/ijase.5.2.2018.924-930.
[6]C. Srinivasan, G. Charan and P. Sai Babu, "An IoT based SMART patient health monitoring
system", Indonesian Journal of Electrical Engineering and Computer Science, vol. 18, no. 3, p.
1657, 2020. Available: 10.11591/ijeecs.v18.i3.pp1657-1664.

19
APPENDIX

Outputs

Figure A: LCD Output results

a
Snapshots

(a)

(b)

Figure B: ThingSpeak IoT Cloud Output results a) temperature below threshold b) temperature
above threshold

b
Figure C: Oxygen level and Pulse Rate shown by Max30100 in ThingSpeak

Figure D: BPM and SpO2 being displayed in Serial Monitor

c
Figure E: Vitals measured by sensors exported in Excel file

d
Arduino Code

#include <SoftwareSerial.h>
#include <Wire.h>
#include "MAX30100_PulseOximeter.h"
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 2, 16);

const int LM35_PIN = A1; // Define analog pin the LM35 is connected to
float temp_C, temp_F; // Define a couple of variables to hold the temperatures

#define REPORTING_PERIOD_MS 1000


PulseOximeter pox;
uint32_t tsLastReport = 0;
float BPM, SpO2;
void onBeatDetected()
{
Serial.println("Beat!");
}

#define RX 4
#define TX 5

String AP = "sandesh90_fpkhr"; // AP NAME


String PASS = "raktim_don"; // AP PASSWORD
String API = "87DQGCOJBIY9JZ5W"; // Write API KEY
String HOST = "api.thingspeak.com";
String PORT = "80";
int countTrueCommand;
int countTimeCommand;
boolean found = false;

e
int valSensor = 1;

SoftwareSerial esp8266(RX,TX);

void setup()
{
Serial.begin(115200);
esp8266.begin(115200);
lcd.init();
lcd.backlight();
lcd.setCursor (0,0);
lcd.print (" PATIENT HEALTH ");
lcd.setCursor (0,1);
lcd.print (" MONITOR SYSTEM ");
delay (3000);

// Initialize the PulseOximeter instance


// Failures are generally due to an improper I2C wiring, missing power supply
// or wrong target chip
/* if (!pox.begin()) {
Serial.println("FAILED");
for(;;);
} else {
Serial.println("SUCCESS");
}

pox.setIRLedCurrent(MAX30100_LED_CURR_7_6MA);

// Register a callback for the beat detection


pox.setOnBeatDetectedCallback(onBeatDetected); */

f
sendCommand("AT",5,"OK");
sendCommand("AT+CWMODE=1",5,"OK");
sendCommand("AT+CWJAP=\""+ AP +"\",\""+ PASS +"\"",20,"OK");
}

void loop()
{

String getData = "GET /update?api_key="+


API+"&field1="+getTemperatureValue()+"&field2="+getBPMValue()+"&field3="+getSpO2Va
lue();
sendCommand("AT+CIPMUX=1",5,"OK");
sendCommand("AT+CIPSTART=0,\"TCP\",\""+ HOST +"\","+ PORT,15,"OK");
sendCommand("AT+CIPSEND=0," +String(getData.length()+4),4,">");
esp8266.println(getData);delay(1500);countTrueCommand++;
sendCommand("AT+CIPCLOSE=0",5,"OK");
}

String getTemperatureValue()
{
temp_C = Get_Temp(LM35_PIN); // Get the temp in C
temp_F = C_To_F(temp_C); // Convert the temp from C to degrees F
printtemp(temp_F);
Serial.println("_______");
Serial.print("Temp in deg Celcius = ");
Serial.println(temp_C);
Serial.print("Temp in deg Fahrenheit = ");
Serial.println(temp_F);
Serial.println("_______");
return String(temp_F);

g
}

float Get_Temp(int pin)


{
float raw_temp = analogRead(pin);
float voltage = (raw_temp * 5.0 / 1024) * 100; // Calculate temp based on raw reading
return voltage;
}

float C_To_F(float temp)


{
return (temp * 1.8) + 32; // Basic formula for converting degrees C to F
}

void printtemp(float temp_F)


{
lcd.setCursor(0,0);
lcd.print("Temp in F:");
lcd.print(temp_F);
}

String getBPMValue()
{
// Make sure to call update as fast as possible
pox.update();

if (millis() - tsLastReport > REPORTING_PERIOD_MS)


{
BPM = pox.getHeartRate();
SpO2 = pox.getSpO2();
Serial.println("_______");

h
Serial.print("Heart rate:");
Serial.print(BPM);
Serial.print("bpm / SpO2:");
Serial.print(SpO2);
Serial.println("%");

lcd.setCursor(0,1);
//lcd.print("BPM:");
lcd.print(BPM);
lcd.print("bpm/SpO2:");
lcd.println(SpO2);
tsLastReport = millis();
}
return String(BPM);
}

String getSpO2Value()
{
if (millis() - tsLastReport > REPORTING_PERIOD_MS)
{
SpO2 = pox.getSpO2();
tsLastReport = millis();
}
return String(SpO2);
}

void sendCommand(String command, int maxTime, char readReplay[]) {


Serial.print(countTrueCommand);
Serial.print(". at command => ");

i
Serial.print(command);
Serial.print(" ");
while(countTimeCommand < (maxTime*1))
{
esp8266.println(command);//at+cipsend
if(esp8266.find(readReplay))//ok
{
found = true;
break;
}

countTimeCommand++;
}

if(found == true)
{
Serial.println("OYI");
countTrueCommand++;
countTimeCommand = 0;
}
if(found == false)
{
Serial.println("Fail");
countTrueCommand = 0;
countTimeCommand = 0;
}

found = false;
}

View publication stats

You might also like