0% found this document useful (0 votes)
5 views43 pages

Ecs Report

Uploaded by

rickyabhi030405
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)
5 views43 pages

Ecs Report

Uploaded by

rickyabhi030405
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

IOT BASED PATIENT HEALTH MONITORING SYSTEM

USING RASPBERRY PI

Submitted by:
1. N S M Karthik – 19MIS7023

2. M V S G Pardhu – 19MIS7099

3. G Lakshmi – 19MIS7044

4. S Shivani – 19MIS7073

5. T Prudhvi Teja – 19MIS7015

6. P Chandu Vardhan Reddy– 19MIS7081

Guidance of: “Prof. Syed Khasim”


ABSTRACT
With an improvement in technology and miniaturization of sensors, there have been
attempts to utilize the new technology in various areas to improve the quality of human life. One
main area of research that has seen an adoption of the technology is the healthcare sector. The
people in need of healthcare services find it very expensive this is particularly true in developing
countries.

As a result, this project is an attempt to solve a healthcare problem currently society is


facing. The main objective of the project was to design a remote healthcare system. It is comprised
of two main parts. The first part being, detection of patient’s vitals using sensors, second part was
providing the detected data for remote viewing. Remote viewing of the data enables a doctor or
guardian to monitor a patient’s health progress away from hospital premises

The Internet of Things (IoT) concepts have been widely used to interconnect the available
medical resources and offer smart, reliable, and effective healthcare service to the patients. Health
monitoring for active and assisted living is one of the paradigms that can use the IoT advantages
to improve the patient’s lifestyle.

In this project, we have presented an IoT architecture customized for healthcare


applications. The aim of the project was to come up with a Remote Health Monitoring System that
can be made with locally available sensors with a view to making it affordable if it were to be mass
produced

We designed this project to monitor temperature, humidity, Oxygen and heart-rate of the
patient using IOT. Through this we can easily send the real time information to many users and
also the doctor can monitor the patient from any place in the world. For this Internet connection is
mandatory. “Deaths due to heart attacks up by 53% in 5 years: NCRB”.

Now a day’s the death rate is increasing in India because of mainly heart attacks and reason
behind this cause is that, the patients are not getting the proper check-ups. In order to provide the
proper check-up for patient we need to monitor the health of the patients continuously and then
come to a conclusion.
In the traditional approach, the doctor needs to visit the patient’s wards for checking the
status of patient and be present near the patient all the time. In order to avoid such problems, we
can make use of the present technology in a smarter way. By this we can save many lives by
providing a quick service.

In fact, it is our primary responsibility to save the lives of frontline workers like doctors.
So, we as a team designed an IoT Based Patient Monitoring System to monitor the patient health
parameters virtually by a doctor. This can also help people in their homes who can detect
abnormalities in their health and seek medical care immediately.

The system we developed will measure a patient’s body temperature, heartbeat, and oxygen
levels in the blood and send the data to a mobile application using Messages.
TABLE OF CONTENTS

ABSTRACT

Title page. No

INTRODUCTION 1

1. PROJECT DESCRIPTION 4
1.1 Background Study 4
1.2 Problem Statement 6
1.3 Objective 7

2. LITERATURE SURVEY 9
2.1 Development and Clinical Evaluation of a Home Healthcare System Measuring 9
in Toilet, Bathtub and Bed without Attachment of Any Biological Sensors
2.2 Intelligent wireless mobile patient monitoring system 10
2.3 The real-time monitoring system for in-patient based on ZigBee 10

3. EXISTING SYSTEM 13

4. PROPOSED SYSTEM 14

5. SENSORS & MODULES 15


5.1 Components 15
5.1.1 Raspberry pi 15
5.1.2 DHT22 16
5.1.3 Max30100 17
5.1.4 Pi Camera 17
18
5.1.5 LCD
6. REQUIREMENT ANALYSIS 19
6.1 Functional Requirements 19
6.2 Non-Functional Requirements 19
6.3 Software Specifications 20
6.4 Hardware Specifications 20

7. SYSTEM DESIGN 20

8. PROCEDURE 23

9. RESULTS 23

10. CONCLUSION & FUTURE SCOPE 25

REFERENCE 26

CODE IN APPENDIX 27
Code for Raspberry pi 27
Code for Webpage 33
LIST OF FIGURES

Figure Title Page. No

1. Comparative Analysis 12

2. Existing System 14

3. Raspberry pi 3b+ 16

4. DHT22 16

5. Max30100 17

6. Pi Camera 18

7. LCD 18

8. Use case 21

9. Class Diagram 22

10. Block Diagram 22

11. Result 23

12. Webpage 24
INTRODUCTION
These days, the expansion of innovations by wellbeing specialists is exploiting these
electronic devices. IoT devices are profoundly utilized in the clinical area. For COVID-19 patients,
high blood pressure patients, hypertension patients, diabetic patients, etc., in a country territory, in
rural areas, the number of doctors is not the same as in urban areas. Medical equipment is not
readily available in rural areas, except for government medical centers.

The percentage of patients in these clinics is greater than that in government medical
facilities. Similarly, the equipment has, for the most part, ended. As a result, if an emergency arises,
this hardware component will send a report to the physicians or medical professionals as soon as
possible. The remaining work will be done by doctors based on their reports.

