You are on page 1of 62

CHAPTER 1:

INTRODUCTION

The purpose of this project is to monitor various health parameters like Heart rate, Blood
Oxygen level, Sweat level, temperature over IoT network. We are measuring these
parameters and display them on local LCD display and send all the parameter values over
IoT network to real time website. If any of these parameters exceeds the predefined limits
then it sends alert messages to a predefined number as SMS text messages. We are also
incorporated emergency button to get emergency help from remote persons.
The entire system is based on Arduino Uno microcontroller and all the sensors are
interfaced with it. We are using two different communications in this. One is GSM network
to indicate emergency alert message to remote persons like doctors or care takers. The
other network communication is IoT based which displays all the monitored parameters in
a real time website which can be monitored across the world.
Technology is being used everywhere in our daily life to fulfill our requirements. We are
employing different sensors for different applications sometimes we may even use same
sensors differently for different applications. Whatever it may be the final output is life
has increased its speed with the technology boosters. We can not only increase the speed
of life but also increase security with good ideas to make use of this technology. This idea
to provide efficient health service to patients has given birth to the project heart beat
monitoring system with interfacing to IoT.
Heart beat monitor and display graph system is a portable and a best replacement for the
old model stethoscope which is less efficient. The heart beat rate is calculated manually
using stethoscope where the probability of error is high because the heart beat rate is in
between 70 to 90 per minute whose occurrence is less than 1 sec, so this device can be
considered as a very good alternative instead of a stethoscope.
The functioning of this device is based on the truth that the blood circulates for every one
heart beat which can be sensed by using a circuit formed by the combination of an and
LED. Depending upon the rate of circulation of blood per second the heart beat rate per
minute is calculated. This device consists of a micro controller which takes the input fro m
the heart beat sensor and calculates the heart rate of the patient. The micro controller also
takes the responsibility to convey the same information to the remote mobile using IoT.

1
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
1.1 Objective :

● To design, a user friendly system which is simple, low cost and power efficient for

Bridging the gap between the doctor and the patient.

● To integrate the features of all the hardware components used in the system which has

been developed.

● To Present and place every module carefully to perform the best working unit.

● To implement the system with the highly advanced IC’s with the help of growing

Technology.

● To make the system to function superfine in rural areas and remote areas properly.

1.2 Methodology:

An embedded system is a combination of software and hardware to perform a dedicated task.


Some of the main devices used in embedded products are Microprocessors and
Microcontrollers. So, the “IOT BASED Myocardial Infraction Detection System” uses an
Arduino microcontroller that is Arduino Uno which is interfaced with different sensors
which acquire the information continuously regarding body temperature by LM35 sensor ,
heart beat rate and oxygen content in the blood (SpO2) by pulse oximeter sensor , blood
pressure by BP sensor and sweat of the patient if required by sweat sensor and transmits this
collected information after every 15 seconds to the IoT server which is user accessible over
the internet through an IP address for the end users through the IoT module interfaced with
the Arduino.
The system also includes a GSM module, GPS module, Emergency switch, Buzzer and LCD
display unit which are interfaced with the Arduino. The GSM module sends the alert
messages, the GPS module sends the location of the patient to the registered contacts during
emergency, the emergency switch when pressed by the patient provides the alert message
along with the location through GSM and GPS module to the registered contacts. The buzzer
gives an alarm tune in case any emergency and the LCD unit displays the information
collected by the sensors and alert notifications at that time.

2
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
Chapter 2:
LITERATURE REVIEW AND RESEARCH GAP

[2.1] Patient Monitoring System Based on Internet of Things:

Literature Review :

It develop a personal health diagnosis based on the symptoms of the patient. A huge amount
of collected data is used to analyze the disease and risk of the patients. It discussed the
innovations of the new generation systems are the development of continuous monitoring
features for the patient and the improvement of workflows and productivity of medical
personal. It also emphasized the various wireless technologies and the advantages of using
those technologies.

Research Gap:
To get the information about human health in real time via IoT wearable device.

[2.2] Design of IoT Based Smart Health Monitoring and Alert System:

Literature Review :

It develop an approach to maintain health care data of a patient collected in different


geographical locations. The data is available to doctors, hospitals, laboratories etc., to check
the medical history of the patients. An intelligent systems, which detect the disinfected
articles and alerts the medical staff to wash hands after the contact with the disinfectant
articles.

Research Gap:
IOT include embedded technology which allows them to exchange information, with each
other or the Internet.

3
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
[2.3] Smart Human Health Monitoring System by using IoT:

Literature Review:

With the increasing health related problems and lack of proper solution in healthcare to
monitor the patients in the absence of doctor, the patients face serious problems and lost life
in critical conditions, Hence to overcome the absence doctor, the patients face serious
problems and lost life in critical conditions, and evaluate the status of each patient by the
doctor even in their absence in hospital or near the patient.

Research Gap:
Maintaining a database server is a must so that there is even track of previous medical record
of the patient providing a better and improved examining.

[2.4] Survey of Health Monitoring Management Using Internet of Things (IOT):

Literature Review :

Internet of Things (IoT) and cloud computing plays a vital role in today’s Tele-monitoring
health system. This system keeps track of patient’s physiological parameters through
collection of body sensors’ data using Raspberry Pi board. The patient’s health card are
developed by the doctors and displayed on a webpage where doctors and patients can access
and communicate each other without physical presence. Using cloud computing, the data
can be stored, updated and accessed from anywhere in the world. It is very suitable for rural
areas where medical facilities are not available.

Research Gap:
Not easy to deploy WSN nodes compared to wired networks.

4
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
[2.5] Smart Healthcare: Basic Health Check-up and Monitoring System for Elderly:

Literature Review:

The specialized healthcare monitoring system for elderly people is a growing need in the
aging population world. This system performs basic health checkups by measuring the body
parameters regularly and report the data to the doctors. The result data are then displayed as
statements in a web application where doctors and patients can interact with each other.
Evaluation is of two parts: 1) Qualitative interviewing and 2) Quantitative Survey. The main
challenge is to make elders equipped with for growing new technologies and to become
familiarity towards Smartphone, computer, etc.

Research Gap:
Adoption of new technologies is difficult to equip with for elders.

[2.6] Patient Monitoring System Based on Internet of Things:

Literature Review:

IoT along with smart devices reduce complexity and complications in the healthcare system.
The penetration of mobile technologies and smart devices over healthcare system cause huge
impact on the world. The full-fledge utilization of M-health and E-health applications in
today’s world is made aware to the people for improving and maintaining the good quality
of life. Apart from regular monitoring of patients condition through M-health system, the
main objective is to educate them through recommendations of healthy eating habits and
effective workout routines for improving their quality of healthy life.

Research Gap:
Recommendations are so general and not personalized for each treatment.

5
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
CHAPTER 3:

PRIOR ART SEARCH

3.1) Infant healthcare monitoring system for rural medical centre using IOT
Application No. : 201941005978 Publication No. : 08/2019

Abstract:

In real time the current procedures for infants and neonates patient monitoring system in
India with special attention for individuals become uphill task for each and every physician
in a medical centre. So they came with a device which is especially designed and developed
for infant and neonate ICU’s. In this design the sensors are used for monitoring infants and
neonates are used to measure temperature, Sp02, blood pressure, pulse rate and respiration
rate. We proposed this design for the betterment of healthcare with social responsibility.

Claim:

(a) A method for infant healthcare using IOT.


(b) A method as claimed in (a), wherein it can be used in all types of patient monitoring
system.
(c) A method as claimed in (a), wherein it uses only for neonate intensive care units.
(d) A method as claimed in (a), wherein it is used also in infant intensive care units.
(e) A method for added module in infant incubator setup.

Analysis:

This system provides intensive care units only for neonates and infants with a method for
added module in infant incubator setup.
This system uses an IOT CC3200 the first internet on chip with combined microcontroller
and 802.11 Wi-Fi connectivity to service on internet all in single IC.

6
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
3.2) IOT based real time remote patient monitoring system
Application No. : 201821036724 Publication No. : 42/2018

Abstract:

