0% found this document useful (0 votes)
55 views

IOT Patient

This document presents a project on an IoT-based patient health monitoring system using sensors to measure vital signs. The system uses an Arduino Nano, WiFi module, DHT11 temperature and humidity sensor, heart rate sensor, infrared temperature sensor, and LCD display. It is configured to integrate with the ThingSpeak cloud platform for real-time data transmission and analysis. The aim is to summarize health parameters like temperature, blood oxygen, and heart rate to monitor patients remotely. This type of monitoring system allows for more efficient and patient-centric healthcare by addressing limitations of traditional methods.
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)
55 views

IOT Patient

This document presents a project on an IoT-based patient health monitoring system using sensors to measure vital signs. The system uses an Arduino Nano, WiFi module, DHT11 temperature and humidity sensor, heart rate sensor, infrared temperature sensor, and LCD display. It is configured to integrate with the ThingSpeak cloud platform for real-time data transmission and analysis. The aim is to summarize health parameters like temperature, blood oxygen, and heart rate to monitor patients remotely. This type of monitoring system allows for more efficient and patient-centric healthcare by addressing limitations of traditional methods.
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/ 43

Heart Rate Monitoring and Pulse Oximeter System

STUDENT’S NAME
Atheer Hani Muhammad
Muhammad Haider Nasser
Abbas Yahya Hamoud

A project report submitted in partial fulfilment of the


requirements for the award of the degree of
Bachelor of Computer Techniques Engineering at
College of Technical Engineering / University of AlKafeel.

Supervised by
Assist. Lec: Sajjad Hadi Hussein

2023-2024
Najaf, Iraq
SUPERVISOR CERTIFICATE

I hereby certify that this project report is based on my original work except for citations and
quotations which have been duly acknowledged.

Signature :

Name : Assist. Lec: Sajjad Hadi Hussein

Date : 2024 / /

I
EXAMINING COMMITTEE CERTIFICATE

We certify that this project report entitle “Heart Rate Monitoring and Pulse Oximeter
System” was prepared by Assist. Lec: Sajjad Hadi Hussein has met the required standard
for submission in partial fulfilment of the requirements for the award of Bachelor of
Computer Techniques Engineering at College of Technical Engineering / University of
AlKafeel.

Approved by,

Signature : Signature :

Member : Member :

Date : 2024 / / Date : 2024 / /

Signature :

Chairman :

Date : 2024 / /

Signature :

Head of Dept. :

Date : 2024 / /

II
ACKNOWLEDGEMENTS
I would like to extend my heartiest gratitude to Assist. Lec: Sajjad Hadi
Hussein my project supervisor, for his invaluable guidance, inspirations and
timely suggestions which facilitated the entire process of bringing out this
project on " Heart Rate Monitoring and Pulse Oximeter System". It would have
been really hard to complete this project successfully without the directions of
whom. I really couldn’t have done it without him.
I also extend my love and respect to the Head of the Department of computer
technical Engineering, and to all professors who were most fortunate to extend
a helping hand during my studies.

III
ABSTRACT
The Internet of things has provided opportunity and applications for medical
patients. The IOT applications are key enabling technologies in medical
service. It is important way for taking care of patient’s health. IOT is consisting
of communication and sensors which are suitable tools for IOT based health
care monitoring system. This project introduces an IoT-Based Patient Health
Monitoring System designed for hospital beds, employing a synergy of
hardware components, including Arduino Nano, ESP8266 WIFI module, heart
rate sensor, IR temperature sensor, DHT11 sensor, and a 4x20 LCD display.
The system is configured to seamlessly integrate with the Thingspeak cloud
platform, establishing a robust communication network for real-time data
transmission and analysis. The aim of this review project is to summarize
various health parameters of human body such as temperature body, blood
oxygen and heart rate using sensors. Deploying this IoT-based monitoring
system on hospital beds represents a paradigm shift in healthcare delivery,
emphasizing proactive and data-driven approaches. The proposed system not
only addresses the limitations of traditional monitoring methods but also lays
the foundation for a more efficient and patient-centric healthcare ecosystem.
This project contributes to the evolving landscape of IoT applications in
healthcare and sets the stage for further advancements in remote patient
monitoring and care.

IV
TABLE OF CONTENTS

Titles Page NO

ACKNOWLEDGEMENTS III

ABSTRACT IV

TABLE OF CONTENTS V

LIST OF FIGURE VII

LIST OF ABBREVIATIONS VIII

CHAPTER ONE 1

GENERAL INTRODUCTION 1

1.1 INTRODUCTION 1

1.2 MOTIVATION 2

1.3 problem statement 2

1.4 Objectives 3

1.5 Organization of the project 4

CHAPTER TWO 5

LITERATURE REVIEW 5

2.1 Related Work 5

2.2 Based Patient Monitoring 6

2.3 Heart Rate 7

2.4 Pulse Oximeter 8

CHAPTER THREE 9

Design and implementation of system 9

V
3.1 Introduction 9

3.2 The proposed system 9

3.3 Hardware Components of project 10

3.3.1 Arduino Nano 10

3.3.2 Wi-Fi Module ESP8266 11

3.3.3 DHT11 Sensor Module 12

3.3.4 Heart Rate Sensor Module 13

3.3.5 MLX90614 Infrared Temperature Sensor Module 14

3.3.6 LCD 4x20 module 14

3.4 Software Components 15

3.4.1 ThingSpeak 15

3.4.2 Arduino IDE 16

CHAPTER FOUR 17

RESULTS AND DISCUSSION 17

CHAPTER FIVE 20

5.1 Conclusion 20

5.2 Recommendation for future work 20

REFERENCES 21

APPENDIX A 23