The IoT health-monitoring platform has provided us with a significant benefit in the
advancement of contemporary medicine. IoT devices are widely used in the medical sector. And
the technology we are talking about is a patient health monitoring system that uses the IoT. A
sensor in this health monitoring system will collect information about the patient’s health
condition. It is smaller in size, faster, and more affordable.

This system can be used to measure the oxygen saturation level, heart rate, and temperature of
the human body and display the results on a web-based platform. The physical, logical, and
application layers are the three layers of the system. It is a multiparameter monitoring system that
will monitor oxygen saturation level, heart rate, humidity, and temperature simultaneously.

The homecare is provided instead of the expensive clinical care and prevention is provided by
the efficient healthcare service. This service will help every individual by following basic
healthcare, which leads to more advantageous results.

To begin with, as an apparatus layer that enables connections using sensors and improvements,
heart rate, oxygen saturation level, respiratory flow rate, temperature, and other parameters are all
measured using sensors. The primary goal of this IoT is to enhance a cosmology-based response
with the ability to track the state of health. One of the “important indicators,” or important
measures of wellbeing in the human body, is heart rate.

1|Page
It counts how many times the heart contracts or beats per minute. Because of continuous work,
security threats, and passionate responses, the heartbeat speed changes. The resting pulse refers to
a person’s pulse while he or she is relaxed. While relaxing, a person’s pulse rate should be between
60 and 100 beats per minute after the age of ten. During exercise, the heart beats faster. There is a
recommended maximum heart rate that varies based on the person’s age. It is not just the rate at
which your heart beats that matters. The heartbeat state is also important, and an irregular beating
can indicate a serious medical problem. The heart is a powerful organ located in the center of the
chest. When the heart thumps, it transports oxygen- and nutrient-rich blood around the body while
also returning waste products.

A healthy heart supplies the body with just the appropriate amount of blood at precisely the
right time for whatever it is doing at the time. The pulse is frequently confused with the heartbeat,
which refers to how often the supply pathways expand and contract as a result of the heart’s
siphoning activity. Because the compressions of the heart create the expansion of pulse rate in the
channels that lead to a noticeable pulse, the beat rate is probably the same as the pulse. Measuring
the pulse is an instantaneous percentage of the heart in this method.

The typical pulse rate for adults over the age of ten, especially elderly people, is somewhere
between 60 and 100 beats per minute (bpm). Competitors who have been thoroughly prepared may
have a resting pulse of less than 60 beats per minute, with some reaching 40 beats per minute. It is
noticed that the heartbeats of the patients change continuously. The heart rate is not stable for
patients with chronic diseases like asthma, hypertension, heart disease, Chronic Obstructive
Pulmonary Disease (COPD), etc. In addition, for the COVID-19-affected people, the heart rate
also varies very quickly. It is critical to keep track of these patients’ heartbeats in real time, which
can be done with the help of an IoT-based real-time patient monitoring system.

While individuals with coronavirus illness feel ill, their oxygen levels are often insufficient.
Low oxygen levels could be a precursor to the need for medical intervention. Pulse oximetry is a
technology for determining the amount of oxygen-carrying hemoglobin in the blood.

Most people consider it to be a vital indicator, analogous to blood pressure. With the help of
a pulse oximeter, a light emission passes through the fingertip. By measuring how much light is
taken in as it passes through the fingertip, the oxygen level, or saturation (SpO2), is managed. In

2|Page
any case, normal SpO2 levels for humans are often greater than 95%. A small number of patients
with chronic lung disease or sleep apnea may have normal values of approximately 90%. A clinical
expert should be counseled for SpO2 perusing underneath pattern or per office convention if the
patient is a drawn-out consideration office occupant or has been recently assessed by a doctor for
coronavirus-related concerns. Supplemental oxygen or different medicines may be required.
Others in the network should contact a medical care supplier if they experience wind or when the
estimated SpO2 is less than 95%.

The CDC identifies serious sickness from coronavirus in individuals who have a respiratory
recurrence of more than 30 breaths every moment, SpO2, and a lower than 94% at room air adrift
level (or, for patients with ongoing hypoxemia, an abatement from the pattern of more than3%).

There are many patients with chronic diseases like asthma, COPD, and heart-related problems
in the world. In COVID-19-affected people, the SpO2 level changes very rapidly and, without
continuous monitoring, can cause death as well. It is essential to keep continuous real-time
monitoring of the SpO2 level of the above-mentioned patients. Body temperature is another vital
physiological parameter of humans. People with illnesses find it very essential to monitor their
body temperature. High fever is one of the main symptoms of COVID-19 patients.

It is very important to monitor the body temperature of such patients continuously. An IoT-
based real-time SpO2 level, heart rate, and temperature monitoring system is very helpful now in
the modern age. This motivates the development of an IoT-based health monitoring system.

Due to IoT-based health monitoring systems, it has become possible for users to get the
necessary physiological information while sitting at home. This system has made life easier for
elderly patients, as for them, the long way to the hospital can be both difficult and tiring. Here, we
have chosen some specific sensors to detect certain problems. The system will collect data on the
patient’s heartbeat, oxygen saturation level, temperature, and other parameters.