The patient’s health status is monitored through IoT which makes medical equipment more
efficient by allowing real time monitoring of patients health. In this system the sensor
acquires the data of the patient which includes the body temperature, heart pulse rate and
blood pressure rate. The patient’s health parameter get transmitted on Raspberry pi platform
which sends this data to the cloud server where the monitoring and analysis of this data is
done on any device at remote end. Thus it monitors data of all patients from various places
which reduces cost and reduces the trade-off between patient outcome and disease
management.

Claim:

(a) This system can be used to reduce the time lag in between actual requirements and
service treatment in clinical services.
(b) This system can be used to available the medical history of every patients on cloud for
real time and secure health monitoring.
(c) This system can provide real time medical services to patients on remote location.

Analysis:

The system provides the sensors and IOT module interfaced with Raspberry pi which allows
interfacing services and actuators through the general purpose I/O pins.
The Raspberry pi collects data from sensors and then it transfer wirelessly to cloud which is
the Amazon web services (AWS) cloud from which it is accessed through an android
application platform Bit care which visualizes the whole patient’s uploaded data from remote
locations.

7
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
3.3) Secure Health care system
Application No. : 201821015566 Publication No. : 21/2018

Abstract:

This proposes a system and a method for health care system and the physical parameters like
temperature, blood pressure and oxygen content related to the patient are monitored using
sensors. The IOT is utilized to send secure data sensed by the sensors and increasing quality
of life of patient. The system detects alert conditions and will send to registered first doctor
if he is not responding within threshold time then the alert will be send to another registered
doctor.

Claim:

(a) A method for monitoring old age person using IOT which comprises of group of sensors
Sensing physical parameters of the patient and transmitting the physical parameters to
storage device through network determined by control system along with an alert
Condition when the physical parameters exceed a threshold value and transmitting this
signal to the registered doctor by securing control elements positioned at the storage
Device which improve the security of physical parameters.
(b) The method in claim (a), wherein the physical parameters is temperature, blood
pressure, oximeter, etc.
(c) The method in claim (a), wherein the control elements are temperature controller, blood
pressure controller, oxygen controller.

Analysis:

The system provides a secure network system for the transmission of patient parameters to
the hospitals which is implemented as intranet, local area network, wide area network,
internet with dedicated or shared network. The shared network uses Hypertext transfer
protocol(HTTP), Transmission control protocol/Internet protocol(TCP/IP), Wireless
application protocol(WAP) to communicate with other network through routers, bridges,
servers, computing devices, storage devices, etc.
The system when detects alert conditions will send to registered first doctor if he is not
responding within threshold time then the alert will be send to another registered doctor.

8
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
3.4) Ubiquitous wearable: Smart health monitoring system
Application No. : 201841009895 Publication No. : 12/2018
Abstract:

This system proposes a design of universal health band which would address the major
health issues faced by the people. This smart band will sense the body temperature and pulse
rate as a personal health assistant. The health of the individuals is incessantly monitored and
automatically sends an alert message to relatives as well as hospitals in case of emergency.

Claim:

(a) A system for determining the body temperature and pulse rate along with the location
of the patient and forwarding messages to the registered numbers in case of emergency.
(b) The system in claim (a) consists of LM35 sensor to detect body temperature and a
SEN11574 sensor to find the pulse rate of the individual using Arduino NANO.
(c) The system in claim (a) includes additional components like batteries, wires, buzzer,
charging module.
(d) The device in claim (a) includes a GSM module for sending alert messages and a GPS
module for location of the patient.

Analysis:

The system provides a band which includes a LM35 sensor to measure the body temperature
and a SEN11574 sensor to measure pulse rate of the individual.
This system provides a GSM(SIM800L) module for sending alert message to the registered
contacts and GPS module for location of the patient interfacing with Arduino NANO
microcontroller.
The band generates an alarm for about 10 seconds in case of emergency and if the patient
fails to switch off the alarm within given time limit then it sends an alert message along with
patient’s location to the registered contacts as well as the nearby hospitals automatically.

9
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
3.5) IOT based health care system for the elderly
Application No. : 201611032136 Publication No. : 12/2018

Abstract:

This system proposes an IOT based health monitoring and management system which
consists of sensing, transportation, storage and application layers which has different
functions. This system implements an IOT platform based system which provides the
measurement of body parameters like ECG, temperature, moisture, heart rate, fall detection
and location of the patients. The device collects data from different sensors and upload it to
the cloud which is monitor through the mobile application for the patient and doctors which
contains a very simple GUI interface for reading all the parameters anywhere in the world
by using internet connectivity.

Claim:

The system,
(a) Measure body temperature.
(b) Detect perspiration.
(c) Measure heart rate.
(d) Take electrocardiogram.
(e) Locate the location of device through GPS.
(f) Upload data on cloud and fetch the cloud data on an android application.
(g) Provides an alert system for critical situation.

Analysis:

The system implements a humidity sensor(DHT11) for measuring moisture for creating safer
and comfortable environment for the patient, ECG module(AD8232) for heart beat rate
accelerometer(ADXL335) sensor for patient’s body position and GPS(NEO-6M) module for
location of the patients.
The system uses an Ethernet shield(R911105A) for fast communication of the information
data, electrode pads for fall detection with IC 7805 connected to the Arduino Mega 2560
controller.

10
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
Chapter 4:

SYSTEM DESCRIPTION

4.1 Problem Statement:


An IOT based myocardial infraction detection system provides useful physiological
information in the home. This system is useful for the heart patients who would like to avoid
a long hospital stay. The sensors are used to collect the physical parameters and transmit to
the output devices which is controlled by the microcontroller through analyzing the sensor
signals. In this project, we have to choose an appropriate sensors according to which we like
to detect and design algorithms to realize the detection. Using a single parameter monitoring
system an approach to an IOT based myocardial infraction detection system is to be designed
that extends healthcare from hospital to the patient’s home. The system collects the
parameters which includes heartbeat rate, blood pressure rate, oxygen content rate, body
temperature and sweatiness level. These data is availed for monitoring using IOT
technology.

4.2 Hardware Description:


4.2.1 Block Diagram:
The block diagram of the project and design aspect of independent modules are considered.

Fig.4.1: Block diagram of IoT based Myocardial Infraction Detection System

11
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
4.2.2 Components:
The main components of this project are:
1. Regulated power supply (RPS) unit
2. Micro controller (Arduino UNO)
3. Pulse oximeter sensor
4. Temperature sensor
5. Blood pressure sensor
6. Sweat sensor
7. Emergency Switch
8. IoT module (WIFI Modem)
9. LCD Display
10. GSM Modem
11. GPS Receiver
12. Buzzer

4.2.3 Regulated Power Supply (RPS) Unit:

a. Introduction to Power Supply:


As we know that many electronic circuits using tubes or transistors requires a DC power
supply as we cannot use DC batteries everywhere because DC batteries are costly and
require replacement once discharge. So in such cases, we need to make use of electronic
circuits which can convert ac supply into dc power supply using a rectifier-filter system,
these kinds of electronic circuits are called as DC power supply.
Rectifier-filter circuit contains an ordinary dc power supply. The output of ordinary dc power
supply remains steady as long as ac mains voltage or load is contrast. But in many electronics
circuits it very important to keep the contact DC power supply irrespective of variant ac
mains supply. There is a high possibility of circuit damage if the DC power supply is not
constant. To avoid this situation, we can make use of voltage regulating devices which can
keep the DC voltage at a constant level. So this combination of Voltage regulating devices
with the ordinary dc power supply is called as Regulated DC power supply. Regulated DC
power supply is an electrical device which produces the constant DC power
supply irrespective of variant ac mains supply.

12
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
d. What is the need for a Regulated Power supply?
We have already covered the limitations of an ordinary power supply. In an ordinary power
supply, the voltage regulation is poor i.e. D.Sc. output voltage changes considerably with
load current. Moreover, output voltage also changes due to variations in the input arc.
voltage. Thus, there is a need of regulated power supply.

e. Working of the Regulated Power supply:


The general block diagram of regulated power supply is shown below:

Fig. 4.2: Block diagram of regulated power supply

A voltage regulator is necessary to maintain a constant output dc voltage by providing line


regulation and load regulation. For this purpose, we can user A Zener-regulator,
transistorized regulator or three terminal IC regulator
IC7805 is a 5V fixed three terminal positive voltage regulator IC. The IC has features such
as safe operating area protection, thermal shut down, internal current limiting which makes
the IC very rugged. Output currents up to 1A can be drawn from the IC provided that there
is a proper heat sink. A 9V transformer steps down the main voltage, 1A bridge rectifies it
and capacitor C1 filters it and IC7805 regulates it to produce a steady 5Volt DC. The circuit
schematic is given below:

Fig. 4.3: Regulated power supply circuit

13
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
4.2.4 Arduino UNO:

Fig. 4.4: Arduino UNO


a. Overview:
The Arduino Uno is a microcontroller board based on the ATmega328. It has 14 digital
input/output pins of which 6 can be used as PWM outputs, 6 analog inputs, a 16 MHz
ceramic resonator, a USB connection, a power jack, an ICSP header, and a reset button. It
contains everything needed to support the microcontroller simply connect it to a computer
with a USB cable or power it with a AC-to-DC adapter or battery to get started. The Uno
differs from all preceding boards in that it does not use the FTDI USB-to-serial driver chip.
It features the Atmega16U2 (Atmega8U2 up to version R2) programmed as a USB-to-serial
converter. The Uno board has a resistor pulling the 8U2 HWB line to ground, making it
easier to put into DFU mode. The board has the following new features:
1.0 pinout: added SDA and SCL pins that are near to the AREF pin and two other new pins
placed near to the RESET pin, the IOREF that allow the shields to adapt to the voltage
provided from the board. In future, shields will be compatible both with the board that use
the AVR, which operate with 5V and with the Arduino Due that operate with 3.3V. The
second one is a not connected pin, that is reserved for future purposes.
"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0. The
Uno and version 1.0 will be the reference versions of Arduino which is the latest in a series
of USB Arduino boards.

14
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
b. Features:
Table 4.1: Specification of Arduino Uno
Parameter Specification
Microcontroller ATmega328
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limits) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB (ATmega328) of which 0.5 KB
used by bootloader
SRAM 2 KB (ATmega328)
EEPROM 1 KB (ATmega328)
Clock Speed 16 MHz
ADC resolution 10 bits
Analog to digital scale factor 4.9mV/℃

c. ATmega328 Microcontroller:

Fig. 4.5: a) ATmega328 IC b) Pin Diagram

Each of the 14 digital pins on the microcontroller can be used as an input or output, using
pin Mode(), digital Write(), and digital Read() functions. They operate at 5 volts. Each pin

15
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
can provide or receive a maximum of 40 mA and has an internal pull-up resistor
(disconnected by default) of 20-50 K ohams.
Somen pins have specialized functions:
Serial : 0 (RX) and 1 (TX) is used to receive (RX) and transmit (TX) TTL serial data. These
pins are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip.
External Interrupts : 2 and 3 these pins can be configured to trigger an interrupt on a low
value, a rising or falling edge, or a change in value.
PWM : 3, 5, 6, 9, 10, and 11 which provides 8-bit PWM output with the analogWrite()
function.
SPI : 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK) these pins support SPI communication
using the SPI library.
LED : 13 which is a built-in LED connected to digital pin 13. When the pin is HIGH the
LED is on and when the pin is LOW it is off.
The microcontroller has 6 analog inputs, labelled A0 through A5 each of which provide 10
bits of resolution (i.e. 1024 different values). By default they are measure from ground to 5
volts though is it possible to change the upper end of their range using the AREF pin and the
analog Reference() function.
Additionally, some pins have specialized functionality :
TWI : A4 or SDA pin and A5 or SCL pin which supports TWI communication using the
Wire library.
There are a couple of other pins on the board :
AREF : Reference voltage for the analog inputs used with analogReference().
Reset : Bring this line LOW to reset the microcontroller typically used to add a reset button
to shields which block the one on the board.
VCC: Digital supply voltage magnitude of the voltage range between 4.5 to 5.5 V for the
ATmega8 and 2.7 to 5.5 V for ATmega8L.
GND: Ground Zero reference digital voltage supply.

e. Communication:
The Arduino Uno has a number of facilities for communicating with a computer, another
Arduino, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial
communication which is available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on
the board channels this serial communication over USB and appears as a virtual com port to

16
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
software on the computer. The 16U2 firmware uses the standard USB COM drivers and no
external driver is needed. On Windows a .inf file is required. 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 USB-
to-serial 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 Uno's
digital pins. The ATmega328 also supports I2C (TWI) and SPI communication. The
Arduino software includes a Wire library to simplify use of the I2C bus and for SPI
communication it uses the SPI library.

f. Power:
The Arduino Uno can be powered via the USB connection or with an external power supply.
The power source is selected automatically. External (non-USB) power can come either
from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging
a 2.1mm centre-positive plug into the board's power jack. Leads from a battery can be
inserted in the God and Vin pin headers of the POWER connector. The board can operate
on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin
may supply less than five volts and the board may be unstable. If using more than 12V, the
voltage regulator may overheat and damage the board. The recommended range is 7 to 12
volts.
The power pins are as follows:
VIN : The input voltage to the Arduino board when it's using an external power source (as
opposed to 5 volts from the USB connection or other regulated power source). You can
supply voltage through this pin, or, if supplying voltage via the power jack, access it through
this pin.
5V : This pin outputs a regulated 5V from the regulator on the board. The board can be
supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or
the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the
regulator, and can damage your board.
3.3V : A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50
mA.
GND : Ground pins.

17
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
4.2.5 Pulse Oximeter MAX30100 sensor:

a. Overview:
The MAX300100 breakout board reads the heart rate or pulse oximetry. The chip has an
integrated optical sensor that derives its reading from emitting two wavelength of light from
the two LED’s then measures the absorbance of pulsing blood through a photodetector. The
signal is processed by a low noise analog signal processing unit and communicated to the
Microcontroller through the I2C Interface.
The MAX30100 operates from 1.8v and 3.3v voltage input and can be powered down
through software with negligible standby current, permitting the power supply to remain
connected at all times. The device is suitable for wearable devices like smart watch, medical
monitoring equipment’s, fitness assistant and smart suits. Required Components Arduino
Microcontroller, ESP8266 (Arduino IDE Integrated), Teensy MCU (Teensy Duino
Integrated), Buzzer / Alarm (Optional) LCD / OLED i2C Display (Optional) Solder Less
Breadboard Jumper Wire.

b. Features:
• Complete Pulse Oximeter and Heart-Rate sEnsor ssolution samplifies the dsign.
• Integrated LEDs, Photo Sensor, and High-Performance Analog front -end.
• Tiny 5.6mm x 2.8mm x 1.2mm 14-Pin optically enhanced system-in-package.
• Ultra-low-power operation increasing the battery life for wearable devices.
• Programmable sample rate and LED current for power savings.
• Ultra-low shutdown current (0.7µA, typ).
• Advanced functionality which improves measurement performance.
• High SNR which provides robust motion artifact resilience.
• Integrated ambient light cancellation.
• High sample rate capability.
• Fast data output capability.

18
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
Table 4.2: Specifications of pulse oximeter
Parameter Specification
Power Supply 1.8-2.0 v
LED power supply 3.3-5.0 v
Supply current 600-1200 µA
Shutdown current 0.7 µA
ADC resolution 14 bits
Operating temperature -40℃ - +85℃
LED peak wavelength 650nm
Serial clock frequency 400kHz

c. Operation:

Fig. 4.6: a) Pulse oximeter MAX30100 b) Operation of a pulse oximeter

Operation of the pulse oximeter utilizing PPG to measure oxygen saturation. Figure 4.10
above shows the operation of a pulse oximeter. On the left is a depiction of transmission
pulse oximetry and on the right is a depiction of reflection pulse oximetry. As shown in the
figure, both the LED and the photodetector are placed on the same side of the finger in the
reflection pulse oximetry while the LED and the photodetector are placed on the opposite
sides of the finger in the transmission pulse oximetry. The PPG waveform consists of two
components, the pulsatile AC component, which is attributed to the cardiac synchronous
changes in the arterial blood volume per heart three beat and the slowly varying or relatively
constant DC component, which is attributed to respiration, sympathetic nervous system
activity and thermoregulation. Light absorption by different tissues showing the PPG
waveform based on arterial blood absorption at the top. The PPG waveform with its AC and
DC components. While the AC component represents variable arterial blood absorption, the
DC component represents relatively constant blood absorption by the arteries, veins, tissues
and bones. These two components are relevant for determining the amount of oxygen in the
blood but only the AC component is needed for calculating the heart rate, where each spike