VI
LIST OF FIGURE
Fig 3-1: A block Diagram of the proposed system...........................................10
Fig 3-2: Arduino Nano....................................................................................11
Fig 3-3: Wi-Fi Module ESP8266.....................................................................12
Fig 3-4: DHT11 Sensor Module......................................................................13
Fig 3-5: Heart rate sensor module MAX30102 - pulse sensor........................13
Fig 3-6: MLX90614 Infrared Non-contact Temperature Sensor Module........14
Fig 3-7: LCD 20*4 Display............................................................................15
Fig 3-8: ThingSpeak website..........................................................................16
Fig 4-1: Interfacing of LCD and sensors with Arduino...................................17
Fig 4-2: Result displayed on 4x20 LCD..........................................................18
Fig 4-3: Graphs of sensor output on the thing speak.......................................18
Fig 4-4: Finally shape of project.....................................................................19

VII
LIST OF ABBREVIATIONS
AHA American Heart Association
ECG Electrocardiogram
GPIO General Purpose Input/Output
I2C Inter-Integrated Circuit
IDE Integrated Development Environment
IOT Internet of Things
IR Infrared
LCD Liquid Crystal Display
LED Light Emitting Diode
NTC Negative Temperature Coefficient
PWM Pulse Width Modulation
RF Radio Frequency
SOC System on a Chip
USB Universal Serial Bus
WSN Wireless Sensor Network

VIII
CHAPTER ONE

GENERAL INTRODUCTION

1.1 INTRODUCTION
In today’s world it is very difficult to carry patients from home to hospitals
for regular checkup. There are lot of challenges like waiting in the queue,
travelling time and patient may be prone to various infections moving in this
polluted environment. So, the health care industry is focusing on in-home health
care services where the patient can undergo medical check-ups in the comfort of
his home environment. Health care industry is working together with Information
and communication technology industry to develop models that reduces the time
consumption, increasing accuracy and interoperable on any platform that can be
beneficial to both hospitals and patient [1]. Nowadays Internet of Things (IOT) is
attaining development on a rapid pace and experts estimate that about 50 billion
devices will be connected to the internet by 2020. It is a technology in which all
the devices like vehicles, buildings, sensors etc. are connected to the internet
through the existing infrastructure. Biotelemetry is the electrical technique for
conveying biological information from a living organism and its environment to
location where the information can be observed or recorded. A wireless health
monitoring device will be attached to the patient and physicians can monitor the
patient from anywhere across the world [2]. Typically, the patient health
monitoring system consists of various sensors that measure the physiological
information from the patient and transfer them to an Arduino as electrical signals.
The microcontroller processes this physiological data and transmits them to
associated ThingSpeak website that is linked to the IoT module. The doctor or the
caretaker can access the website by typing the unique id given to the patient. As
we are storing the data in the cloud it can be accessed anywhere, anytime over the
1
internet. The patient need not carry all the medical reports for the check-up. The
doctor can directly access the medical reports by typing the patient’s id on that
website.

1.2 MOTIVATION
In the realm of healthcare, where each advancement holds the potential to
transform lives, the integration of Internet of Things (IoT) technology into patient
health monitoring systems stands as a beacon of hope and progress. As we embark
on the journey of exploring and implementing an IoT-based Patient Health
Monitoring System, envision a future where the bed of sickness becomes a
platform for empowerment and healing. This project endeavor not only transcends
the traditional boundaries of healthcare but also symbolizes a paradigm shift in
how we perceive patient care. Picture a hospital where every bed is not just a place
of rest for the ailing, but a node within a dynamic network, constantly relaying
vital health data to caregivers in real-time. This IoT-driven metamorphosis
promises not only increased efficiency in monitoring patients but also a more
compassionate and personalized approach to healthcare. Let the prospect of this
transformative system propel us forward in our research, as we strive to bring
about positive change and redefine the landscape of patient well-being. In the
convergence of technology and compassion lies the motivation to create a future
where the hospital bed becomes a symbol of not just recovery, but of resilience
and innovation.

1.3 problem statement


The current landscape of patient health monitoring in hospitals often faces
challenges in achieving real-time, comprehensive, and non-intrusive data
collection. The absence of an integrated and IoT-based solution leads to delayed
responsiveness to critical health events, potentially impacting patient outcomes.
The existing systems lack the sophistication required to monitor a patient's vital
parameters continuously and seamlessly, especially when confined to a hospital

2
bed. The integration of Arduino Nano, heart rate sensor, IR sensor, DHT11 sensor,
and LCD into a cohesive IoT-based Patient Health Monitoring System represents
a promising avenue for addressing these challenges. However, the current
problem lies in the absence of a well-established and optimized framework that
fully exploits the capabilities of these components. Furthermore, issues related to
data security, sensor accuracy, and the integration of this system with existing
hospital infrastructure need to be meticulously addressed. This research seeks to
bridge these gaps by developing a robust and scalable IoT-based patient health
monitoring system that leverages Arduino Nano and a suite of sensors, ensuring
real-time data acquisition, analysis, and presentation. Through this investigation,
we aim to overcome the current limitations and pave the way for a more efficient,
reliable, and patient-centric healthcare monitoring paradigm.

1.4 Objectives
There are several objectives to achieve in this project. The objectives are:
• To ensure a stable foundation for real-time data collection and transmission
from patient health monitoring devices placed on hospital beds.
• To design a sensor integration system that is accurate, non-intrusive, and
adaptable to various patient conditions.
• To create a system which uses the cloud to store patient data.