3|Page
Chapter 1 – PROJECT DESCRIPTION

1.1 Background study

What is a Remote Health Monitoring System?

A Remote health monitoring system is an extension of a hospital medical system where a


patient’s vital body state can be monitored remotely. Traditionally the detection systems were only
found in hospitals and were characterized by huge and complex circuitry which required high
power consumption. Continuous advances in the semiconductor technology industry have led to
sensors and microcontrollers that are smaller in size, faster in operation, low in power consumption
and affordable in cost.

This has further seen development in the remote monitoring of vital life signs of patients
especially the elderly. The remote health monitoring system can be applied in the following
scenarios:

1. A patient is known to have a medical condition with unstable regulatory body system. This
is in cases where a new drug is being introduced to a patient.
2. A patient is prone to heart attacks or may have suffered one before. The vitals may be
monitored to predict and alert in advance any indication of the body status.

3. Critical body organ situation


4. The situation leading to the development of a risky life-threatening condition. This is for
people at an advanced age and maybe having failing health conditions.

5. Athletes during training. To know which training regimes will produce better results.

In recent times, several systems have come up to address the issue of remote health monitoring.
The systems have a wireless detection system that sends the sensor information wirelessly to a
remote server. Some even adopted a service model that requires one to pay a subscription fee. In
developing countries, this is a hindrance as some people cannot use them due to cost issue
involved. There is also the issue of internet connectivity where some systems to operate, good
quality internet for a real-time remote connection is required. Internet penetration is still a problem
in developing countries.

4|Page
Many of the systems were introduced in the developed countries where the infrastructure is
working perfectly. In most cases, the systems are adapted to work in developing countries. To
reduce some of these problems there is need to approach the remote detection from a ground-up
approach to suit the basic minimal conditions presently available in developing countries.

A simple patient monitoring system design can be approached by the number of parameters it
can detect. In some instances, by detecting one parameter several readings can be calculated. For
simplicity considerations parameter detection are:

i) Single parameter monitoring system: In this instance, a single parameter is


monitored e.g., Electrocardiogram (ECG) reading. From the ECG or heartbeat
detection, several readings can be got depending on the algorithm used. An ECG
reading can give the heart rate and oxygen saturation.

ii) Multi-parameter monitoring system: This has multiple parameters being monitored
at the same time. An example of such a system can be found in High Dependency Units
(HDU), Intensive Care Units (ICU), during the surgery at a hospital theatre or Post
surgery recovery units in Hospitals. Several parameters that are monitored include the
ECG, blood pressure, respiration rate. The Multiparameter monitoring system basically
proof that a patient is alive or recovering. In developing countries, just after retiring
from their daily career routine majority of the elderly age group, move to the rural
areas. In developed countries, they may move to assisted living group homes. This is
where a remote health monitoring system can come in handy.

5|Page
1.2 Problem Statement

Remote health monitoring can provide useful physiological information in the home. This
monitoring is useful for elderly or chronically ill patients who would like to avoid a long hospital
stay. Wireless sensors are used to collect and transmit signals of interest and a processor is
programmed to receive and automatically analyze the sensor signals. In this project, you are to
choose appropriate sensors according to what you would like to detect and design algorithms to
realize your detection. Examples are the detection of a fall, monitoring cardiac signals.

Using a single parameter monitoring system an approach to a remote health monitoring system
was designed that extends healthcare from the traditional clinic or hospital setting to the patient's
home. The system was to collect a heartbeat detection system data, fall detection system data,
temperature data and few other parameters. The data from the single parameter monitoring systems
was then availed for remote detection.

During design the following characteristics of the future medical applications adhered:

a. Integration with current trends in medical practices and technology,


b. Real-time, long-term, remote monitoring, miniature, wearable sensors, and long battery
life of a designed device.
c. Assistance to the elderly and chronic patients. The device should be easy to use with
minimal buttons.

6|Page
1.3 Objective

Here the main objective is to design a Remote Patient Health Monitoring System to
diagnose the health condition of the patients. Giving care and health assistance to the bedridden
patients at critical stages with advanced medical facilities have become one of the major problems
in the modern hectic world.

In hospitals where many patients whose physical conditions must be monitored frequently
as a part of a diagnostic procedure, the need for a cost-effective and fast responding alert
mechanism is inevitable. Proper implementation of such systems can provide timely warnings to
the medical staffs and doctors and their service can be activated in case of medical emergencies.
Present-day systems use sensors that are hardwired to a PC next to the bed.

The use of sensors detects the conditions of the patient and the data is collected and
transferred using a microcontroller. Doctors and nurses need to visit the patient frequently to
examine his/her current condition. In addition to this, use of multiple microcontrollers based
intelligent system provides high-level applicability in hospitals where many patients must be
frequently monitored. For this, here we use the idea of network technology with wireless
applicability, providing each patient a unique ID by which the doctor can easily identify the patient
and his/her status of health parameters. Using the proposed system, data can be sent wirelessly to
the Patient Monitoring System, allowing continuous monitoring of the patient. Contributing
accuracy in measurements and providing security in proper alert mechanism give this system a
higher level of customer satisfaction and low-cost implementation in hospitals.