19
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
in the wave represents a single heartbeat. PPG is applied in the development of various
commercially available health monitoring and measuring devices such as oximeter, for
measuring blood oxygen saturation, heart rate meter for heart rate measurement, and blood
pressure monitor.

4.2.6 LM35 Temperature sensor:

a. Overview:
A temperature sensor is a thermocouple or a resistance temperature detector (RTD) that
gathers the temperature from a specific source and alters the collected information into
understandable type for an apparatus or an observer. Temperature sensors are used in several
applications namely HV system and AC system environmental controls, medical devices,
food processing units, chemical handling, controlling systems, automotive under the hood
monitoring and etc.
LM35 Temperature sensor uses the LM35 integrated circuit. Can be used in numerous
weather detection applications for home automation / weather monitoring. Breakout board
format allows for easy interfacing with Arduino.
The LM35 datasheet specifies that this ICs are precision integrated-circuit temperature
sensors, whose output voltage is linearly proportional to the Celsius (Centigrade)
temperature.
The LM35 thus has an advantage over linear temperature sensors calibrated in ˚ Kelvin, as
the user is not required to subtract a large constant voltage from its output to obtain
convenient Centi-grade scaling. The LM35 does not require any external calibration or
trimming to provide typical accuracies of ±1⁄4˚C at room temperature and ±3⁄4˚C over a
full −55 to +150˚C temperature range.

Fig.4.7: a) LM35 sensor b) Inside view

20
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
b. Features:
Table 4.3: Specifications of LM35 sensor
Parameter Specification
o
Calibration Celsius (Centigrade)
Operating temperature −55oC to +150oC
Operating voltage 4V - 30V
Current drain Less than 60 µA
Nonlinearity ±1⁄4oC typical
Accuracy 0.5oC
Linear scale factor + 10.0 mV/oC
Impedance output 0.1 Ω for 1 mA load

c. Pin Description:
Table 4.4: Description of pins of LM35 sensor
Pin No. Function Name
1 Supply Voltage: 5V(+35V to -2V) VCC
2 Output Voltage( +6V to -1V) Output
3 Ground( 0V) Ground

4.2.7 Blood Pressure Sensor:

a. Overview:
Blood pressure is the pressure of the blood in the arteries as it is pumped around the body
by the heart. When your heart beats, it contracts and pushes blood through the arteries to the
rest of your body. This force creates pressure on the arteries. Blood pressure is recorded as
two numbers— the systolic pressure (as the heart beats) over the diastolic pressure (as the
heart relaxes between beats). The unit which measures this is called Sphygmomanometer.
Monitoring blood pressure at home is important for many people, especially if you have high
blood pressure. Blood pressure does not stay the same all the time. It changes to meet your
body’s needs. It is affected by various factors including body position, breathing or
emotional state, exercise and sleep. It is best to measure blood pressure when you are relaxed
and sitting or lying down.

21
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
b. Classification of blood pressure for adults (18 years and older):

Table 4.5: Classification of blood pressure rate


Condition Systolic (mm Hg) Diastolic (mm Hg)
Hypotension < 90 < 60
Desired 90–119 60–79
Prehypertension 120–139 80–89
Stage 1 Hypertension 140–159 90–99
Stage 2 Hypertension 160–179 100–109
Hypertensive Crisis ≥ 180 ≥ 110

High blood pressure (hypertension) can lead to serious problems like heart attack, stroke or
kidney disease. High blood pressure usually does not have any symptoms, so you need to
have your blood pressure checked regularly.
Blood Pressure & Pulse reading are shown on display with serial out for external projects of
embedded circuit processing and display. Shows Systolic, Diastolic and Pulse Readings.
Compact design fits over your wrist like a watch. Easy to use wrist style eliminates pumping.

Fig.4.8: Blood pressure sensor


c. Features:
 Intelligent automatic compression and decompression.
 Easy to operate, switching button to start measuring.
 60 store groups memory measurements.
 Can read single or all measures.
 3 minutes automatic power saving device.
 Intelligent device debugging, automatic power to detect.
 Local tests for wrist circumference as 135-195mm.
 Large-scale digital liquid crystal display screen, Easy to Read Display.
 Fully Automatic, Clinical Accuracy, High-accuracy.
 Power by External +5V DC.
 Serial output data for external circuit processing or display.

22
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
Table 4.6: Specification of blood pressure sensor
Parameter Specification
Operating Voltage 5V
Operating Current 200mA
Output format 8 bits, no parity, 1 stop bit
Serial data baud rate 9600
Sensing unit wire length 2m
Pressure range 0mm Hg to 258mm Hg
Maximum pressure without permanent 1550mm Hg
damage
Accuracy ±1mm Hg
Operating temperature -20℃ to 85℃
Combined linearity and hysteresis ±0.25%
Response time 1 ms

d. Sensor Pinouts:
 TX-OUT = Transmit output. Output serial data of 3V logic level, usually connected
to RXD pin of microcontrollers/RS232/USB-UART.
 +5V = Regulated 5V supply input.
 GND = Board Common Ground.
e. Output Readings:
Following are example output readings from sensor. Each reading consist of 15 bytes at 9600
baud rate. The reading packet's last byte is always enter key character(0x0A in hex and 10
in decimal) so you can view each reading on new line. Also this character can be used to
sync in microcontrollers after reach readings.
The output reading is 8bit value in ASCII format fixed digits, from 000 to 255.
Typical reading will be like below where the three values separated by comma and space.
Systolic, Diastolic, Pulse
129, 107, 095

23
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
4.2.8 Sweat Sensor:

Fig.4.9: PCB designed sweat sensor


a. Overview:
This sensor is a PCB designed based type sensor printed on the flexible sheet with the design
as shown in the above figure 4.14. In this sensor the current is supplied to one end of the
plate when the sweat drop comes on the sensor due to presence of salty content in the sweat
the sensor conducts the current and comes out from another end of the plate thus sensing the
sweat content parameter to the microcontroller and display to the LCD and IoT server
through IoT module connected to it. If the conduction is through smaller gap as shown in
the figure then it will display low sweat and if the conduction is through bigger gap as shown
in the figure then it will display high sweat with a buzzer alarm. This sensor performs
functions like a switch.

4.2.9 Switch:

a. Overview:
A switch is an electrical component that can "make" or "break" an electrical circuit,
interrupting the current or diverting it from one conductor to another. The mechanism of a
switch removes or restores the conducting path in a circuit when it is operated. It may be
operated manually, for example, a light switch or a keyboard button, may be operated by a
moving object such as a door, or may be operated by some sensing element for pressure,
temperature or flow.
In the project the switch is used for following:
1) For the activation of the Blood Pressure sensor initialization.
2) For emergency help when pressed by the patient which sends the alert messages as well
as location to the registered contacts in emergency.

24
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
4.2.10 IoT Module:

Fig.4.10: IoT ESP8266 module


a. Overview:
Espressif’s ESP8266EX delivers highly integrated Wi-Fi SoC solution to meet user’s
continuous demands for efficient power usage, compact design and reliable performance in
the Internet of Things industry. With the complete and self-contained Wi-Fi networking
capabilities, ESP8266EX can perform either as a standalone application or as the slave to a
host MCU. When ESP8266EX hosts the application, it promptly boots up from the flash.
The integrated highspeed cache helps to increase the system performance and optimize the
system memory. Also, ESP8266EX can be applied to any microcontroller design as a Wi-Fi
adaptor through SPI/SDIO or UART interfaces.
ESP8266EX integrates antenna switches, RF balun, power amplifier, low noise receive
amplifier, filters and power management modules. The compact design minimizes the PCB
size and requires minimal external circuitries. Besides the Wi-Fi functionalities,
ESP8266EX also integrates an enhanced version of Tensilica’s L106 Diamond series 32-bit
processor and on-chip SRAM. It can be interfaced with external sensors and other devices
through the GPIOs. Software Development Kit (SDK) provides sample codes for various
applications. Espressif Systems’ Smart Connectivity Platform (ESCP) enables sophisticated
features including:
• Fast switch between sleep and wakeup mode for energy-efficient purpose.
• Adaptive radio biasing for low-power operation.
• Advance signal processing.
• Spur cancellation and RF co-existence mechanisms for common cellular, Bluetooth, DDR,
LVDS, LCD interference mitigation.