3
1.5 Organization of the project
Chapter Two: delves into an extensive review of existing literature related
to IoT applications in healthcare and patient monitoring systems. It analyses prior
research findings, methodologies, and technological frameworks.
Chapter Three: focuses on the detailed design and architecture of the
proposed Patient Health Monitoring System. We outline the integration of
Arduino Nano, heart rate sensor, IR sensor, DHT11 sensor, and LCD display
within a cohesive framework.
Chapter Four: details the practical implementation of the IoT-based
monitoring system. It covers the step-by-step process of assembling the hardware
components, coding the software logic, and ensuring seamless integration.
Chapter Five: concludes with a summary of the project's achievements,
contributions to existing knowledge, and recommendations for future
enhancements.

4
CHAPTER TWO

LITERATURE REVIEW

2.1 Related Work


In [3], author has presented “An IOT Based Health care monitoring system”.
Constant observation is required in hospitals where the patients are under medical
care for a longer period of time. Although the patient is not in a critical situation,
the doctors still need confirmation on their health parameters. Now a day, the
expenses for hospitalization are high and expensive. So, the health policies in
various countries have shifted its focus from providing reactive, acute care to
provide care outside the hospital. Hence author designs and build the sensing data
that conditions the system to display accurate body parameters of the patients. The
aim of this paper is to supervise the heart rate, blood pressure, temperature and
ECG continuously through respective sensors. The recorded data is sent to the
device and if the value exceeds, the alert message will be sent to the doctor. In
[4], author has presented “An IOT Based Smart Health care system using
Raspberry Pi”. They have used an exclusive sensor to monitor a patient’s health
parameters. Hence author has used platform Raspberry Pi for IoT. The Raspberry
Pi is a platform which offers compact platform for a Linux server with a low cost.
The combination of Raspberry Pi and IoT is a new changing technology in the
healthcare system. Raspberry Pi collects various data from sensors and transfers
to database. Cloud computing possess numerous advantages such as flexibility,
highly automated, low cost etc. The Cloud's features enable customers to build
and deploy their applications on virtual servers. Here the author has concentrated
over the idea of separating wireless sensor network and cloud computing. Once
sensors are connected to patients’ bodies, they start to receive and transmit data
to the database sensors like temperature (DS18B20), heartbeat, blood pressure,
ECG (AD8232) services available in the cloud are responsible for receiving,

5
storing, and distributing patient’s data. In [5], author presented a “Review on-IOT
Based smart healthcare system”. Here architecture of Smart Health Care
Monitoring and IOT is demonstrated by author. New technologies help in
minimizing the better quality as well security concept. ECG signals are obtained
by electrodes that are placed on the chest. Later wires are connected to ECG
sensor (AD8232). The sensor is used in measuring the electrical activity of the
heart. Problems and challenges that could be faced in future are presented by this
system. Applications of IOT can be improved using new methodologies and
technologies. Sensors like Blood pressure, Temperature, Heart rate, ECG are used
in IOT along with Raspberry Pi kit and Wi-Fi module. In [6], author has presented
“An Overview on Heart rate Monitoring and Pulse Oximeter System”. In this
paper a low-cost device is described that measures the heart rate of the patient by
placing sensors on the fingers, later the result will be displayed on LCD. The
designed system can be used by unprofessional people. The change in heart rate
can be displayed by graph using graphical LCD. Over a period of time, maximum
and minimum heart rate can be displayed using the designed system.
Abnormalities are displayed on LCD indicated by buzzer. In order to send heart
rate to PC output should be attached. In [7], author has presented “Heart rate
Measurement from the Finger Using a Low-Cost Microcontroller”. IOT has a
wide range of application. IoT has been developed for Wireless sensor network
(WSN). Using IOT, health monitoring designs are presented. There are some
problems that are related to health monitoring and IOT. New technologies help to
minimize better quality as well as security concept. New technologies and
methodologies are used. Aurdino board, Wi-Fi modules, temperature, pulse
oximeter, blood pressure, heartbeat rate sensors are used in IoT.

2.2 Based Patient Monitoring


According to the WHO, 4.9 million people died from lungs cancer, overweight
2.6 million, 4.4 million for elevated cholesterol, 7.1 million for high blood

6
pressure. Patients who need a regular monitoring by doctors to discuss the state
of health condition, IoT based patient monitoring system is useful for them. The
main concept of IoT is defined as the integration with electronic devices that
connect with doctors or health monitoring persons. IoT the term was first
mentioned by Kevin Ashtor in 1998. IoT can be divided in three sections.
1. Internet – Oriented Middle ware.
2. Things Sensors Oriented.
3. Knowledge Oriented Semantics.
First as hardware layer which allow the interconnection by using sensors and
technologies. Sensors are used to measure Heartbeat, and Temperature etc. The
main purpose of this IoT is to improve a solution based on ontology with ability
to monitor the health status [8].

2.3 Heart Rate


Heart rate known as pulse rate is the number of times a person’s beat per minute.
Normal heart rate varies from person to person but a normal range for adults is 60
to 100 beats per minute. Also, normal heart rate depends on the individual age,
body size, heart condition also the person is sitting or moving, medication use and
even air temperature. Emotion c vary heart rate for example getting excited,
scared can increase the heart rate. According to American Herat Association
(AHA) well trained athlete may have a normal heart rate of 40 to 60 beats per
minute. There are 4 steps to measure heart rate:
1. Writs
2. Inside of an elbow
3. Side of the neck
4. Top of the foot
How to measure accurate heart rate: Put two fingers over one of these areas and
count the number of beats in60 seconds. Also measure 20 seconds and multiply
by three which is easier than first step. Resting heart rate: When a person is in