Thus, the patient can engage in his daily activities in a comfortable atmosphere where
distractions of hardwired sensors are not present. Physiological monitoring hardware can be easily
implemented using simple interfaces of the sensors with a Microcontroller and can effectively be
used for healthcare monitoring. This will allow development of such low-cost devices based on
natural human-computer interfaces. The system we proposed here is efficient in monitoring the
different physical parameters of many numbers bedridden patients and then in alerting the
concerned medical authorities if these parameters bounce above its predefined critical values.
Thus, remote monitoring and control refer to a field of industrial automation that is entering a new
era with the development of wireless sensing devices.

7|Page
The Internet of Things (IoT) platform offers a promising technology to achieve the
healthcare services, and can further improve the medical service systems. IoT wearable platforms
can be used to collect the needed information of the user and its ambient environment and
communicate such information wirelessly, where it is processed or stored for tracking the history
of the user. Such a connectivity with external devices and services will allow for taking preventive
measure (e.g., upon foreseeing an upcoming heart stroke) or provide immediate care (e.g., when a
user falls and needs help).

8|Page
Chapter 2 – LITERATURE STUDY

2.1 Development and Clinical Evaluation of a Home Healthcare System Measuring in Toilet,
Bathtub and Bed without Attachment of Any Biological Sensors

Daily monitoring of health condition at home is important for an effective scheme for early
diagnosis, treatment, and prevention of lifestyle-related diseases such as adiposis, diabetes and
cardiovascular diseases. While many commercially available devices for home health care
monitoring are widely used, those are cumbersome in terms of self-attachment of biological
sensors and self-operation of them. From this viewpoint, we have been developing a non-conscious
physiological monitoring system without attachment of any sensors to the human body as well as
any operations for the measurement.

We developed some devices installed in a toilet, a bath, and a bed and showed their high
measurement precision by comparison with simultaneous recordings of ordinary biological sensors
directly attached to the body. To investigate that applicability to the health condition monitoring,
we developed a monitoring system in combination with all the monitoring devices at hospital
rooms and previously carried out the measurements of patients' health condition.

Further, in this study, the health conditions were measured in 10 patients with
cardiovascular disease or sleep disorder. From these results, the patients’ health conditions such
as the body and excretion weight in the toilet, the ECG during taking the bath and the pulse and
respiration rate during sleeping were successfully monitored in the hospital room, demonstrating
its usefulness for monitoring the health condition of the subjects with cardiovascular disease or
sleep disorder.

9|Page
2.2 Intelligent wireless mobile patient monitoring system

Nowadays, Heart-related diseases are on the rise. Cardiac arrest is quoted as the major
contributor to the sudden and unexpected death rate in the modern stress filled lifestyle around the
globe. A system that warns the person about the onset of the disease earlier automatically will be
a boon to the society. This is achievable by deploying advances in wireless technology to the
existing patient monitoring system.

We propose the development of a module that provides mobility to the doctor and the
patient, by adopting a simple and popular technique, detecting the abnormalities in the bio signal
of the patient in advance and sending an SMS alert to the doctor through Global System for Mobile
(GSM) thereby taking suitable precautionary measures thus reducing the critical level of the
patient. Worldwide surveys conducted by World Health Organization (WHO) have confirmed that
the heart-related diseases are on the rise. Many of the cardiac-related problems are attributed to
the modern lifestyles, food habits, obesity, smoking, tobacco chewing and lack of physical
exercises etc. The post-operative patients can develop complications once they are discharged from
the hospital. In some patients, the cardiac problems may reoccur, when they start doing their
routine work. Hence the ECG of such patients needs to be monitored for some time after their
treatment.

This helps in diagnosing the improper functioning of the heart and take precautions. Some
of these lives can often be saved if acute care and cardiac surgery is provided within the so-called
golden hour. So, the need for advice on first-hand medical attention and promotion of good health
by patient monitoring and follow-up becomes inevitable.

Hence, patients who are at risk require that their cardiac health to be monitored frequently
whether they are indoors or outdoors so that emergency treatment is possible. Telemedicine is
widely considered to be part of the inevitable future of the modern practice of medicine.

10 | P a g e
2.3 The real-time monitoring system for in-patient based on ZigBee

The system is made up of two sub-systems: patient physical states data acquisition and
communication system based on ZigBee technology, and hospital monitoring and control center.
The patient physical states data acquisition and communication system monitors the main physical
parameters and movement status continuously.

The information from data acquisition system is sent to hospital monitoring center by
ZigBee wireless communication module. The monitoring center receives the information from
each patient and save them to the database, and then judges the states of the patient by fuzzy
reasoning. The data from the patient can be displayed as a graph or numeric on the monitor if it is
necessary, and then the doctor can diagnose the patient according to the recorded continuous data.

Wireless sensor network is made up of a lot of wireless sensors based on ZigBee