25
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
b. Features:
Table 4.7: Specification of ESP8266 module
Parameter Specification
Processor L106 32-bit RISC microprocessor core based on
the Tensilica Xtensa Diamond Standard 106Micro
running at 80 MHz.
Memory 32 KiB instruction RAM
32 KiB instruction cache RAM
80 KiB user-data RAM
16 KiB ETS system-data RAM
External QSPI flash Up to 16 MiB is supported (512 KiB to 4 MiB
typically included).
Wi-Fi IEEE 802.11 b/g/n
ADC (successive approximation 10 bits
ADC)
Frequency range 2.4GHz – 2.5GHz
TX power 802.11b: +20dBm
802.11g: +17dBm
802.11n: +14dBm
RX sensitivity 802.11b: -91dBm (11 Mbps)
802.11g: -75dBm (54 Mbps)
802.11n: -72dBm (MCS7)
Antenna PCB trace, external, IPEX connector, ceramic chip
Peripheral interface UART/SDIO/SPI/I2C/I2S/IR remote control
GPIO/ADC/PWM/LED light & button
Operating voltage 2.5V – 3.6V
Operating current 80mA
Operating temperature -40℃ to +125℃
WiFi mode Station/SoftAP/ SoftAP+ station
Security WPA/WPA2
Encryption WEP/TKIP/AES
Firmware upgrade UART download/OTA (via network)
Software development Supports cloud server development / Firmware and
SDK for fast on chip programming
Network protocol IPv4, TCP/UDP/HTTP
User configuration AT instruction set, Cloud server, Android/IOS app

d. Steps to post the data on the website:


1. Testing the module:
To test the Esp8266 module, test it first by sending AT Commands manually to it by using
the Arduino by arranging the connection as:
Pin 0 Arduino (Rx pin) - Rx Pin Module
Pin 1 Arduino (Tx pin) - Tx Pin Module

26
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
Then upload an empty code (void setup () {} void loop () {}) into the Arduino and open the
serial monitor window to type the commands with the 9600 baud rate. The Esp8266 responds
to a few commands called AT Commands.
After checking the module is working correctly by responding positively to the commands
which is sent then finally move to the next step and start your HTTP post project.
2. Create a website:
Create a website from plenty of free domain and hosting websites available. For creating a
free website use their free subdomain service then just follow their instructions and should
receive an email that lists your FTP Username and FTP Password and your website will be
fully functional within 24 hours. After that use the software which allows to send the files
(php, HTML, images ...) from your computer to the host servers. Before sending any file
make a file for example if we need to make a php file that we will name httppost.php using
NotePad ++. After creating the php server file, send that file to the servers that host your
website and this is where the software comes into accomplish that first need to establish a
connection between computer and the host servers then by right-click on the file which is
require to send, in this case esp8266.php and then transfer.

Fig. 4.11: ESP8266.php code example

3. Sending the data:


For sending the data the Hypertext Transfer Protocol (HTTP) is designed to enable
communications between clients and servers.
HTTP works as a request-response protocol between a client and server. A web browser may
be the client and an application on a computer that hosts a web site may be the server. For