7
resting mode, it is the best time to measure heartbeat. According (AHA) for adults
and older normal heart rate is between 60 and 100 beats per minute (bpm). But
below 60 (bpm) doesn’t mean the person has health issue problem. Active people
have lower heart rates because their muscles don’t need to work as hard to
maintain a steady beat. Maximum and target heart rate: A person’s target heart
rate zone is between 50 percent and 85 percent of his or her maximum heart rate.
According to (AHA) 30-year-old person would be between 50 and 85 percent of
his or her max heart rate [9].

2.4 Pulse Oximeter


Amount of Oxygen content along with the hemoglobin in the blood to the
total hemoglobin containing saturated and unsaturated called Oxygen saturation.
The hemoglobin containing oxygen is called oxygenated while without oxygen is
called deoxygenated hemoglobin. Peripheral oxygen saturation [10] can be
measured through pulse oximeter which is a non-invasive method of monitoring.
Pulse oximeter provides a simple, convenient and non-invasive method for
continuous monitoring of hemoglobin saturated with oxygen and heart rate [11].
It has virtually replaced the transcutaneous monitors. The oxygen saturation in the
blood can be determined by measuring the absorption of two selected wavelengths
of light.

8
CHAPTER THREE

Design and implementation of system

3.1 Introduction
This chapter provides a comprehensive overview of the software design and
implementation of the IoT-based environmental monitoring system. The chapter
includes a description of the system architecture, a discussion of the software
components, and the block diagram, circuit diagram, and flowchart of the system.
The system consists of the following components:
• Sensors: Heart rate sensor, IR temperature sensor and DHT11sensor.
• Microcontroller: The Arduino Nano microcontroller is used to collect data
from the sensors and process it.
• WiFi Module: The ESP8266 WiFi module is used to connect the
microcontroller to the internet.
• Cloud Platform: The ThinkSpeak cloud platform is used to store and
visualize data.

3.2 The proposed system


The block diagram in figure (3.1) illustrates the comprehensive architecture
of the IoT-Based Patient Health Monitoring System designed for hospital beds.
At the core of the system is the Arduino Nano microcontroller, serving as the
central processing unit. Connected to the Arduino Nano are key sensors: the heart
rate sensor, IR temperature sensor, and DHT11 sensor for monitoring vital health
parameters such as heart rate, body temperature, blood oxygen and environmental
conditions. The LCD 4x20 display provides a real-time interface for healthcare
professionals to visualize the patient's health data directly at the bedside.
Facilitating wireless communication and data transmission is the ESP8266 WIFI
module, seamlessly connecting the monitoring system to the Thingspeak cloud
platform. This cloud integration serves as a pivotal component for storing and
9
analyzing the collected health data. Through the ESP8266 module, the system
uploads real-time health information to the Thingspeak cloud, enabling healthcare
providers to access and monitor patient data remotely.
The bidirectional arrows in the block diagram emphasize the dynamic flow of
information within the system. The sensors continuously collect health data,
which is processed by the Arduino Nano. The ESP8266 module ensures the
transmission of this processed data to the Thingspeak cloud for storage and
analysis. Healthcare professionals can then retrieve and review this data through
the cloud platform, allowing for timely interventions and personalized patient
care.

ThingSpeak

Heart rate sensor

Arduino ESP8266 Wi-Fi


IR temperature
NANO Module
sensor

DHT11 sensor LCD 4X20

Fig 3-1: A block Diagram of the proposed system.

3.3 Hardware Components of project

3.3.1 Arduino Nano


The Arduino Nano is a small, complete, and breadboard-friendly board based on
the ATmega328 (Arduino Nano 3.x). It has more or less the same functionality of
the Arduino Duemilanove, but in a different package. It lacks only a DC power
jack and works with a Mini-B USB cable instead of a standard one. The Arduino
Nano has a number of facilities for communicating with a computer, another
Arduino, or other microcontrollers. The ATmega328 provide UART TTL (5V)
10
serial communication, which is available on digital pins 0 (RX) and 1 (TX). An
FTDI FT232RL on the board channels this serial communication over USB and
the FTDI drivers (included with the Arduino software) provide a virtual com port
to software on the computer. The Arduino software includes a serial monitor
which allows simple textual data to be sent to and from the Arduino board. The
RX and TX LEDs on the board will flash when data is being transmitted via the
FTDI chip and USB connection to the computer (but not for serial communication
on pins 0 and 1). A Software Serial library allows for serial communication on
any of the Nano's digital pins. The ATmega328 also support I2C (TWI) and SPI
communication. The Arduino software includes a Wire library to simplify use of
the I2C bus [12]. Figure (3.2) represents the Arduino nano.

Fig 3-2: Arduino Nano.

3.3.2 Wi-Fi Module ESP8266