technology. The ZigBee technology provides a resolution for transmitting sensors’ data by wireless
communication. ZigBee technology can transmit data with a rate of 250kbps, and then it is enough
for the physical parameters of the patient. The communication distance of ZigBee node can be
over 200 meters and can be spread by add route node, and then ZigBee technology is suited to a
short distance wireless sensors network. ZigBee technology owns many virtues, such as low power
consumption, low cost, small size, free frequency, etc.

To know the physical states of in-patient, the physical parameters need to be monitored
real-time. The traditional medical test instrument is a large size and connected by wire often, and
the patient is required to be quiet during the test. In most of the hospital, the medical instruments
need to be read by doctor or nurse, and the physical parameters are tested and recorded one or two
times each day, the real-time monitoring is expensive for most of the patients, and can be only
acquirable for ICU by a nurse.

For this reason, the worsening of patient can’t be found in time, and then the patient can’t
be helped in time. For most of the patients can be monitored real-time in hospital, we should find
a new method. Consider that the movement of the patient is limited in hospital, we adopted the
ZigBee and wireless sensors network to acquire the physical parameters of the patient.

11 | P a g e
Fig 1: Comparative Analysis

12 | P a g e
Chapter 3 – EXISTING SYSTEM
In the existing system, we use active network technology to network various sensors to a
single PMS. Patients’ various critical parameters are continuously monitored via single PMS and
reported to the Doctors or Nurses in attendance for timely response in case of critical situations.
The sensors are attached to the body of the patients without causing any discomfort to them. In
this PMS we monitor the important physical parameters like body temperature, ECG, heart beat
rate and blood pressure using the sensors which are readily available. Thus, the analog values that
are sensed by the different sensors are then given to a microcontroller attached to it. The
microcontroller processes these analog signal values of health parameters separately and converts
it to digital values using ADC converter.

Now, the digitalized values from more than one microcontroller are sent to the Central
PMS. Each of the sensors attached microcontroller with a transceiver will act as a module which
has its own unique ID. Each module transmits the data wirelessly to the gateway attached to the
PC of the Central PMS. The gateway is attached to the PC i.e., Central PMS which is situated in
the medical center, is capable for selecting different patient IDs and allowing the gateway to
receive different physical parameter values the patient specified by the ID.

The software designed using Graphical User Interface (GUI) can operate on different
physical parameters of each patient, consecutively with a specified time interval for each patient

At any time, any of the doctors or nurses can log on the Central PMS and check the history
of the observed critical parameters of any of the patient attached to the network.

13 | P a g e
Fig 2: Existing System

In case of a critical situation which requires the immediate attention of the doctors or nurses
for any of the patients, the custom software will instruct the Central PMS to enable the GSM
modem to send an SMS with the patient ID. A voice call is also made to the doctors and the staffs
of the hospital. The SMS also consists of a status of the patient’s physical condition. With the help
of the patient ID, the doctor can easily identify and attend to the patient situation.

Chapter 4 – PROPOSED SYSTEM


The main objective is to design a Patient Monitoring System with two-way communication
i.e., not only the patient’s data will be sent to the doctor through SMS and email on emergencies,
but also the doctor can send required suggestions to the patient or guardians through SMS or Call
or Emails. And Patient or guardian can able to track patient’s location at any point in time through
Google Maps which would enable to send medical services in case of an emergency for non-bed
ridden patients.

14 | P a g e
Chapter 5 – SENSORS AND MODULES

5.1 COMPONENTS

 Raspberry Pi

 Raspberry Pi Camera

 LCD Display

 DHT22– Temperature and Humidity Sensor

 MAX30100 – Pulse Oximeter and Heart-rate Sensor

5.1.1 Raspberry Pi

The Raspberry Pi is a credit card-sized computer. The Raspberry Pi 3 Model B+ is an


improved version of the Raspberry Pi 3 Model B. It is based on the BCM2837B0 system-on-chip
(SoC), which includes a 1.4 GHz quad-core ARMv8 64bit processor and a powerful Video Core
IV GPU. The Raspberry Pi can run a full range of ARM GNU/Linux distributions, including
Snappy Ubuntu Core, Raspbian, Fedora, and Arch Linux, as well as Microsoft Windows 10 IoT
Core.

The Raspberry Pi 3 Model B+ has many performance improvements over the Model
B including a faster CPU clock speed (1.4 GHz vs 1.2 GHz), increased Ethernet throughput, and
dual-band WIFI. It also supports Power over Ethernet with a Power over Ethernet HAT (not
included). The MagPi Magazine has a blog post with performance benchmarks Raspberry Pi
models.

The dual-band wireless LAN comes with modular compliance certification, allowing the
board to be designed into end products with significantly reduced wireless LAN compliance
testing, improving both cost and time to market.

15 | P a g e
Fig 3: Raspberry pi 3b+

5.1.2 DHT22:

The DHT22 is a low-cost digital temperature and humidity sensor with a single wire
digital interface. It uses a capacitive humidity sensor and a thermistor to measure the
surrounding air and spits out a digital signal on the data pin (no analog input pins needed).

The sensor is calibrated and does not require extra components so you can get the
right to measuring relative humidity and temperature.

It is quite simple to use but requires careful timing to grab data. You can only get
new data from it once every 2 seconds.

Fig 4: DHT22

16 | P a g e
5.1.3 MAX30100