27
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
example: A client (browser) submits an HTTP request to the server; then the server returns
a response to the client. The response contains status information about the request and may
also contain the requested content. On our example the esp8266 is the client and the server
that is hosting our website is the server.
So performing an HTTP Post request has to be under a certain form:
POST /esppost.php HTTP/1.0
Host: serverconnect.site88.net
Accept: */*
Content-Length: "name1=value1&name2=value2".Length
Content-Type: application/x-www-form-urlencoded
name1=value1&name2=value2
4.2.11 LCD Display:

A. LCD Background:
One of the most common devices attached to a micro controller is an LCD display. Some of
the most common LCD’s connected to the many microcontrollers are 16x2 and 20x2
displays. This means 16 characters per line by 2 lines and 20 characters per line by 2 lines,
respectively.

b. Basic 16x2 Characters LCD:

Fig.4.12: LCD Pin diagram

28
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
d. Circuit Description:

Fig.4.13: LCD circuit schematic


Above is the quite simple schematic. The LCD panel's Enable and Register Select is
connected to the Control Port. The Control Port is an open collector / open drain output.
While most Parallel Ports have internal pull-up resistors, there is a few which don't.
Therefore by incorporating the two 10K external pull up resistors, the circuit is more portable
for a wider range of computers, some of which may have no internal pull up resistors.
We make no effort to place the Data bus into reverse direction. Therefore we hard wire the
R/W line of the LCD panel, into write mode. This will cause no bus conflicts on the data
lines. As a result we cannot read back the LCD's internal Busy Flag which tells us if the LCD
has accepted and finished processing the last instruction. This problem is overcome by
inserting known delays into our program.
The 10k Potentiometer controls the contrast of the LCD panel. Nothing fancy here. As with
all the examples, I've left the power supply out. We can use a bench power supply set to 5v
or use an onboard +5 regulator. Remember a few de-coupling capacitors, especially if we
have trouble with the circuit working properly.

29
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
4.2.12 GSM Modem:
a. Overview:
GSM stands for Global System for Mobile communications which is important as the
world’s most widely used cell phone technology. Cell phones use a cell phone service
carrier’s GSM network by searching for cell phone towers in the nearby area. Global system
for mobile communication (GSM) is a globally accepted standard for digital cellular
communication.
GSM is the name of a standardization group established in 1982 to create a common
European mobile telephone standard that would formulate specifications for a pan-European
mobile cellular radio system operating at 900 MHz. It is estimated that many countries
outside of Europe will join the GSM partnership.

Fig.4.14: GSM SIM800L module

b. Features:
Table 4.8: Specification of GSM800L module
Parameter Specification
GSM frequency Quad band
GSM850/EGSM900/DCS1800/PCS1900MHz
GPRS connectivity Multi-slot class 12/class 10(optional)
Coding schemes CS-1, CS-2, CS-3 and CS-4
Supply voltage 3.4V – 4.4V
Operating temperature -40℃ to +85℃
Transmitting power Class 4 (2W) at GSM850 and EGSM900
Class 1 (1W) at DCS1800 and PCS1900
GPRS data transfer rate Maximum 85.6 kbps (uplink and downlink)
CSD Support CSD transmission
CSD transmission rate 2.4, 4.8, 9.6, 14.4 kbps
PBCCH Supports Packet Broadcast Control Channel
USSD Supports Unstructured Supplementary Service Data
SMS MT, MO, CB, Text and PDU mode

30
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
SMS storage : SIM card
SIM interface Supports SIM card : 1.8V, 3V
External antenna Antenna pad
Audio feature Tricodec : Half rate (HR), Full rate (FR), Enhanced
full rate (EFR)
Hands free operation
Echo cancellation
Adaptive multi rate
User Interface AT commands
Drivers Microsoft windows mobile RIL driver
MUX driver
Physical characteristics Dimensions: 15.8x17.8x2.4 mm.
Weight: 1.35g
Real time clock Supports RTC
Firmware upgrade Main serial port or USB port

4.2.13 GPS Receiver:

a. Overview :
The NEO-6 module series is a family of stand-alone GPS receivers featuring the high
performance u-blox 6 positioning engine. These flexible and cost effective receivers offer
numerous connectivity options in a miniature 16 x 12.2 x 2.4 mm package. Their compact
architecture and power and memory options make NEO-6 modules ideal for battery operated
mobile devices with very strict cost and space constraints. The 50-channel u-blox 6
positioning engine boasts a Time-To-First-Fix (TTFF) of under 1 second. The dedicated
acquisition engine, with 2 million correlators, is capable of massive parallel time/frequency
space searches, enabling it to find satellites instantly. Innovative design and technology
suppresses jamming sources and mitigates multipath effects, giving NEO-6 GPS receivers
excellent navigation performance even in the most challenging environments.

31
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
Fig. 4.15: GPS NEO-6 module
b. Features:
Table 4.9: Specification of GPS NEO-6 module
Parameter Specification
Receiver Type 50 Channels
GPS L1 frequency (1575.42 MHz)
C/A code
SBAS WAAS, EGNOS, MSAS
Operating voltage 2.7V-3.6V
Interfaces UART, USB, SPI, DDC(I2C compliant)
Real time clock Support RTC crystal
Sensitivity -161dBm Tracking and navigation
-160dBm Reacquisition
-147dBm cold start(without aiding)
-156dBm hot start
Time pulse frequency range 0.25 Hz to1 kHz
Navigation update rate 5Hz maximum
Horizontal position accuracy 2.5m GPS
2.0m SBAS
SBAS+ppp < 1m(2D,R50)
SBAS+ppp < 2m(3D,R50)
Velocity accuracy 0.1m/s
Heading accuracy 0.5 degrees
Operational limits Dynamics <= 4g
50,000m altitude
500m/s velocity
Serial baudrate 4800 – 230400bps (default 9600bps)
Communication protocol NMEA, UBX binary, RTCM
Operating temperature -40℃ to +85℃
Operating current 45mA
TXD/RXD impedance 510 ohms

32
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
4.2.14 Buzzer:

a. Overview :
Basically, the sound source of a piezoelectric sound component is a piezoelectric diaphragm.
A piezoelectric diaphragm consists of a piezoelectric ceramic plate which has electrodes on
both sides and a metal plate (brass or stainless steel, etc.). A piezoelectric ceramic plate is
attached to a metal plate with adhesives. Applying D.C. voltage between electrodes of a
piezoelectric diaphragm causes mechanical distortion due to the piezoelectric effect. For a
misshaped piezoelectric element, the distortion of the piezoelectric element expands in a
radial direction. And the piezoelectric diaphragm bends toward the direction. The metal plate
bonded to the piezoelectric element does not expand. Conversely, when the piezoelectric
element shrinks, the piezoelectric diaphragm bends in the direction Thus, when AC voltage
is applied across electrodes, the bending is repeated, producing sound waves in the air.
To interface a buzzer the standard transistor interfacing circuit is used. Note that if a different
power supply is used for the buzzer, the 0V rails of each power supply must be connected to
provide a common reference.
If a battery is used as the power supply, it is worth remembering that piezo sounders
draw much less current than buzzers. Buzzers also just have one ‘tone’, whereas a
piezo sounder is able to create sounds of many different tones.
To switch on buzzer -high 1
To switch off buzzer -low 1

Fig.4.16: Buzzer

33
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
4.3 Software Description:

This project is implemented using following software’s :


 Arduino Software - for compilation part.
 X-Loader – for loading code on the hardware for simulation part.

4.3.1 Arduino software :


a. Overview :
The Arduino integrated development environment (IDE) is a cross-platform application
(for Windows, macOS, Linux) that is written in the programming language Java. It is used
to write and upload programs to Arduino compatible boards, but also, with the help of 3rd
party cores, other vendor development boards.
The source code for the IDE is released under the GNU General Public License, version 2.
The Arduino IDE supports the languages C and C++ using special rules of code structuring.
The Arduino IDE supplies a software library from the wiring project, which provides many
common input and output procedures. User-written code only requires two basic functions,
for starting the sketch and the main program loop, that are compiled and linked with a
program stub main() into an executable cyclic executive program with the GNU toolchain,
also included with the IDE distribution. The Arduino IDE employs the program avrdude to
convert the executable code into a text file in hexadecimal encoding that is loaded into the
Arduino board by a loader program in the board's firmware.
Steps to use Arduino software:
1. Download the software

Fig.4.17: Downloading page

34
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
2. In next step download library

Fig.4.18: Including the libraries

3. As Arduino doesn’t recognize the directory name, please rename it

Fig.4.19: Renaming Library

4. Launch Arduino by double click “Arduino” below

Fig.4.20: Launching the software

35
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
One example:

Fig.4.21: Using the software

Select the target board as “Arduino Uno”:

Fig.4.22: Selecting the target board

36
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
Click Sketch-> Verify/Compile:

Fig.4.23: Compiling of the code

4.3.3 XLoader:
XLoader is a software which supply the compiled versions of Arduino code without
supplying the source code to Arduino hardware for simulation of the code.
a. Uploading Arduino HEX files with XLoader:
To upload a compiled Arduino sketch (HEX file) to your Arduino board without using the
Arduino IDE with knowing the ins and outs of AVRDude or other command line
programmers convert the code into hex file into binary bootloader file and load as shown in
the figure fig.4.32.

Fig.4.24: XLoader software

37
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
4.4 Project Description:

In this the schematic diagram and interfacing of ARDUINO microcontroller with each
module is considered.

Fig.4.25: Schematic diagram of IoT based Myocardial Infraction Detection System

The above schematic diagram of IoT based health monitoring system explains the interfacing
section of each component with micro controller and heartbeat sensor. Crystal oscillator
connected to 9th and 10th pins of micro controller and regulated power supply is also
connected to micro controller and LED’s also connected to micro controller through
resistors.

38
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
4.4.1 Flowchart:
Start

Required Power Supply(RPS) Unit

LCD initialization , Displaying Project name , Team members name and


Guide’s name on the LCD screen

Displaying system ready notification on the LCD screen

Body temperature
sensor
measurement Blood pressure
sensor
measurement

Heartbeat Sweat sensor


sensor measurement
measurement

Pressing Help switch

Arduino UNO Microcontroller operation


Pressing
Reset switch
IOT ESP8266 module operation

LCD Display
No

Emergency
Yes

GPS NEO-6M Buzzer Alarm GSM SIM800L


module operation module operation

STOP

Fig 4.26: Overview of System

39
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
Fig 4.27: Pulse oximeter Sensor

40
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
Fig 4.28. Body Temperature Sensor

41
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
Fig 4.29. Blood Pressure Sensor

42
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
Fig 4.30: Sweat Sensor
:

Fig 4.31. . Emergency Help Switch

43
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
Working:
a. System:
As shown in Fig 4.27 ,System is powered on with the regulated power supply, it then system
initialisation takes place, it displays the initialisations then gives System ready notification.
After that the data is collected from the sensors and processed by the micro controller.
Then the micro controller send the data to LCD and IoT module and checks for the status.

b. Pulse-oxymeter sensor:
As shown in Fig 4.28 , this senses the Heart-beat rate and Bpm and Spo2 level in blood and
checks for the threshold limit.

c. Temperature Sensor:
As shown in Fig 4.29, this senses the body temperature in collects the information in ℃ and
displays in ℉.

d. BP Sensor:
As shown in Fig 4.30, the BP sensor is operated by the switch, which is manually operated
and it collects the data in mm Hg. And sends the data to the Micro controller

e. Sweat Sensor:
As shown in Fig 4.31, this sensor operates like a closed circuit switch, which senses the
amount of sweat and gives out as “Sweat : High” or “Sweat: Normal”.

44
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
CHAPTER 5:
Results and Discussion

Result:
The project “An IOT Based Myocardial Infraction Detection System” was designed such
that the heartbeat, blood oxygen, temperature, blood pressure, sweat level etc. and LCD
display, IoT website and GSM based SMS alerts. We could measure all the parameters
and display in real time website along with SMS alerts and Location coordinates in case of
emergency. The patient parameters are monitored through the IoT server IP address as
www.ksp.comoj.com/patienthealth.html which is created on the site www.ksp.comoj.com
which provides the following webpage. This webpage is automatically updated after every
two seconds as set while creating and shows the exact parameter which is send from the
IoT module every 15 seconds which is viewed on the PC, mobile, etc.., which is accessed
to the internet connection as follows.

Fig.5.1: Output Parameter monitoring at the User end

45
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
The following shows the alert message sent to the registered number along with the location
coordinates in the case of emergency.

Fig.5.2: Alert messages along with location at the User end

Advantages:
1. This system gives very accurate heart beat rate than the existing equipment.
2. Efficient and low cost design.
3. Low power consumption.
4. Easy to install the system.
5. Fast response.

Disadvantages:
1. Distance is limited.
2. Interfacing heart beat sensor to the Micro Controller is sensitive.

Applications:
This system can be practically implemented in real time to monitor the heart beat rate in
places like hospitals, homes, etc.

46
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
CHAPTER 6:
Conclusion and Scope of Future work

Conclusion:

Integrating features of all the hardware components used have been developed in it. Presence
of every module has been reasoned out and placed carefully, thus contributing to the best
working of the unit. Secondly, using highly advanced IC’s with the help of growing
technology, the project has been successfully implemented. Thus the project has been
successfully designed and tested.

Future Scope:

Our project “An IoT based Myocardial Infraction Detection System” is mainly intended to
design a system, which gives very accurate result than the existing devices in the present day
world. This system has a heartbeat sensor, Temperature sensor, Sweat Sensor and IoT
interfaced to the micro controller. The micro controller is programmed in such a way that it
takes input from the heart beat sensor when a finger is inserted into it and displays the value
on the PC continuously.
We can use Database to store various patients’ data for future usage.
We can use more precised sweat sensor for the sensing operation in the future.
We can use more compact system that is like a wrist watch with all these sensors
incorporated in it in the future.
We can use two way of communication system between the patient and the doctor in the
future.

47
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
REFERENCES

[1]. Jorge Gómez, "Patient Monitoring System Based on Internet of Things: A survey",
Computer Networks, Vol.54, pp. 2787-2805, 2016.

[2]. Sneha N. Malokar 1, Samadhan D. Mali2, "Patient Monitoring System Based on


Internet of Things using Raspberry pi : Key features, application and open issues",
Computer Communication, Vol.54, pp., 2016.

[3]. Giovanni Baldus, "Design of Iot Based Smart Health Monitoring and Alert System"
2016 Center for TeleInFrastuktur, Aalborg University, Denmark, P.P.

[4]. Pioggia, "Personal Health System architecture for stress monitoring and support to
clinical decisions", Computer Communications Vol.35, pp.1296-1305, 2017.

[5]. Franca Delmastro, "Pervasive communications in healthcare", Computer


Communications Vol.35, pp.1284-1295,2017.

[6]. Aruna Devi.S et al. "SMART HUMAN HEALTH MONITORING SYSTEM BY


USING IoT/ International Journal of Computer Science & Engineering Technology
(IJCSET) ISSN,2017.

[7] S. Jaiswal, R. Katake, B. Kute, S. Ranjane, and P. D. Mehetre, “Survey of Health


Monitoring Management Using Internet of Things (IOT),” Int. J. Sci. Res., vol. 5, no.
11, pp. 2243–2246, 2017.

[8] B. Thaduangta et al., “Smart Healthcare: Basic Health Check-up and Monitoring
System for Elderly,” in 2016 International Computer Science and Engineering
Conference (ICSEC), 2016, pp. 1–6.

The sites which were used while doing this project:

1. www.wikipedia.com
2. www.allaboutcircuits.com
3. www.microchip.com
4. www.howstuffworks.com

For Prior art search:

www.ipindia.nic.in

48
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
APPENDIX - A

Program Code:
The program code which is dumped in the microcontroller of our project is shown below.

#include <Arduino.h>
#include <Gpsneo.h>
#include <SoftwareSerial.h>
#include <LiquidCrystal.h>
#include <math.h>
#include <LM35.h>
#include <MAX30100.h>
#include <GSM.h>

LiquidCrystal lcd(13,12,11,10,9,8); //LCD Init GPS gps;

SoftwareSerial IoT = SoftwareSerial(255,15);


SoftwareSerial GPS = SoftwareSerial(2,255);
SoftwareSerial MYGSM = SoftwareSerial(255,3);
char data[150]; //For SMS storage

char num[16] = "+918904740098";


char num1[16] = "+919844265107";
char num1[16] = "+918050127553";

#define BUZZER 5
#define BP_CHECK 16

int mycount = 0;
MAX30100 pulseOxymeter;
float oxygen;
float tempC;
int hcount = 0;

char Systolic[4] = "120";


char Diastolic[4] = "82";
char data1[20];

void check_bp()
{
lcd.clear();

49
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
lcd.setCursor(0, 0);
lcd.print("Press BP Machine");
lcd.setCursor(0, 1);
lcd.print("Button and Wait");
delay(4000);

data1 = Serial.readString();

Systolic[0] = data1[1];
Systolic[1] = data1[2];
Systolic[2] = data1[3];
Systolic[3] = 0;

Diastolic[0] = data1[6];
Diastolic[1] = data1[7];
Diastolic[2] = data1[8];
Diastolic[3] = 0;

digitalWrite(BUZZER,HIGH);
delay(100);
digitalWrite(BUZZER,LOW);

IoT.print(Systolic);
IoT.print("/");
IoT.print(Diastolic);

lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Blood Pressure:");
lcd.setCursor(0, 1);
lcd.print(Systolic);
lcd.print("/");
lcd.print(Diastolic);
delay(5000);

}
void setup()
{
pinMode(6, INPUT); //Sweat
pinMode(7, INPUT); //Emergency
pinMode(BP_CHECK, INPUT); //BP CHECK Button
pinMode(BUZZER,OUTPUT);

50
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
lcd.begin(16, 2);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" PATIENT");
lcd.setCursor(0, 1);
lcd.print(" MONITORING");

MYGSM.begin(9600);
GPS.begin(9600);

IoT.begin(9600);

digitalWrite(BUZZER,HIGH);
delay(1000);
digitalWrite(BUZZER,LOW);
delay(2000);

lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" Project By");
lcd.setCursor(0, 1);
lcd.print(" PAVAN .H");
delay(2000);

lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" KHALANDAR.B");
lcd.setCursor(0, 1);
lcd.print(" KIRAN.K");
delay(2000);

lcd.clear();
lcd.setCursor(0, 0);
lcd.print("GUIDED BY PROF.");
lcd.setCursor(0, 1);
lcd.print(" SURESH KURI");
delay(3000);

pulseOxymeter = MAX30100_Init();

//send initial dummy values to IoT

51
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
IoT.print(94); //temperature
IoT.print("B=120/80"); //BP
IoT.print("H=72"); //Heart rate
IoT.print("O=94"); //Oxygen
IoT.print("E=NO"); //Emergency
IoT.print("S=NORMAL"); //Sweat

digitalWrite(BUZZER,HIGH);
delay(100);
digitalWrite(BUZZER,LOW);

lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" System Ready");
lcd.setCursor(0, 1);
delay(1000);
}

void loop()
{
while(1)
{
pulseoxymeter result = pulseOxymeter_getdata();

if(results)
{
digitalWrite(BUZZER,HIGH);
delay(20);
digitalWrite(BUZZER,LOW);

tempC = read_temperature(0); //LM35 temperature

lcd.clear();
lcd.setCursor(0, 0);
lcd.print("HR=");
lcd.print(result.heartBPM);
lcd.print("BPM");
lcd.print(" T=");
lcd.print(tempC);
lcd.print("F");

lcd.setCursor(0, 1);

52
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
lcd.print("SpO2=");
lcd.print(result.SaO2);
lcd.print("%");

if(digitalRead(BP_CHECK))
{
check_bp();
}
if(digitalRead(7)) //emergency Button
{
tmp_count = 15; //jump to send sms
}

tmp_count++;
if(tmp_count >= 15) //send gprs data for every 15 pulses
{
tmp_count = 0;

IoT.print(tempC); //temperature
IoT.print("H=");
IoT.print(result.heartBPM);
IoT.print("O=");
IoT.print(result.SaO2);
IoT.print("B=");
IoT.print(Systolic);
IoT.print("/");
IoT.print(Diastolic);

lcd.clear();
lcd.setCursor(0, 0);
if(digitalRead(6))
{
IoT.print("S=HIGH");
lcd.print("SWEAT: HIGH ");
digitalWrite(BUZZER,HIGH);
}
else
{
IoT.print("S=NORMAL");
lcd.print("SWEAT: NORMAL");
}

53
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
lcd.setCursor(0, 1);
if(digitalRead(7))
{
IoT.print("E=YES");
lcd.print("EMERGENCY: YES");
digitalWrite(BUZZER,HIGH);
}
else
{
IoT.print("E=NO");
lcd.print("EMERGENCY: NO");
}

digitalWrite(BUZZER,LOW);

if(tempC > 100)


{
digitalWrite(BUZZER,HIGH);
}

if(result.heartBPM > 100 )


{
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Heartrate SMS...");
delay(2000);

String msg_string;

msg_string = "";
msg_string = "http://maps.google.com/?q=";
msg_string += String(gps.location.lat(),6);
msg_string += String(",");
msg_string += String(gps.location.lng(),6);

MYGSM.println("AT+CMGS=+918904740098");
MYGSM.println("High Heartrate Alert at");
MYGSM.println(msg_string);
delay(4000);

MYGSM.println("AT+CMGS=+919844265107");
MYGSM.println("Emergency Alert at");

54
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
MYGSM.println(msg_string);
delay(4000);

MYGSM.println("AT+CMGS=+918050127553");
MYGSM.println("Emergency Alert at");
MYGSM.println(msg_string);
delay(4000);
}

if(digitalRead(7)) //emergency Button


{
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("EMERGENCY SMS...");
delay(2000);
String msg_string;
void SendTextMessage()
{
mySerial.println("AT+CMGF=1"); //To send SMS in Text Mode
delay(1000);
mySerial.println("AT+CMGS=\"+918904740098\"\r"); // change to the phone number
you using
delay(1000);
mySerial.println(""Emergency Alert at"");//the content of the message
delay(200);
mySerial.println((char)26);//the stopping character
delay(1000);
}
}
void SendTextMessage()
{
mySerial.println("AT+CMGF=1"); //To send SMS in Text Mode
delay(1000);
mySerial.println("AT+CMGS=\"+918904740098\"\r"); // change to the phone number
you using
delay(1000);
mySerial.println(""heartrate sms"");//the content of the message
delay(200);
mySerial.println((char)26);//the stopping character
delay(1000);
}
}

55
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
void SendTextMessage()
{
mySerial.println("AT+CMGF=1"); //To send SMS in Text Mode
delay(1000);
mySerial.println("AT+CMGS=\"+919844265107\"\r"); // change to the phone number
you using
delay(1000);
mySerial.println(""Emergency Alert at"");//the content of the message
delay(200);
mySerial.println((char)26);//the stopping character
delay(1000);
void SendTextMessage()
{
mySerial.println("AT+CMGF=1"); //To send SMS in Text Mode
delay(1000);
mySerial.println("AT+CMGS=\"+919844265107\"\r"); // change to the phone number
you using
delay(1000);
mySerial.println(""heartrate sms"");//the content of the message
delay(200);
mySerial.println((char)26);//the stopping character
delay(1000);
msg_string = "http://maps.google.com/?q=";
msg_string += String(gps.location.lat(),6);
msg_string += String(",");
msg_string += String(gps.location.lng(),6);

MYGSM.println("AT+CMGS=+918904740098");
MYGSM.println("Emergency Alert at");
MYGSM.println(msg_string);
delay(4000);

MYGSM.println("AT+CMGS=+919844265107");
MYGSM.println("Emergency Alert at");
MYGSM.println(msg_string);
delay(4000);

}
}
}
}

56
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
Source Code for IOT ESP8266 module:

#define USE_ARDUINO_INTERRUPTS true


#define DEBUG true
#define SSID "********" // "SSID-WiFiname"
#define PASS "************" // "password"
#define IP "" // kspcomoj.com/patienthealth.html ip

#include <SoftwareSerial.h>
#include "Timer.h"
#include <PulseSensorPlayground.h> // Includes the PulseSensorPlayground Library.
Timer t;
PulseSensorPlayground pulseSensor;

String msg = "GET /update?key=your api key";


SoftwareSerial esp8266(A0);

//Variables
const int PulseWire = (A4,A5); // PulseSensor PURPLE WIRE connected to ANALOG
PIN A4 AND A5
const int LED13 = 13; // The on-board Arduino LED, close to PIN 13.
int Threshold = 550; //for heart rate sensor
float myTemp;
int myBPM;
String BPM;
String temp;
string bp
int error;
int panic switchs;
int raw_myTemp;
float Voltage;
float tempC;
void setup()
{

Serial.begin(9600);
esp8266.begin(115200);
pulseSensor.analogInput(PulseWire);
pulseSensor.blinkOnPulse(LED13); //auto-magically blink Arduino's LED with
heartbeat.
pulseSensor.setThreshold(Threshold);

57
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
// Double-check the "pulseSensor" object was created and "began" seeing a signal.
if (pulseSensor.begin())
{
Serial.println("We created a pulseSensor Object !"); //This prints one time at Arduino
power-up, or on Arduino reset.
}
Serial.println("AT");
esp8266.println("AT");

delay(3000);

if(esp8266.find("OK"))
{
connectWiFi();
}
t.every(10000, getReadings);
t.every(10000, updateInfo);
}

void loop()
{
panic_button();
start: //label
error=0;
t.update();
//Resend if transmission is not completed
if (error==1)
{
goto start; //go to label "start"
}
delay(4000);
}

void updateInfo()
{
String cmd = "AT+CIPSTART=\"TCP\",\"";
cmd += IP;
cmd += "\",80";
Serial.println(cmd);
esp8266.println(cmd);
delay(2000);
if(esp8266.find("Error"))

58
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
{
return;
}
cmd = msg ;
cmd += "&field1="; //field 1 for BPM
cmd += BPM;
cmd += "&field2="; //field 2 for temperature
cmd += temp;
cmd += "\r\n";
Serial.print("AT+CIPSEND=");
esp8266.print("AT+CIPSEND=");
Serial.println(cmd.length());
esp8266.println(cmd.length());
if(esp8266.find(">"))
{
Serial.print(cmd);
esp8266.print(cmd);
}
else
{
Serial.println("AT+CIPCLOSE");
esp8266.println("AT+CIPCLOSE");
//Resend...
error=1;
}
}

boolean connectWiFi()
{
Serial.println("AT+CWMODE=1");
esp8266.println("AT+CWMODE=1");
delay(2000);
String cmd="AT+CWJAP=\"";
cmd+=SSID;
cmd+="\",\"";
cmd+=PASS;
cmd+="\"";
Serial.println(cmd);
esp8266.println(cmd);
delay(5000);
if(esp8266.find("OK"))
{

59
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
return true;
}
else
{
return false;
}
}

void getReadings()
{
raw_myTemp = analogRead(A1);
Voltage = (raw_myTemp / 1023.0) * 5000; // 5000 to get millivots.
tempC = Voltage * 0.1;
myTemp = (tempC * 1.8) + 32; // conver to F
Serial.println(myTemp);
int myBPM = pulseSensor.getBeatsPerMinute(); // Calls function on our pulseSensor
object that returns BPM as an "int".
// "myBPM" hold this BPM value now.
if (pulseSensor.sawStartOfBeat())
{ // Constantly test to see if "a beat happened".
Serial.println(myBPM); // Print the value inside of myBPM.
}

delay(20);
char buffer1[10];
char buffer2[10];
BPM = dtostrf(myBPM, 4, 1, buffer1);
temp = dtostrf(myTemp, 4, 1, buffer2);
}

void panic_button()
{
panic = digitalRead(8);
if(panic == HIGH)
{
Serial.println(panic);
String cmd = "AT+CIPSTART=\"TCP\",\"";
cmd += IP;
cmd += "\",80";
Serial.println(cmd);
esp8266.println(cmd);
delay(2000);

60
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
if(esp8266.find("Error"))
{
return;
}
cmd = msg ;
cmd += "&field3=";
cmd += panic;
cmd += "\r\n";
Serial.print("AT+CIPSEND=");
esp8266.print("AT+CIPSEND=");
Serial.println(cmd.length());
esp8266.println(cmd.length());
if(esp8266.find(">"))
{
Serial.print(cmd);
esp8266.print(cmd);
}
else
{
Serial.println("AT+CIPCLOSE");
esp8266.println("AT+CIPCLOSE");
//Resend...
error=1;
}
}
}

61
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI
Appendix – B

Billing of Materials :

Components Number of Price (₹)


components
Transformer (12V) 1 200
Diode (1N4007) 4 5
Capacitor (1000µF) 2 30
Resistor 2 20
Voltage Regulator (IC7805) 1 50
Connecting Wires 100 100
Arduino Uno board 1 500
Pulse oximeter MAX30100 sensor 1 300
LM35 sensor 1 350
Blood Pressure sensor 1 5000
Sweat sensor PCB design 1 150
LCD display 1 125
Switch 2 20
Buzzer 1 20
GSM SIM800L module 1 850
GPS NEO-6 module 1 900
IOT ESP8266 module 1 500
Total ₹ 9,120

62
KLS GOGTE INSTITUTE OF TECHNOLOGY, BELAGAVI

You might also like