The ESP-01S ESP8266 WiFi Module in figure (3.3) is a self-contained
SOC with integrated TCP/IP protocol stack that can give any microcontroller
access to your WiFi network. The ESP8266 is capable of either hosting an
application or offloading all Wi-Fi networking functions from another application
processor. Each ESP-01S 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 WiFi-ability as a WiFi Shield offers (and that’s just

11
out of the box)! The ESP-01S 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 General-purpose input/output (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-existance interfaces, it contains a self-
calibrated RF allowing it to work under all operating conditions and requires no
external RF parts [13].

Fig 3-3: Wi-Fi Module ESP8266.

3.3.3 DHT11 Sensor Module


The DHT11 is a commonly used Temperature and humidity sensor. The
sensor comes with a dedicated NTC (Negative Temperature Coefficient) to
measure temperature and an 8-bit microcontroller to output the values of
temperature and humidity as serial data. The sensor is also factory calibrated and
hence easy to interface with other microcontrollers. The sensor can measure
temperature from 0°C to 50°C and humidity from 20% to 90% with an accuracy
of ±1°C and ±1%. So, if you are looking to measure in this range then this sensor
might be the right choice for you [14]. Figure (3.4) represents the DHT11sensor.

12
Fig 3-4: DHT11 Sensor Module.

3.3.4 Heart Rate Sensor Module


Light-dissolving method: measuring the pulse and blood oxygen saturation
by using human tissue to cause different transmittance when the blood vessel
beats;Light source: a specific wavelength of light-emitting diode selective for
oxyhemoglobin(HbO2)and hemoglobin (Hb) in arterial blood;
The transmittance is converted into an electrical signal: the change in the volume
of the arterial pulsation causes a change in the transmittance of the light. At this
time, the photoelectric variator receives the reflected light from the human tissue,
converts it into an electrical signal, and amplifies and outputs it. The MAX30102
module uses a red LED (660nm), infrared LED (880nm), and photodetector to
approximate blood oxygen content and heart rate pulses. The sensor can be placed
on a finger, wrist, or other area with significant blood flow to measure these
parameters [15]. Figure (3.5) represents the Heart rate sensor module MAX30102
- pulse sensor.

Fig 3-5: Heart rate sensor module MAX30102 - pulse sensor.

13
3.3.5 MLX90614 Infrared Temperature Sensor Module
The MLX90614 is an Infra-Red thermometer for non-contact temperature
measurements. Both the IR sensitive thermopile detector chip and the signal
conditioning ASIC are integrated in the same TO-39 can. Integrated into the
MLX90614 are a low noise amplifier, 17-bit ADC and powerful DSP unit thus
achieving high accuracy and resolution of the thermometer. The thermometer
comes factory calibrated with a digital SMBus output giving full access to the
measured temperature in the complete temperature range(s) with a resolution of
0.02°C. The user can configure the digital output to be PWM. As a standard, the
10-bit PWM is configured to continuously transmit the measured temperature in
range of -20 to 120 °C, with an output resolution of 0.14 °C. Works from 3.3V to
5V input, Module has power regulator IC built in. Standard I2C interface with
built 2x pull up resistors Operating Voltage: 3V- 5V [16]. Figure (3.6) represent
MLX90614 Infrared Non-contact Temperature Sensor Module.

Fig 3-6: MLX90614 Infrared Non-contact Temperature Sensor Module.

3.3.6 LCD 4x20 module


In 20*4 LCD is named because it has 20 columns and 4 rows. It is a very
important device in embedded system and used to display information required.
It is a character display. Moreover, it has 16 pins including supply power +5V and
optional supply power +3V. [17].

14
Features
• High contrast STN 20x4 character LCD
• White text on blue background
• Single +5.0V supply operation
• LED backlight 27 o 5x8 dot characters
• HD44780 equivalent controller

Fig 3-7: LCD 20*4 Display.

3.4 Software Components

3.4.1 ThingSpeak
The Thing Speak server is a data platform that is available to the public. API
for the Internet of Things that allows you to interact with it. data collection,
storage, analysis, visualization, and action derived from sensors. ThingSpeak
provides a very good tool for IoT based projects. By using the ThingSpeak site,
we can monitor our data and control our system over the Internet, using the
Channels and web pages provided by ThingSpeak. So first you need to sign up
for ThingSpeak. So visit https://thingspeak.com and create an account.You may
collect, visualize, and analyses real-time data streams with the cloud based IoT
analytics platform ThingSpeak [18]. Data transmitted to ThingSpeak by your
devices is visualized in real time by ThingSpeak. You have the option to run
MATLAB® code in ThingSpeak to perform online analysis and analyse data as

15
it is received. For the creation of IoT systems and proof-of-concept analytics,
ThingSpeak is commonly utilized. You can send data straight to ThingSpeak from
any internet-connected device via a Rest API or MQTT. The Things Network,
Senet, the Libelium Meshlium gateway, and Particle.io cloud-to-cloud
integrations allow for the transmission of sensor data to ThingSpeak through
LORAWAN and 4G/3G cellular networks as well [19].

Fig 3-8: ThingSpeak website.

3.4.2 Arduino IDE


Arduino IDE (Integrated Development Environment) is an open-source
software that is mainly used for writing and compiling the code into the Arduino
Module. It is an official Arduino software, making code compilation too easy that
even a common person with no prior technical knowledge can get their feet wet
with the learning process. IDE stands for “Integrated Development Environment”:
it is an official software introduced by Arduino.cc, that is mainly used for editing,
compiling and uploading the code in the Arduino Device. Almost all Arduino
modules are compatible with this software that is an open source and is readily
available to install and start compiling the code on the go. In this article, we will
introduce the Software, how we can install it, and make it ready for developing
applications using Arduino modules [20].

16
CHAPTER FOUR

RESULTS AND DISCUSSION

Fig 4-1: Interfacing of LCD and sensors with Arduino.

This project results in helping in the healthcare sector by monitoring patients'


health. The system also allows physicians to monitor useful parameters such as
temperature and heart rate of patients at remote locations in the hospital and can
monitor patients when they are offsite. Using the patient monitoring system saves
time and hence this system is developed. Here we firstly fetch the data on the
patient's end using sensors which includes the temperature using IR temperature
sensor, heart rate and blood oxygen using heartbeat sensor.

17
Fig 4-2: Result displayed on 4x20 LCD.

The parameters can also be read directly through the installed LCD display as
show in figure (4-2).

Fig 4-3: Graphs of sensor output on the thing speak.

18
Fig 4-4: Finally shape of project.

19
CHAPTER FIVE
CONCLUSION AND FUTURE WORK

5.1 Conclusion
In conclusion, the IoT-Based Patient Health Monitoring System, featuring
Arduino Nano, ESP8266 WIFI module, heart rate sensor, IR temperature sensor,
DHT11 sensor, LCD 4x20 display, and Thingspeak cloud integration, represents
a significant leap forward in the landscape of hospital care. Through meticulous
design, implementation, and evaluation, this project has successfully
demonstrated the system's potential to revolutionize patient monitoring, offering
a synergistic blend of real-time data acquisition, wireless connectivity, and cloud-
based analysis. While the system exhibits considerable potential, it is important
to acknowledge certain challenges encountered during the research, such as
ensuring data security and addressing potential connectivity issues. However,
these challenges have provided valuable learning experiences and avenues for
future improvements. Through rigorous testing and validation, the system
demonstrated robust performance in terms of data accuracy, reliability, and real-
time data transmission. The bidirectional communication between the monitoring
system and Thingspeak cloud empowers healthcare providers with timely
insights, fostering early detection of health anomalies and facilitating proactive
interventions. This project sets the stage for continued exploration and refinement
of IoT applications, paving the way for a new era in hospital-based patient
monitoring.

5.2 Recommendation for future work


As a part of future scope, we can create separate authentication and login for
the doctors and patients. Furthermore, more sensors can be added to measure
additional health parameters like blood pressure, blood sugar level, etc. which will
help in better health monitoring.

20
REFERENCES
[1] Hassanalieragh M, Page A, Soyata T, Sharma G. Health monitoring and
management using Internet of Things (IoT) sensing with cloud-based processing:
Opportunities and challenges. Proceedings of IEEE International Conference on
Service Computing; 2015 Jun. p. 285–92.
[2] Sinha N, Ravi V. Implementation of health monitoring system using mixed
environment. INDJST. 2015 Aug; 8(20):1–7.
[3] Sneha N. Malokar , Samadhan D. Mali. “A IoT Based Health Care Monitoring
System”, Int. J. of Advanced Research in Electrical,Electronics and
Instrumentation Engineering, 6(1), June 2017, pp.4661-4667.
[4] Raghavendra K K, Sharanya P S, Shaila Patil.“An IoT Based Smart Healthcare
System Using Raspberry Pi”, Int. J. of Research and Scientific Innovation (IJRSI),
5(6), June 2018, pp.103-106.
[5] Ashlesha A. Patil, Dr. S. R. Suralkar “Review onIOT Based Smart Healthcare
System”, Int. J. of Adv. Research in Engineering and Technology (IJARET), 8(3),
May - June 2017, pp. 37–42.
[6] Esrat Jahan, Tilottoma Barua, Umme Salma,” An Overview on Heart rate
Monitoring and Pulse Oximeter System”, Int. J. of Latest Research in Science and
Technology, 3(5), SeptemberOctober 2014, pp. 148-152.
[7] Dogan Ibrahim, Kadri Buruncuk “Heart rate Measurement from the Finger
using a Lowcost Microcontroller”, Int’l Journal of Computing, Communications
& Instrumentation Engg. (IJCCIE), 4(1), 2017, pp. 25-29.
[8]https://ac.els-cdn.com/S18770506301260/1-s2.0-S1877050916301260-
main.pdf?_tid=dcbc873b-3c7a-4fea-8d41-
f4c25d549727&acdnat=1521015990_964ce32f5ddee49a5b9eb8f73c99179f
[9] https://www.livescience.com/42081-normal-heart-rate.html .
[10] Chugh S, Kaur J. Low-cost calibration free Pulse oximeter. In India
Conference (INDICON), 2015 Annual IEEE India Conference (INDICON), New
Delhi, 2015, pp. 1-5 2.
21
[11] Dingle RE, Grady MD, Lee JA. Continuous transcutaneous oxygen
monitoring in the neonate. Amer J Nurs 1980, 80: 890.
[12] G. Parmar, S. Lakhani and M. K. Chattopadhyay, “An IoT based low-cost
healthcare monitoring system,” 2017 International Conference on Recent
Innovations in Signal processing and Embedded Systems (RISE), Bhopal, 2017,
pp. 524-528, doi: 10.1109/RISE.2017.8378212.
[13] esp8266 Wi-Fi module quick start guide v 1.0.4.pdf
https://www.mpja.com/download/esp8266%20wifi%20module%20quick%20sta
rt%20guide%20v%201.0.4.pdf
[14] Aayush Doshi, Yashraj Rai “Iot based Fire and Gas monitoring System”
International Journal for Research in Applied Science & Engineering Technology
(IJRASET) ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.429 Volume
9 Issue VII July 2021.
[15] https://www.botnroll.com/en/biometric/4310-heart-rate-sensor-module-
max30100-pulse-sensor.html
[16] https://www.bdtronics.com/mlx90614-infrared-non-contact-temperature-
sensor-module.html
[17] Amitabha Chakrabarty “IoT BASED PATIENT MONITORING SYSTEM”
12321021,12301040,14121084, 12301048_CSE.pdf
[18] Ebrahim Al Alkeem1, Dina Shehada1, Chan Yeob Yeun1, M. Jamal
Zemerly, Jiankun Hu, Springer Science+Business Media New York 2017, "New
secure healthcare system leveraging cloud of things."
[19] AfefMdhaffar, TarakChaari, Kaouthar Larbi, Mohamed Jmaiel, and Bernd
Freisleben are three of the authors of this book. IEEE EUROCON 2017: "IoT-
based Health Monitoring through LoRaWAN"
[20] Mohamed FEZARI and Ali Al Dahoud” Integrated Development
Environment “IDE” For Arduino” Authors: Mohamed FEZARI and Ali Al
Dahoud Al Zaytoona University, Amman, Jordan2017

22
APPENDIX A
Code of system:
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
#include <Adafruit_MLX90614.h>
#include <EEPROM.h>
#include <SoftwareSerial.h>
String agAdi = "Extender2"; // We write the name of our network here.
String agSifresi = "Aa888888"; // We write the password of our network
here.

int rxPin = 2; //ESP8266 RX pini


int txPin =3;
String ip = "184.106.153.149"; //Thingspeak ip adresi
float sicaklik, nem;
int beat;
SoftwareSerial esp(rxPin, txPin);
#include "MAX30105.h" //sparkfun MAX3010X library
MAX30105 particleSensor;
LiquidCrystal_I2C lcd(0x27,20,4);
//#define MAX30105 //if you have Sparkfun's MAX30105 breakout board , try
#define MAX30105
Adafruit_MLX90614 mlx = Adafruit_MLX90614();
#include <dht11.h>
#define dht_apin 4 // Analog Pin sensor is connected to
dht11 dhtObject;
double avered = 0; double aveir = 0;
double sumirrms = 0;
double sumredrms = 0;
23
int i = 0;
int Num = 100;//calculate SpO2 by this sampling interval
int Temperature;
int temp;
int ESpO2;//initial value of estimated SpO2
int ESpO2_ROM;
double FSpO2 = 0.7; //filter factor for estimated SpO2
double frate = 0.95; //low pass filter for IR/red LED value to eliminate AC
component
#define TIMETOBOOT 3000 // wait for this time(msec) to output SpO2
#define SCALE 88.0 //adjust to display heart beat and SpO2 in the same scale
#define SAMPLING 5 //if you want to see heart beat more precisely , set
SAMPLING to 1
#define FINGER_ON 30000 // if red signal is lower than this , it indicates your
finger is not on the sensor
#define USEFIFO
#define Greenled 8
#define Redled 9
void setup()
{
Serial.begin(9600);
Serial.println("Started");
esp.begin(115200); // We are starting serial communication
with ESP8266.
esp.println("AT"); // We do the module control with the
AT command.
Serial.println("AT sent ");
while(!esp.find("OK")){ // We wait until the module is
ready.

24
esp.println("AT");
Serial.println("ESP8266 Not Find.");
}
Serial.println("OK Command Received");
esp.println("AT+CWMODE=1"); // We set the ESP8266
module as a client.
while(!esp.find("OK")){ // We wait until the setting is
done.
esp.println("AT+CWMODE=1");
Serial.println("Setting is ....");
}
Serial.println("Set as client");
Serial.println("Connecting to the Network ...");
esp.println("AT+CWJAP=\""+agAdi+"\",\""+agSifresi+"\""); // We are
connecting to our network.
while(!esp.find("OK")); // We wait until it is connected to
the network.
Serial.println("connected to the network.");
delay(1000);
lcd.begin();
lcd.backlight();
lcd.setCursor(3,1);
lcd.print("Running......");
delay(3000);
lcd.clear();
ESpO2 = readEEPROM();
Temperature = EEPROM.read(6);
pinMode(Greenled,OUTPUT);
pinMode(Redled,OUTPUT);

25
digitalWrite(Greenled,LOW);
digitalWrite(Redled,LOW);
// Initialize sensor
while (!particleSensor.begin(Wire, I2C_SPEED_FAST)) //Use default I2C port,
400kHz speed
{
Serial.println("MAX30102 was not found. Please check wiring/power/solder
jumper at MH-ET LIVE MAX30102 board. ");
//while (1);
}

//Setup to sense a nice looking saw tooth on the plotter


byte ledBrightness = 0x7F; //Options: 0=Off to 255=50mA
byte sampleAverage = 4; //Options: 1, 2, 4, 8, 16, 32
byte ledMode = 2; //Options: 1 = Red only, 2 = Red + IR, 3 = Red + IR + Green
//Options: 1 = IR only, 2 = Red + IR on MH-ET LIVE MAX30102 board
int sampleRate = 200; //Options: 50, 100, 200, 400, 800, 1000, 1600, 3200
int pulseWidth = 411; //Options: 69, 118, 215, 411
int adcRange = 16384; //Options: 2048, 4096, 8192, 16384
// Set up the wanted parameters
particleSensor.setup(ledBrightness, sampleAverage, ledMode, sampleRate,
pulseWidth, adcRange); //Configure sensor with these settings

particleSensor.enableDIETEMPRDY();
mlx.begin();
}

void loop()
{

26
getTemperatureValue();
getHumidityValue();
uint32_t ir, red , green;
double fred, fir;
double SpO2 = 0; //raw SpO2 before low pass filtered

#ifdef USEFIFO
particleSensor.check(); //Check the sensor, read up to 3 samples

while (particleSensor.available()) {//do we have new data


#ifdef MAX30105
red = particleSensor.getFIFORed(); //Sparkfun's MAX30105
ir = particleSensor.getFIFOIR(); //Sparkfun's MAX30105
#else
red = particleSensor.getFIFOIR(); //why getFOFOIR output Red data by
MAX30102 on MH-ET LIVE breakout board
ir = particleSensor.getFIFORed(); //why getFIFORed output IR data by
MAX30102 on MH-ET LIVE breakout board
#endif

i++;
fred = (double)red;
fir = (double)ir;
avered = avered * frate + (double)red * (1.0 - frate);//average red level by low
pass filter
aveir = aveir * frate + (double)ir * (1.0 - frate); //average IR level by low pass
filter

27
sumredrms += (fred - avered) * (fred - avered); //square sum of alternate
component of red level
sumirrms += (fir - aveir) * (fir - aveir);//square sum of alternate component of
IR level
if ((i % SAMPLING) == 0) {//slow down graph plotting speed for arduino
Serial plotter by thin out
if ( millis() > TIMETOBOOT) {
float ir_forGraph = (2.0 * fir - aveir) / aveir * SCALE;
float red_forGraph = (2.0 * fred - avered) / avered * SCALE;
//trancation for Serial plotter's autoscaling
if ( ir_forGraph > 100.0) ir_forGraph = 100.0;
if ( ir_forGraph < 80.0) ir_forGraph = 80.0;
if ( red_forGraph > 100.0 ) red_forGraph = 100.0;
if ( red_forGraph < 80.0 ) red_forGraph = 80.0;
// Serial.print(red); Serial.print(","); Serial.print(ir);Serial.print(".");
float temperature = particleSensor.readTemperatureF();

if (ir < FINGER_ON){


temp = Temperature;
EEPROM.write(6,temp);
ESpO2_ROM = ESpO2;
writeEEPROM(&ESpO2_ROM);
// lcd.setCursor(0,2);
// lcd.print("Last test: ");
// lcd.setCursor(11,2);
// lcd.print(ESpO2_ROM);
// lcd.print(" ");
// lcd.print("% ");
//

28
// lcd.setCursor(0,3);
// lcd.print("Last temp: ");
// lcd.setCursor(11,3);
// lcd.print(temp);
// lcd.print(" ");
// lcd.print("*C");
lcd.begin();
lcd.setCursor(0,0);
lcd.print(" Place Finger");
lcd.setCursor(0,1);
lcd.print("tmp ");
lcd.print(temp);
lcd.print("C");
lcd.setCursor(9,1);
lcd.print("SP ");
lcd.print(ESpO2_ROM);
lcd.print("%");
beat = random(85, 90);
Serial.println(beat);
IOT();
break;
}
if(ir > FINGER_ON){
Temperature = mlx.readObjectTempC();
lcd.setCursor(0,0);
lcd.print("Oxygen % = ");
lcd.setCursor(11,0);
lcd.print(ESpO2);
//Serial.print(ESpO2);

29
lcd.print(" ");
lcd.print("% ");
lcd.setCursor(0,2);
lcd.print("beat heart = ");

lcd.print(beat);
lcd.print(" bpm");
// Temperature = Temperature+2;
lcd.setCursor(0,1);
lcd.print("Human Temp: ");
lcd.print(Temperature);
lcd.print(" *C");
if((ESpO2 >= 90) && (Temperature < 38)){
digitalWrite(Redled,LOW);
digitalWrite(Greenled,HIGH);
}
if((ESpO2 < 90) || (Temperature > 37)){
digitalWrite(Greenled,LOW);
digitalWrite(Redled,HIGH);

}
}
if ((i % Num) == 0) {
double R = (sqrt(sumredrms) / avered) / (sqrt(sumirrms) / aveir);
// Serial.println(R);

30
SpO2 = -23.3 * (R - 0.4) + 100;
ESpO2 = FSpO2 * ESpO2 + (1.0 - FSpO2) * SpO2;//low pass filter
Serial.print(SpO2);Serial.print(",");Serial.println(ESpO2);
sumredrms = 0.0; sumirrms = 0.0; i = 0;
break;
}
particleSensor.nextSample(); //We're finished with this sample so move to next
sample
// Serial.println(SpO2);
}
#endif
}

void writeEEPROM(int *data)


{
byte ByteArray[4];
memcpy(ByteArray, data, 4);
for(int x = 0; x < 4; x++)
{
EEPROM.write(x, ByteArray[x]);
}

float readEEPROM()
{
int ESpO2 = 85.0;
byte ByteArray[4];
for(int x = 0; x < 4; x++)

31
{
ByteArray[x] = EEPROM.read(x);
}
memcpy(&ESpO2, ByteArray, 4);
return ESpO2;
}

void IOT(){
esp.println("AT+CIPSTART=\"TCP\",\""+ip+"\",80"); // We connect to
Thingspeak.
if(esp.find("Error")){ // We check the connection error.
Serial.println("AT+CIPSTART Error");
}
String veri = "GET
https://api.thingspeak.com/update?api_key=0IQF6EOVSO1CNRJB"; //
Thingspeak command. We write our own api key in the key part.
veri += "&field1=";
veri += String(ESpO2_ROM);// The spo2 variable we will send
veri += "&field2=";
veri += String(beat);// The beat heart variable we will send
veri += "&field3=";
veri += String(temp);// The human temp variable we will send
veri += "&field4=";
veri += String(getTemperatureValue());// The Room temp variable we will send
veri += "&field5=";
veri += String(getHumidityValue());// The Room Humidity variable we will
send

32
veri += "\r\n\r\n";
esp.print("AT+CIPSEND="); // We give the length of data
that we will send to ESP.
esp.println(veri.length()+2);
delay(2000);
if(esp.find(">")){ // The commands in it are running
when ESP8266 is ready..
esp.print(veri); // We send the data.
Serial.println(veri);
Serial.println("Data sent.");
delay(1000);
}
Serial.println("Connection Closed.");
esp.println("AT+CIPCLOSE"); // we close the link
delay(1000);
}

String getTemperatureValue(){

dhtObject.read(dht_apin);
Serial.print(" Temperature(C)= ");
int temp = dhtObject.temperature;
Serial.println(temp);
delay(50);
lcd.setCursor(0, 3);
lcd.print("Room:");
lcd.setCursor(5, 3);
lcd.print("T:");
lcd.print(temp);

33
lcd.print(" c");
return String(temp);

String getHumidityValue(){

dhtObject.read(dht_apin);
Serial.print(" Humidity in %= ");
int humidity = dhtObject.humidity;
Serial.println(humidity);
delay(50);
lcd.setCursor(13, 3);
lcd.print("H:");
lcd.print(humidity);
lcd.print(" %");
return String(humidity);

34

You might also like