The MAX30100 is an integrated pulse oximetry and heartrate monitor sensor solution. It
combines two LEDs, a photodetector, optimized optics, and low-noise analog signal processing to
detect pulse oximetry and heart-rate signals.

The MAX30100 operates from 1.8V and 3.3V power supplies and can be powered down
through software with negligible standby current, permitting the power supply to always remain
connected.

Fig 5: MAX30100

5.1.4 Pi Camera

This 5-megapixel sensor with OV5647 camera module is capable of 1080p video and still
images that connect directly to your Raspberry Pi. This is the plug-and-play-compatible latest
version of the Raspbian operating system, making it perfect for time-lapse photography, recording
video, motion detection and security applications. Connect the included ribbon cable to the CSI
(Camera Serial Interface) port on your Raspberry Pi, and you are good to go!

The board itself is tiny, at around 25mm x 23mm x 9mm and weighing in at just over 3g,
making it perfect for mobile or other applications where size and weight are important. The sensor
has a native resolution of 5 megapixel, and has a fixed focus lens on board. In terms of still images,
the camera is capable of 2592 x 1944-pixel static images, and supports 1080p30, 720p60 and
640x480p90 video.

Note: This module is only capable of taking pictures and video, not sound.

17 | P a g e
Fig 6: Pi Camera

5.1.5 LCD

In LCD 16×2, the term LCD stands for Liquid Crystal Display that uses a plane panel
display technology, used in screens of computer monitors & TVs, smartphones, tablets, mobile
devices, etc. Both the displays like LCD & CRTs look the same but their operation is different.
Instead of electrons diffraction at a glass display, a liquid crystal display has a backlight that
provides light to each pixel that is arranged in a rectangular network.

Every pixel includes a blue, red, green sub-pixel that can be switched ON/OFF. Once all
these pixels are deactivated, then it will appear black and when all the sub-pixels are activated then
it will appear white. By changing the levels of each light, different color combinations are
achievable. This article discusses an overview of LCD 16X2 & its working with applications.

Fig 7: LCD

18 | P a g e
Chapter 6 – REQUIREMENT ANALYSIS

Requirement Analysis is the first and important phase of the software developing activity
in developing any kind of project effectively. We started to list out all the functionalities that my
application should provide. There have been some minor changes with respect to the
functionalities over the course of development.

6.1 Functional Requirements

• Application must have a module for login using unique credentials of a patient for the
doctor to monitor patient’s vital data.
• Application must have a module for login using unique credentials of a patient for
Guardian/Caretaker to monitor patient’s vital data.
• Location Tracking: Application must have track location option with which doctor or
guardian can track location of the patient.
• Location sender: Hardware must have a GPRS module to fetch location coordinates which
can be used to track location of patient.
• Messaging Service: Hardware must have GSM module which send’s SMS alert messages
to doctor and guardians upon any emergencies. And application must send email alerts
upon any emergencies.

6.2 Non-Functional Requirements

Non-functional requirements are not directly related to the functional behavior of the
system.

• Web application must be user friendly, simple, and interactive.


• The user interface is designed in such way that novice users with little knowledge of web,
should be able to access this application.

19 | P a g e
6.3 Software Specifications

• Operating System: Windows 7 or higher


• Platform: Debian Linux (Raspberry pi OS)
• IDE: Thonny
• Technologies used: Python

6.4 Hardware Specifications

• Microcontroller: Raspberry pi
• Sensors: Temperature and Humidity - DHT22, Heart rate and blood Oxygen – Max30100
• Micro USB power supply (Standard mobile phone charger)
• Processor speed: 1.6GHz
• RAM: 512 MB

• SD Card: 8gb or higher

Chapter 7 – SYSTEM DESIGN

System design is the process of defining the architecture, components, modules, interfaces,
and data for a system to satisfy specified requirements. Overall product architecture, the
subsystems that compose the product, and the way subsystems are allocated to processors are
depicted using the System Design. UML is used to model system designs. Unified Modelling
Language is a standard object-oriented analysis and design language. Use Case diagram and
Sequence diagram, which are types of UML diagrams, of the application are shown below.

20 | P a g e
Fig 8: Use Case

21 | P a g e
Fig 9: Class Diagram

Fig 10: Block Diagram

22 | P a g e
Chapter 8 - PROCEDURE
 The IoT health-monitoring platform has provided us with a significant benefit in the
advancement of contemporary medicine.
 IoT devices are widely used in the medical sector. And the technology we are talking about
is a patient health monitoring system that uses the IoT.
 Here, patients will measure their pulse rate and Heart Rate using the max30100 sensor and
body temperature using the DHQT22 sensor, and patients can see measurement data in the
Web page and as well as in LCD display.
 And the Doctor will also be able to see the results on webpage through the webcam attached
to the raspberry pi which updates the data for every 2 seconds.

Chapter 9 - RESULT

Fig 11: Result

23 | P a g e
Fig 12: Webpage

24 | P a g e
Chapter 10 - CONCLUSION & FUTURE SCOPE

 The design and implementation of a health monitoring system using IoT.

 This IoT-based device allows users to determine their health parameters, which could help
regulate their health over time.

 Eventually, the patients could seek medical assistance if the need arises. They could easily
share their health parameter data instantly within one application with the doctor.

 As we know, the IoT is now considered one of the most desirable solutions in health
monitoring. It makes sure that the parameter data is secured inside the cloud, and the most
important thing is that any doctor can monitor the health of any patient at any distance.

 This about an IoT-based health monitoring system using Raspberry pi that has been
developed. The system will measure a patient’s body temperature, heartbeat, and the
Oxygen levels in the blood and send the data to webpage.

 This information is also transmitted to the LCD panel, allowing the patient to see their
current health state quickly.

 Elderly patients, asthma patients, COPD patients, patients with chronic diseases, COVID-
19 patients, and diabetic patients will be able to keep their health in check over time with
the help of the system we developed.

 The sensors used in the system can be improved, and we can measure several health
parameters when additional sensors are added.
 The video feature can be added for face-to-face consultation between the doctors and
patients.
 Some more measures which are very significant to determine a patient’s condition like the
level of diabetes, respiration monitoring, etc. can be addressed as future work.

 The data, consisting medical history of many patients’ parameters and corresponding
results, can be explored using data mining, in search of consistent patterns and systematic
relationships in the disease.

 For instance, if a patient’s health parameters are changing in the same pattern as those of a
previous patient in the database, the consequences can also be estimated. If the similar
patterns are found repeatedly, it would be easier for the doctors and medical researchers to
find a remedy for the problem.

25 | P a g e
REFERENCES

❖ Ananda Mohon Ghosh; Debashish Halder; S K Alamgir Hossain, Remote health


monitoring system through IoT, 5th International Conference on Informatics, Electronics
and Vision (ICIEV)
❖ R. Kumar; M. Pallikonda Rajasekaran, An IoT patient-based monitoring system using
Raspberry Pi, 2016 International Conference on Computing Technologies and Intelligent
Data Engineering (ICCTIDE'16)
❖ Sarfraz Fayaz Khan, Health care monitoring system in the Internet of Things (IoT) by using
RFID, 2017 6th International Conference on Industrial Technology and Management
(ICITM).
❖ S. M. Riazul Islam, Daehan Kwak, MD. Humaun Kabir, “The Internet of Things for Health
Care: A Comprehensive Survey”, Date of publication June 1, 2015, DOI
10.1109/ACCESS.2015.2437951

26 | P a g e
CODES IN APPENDIX
➢ Code for Raspberry pi

from threading import Thread

import board

import digitalio

import adafruit_character_lcd.character_lcd as character_lcd

import io

import picamera

import logging

import socketserver

from threading import Condition

from http import server

import Adafruit_DHT

DHT_SENSOR = Adafruit_DHT.DHT11

DHT_PIN = 4

import time

import max30100

mx30 = max30100.MAX30100()

mx30.enable_spo2()

mx30.set_led_current(11.0,11.0)

27 | P a g e
PAGE= open("webpage.text")#WEBPAGE CODE

PAGE = PAGE.read()

time.sleep(3)

global temperature

global humidity

global h1

global s1

temperature = 0.00

humidity = 0.00

lcd_rs = digitalio.DigitalInOut(board.D7)

lcd_en = digitalio.DigitalInOut(board.D8)

lcd_d7 = digitalio.DigitalInOut(board.D18)

lcd_d6 = digitalio.DigitalInOut(board.D23)

lcd_d5 = digitalio.DigitalInOut(board.D24)

lcd_d4 = digitalio.DigitalInOut(board.D25)

lcd_columns = 16

lcd_rows = 2

lcd = character_lcd.Character_LCD_Mono(lcd_rs, lcd_en, lcd_d4, lcd_d5, lcd_d6, lcd_d7,


lcd_columns, lcd_rows)

lcd.message = " activating \n camera"

time.sleep(2)

lcd.clear()

#def senorsdata():

class StreamingOutput(object):

def __init__(self):

28 | P a g e
self.frame = None

self.buffer = io.BytesIO()

self.condition = Condition()

def write(self, buf):

if buf.startswith(b'\xff\xd8'):

self.buffer.truncate()

with self.condition:

self.frame = self.buffer.getvalue()

self.condition.notify_all()

self.buffer.seek(0)

return self.buffer.write(buf)

class StreamingHandler(server.BaseHTTPRequestHandler):

def do_GET(self):

print("success")

if self.path == '/':

self.send_response(301)

self.send_header('Location', '/index.html')

self.end_headers()

elif self.path == '/index.html':

content = PAGE.encode('utf-8')

self.send_response(200)

self.send_header('Content-Type', 'text/html')

29 | P a g e
self.send_header('Content-Length', len(content))

self.end_headers()

self.wfile.write(content)

elif self.path == '/sensor':

mx30.read_sensor()

mx30.ir, mx30.red

hb = int(mx30.ir/125)

spo2 = int(mx30.red/115)

if mx30.ir != mx30.buffer_ir :

h1 = hb

if mx30.red != mx30.buffer_red:

s1 = spo2

humidity, temperature = Adafruit_DHT.read_retry(DHT_SENSOR, DHT_PIN)

## lcd.message = "T=" + str(round(temperature,1)) + " H=" + str(round(humidity,1))


+ "% \nBPM=" + str(h1) + " o2=" + str(s1) +"% "

## global temperature

## global humidity

## global h1

## global s1

sensordata = '{"tem":'+ str(round(temperature,1)) + ',"hum":' + str(round(humidity,1))


+',"hea":'+ str(h1)+',"oxy":'+str(s1)+'}'

print(sensordata)

self.send_response(200)

self.send_header('Content-Type', 'text/plain')

self.send_header('Content-Length', len(sensordata))

self.end_headers()

30 | P a g e
self.wfile.write(sensordata.encode('utf-8'))

elif self.path == '/stream.mjpg':

self.send_response(200)

self.send_header('Age', 0)

self.send_header('Cache-Control', 'no-cache, private')

self.send_header('Pragma', 'no-cache')

self.send_header('Content-Type', 'multipart/x-mixed-replace; boundary=FRAME')

self.end_headers()

try:

while True:

with output.condition:

output.condition.wait()

frame = output.frame

## mx30.read_sensor()

## mx30.ir, mx30.red

#lcd.message = "T=" + str(round(temperature,1)) + " H=" +


str(round(humidity,1)) + "% \nBPM=" + str(h1) + " o2=" + str(s1) +"% "

self.wfile.write(b'--FRAME\r\n')

self.send_header('Content-Type', 'image/jpeg')

self.send_header('Content-Length', len(frame))

self.end_headers()

self.wfile.write(frame)

self.wfile.write(b'\r\n')

except Exception as e:

31 | P a g e
logging.warning(

'Removed streaming client %s: %s',

self.client_address, str(e))

else:

self.send_error(404)

self.end_headers()

print("oho")

class StreamingServer(socketserver.ThreadingMixIn, server.HTTPServer):

allow_reuse_address = True

daemon_threads = True

with picamera.PiCamera(resolution='320x240', framerate=10) as camera:

output = StreamingOutput()

camera.rotation = 180

camera.start_recording(output, format='mjpeg')

try:

address = ('', 8000)

server = StreamingServer(address, StreamingHandler)

server.serve_forever()

finally:

camera.stop_recording()

32 | P a g e
➢ Code for Webpage

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!DOCTYPE html>

<html lang="en">

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css"


integrity="sha384-
fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr"
crossorigin="anonymous">

<head>

<title>Health monitor</title>

</head>

<body>

<h1>REAL TIME PATIENT HEALTH MONITORING SYSTEM USING RASPBERRY


PI</h1>

<div class="video">

<img src="stream.mjpg" width="320" height="240" class ="patient"/>

<div class="text">

<p>patient live video</p>

</div>

</div>

<div class="parameters">

<p>

<i class="fas fa-heartbeat" style="font-size:30px;color:deeppink;" ></i>

<span class="pu">Heart-Rate = </span>

<span id="puvalue"></span>

33 | P a g e
<t class="units">BPM</t>

</p>

<p>

<img
src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/79/Oxygen_symbol.svg/480
px-Oxygen_symbol.svg.png" width="30" height="30" />

<span class="ox">oxygen levels = </span>

<span id="oxvalue"></span>

<t class="units">%</t>

</p>

<p>

<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS3SiB9y0-
IxLFOHKFugn1blUqIzaX1Xn8yUg&usqp=CAU" width="30" height="30" />

<span class="te">Temperature = </span>

<span id="tevalue"></span>

<t class="units">&deg;C</t>

</p>

<p>

<img src=" https://image.flaticon.com/icons/png/512/728/728093.png" width="30"


height="30" />

<span class="hu">Humidity = </span>

<span id="huvalue"></span>

<t class="units">%</t>

</p>

</div>

34 | P a g e
</body>

</html>

<style>

body {

background-image:
url("https://i.pinimg.com/736x/d5/04/1c/d5041cbbcc330ed61cd1f69e124e2789.jpg");

h1

text-align: center;

color: blue;

font-size: 20px;

text-shadow: 2px 2px 1px skyblue;

/*border-style: solid;*/

.video {

text-align: center;

.text{

position: relative;

text-align: center;

35 | P a g e
font-weight: bolder;

font-size: 10px;

font-style: italic;

.patient

border-width: 4px;

border-style: solid;

/*box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);*/

div.parameters

font-size: 20px;

margin-left: 20%;

</style>

36 | P a g e
<script>

setInterval(function() {

// Call a function repetatively with 2 Second interval

getData();

}, 6000); //6000mSeconds update rate

function getData() {

var xhttp = new XMLHttpRequest();

xhttp.onreadystatechange = function() {

if (this.readyState == 4 && this.status == 200) {

var sensorvalues = JSON.parse(this.responseText);

document.getElementById("puvalue").innerHTML = sensorvalues.hea;

document.getElementById("oxvalue").innerHTML = sensorvalues.oxy;

document.getElementById("tevalue").innerHTML = sensorvalues.tem;

document.getElementById("huvalue").innerHTML = sensorvalues.hum;

};

xhttp.open("GET", "/sensor", true);

xhttp.send();

</script>

37 | P a g e

You might also like