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

Low Cost Health Monitoring System

Submitted by
Muhammad Jawad Sadiq(Bsee14046)
Muhammad Farooq (Bsee14051)
Muhammad Ali Raza(Bsee14073)

Supervised by
Advisor Name: Dr. Kashif Riaz
Co-advisor: Dr. Sajid Ahmed

Department of Electrical Engineering


Information Technology University
Lahore, Pakistan
June 2018
Low Cost Health Monitoring System
LOW COST HEALTH MONITORING SYSTEM

A Dissertation
Presented to
The Academic Faculty

by

Muhammad Jawad Sadiq (BSEE14046)


Muhammad Farooq(BSEE14051)
Muhammad Ali Raza(BSEE14073)

In Partial Fulfillment
of the Requirements for the Degree
BS ELECTRICAL ENGINEERING in the
INFORMATION TECHNOLOGY UNIVERSITY
LAHORE, PAKISTAN

INFORMATION TECHNOLOGY UNIVERSITY


LAHORE, PAKISTAN
JUNE 2018
CERTIFICATE OF ORIGINALITY

We hereby declare that this thesis titled “Low Cost Health Monitoring System”
is our own work to the best of our knowledge. It contains no materials previously
published or written by another person, nor material which to a substantial extent has
been accepted for the award of any degree or diploma at ITU or any other education
institute, except where due acknowledgment, is made in the thesis. Any contribution
made to the research by others, with whom we have worked at ITU or elsewhere, is
explicitly acknowledged in the thesis.

We also declare that the intellectual content of this thesis is the product of my
own work, except to the extent that assistance from others in the project’s design and
conception or in style, presentation and linguistic is acknowledged. We also verified
the originality of contents through plagiarism software.

Muhammad Jawad Sadiq Signature:

Muhammad Farooq Signature:

Muhammad Ali Raza Signature:


LOW COST HEALTH MONITORING SYSTEM

Approved by:

Dr. Kashif Riaz, Advisor


Department of Electrical Engineering
Information Technology University

Dr. Sajid Ahmed, Co-advisor


Department of Electrical Engineering
Information Technology University

Date Approved: August 16, 2018


This thesis is dedicated to our respected instructors. Who always helped and

encouraged us in hopeless and hard times of our project. We also dedicate this report

to our parents. Who always support us in every circumstance of life and due to their

continuous support today we have achieved this goal.


LOW COST HEALTH
MONITORING SYSTEM

DEPARTMENT OF ELECTRICAL ENGINEERING


INFORMATION TECHNOLOGY UNIVERSITY
LAHORE, PAKISTAN
ACKNOWLEDGEMENTS

First of all we thank to Him who created this universe, Allah Almighty Who gives His

blessings to us, we also express our prays and greetings to our highly experienced, humble

respectable and remarkable talented teachers Dr. Kashif Riaz and Dr. Sajid who

appreciated and motivated us in selecting, working, researching and completing the project

and we are also thankful to our parents for encouraging, supporting and believing in our

efforts and hard work.

iv
TABLE OF CONTENTS

ACKNOWLEDGEMENTS iv

LIST OF TABLES viiii

LIST OF FIGURES xi

LIST OF SYMBOLS AND ABBREVIATIONS xviii

SUMMARY xiiii

CHAPTER 1. Introduction 1
1.1 Background 1
1.2 About Project 1
1.3 Literature Review 2
1.4 Objectives 3

CHAPTER 2. Controlling Devices and Temperature Sensing 5

2.1 Components used in hardware 5


2.1.1 Arduino 5
2.1.2 Node MCU 7
2.2 Temperature Sensor 10
2.2.1 Maximum Rating 11
2.2.2 Bit Transfer 13
2.2.3 Signal Processing Principle 13
2.2.4 Sleep Mode 14
2.2.5 Unique Features 16
2.2.7 Applications 17

2.3 Programming 18

2.3.1 Display 19

v
2.4 Output of Sensor 20

CHAPTER 3. Pulse Sensor 24


3.1 Description 24
3.1.1 Specification 24
3.1.2 Pin Out – Pulse Sensor 25
3.2 Working Principle of Pulse sensor 26
3.2.1 Pulse Sensor to Arduino 28
3.3 Running code of pulse sensor 30

CHAPTER 4. Electrocardiogram (ECG) 33

4.1 Introduction 33
4.2 Electrode Placement and Electrical Activity of Heart 36
4.3 How to read ECG 38
4.4 ECG examples of disease and their abnormalities 44
4.5 Results 48

CHAPTER 5. Conclusion 49
5.1 Cost Analysis 49
5.2 Conclusion 49
5.3 Future Scope 50

References 52

vi
vii
LIST OF TABLES

Table – 1 Pin Category and Details of Arduino

Table – 2 Technical Specifications and Maximum

Operating values of Voltage and Current

for Arduino

Table – 3 Node MCU Pins Detail and Functioning

Table – 4 Data Base for Temperature Sensor with

Instruction

Table – 5 Data Base for Pulse Sensor with

Instructions

viii
LIST OF FIGURES

Fig 0 Block diagram working steps of device 4

Fig 1 Arduino Uno (Pin Configuration) 5

Fig 2 Node MCU Pin Configuration and Connecting Map 8

Fig 3 Configuration of Temperature Sensor with Arduino 10

Fig 4 Circuit Diagram of Temperature Sensor with Arduino 11

Fig 5 Infrared Sensor with Pin Configuration 12

Fig 6 Bit Transfer Mechanism with SCL and SDA 13

Fig 7 Mechanism of Entering in Sleep Mode 15

Fig 8 Mechanism of Exiting in Sleep Mode 15

Fig 9 Programming Setup of Temperature Sensor 18

Fig 10 Output of Object Temperature and Ambient Temperature 19

Fig 11 Display of Temperature Readings on LCD 20

Fig 12 Project Setup of Sensor with Arduino and OLED (Temperature Sensor) 21

Fig 13 Output of Temperature Sensor according to Data Base 23

Fig 14 Circuit of Pulse Sensor with Arduino 24

Fig 15 Kit of Pulse Sensor with all setting materials 25

Fig 16 Pins Configurations of Pulse Sensor and Layout 26

Fig 17 Display Values of Pulse Sensor on LCD 27

Fig 18 Project Setup of Pulse Sensor with OLED 28

Fig 19 Output of Pulse Sensor according to database 30

Fig 20 Programming Setup of Pulse Sensor 31

Fig 21 Output of Pulse sensor at Serial port 32

Fig 22 ECG module 33

ix
Fig 23 Pin Configuration and Electrodes Placement 34

Fig 24 Typical ECG Signal 35

Fig 25 ECG of Normal Person (Sensor Result) 35

Fig 26 Electrodes Placement 36

Fig 27 Limb and Augmented Limb Leads 37

Fig 28 Normal and Abnormal P Waves 40

Fig 29 Depressed and Elevated ST segment 42

Fig 30 Right Bundle Branch Block 44

Fig 31 A 55 year old man with 4 hours of "crushing" chest pain 45

Fig 32 Abnormality in ECG 45

Fig 33 ECG of a heart disease patient 46

Fig 34 Abnormal wave 46

Fig 35 Abnormal ECG having complete heart disease problem 47

Fig 36 R-R Interval Difference for different waves 48

Fig 37 Normal ECG from Sensor 48

Fig 38 Normal Patient 121 from PhysioNet 49

Fig 39 Abnormal Patient 163 having dysthymia disease 49

Fig 40 Sensors Complete Output (ECG, Heart Beat and Body Temperature) 51

x
LIST OF SYMBOLS AND ABBREVIATIONS

LCD Liquid Crystal Display


MLX90614 Temperature Sensor
IDE Integrated Development Environment
PWM Pulse Width Modulation
TTL Time-to-live
EEPROM Electrically Erasable Programmable Read-Only
Memory

SRAM Static Random Access Memory

LED Light Emitting Diode


SDA Serial Data
SCL Serial Clock
MCU Multipoint Control Unit
IR Infrared
FIR Filter Finite Impulse Response
OLED Organic Light-Emitting Diode
BPM Beats Per Minutes

xi
SUMMARY

Now a day’s health problems are increasing very rapidly. People are busy in their daily

works and business at offices and industries without maintaining their health. Doctors in

hospital also have difficulty to monitoring health of patients. We need to keep them aware

with their health conditions and parameters and easy monitoring in hospitals. Therefore we

are going to manage and overcome this problem for every person and doctors by making

low cost health monitor project. This project will help and change the life of user for

monitoring their health issues and overcome health issues.

xii
CHAPTER 1 INTRODUCTION AND OBJETIVES

1.1 Background

Our project is a working model which uses sensors to measure different parameters like

body temperature, heart beat rate and ECG; a micro-controller board, Arduino, is used for

analyzing and monitoring the health of patient and any abnormality felt by the patient

causes the device to give an alarm. The device also store the data in database and this is

very useful for future analysis of patient according to the previous record. For more useful

and advance medical applications, this project can be improve by adding and empowering

with the features of blood pressure monitoring systems, dental care and respiratory systems

,therefore making it useful in hospitals as a very efficient and reliable patient care

system.[1]

1.2 About Project

This device is able to monitor pulse sensing, ECG, temperature and blood pressure at

runtime. It has pulse sensor, ECG module and temperature sensor, which are highly

accurate and precise. These all sensors are packed together in a portable device. Firstly, the

pulse sensor is used for pulse counting. The sensor gives pulse counting when it connects

with earlobe. We use a microcontroller to operate the sensor, which gives command and

show the values on a screen. A patient can easily use the pulse monitoring function and

save all values in a database. Secondly, we also monitoring the heart beat and collecting

ECG data, for this purpose we used ECG module. ECG module have three electrodes,

which attach to the body for sensing heartbeats. The module shows the graphs on the basis

of heart beats and store it in database of the patient. Thirdly, temperature sensing is the

1
most important function of device. For temperature measurement, we use infrared

temperature sensor. This sensor works when it contacts to the body. It gives highly accurate

value of temperature at runtime. These all sensors perform their tasks at the same time.[2]

1.3 Literature Review

We can easily monitor human health by analyzing the ECG pulse, temperature and blood

pressure. Firstly, we analyze the ECG pulse, that is amplified to a certain level and the

average time interval is measured, from which we can get the heart beat rate. But this

method fails to indicate heart blocks immediately and so for this purpose, photo electric

pulse transducers are used. The pulse rate monitoring method indicates and detects heart

block immediately by sensing the flow of blood circulation in the limb terminals. This

technique uses photoelectric transducers which are easy to attach and operate with the 3

ECG electrodes. Also the output signal amplitude is large with better signal to noise ratio.

The finger probe used for pulse sensing. Secondly, we discus about patient calling system.

The patient calling system consists of four switches when button pressed gives display on

the screen and turn on an audio alert indicating that a patient is calling. These switches are

placed with the monitoring device of the patient to enable medical access in an emergency.

Respiratory system is also important function. The device circuit uses a temperature sensor

for measuring the respiration rate. A thermistor is a ceramic semiconductor which shows a

change in resistance with a change in its body temperature. Thermistors has other important

advantages over another sensors in that they are available in smaller sizes, with faster

response times, at lower costs and with greater resistance to any shock and vibration

2
effects. Hardware used in the project are microcontroller-Arduino, OLED, LCD display,

MLX90614, Pulse Sensor and ECG module. These controllers and sensors have precision

high speed of processing and programmable capacity. [3]

1.4 Objectives

 Monitor health in busy and working time

 Easy monitoring of patient in hospital

 Keep aware with health conditions

 Efficient record of a patient and their treatment

1.5 Block Diagram

In this we will explain the block diagram of our project there are three sensors (pulse

sensor, IR temperature sensor, ecg module) connected with a microcontroller (Arduino or

node MCU), the microcontroller required 5 volts to operate. The microcontroller then

processed the data and displayed it on app,

OLED or screen.

3
Fig 0: Block Diagraph - Working steps of Device

4
CHAPTER 2 CONTROLLING DEVIES AND TEMPERATURE

SENSING

2.1 Components used in hardware

2.1.1 Arduino

The Arduino Uno is a microcontroller which operate our device according to instructions.

It has 14 digital input and 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, and a reset button.

The language of Arduino is a set of C and C++ languages. We use the Arduino Software

(IDE) for programming. We use this to operate our temperature, pulse and ECG sensors.

[4]

Fig 1: Arduino Uno (Pin Configuration) [4]


Arduino is a very efficient and low cost controller. We can give power to operating

components from Arduino by Vin, 3.3 v and 5v pins. It has a reset button to reset whole

running operation and refresh the device for precise measurement. It has analog pins from

A0 – A5 which provide analog input from 0-5v for operating command to the sensors.

5
There are pins from 0-13 which can be used as output and input pins for giving results.

Two pins 0(Rx) and 1(Tx) are communication pins which are serial pins and used to

transfer TTL serial data. 3, 5, 6,9,11 pins provides 8-bits PWM output. It has 32 KB flash

memory for storing data and operations, 2 KB SRAM, 1KB EEPROM and 16MHz

frequency. [5]

Pin Description

Table 1: Pin Category and Details of Arduino [6]

Pin Category Pin Name Details

Vin: Input voltage to Arduino when using an external


power source.
5V: Regulated power supply used to power
Vin, 3.3V, 5V,
Power microcontroller and other components on the board.
GND
3.3V: 3.3V supply generated by on-board voltage
regulator. Maximum current draw is 50mA.
GND: ground pins.
Reset Reset Resets the microcontroller.
Analog Pins A0 – A5 Used to provide analog input in the range of 0-5V
Input/output Digital Pins 0 –
Can be used as input or output pins.
Pins 13
Serial 0(Rx), 1(Tx) Used to receive and transmit TTL serial data.
External
2, 3 To trigger an interrupt.
Interrupts
PWM 3, 5, 6, 9, 11 Provides 8-bit PWM output.
10 (SS), 11
(MOSI), 12
SPI Used for SPI communication.
(MISO) and 13
(SCK)
Inbuilt LED 13 To turn on the inbuilt LED.
A4 (SDA), A5
TWI Used for TWI communication.
(SCA)
AREF AREF To provide reference voltage for input voltage.

6
Arduino Uno Technical Specifications

Table 2: Technical Specifications and Maximum Operating values of Voltage

and Current for Arduino [6]

Microcontroller ATmega328P– 8 bit AVR family microcontroller


Operating Voltage 5V
Recommended Input
7-12V
Voltage
Input Voltage Limits 6-20V
Analog Input Pins 6 (A0 – A5)
Digital I/O Pins 14 (Out of which 6 provide PWM output)
DC Current on I/O Pins 40 mA
DC Current on 3.3V Pin 50 mA
Flash Memory 32 KB (0.5 KB is used for Bootloader)
SRAM 2 KB
EEPROM 1 KB
Frequency (Clock Speed) 16 MHz

2.1.2 Node MCU

The new node MCU is fast, efficient and low cost WIFI technology. It has all function that

a Arduino has. The most important function is the wireless communication technology. We

can connect it with the internet and WIFI for transferring output data. We can programmed

it according to our desired and requirement of the project. it is powerful and quicker than

a Arduino as microcontroller. It is having pins D0 to D8 and RX-TX and it also use Arduino

IDE software.

7
Fig 2: Node MCU Pin Configuration and Connecting Map [7]

Below table gives NodeMCU Dev Kit IO pins and ESP8266 internal GPIO pins mapping

Table 3: Node MCU Pins Detail and Functioning [8]


Pin Names on NodeMCU Development Kit ESP8266 Internal GPIO Pin number

D0 GPIO16

D1 GPIO5

D2 GPIO4

D3 GPIO0

D4 GPIO2

D5 GPIO14

D6 GPIO12

D7 GPIO13

D8 GPIO15

8
Pin Names on NodeMCU Development Kit ESP8266 Internal GPIO Pin number

D9/RX GPIO3

D10/TX GPIO1

D11/SD2 GPIO9

D12/SD3 GPIO10

The GPIO’s shown in blue box 1, 3, 9, 10 pins are not used in the projet and mostly not used

for GPIO purpose on Dev Kit. ESP8266 is a system on a chip (SoC) design with components

like the processor chip. The processor has 16 GPIO lines, some of which are used internally to

interface with other components of the SoC. Many lines are used internally within the ESP8266

SoC, we have about 11 GPIO pins for GPIO purpose. Two pins out of 11 are generally used

for RX and TX for communication with a host PC from which code is compiled. In this only

nine general purpose Input/output pins i.e. from D0 to D8. RX, TX, SD2, SD3 pins are used

for other internal process of sensors with controller. [9]

2.2 Temperature Sensor

We used MLX90614 temperature sensor for measuring body temperature of patient,

precision and runtime operating are the qualities of the sensor. The MLX90614 is an Infra-

Red thermometer. It is used as non-contact temperature measurements. When body comes

close to the sensor it sense its temperature and show the results on screen. It has low noise

amplifier, 17-bit ADC, which convert analog values to digital values, and powerful DSP

unit, a high accuracy and resolution of the thermometer is achieved. It is fully calibrated

with PWM and SMBus output for runtime response. The 10-bit PWM present in this which

continuously transmit the measured temperature in range of -20 to 120 °C, with an output

resolution of 0.14 °C which is the unique feature of the sensor. The PWM pin can be

9
configured to act as thermal rely which is suitable for sensitive thermostats applications in

various field. [9]

Fig 3: Configuration of Temperature Sensor with Arduino [10]


The thermometer is operate in 5V compatible or 3V (battery) compatible. It has one pin for

external power Vdd and one for ground. A serial data pin which is used for data transfer.

It act as digital input/output and temperature reading is available at this pin. Serial clock

pin is also present which operate the sensor value with a particular period. This pin is use

for 2 wire communication protocol. In our project, we are operating it on 3.3v.

10
Fig 4: Circuit Diagram of Sensor with Arduino [11]

2.2.1 Maximum Rating of Temperature Sensor

Supply Voltage --------- VDD (over voltage) 7V, 5V, 7V, 5V

Supply Voltage --------- VDD (operating) 5.5 V, 3.6V, .5V, 3.6V

Reverse Voltage-------- 0.4 V

Operating Temperature Range ------------------------- TA - -40…+85°C

Storage Temperature Range ------------------------- TS - -40+105°C

ESD Sensitivity ------------------------- (AEC Q100 002) 2kV

DC current into SCL/Vz (Vz mode) ------------------------- 2 mA

DC sink current, SDA /PWM pin ------------------------- 25 mA

DC source current, SDA/PWM pin ------------------------ 25 mA

DC clamp current, SDA/PWM pin ------------------------ 25 mA

DC clamp current, SCL pin ------------------------ 25 mA

11
Fig 5: Infrared Sensor with Pin Configuration [12]

2.2.2 Bit Transfer Mechanism

The input/output data on PWM or SDA must be changed because SDA have direct relation

with SCL, when SCL is lower than min 300ns after the falling edge of SCL. The data is

extracted by both MD and SDs on the rising edge of the serial clock, there is sampling and

changing data on SCL.

12
Fig 6: Bit Transfer Mechanism with SCL and SDA [12]

2.2.4 Signal Processing Principal


The operation and working of the MLX90614 is controlled and operated by an internal

state machine which is programmed in Arduino, which controls the measurements of the

sensor. The state machine also handles the calculations of temperatures like take average

of readings. The most important function of state machine is that it does the processing of

the temperatures to output then through the PWM output.

The ASSP supports 2 IR sensors but in our project we only use one sensor. The output of

the IR temperature sensors is amplified and filtered by a low noise and low offset chopper

amplifier with programmable gain. It is then converted by a sigma delta modulator to a

single and set to a powerful DSP for further processing and this all process is operate by

Arduino. The signal is treated and processed by programmable FIR and IIR low pass filters

for further reduction of the band width and for getting accurate readings. In this process we

use input signal to achieve the desired noise free performance. The output which is from

13
IIR filter is the measurement result and is save in the internal RAM for the record of the

parameters of health .

Based on results achieves by IIR and FIR filters and after free from noise, the ambient

temperature Ta and object temperatures To are calculated. These calculated temperatures

have resolution of 0.01 °C. The data for Ta and To read in two methods i.e. reading RAM

cells which dedicated for this purpose through interfacing of the 2-wire. It has 0.02 °C

resolution and have PWM of 10 bit and this is remarkable. [12]

2.2.5 Sleep Modes of Sensor

MLX90614 can be in sleep mode by entering the command “Enter SLEEP mode” this

mode sent data through the SMBus interface from processing. This sleep mode is not

available and operate for the version of 5V supply. In this mode, we kept SCL pin low to

set the current consumption limit during sleep to 2.5uA. MLX90614 turn into default

power-up mode by setting SCL pin high and SDA pin low for at minimum tDDq=13ms.

 Entering in Sleep Mode

Fig 7: Mechanism of Entering in Sleep Mode [12]

14
 Exiting in Sleep Mode

Fig 8: Mechanism of Exiting in Sleep Mode [12]

2.2.6 Unique Features of Infrared Temperature Sensor


 Low-cost non-contact thermometer

 Output data linearly dependent on the object temperature with high accuracy and

extended resolution

 Supports versatile customization to a very wide range of temperatures, power

supplies and refresh rates

 Embedded error checking and correction mechanism provides high memory

reliability

 Both single- and dual-zone IR thermometers.

 Low power consumption and sleep mode make the thermometer ideally suited for

handheld mobile applications

15
 Dual zone non-contact temperatures measurements available via a single line

(extended PWM)

 Factory product IR thermometer have linear digital output

 Have small size and quit easy to integrate

 Standard calibration and production in temperature range:

 -40 to 125°C for ambient temperature

 -70 to 380°C for object temperature

 Have 0.5°C accuracy and perfection in the range 0-50°C

 0.01°C output resolution possible

 Have high refresh rate

 Have easy emissivity correction

 Continuously read temperature through PWM output

 For temperatures reading and reconfiguration of sensor it have 2-wire SMBus

interface

 Have capability for building blocks more than 100 thermometers

 Have high reliability for sensing and have long-term stability in any conditions

 Have remarkable ESD/EMC characteristics

 Have highly efficient power saving mode and methods for battery operation

 It can be track able because it have unique ID

 Have efficient and compatible RoHs

2.2.7 Applications of Temperature Sensor


 Can high precision, reliable and accuracy contact-less temperature measurement

 can be used for Air Conditioning control system in mobile area

16
 Can be used in defogging Windshield

 Detection mechanism of Automotive blind angle

 Presence detector of any living organism by its body temperature

 Use alarm systems by detecting heat of the place

 Use as control system for industrial temperature

 Temperature control system in electronic machines like laser printers and copiers

 Use for temperature control in home appliances i.e. Microwave ovens, stove,

heater, dryer etc.

 Healthcare is the main use

 Livestock temperature monitoring

 Use in power systems i.e. in electronic relays and lines [13]

2.3 Programming and Operating Software

In software part we use Arduino language for instructions. We use

SparkFun_MLX90614_Arduino_Library for taking temperature readings. It define all time

unit for taking inputs and outputs according to requirements.

17
Fig 9: Programming Setup of Temperature Sensor
It can give the value of temperature in both Fahrenheit and degree Celsius. We are taking

temperature of object and surrounding for our project.

2.3.1 Display of Temperature Values


We used serial. Print command to print the readings on serial port of Arduino. We can see

serial port on computer screen. We can set our require delay and time for showing values.

This method is the best for our project because we can easily observe values on screen and

store.

18
Fig 10: Output of Object Temperature and Ambient Temperature

We can see the values of temperatures on serial port of Arduino on screen. We can change

the display screen according to our requirements. We can easily use this in hospitals for

health monitoring.

Other way to display the readings is the liquid crystal display (LCD). LCD can also have

remarkable values display quality. We can use our desired size for display.

19
Fig 11: Display of Temperature Readings on LCD

2.4 Output of the Sensor

It have an internal 17-bit Analog-Digital Converter and highly efficient DSP chip to get

highly accurate values of pulses and these have 0.01 resolution. IR thermometers measures

the temperature of observed object. It measures the temperature by reflecting of infrared

rays with the body cells. When we put body near it then it detects the temperature of that

object. It can also measures the environment temperature which is surrounding the object.

20
Fig12: Project Setup of Sensor with Arduino and OLED (Temperature Sensor)

In we connect the temperature sensor with OLED. OLED has clear and high quality. In this

we use display library to show the temperature values on OLED. We connect the sensor

with Arduino and control the operation of sensor. With this we also connect OLED with

Arduino to display values.

Moreover, we make a database of temperature diseases and show them on screen.

Programing instruction use the database and give instruction to the user according to their

condition of temperature.

21
The database is:

Table 4: Data Base for Temperature Sensor with Instructions

Less than 95 Hyperthermia (low)

95-100 Normal

100-102 Fever

Above 102 High fever

This will compare user temperature with database and give instructions on screen. If you

have 95 it will show hyperthermia which is low temperature disease and in same way if

we have above 102 F it will give high fever.

Fig 13: Output of Temperature Sensor according to Data Base

22
In this we can see that a person have 100 F temperature and our device gives the message

of normal condition according to data base.

23
CHAPTER 3. PULSE SENSING AND MONITORING

3.1 Description of Pulse Sensor


Pulse Sensor is use with method of a plug-and-play and it measures heart-rate of the

patients, this sensor operated by Arduino. It can be use by doctors, patients, artists and all

expert of any field for measuring the pulse count. Pulse Sensor also have amplification and

noise cancellation mechanism and circuitry with the hardware. It is faster and quit easy and

we can rely on its authentic pulse readings. Pulse Sensor works with the safe limit operating

voltage either 3V or 5V Arduino for avoiding any kind of shock.

Fig 14: Circuit of Pulse Sensor with Arduino [14]

3.1.1 Specification

 Diameter = 16mm

 Thickness = 3mm

 Working Voltage = 3V to 5V

24
 Working Current = 4mA at 5V [15]

Fig 15: Kit of Pulse Sensor with all setting materials [16]

In this article, we are interfacing a Pulse Sensor with Arduino. The pulse sensor we are

to using is a plug and play heart rate sensor. This sensor is much easy to use, save the record

and operate. Set your finger or earlobe on front side of the sensor and it will sense the

heartbeat by measuring and sensing the change in light intensity from the expansion of

capillary blood vessels.

3.1.2 Pin Out – Pulse Sensor

The pulse sensor has three pins which are mention below:

 GND: Ground Pin

25
 VCC: 5V or 3V Pin

 A0: Analog Pin

There is also a LED in the center of this sensor which helps in detecting the heartbeat.

Below the LED, there is a noise removing circuitry which have to keep away the noise

from affecting and disturbing the readings and filter out any noise.

Fig16: Pins Configurations of Pulse Sensor and Layout [17]

3.2 Working Principle of Pulse Sensor

We know when a heartbeat take place blood is pumped in and out from heart and circulate

through the human body and gets enter into the capillary tissues. The volume of these

capillary tissues increases due to pumped out blood from heart. But in between the

heartbeats, this volume inside capillary tissues keep on decreases. This change in volume

between the heartbeats change the amount of light that will pass and transmit through these

tissues. This change is too small but we can measure it with pulse sensor with the help of

26
arduino.

Figure 17: Display Values of Pulse Sensor on LCD

The pulse rate can be measure with the help of sensor light. When we place the finger on

the pulse sensor, the light reflection will change which is based on capillary blood vessel’s

volume. While a heartbeat happened, the volume of the capillary blood vessels become

high. This affects the reflection of light and the light reflected at the time of a heartbeat

will be less compared to that of the time during which there is no heartbeat. This variation

in light transmission and reflection can be obtained as a pulse from the output of pulse

sensor. This pulse can be then conditioned to measure heartbeat and then programmed

accordingly to read as heartbeat count. [17]

3.2.1 Pulse Sensor to Arduino

27
 GND pin of pulses sensor to GND of Arduino

 VCC of pulse sensor to 5V of Arduino

 A0 of pulse sensor to A0 of Arduino

Figure18: Project Setup of Pulse Sensor with OLED

In this we have the setup of pulse sensor with arduino, we can see output on OLED. By

OLED we have clear output. The sensor is operated with arduino and then arduino display

the result on OLED. We used display library for OLED display in operated coded.

After this we need to give instruction according to the values of pulse sensor for the further

treatment of patient. For this task, we firstly make a data base acording to the medical

researches and parameters. After this we use this data base for giving the useful suggestions

to the user of the device.

Table 5: Data Base for Pulse Sensor with Instructions

28
Less than 60 Very low

60 Low

65 Normal

90 High

It mean when output of the sensor is less than 60 BPM then the device show the message

on screen that your pulse is very low and when equal to 65 then it will show the pulse is

normal and show high pulse message when pulse is 90 BPM.

Figure 19: Output of Pulse sensor according to Data Base

In this we can see that a person have 72 BPM and our device gives the message of normal

condition according to data base.

3.3 Running code of pulse sensor

We get the pulse sensor software with combination of Arduino from pulse sensor library.

We know this with the name “PulseSensorAmped_Arduino”. For running and operate the

29
sensor we get library of pulse sensor from SparkFun. We use this library to operate the

sensor according to our requirements of our project. We want to give the instruction that

do not connect the pulse sensor with our body until your computer or laptop is not

disconnected to main AC supply. These instruction implies when your Vcc is laptop or

computers or any charging devices. Kindly be careful and safe yourself from power

switches and use low battery power. Connect the red wire of Pulse Sensor to Vcc of

Arduino, ground with black wire, and Analog Pin A0 with purple which are on Arduino,

and upload and install the ‘PulseSensoAmped_Arduino’ or sparkFun Library.

Figure 20: Programming Setup of Pulse Sensor

30
After all this updating, you must should see pin 13 blinking on Arduino with your heartbeat

time when you put your finger on sensor. If you hold the sensor hardly, it will compress all

the blood of your fingertip and then it will no signal appear on Arduino. If you hold it too

lightly then noise will add in reading of sensor and spoil the results. Moderate grip and

holding of sensor give accurate value of pulse. You will take different readings with

different situations, for example: after running, after exercise and in lay down situations

etc.[18]

Figure 21 Output of Pulse Sensor at Serial Port

31
CHAPTER 4 Electrocardiogram (ECG)

4.1 Introduction

Figure 22: ECG Module


Single lead heart rate monitor
This is a Spark Fun single lead heart rate monitor (AD8232), it is an economical board and

used to measure electrical activity of the heart. The electrical activity can be called as ECG

or electrocardiography and its output as an analog reading. Usually ECGs are very noisy

but ad8232 can be used as op amp to obtain a clear signal from PR and QT interval easily.

This single lead heart rate monitor (AD8232) is an integrated signal module for ECG and

other bio potential measurement applications. The purpose to design such a module is to

32
amplify, extract and filter out small bio potential signals in the presence of noise, such as

the noises that are created by motion or remote electrode placement.

There are nine connections that are from the IC that you can solder pins, wires, or other

connectors to SDN, LO+, LO-, OUTPUT, 3.3V, GND provide essential pins for operating

this monitor with an Arduino or other microcontrollers. You can use the provided pins on

this board that are RA (Right Arm), LA (Left Arm), and RL (Right Leg) pins to attach and

you can also use your own custom sensors. Also, there is an LED indicator light there on

the sensor that will pulsate to the rhythm of a heartbeat. To use this module the Biomedical

Sensor Pads and Sensor Cable are required to monitor heart. There is a specific position to

put electrodes on body. Given below the pin configuration and electrodes placement. [19]

Figure 23: Pin Configuration and Electrodes Placement [20]

The standard or typical ECG waveform that we got look like the image that is given

below with different intervals that have to be taken consideration while reading ECG

waveform.

33
Figure 24: Typical ECG Signal [21]

In the figure below you can see the result of ECG from our sensor ad8232

Figure 25: ECG of Normal Person (Sensor Result)

4.2 Electrodes Placement and Electrical Activity of the Heart


In the below figure it is clearly show the placement of electrodes on human body.

The details about this are given in below table.

34
Figure 26: Electrodes Placement [22]

Table 1: Electrodes Placement Details [22]

ELECTRODE PLACEMENT

V1 4th Intercostal space to the right of the


sternum

V2 4th Intercostal space to the left of the sternum

V3 Midway between V2 and V4

V4 5th Intercostal space at the midclavicular line

V5 Anterior axillary line at the same level as V4

V6 Midaxillary line at the same level as V4 and


V5

35
RL Anywhere above the ankle and below the
torso

RA Anywhere between the shoulder and the


elbow

LL Anywhere above the ankle and below the


torso

LA Anywhere between the shoulder and the


elbow

Figure 27: Limb and Augmented Limb Leads [23]

In the above figure the details of limbs are given which are as follows:

I = LA-RA

II = LL-RA

III = LL-LA

36
aVR = RA-0.5(LA+LL)

aVL = LA-0.5(RA+LL)

aVF = LL-0.5(RA+LL)

The purpose of ECG is to look after the Electrical activity of the Heart. In the table below

you can find the details about electrical activity of different limbs.

Table 2: Electrical Activity of the Heart [24]

Category Leads Activity

Inferior Leads II, III Look at electrical activity from the vantage point of
leads' and aVF the inferior surface (diaphragmatic surface of heart)

Lateral I, aVL, Look at the electrical activity from the vantage point of
leads V5 and V6 the lateral wall of left ventricle

Septal V1 and V2 Look at electrical activity from the vantage point of the septal surface
leads of the heart (interventricular septum)

Anterior V3 and V4 Look at electrical activity from the vantage point of the anterior wall
leads of the right and left ventricles (Sternocostal surface of heart)

4.3 How to read ECG

There are different intervals and wave in a single ECG to understand it completely

we have to look at each interval or wave separately. Each interval or wave represent

different characteristics and abnormalities.

• P wave represents Atrial Depolarization

37
• The PR interval tracks the atrial impulse from the atria through the AV node

• The QRS represents ventricular depolarization

• The ST segment represents the end of ventricular conduction

• The QT interval measures ventricular depolarization and repolarization

P Wave Characteristics: [25]

Normal P Wave

• Its location usually precedes the QRS complex

• The amplitude is 2 to 3 mm high

• The duration is round about 0.06 to 0.12 second

• The configuration remains usually rounded and upright

• The deflection is positive or upright in leads (I, II, aVF, and V2 to V6). It remains

positive but variable in leads III and aVL also negative or inverted in lead aVR

and biphasic or variable in lead V1.

Abnormal P Wave:

• Peaked, notched, or enlarged P waves

• Inverted P waves

38
• Varying P waves

• Absent P waves

Fig 28: Normal and Abnormal P Waves [25]


QR Interval Characteristics:
Normal QR interval

• Its location starts from the beginning of the P wave to the beginning of the QRS

complex

• The duration varies from 0.12 to 0.20 second

Abnormal QR interval

39
• Short PR intervals is there which is usually ( less than 0.12 second) also there is

impulse that is originated somewhere other than the SA node

 It is associated with “junctional arrhythmias and preexcitation syndromes”.

• Long PR intervals (greater than 0.20 second) represent conduction delay through

the atria or AV junction.

 Due to digoxin toxicity or heart block—slowing related to ischemia or conduction

tissue disease.

QRS Complex Characteristics:

Normal QRS

• location—follows the PR interval

• amplitude—5 to 30 mm high but differs for each lead used

• the duration last from 0.06 to 0.10 second, or half of the PR interval

• deflection—positive in leads I, II, III, aVL, aVF, and V4 to V6 and negative in

leads aVR and V1 to V3

Abnormal QRS

• Deep, wide Q waves may represent myocardial infarction

• Notched R wave may signify a bundle-branch block

• If there is a widened QRS complex (greater than 0.12) that may signify a ventricular

conduction delay

• missing QRS complex may indicate AV block or ventricular standstill

ST Segment Characteristics:

Normal ST

40
• location—this will extends from the S wave till the beginning of the T wave

• deflection—usually isoelectric (neither positive nor negative); may vary from –0.5

to +1 mm in some precordial leads

Abnormal ST

• depressed ST segment may indicate myocardial ischemia or digoxin toxicity

• elevated ST segment may indicate myocardial injury

Fig 29: Depressed and Elevated ST segment [25]


T Wave Characteristics:

Normal T wave

• location—follows the S wave

• Amplitude— if we look at it, it is usually 0.5 mm in leads I, II, and III and up to 10

mm in the precordial leads.

• configuration—typically round and smooth

• deflection—usually upright in leads I, II, and V3 to V6; inverted in lead aVR;

variable in all other leads

Abnormal T wave

• If we look at the abnormality it is tall, peaked, or tented T waves that indicate

myocardial injury or hyperkalemia.

41
• There are some Inverted T waves in leads I, II, or V3 through V6 that may represent

myocardial ischemia.

• Also if T waves are heavily notched or pointed T waves in an adult may mean

pericarditis.

QT interval Characteristics:

Normal QT interval

• location—extends from the beginning of the QRS complex to the end of the T wave

• duration—varies according to age, sex, and heart rate; usually lasts from 0.36 to

0.44 second

Abnormal QT interval

• An abnormality in duration may indicate myocardial problems

• Prolonged QT intervals indicate that the relative refractory period is longer

therefore increases the risk of a life-threatening arrhythmia

• If there are short QT intervals that may be arises due to digoxin toxicity or

hypercalcemia.

U wave Characteristics:

• location—follows the T wave

• configuration—typically upright and rounded

• deflection—upright

If there is a prominent U wave it may be due to hypercalcemia, hypokalemia, or digoxin

toxicity.

42
4.4 ECG examples of disease and their abnormalities

Right Bundle Branch Block

Fig 30: Right Bundle Branch Block [26]

Fig 31: A 55 year old man with 4 hours of "crushing" chest pain [26]

43
If we notice this ECG we got these abnormalities

• There is wide QRS, more than 120 ms (3 small squares)

• If we look at secondary R wave it is in lead V1

• The other abnormalities in such ECG are slurred S wave in lateral leads and T wave

changes in the septal leads.

First Degree Heart Block

Fig 32: Abnormality in ECG [26]

• Marked first degree heart block

• PR interval > 300 ms, P waves are buried in the preceding T wave

44
Fig 33: ECG of a heart disease patient [26]

Abnormalities in first degree heart block disease are as follows:


• The left anterior hemi blocked.
• There is hypertrophy in left ventricular.
• There is long PR interval that (also called first degree heart block)
• Also a left atrial hypertrophy
Complete Heart Block (CHB)

Fig 34: Abnormal Wave

• The atrial rate is approximately 100 bpm.

• If we look at the “ventricular rate” that is approximately 40 bpm.

45
• The two rates in this ECG are independent; “there is no evidence that any of the

atrial impulses are conducted to the ventricles”.

Fig 35: Abnormal ECG having complete heart disease problem [26]
Abnormalities in CHB are as follows:

• The atrial rate remains 85 bpm.

• The ventricular rate is up to 38 bpm.

• If we look at the atrial impulses none of them “appear to be conducted to the

ventricles”.

• If there are rhythm there in wave it is maintained by a “junctional escaped rhythm”.

• The Marked inferior “ST elevation” present there indicates that the cause is due to

an “inferior STEMI”.

46
4.5 Results

We look for different result to interpret something about ECG and at last we finally

decided to look for R-R interval through which we can analyze those that have irregularity

in wave like “arrhythmia” diseases patients their ECG are irregular in pattern.

In the figure below on x-axis there are interval numbers while on y-axis R-R intervals

time (ms). For normal waves R-R interval remains fixed but if there is abnormality in wave

there are variations in R-R interval. The figure below contains 7 different R-R intervals in

which two are of normal data is taken from sensor (ad8232), other two are also normal and

data is taken from database (physioNet) while the three waves are from database and waves

are abnormal having “arrhythmia” disease (physioNet). The normal patients from database

are p121 and p131 while abnormal patients are p151, p157 and p168 they all are patients

of “arrhythmia”.

The constant line in figure below represent there are less variations in time interval between

R-R and these are of normal patients as it is the difference of time interval between R-R

peaks and it gives a constant number. The variations in figure are due to difference in time

interval between R-R peaks also these are of abnormal patient with “arrhythmia” disease.

Difference in intervals time means it is not abnormal wave and thus we declared it

abnormal and from database it is approved that these patients are suffering from

“arrhythmia” disease. Major symptoms of arrhythmia disease is abnormal heart rhythm and

47
irregular heartbeat that is why there is different in interval time between R-R peaks. For

further details I referred.[26]–[28]

Fig 36: R-R Interval Difference for different waves

Normal ECG from Sensor

Fig 37: Normal ECG from Sensor

48
The waveforms that I used are taken from Physio Net database

Fig 38: Normal Patient 121 from PhysioNet

Fig 39: Abnormal Patient 163 having dysthymia disease

49
CHAPTER 5

Conclusion

5.1 Cost analysis

Following are the cost of various components that we have used in our project.

Table 5.1: Cost of components

Sr. # Component Name Quantity Unit Price Total price

1. Arduino Uno 1 400 400

2. Node MCU 1 450 450

3. OLED 1 400 400

4. ECG Module with Electrodes 1 1500 1500

5. Temperature Sensor 1 350 350

6. Pulse Sensor 1 400 400

8. Total 3500 RS

5.2 Conclusion

In conclusion we completed low cost health monitoring system using Arduino UNO as our

microcontroller and we used three sensor to detect some vital parameters of human body

like ECG, heart beat and body temperature. For this purpose we have used ad8232 as ECG

module, pulse sensor and mlx90614 temperature sensor. We used OLED to display results

of heart beat and pulse sensor. With the help of database we are able to alarm patient on

50
their early stage of disease. Our main objective was to make a low cost device that can able

to extract some vital parameters that we achieved in our project.

51
Figure 40: Setup and Complete Output (ECG, Heart Beat and Body Temperature)

5.3 Future Scope

Further we can add some more parameters to detect and we can convert this into a handy

device to detect vital parameters of human body. In ECG we can work to some extent to

detect some other waves having disease. There is a lot of thing to do in future work.

52
References
[1] P. Report and C. O. F. Examination, “A project report on Health Monitoring
System.”
[2] S. Ahmed, S. Millat, M. A. Rahman, S. N. Alam, and M. S. R. Zishan, “Wireless
health monitoring system for patients,” in 2015 IEEE International WIE
Conference on Electrical and Computer Engineering (WIECON-ECE), 2015, pp.
164–167.
[3] S. Suryanarayanan, S. Manmadhan, and N. Rakesh, “Design and Development of
Real Time Patient Monitoring System with GSM Technology,” J. Cases Inf.
Technol., vol. 19, no. 4, pp. 22–36, Oct. 2017.
[4] “Arduino Uno Pin Diagram, Specifications, Pin Configuration &
Programming.” [Online]. Available:
https://components101.com/microcontrollers/arduino-uno. [Accessed: 27-Aug-
2018].
[5] “Arduino Uno Technology · Free image on Pixabay.” [Online]. Available:
https://pixabay.com/en/arduino-arduino-uno-technology-2168193/. [Accessed: 27-
Aug-2018].
[6] “Arduino Uno R3 Microcontroller.” [Online]. Available:
https://www.trossenrobotics.com/p/arduino-uno.aspx. [Accessed: 27-Aug-2018].
[7] “NodeMCU Pinout Reference | Teach Me Microcontrollers!” [Online]. Available:
https://www.teachmemicro.com/nodemcu-pinout/. [Accessed: 27-Aug-2018].
[8] “NodeMcu -- An open-source firmware based on ESP8266 wifi-soc.” [Online].
Available: http://nodemcu.com/index_en.html. [Accessed: 27-Aug-2018].
[9] “NodeMCU Documentation.” [Online]. Available:
https://nodemcu.readthedocs.io/en/master/. [Accessed: 27-Aug-2018].
[10] “Wiring and Test | Using Melexis MLX90614 Non-Contact Sensors | Adafruit
Learning System.” [Online]. Available: https://learn.adafruit.com/using-melexis-
mlx90614-non-contact-sensors/wiring-and-test. [Accessed: 27-Aug-2018].
[11] “MLX90614 Datasheet, PDF - Alldatasheet.” [Online]. Available:
https://www.alldatasheet.com/view.jsp?Searchword=Mlx90614. [Accessed: 27-
Aug-2018].
[12] “MLX90614 Digital Infrared Thermometer - Melexis | Mouser Europe.” [Online].
Available: https://eu.mouser.com/new/melexis/melexis-MLX90614-infrared-
thermometer/. [Accessed: 27-Aug-2018].
[13] “MLX90614 IR Thermometer Hookup Guide - learn.sparkfun.com.” [Online].
Available: https://learn.sparkfun.com/tutorials/mlx90614-ir-thermometer-hookup-
guide. [Accessed: 27-Aug-2018].
[14] “e-Health Sensor Shield for Arduino and Raspberry Pi - 9 sensors for pulse, blood

53
oxygen, breathing, temperature, ECG, glucometer, GSR, b… | bio sensors |
Pinte….” [Online]. Available:
https://www.pinterest.com/pin/513832638705318344/. [Accessed: 27-Aug-2018].
[15] “Pulse Sensor with Arduino.” [Online]. Available:
http://www.theorycircuit.com/pulse-sensor-arduino/. [Accessed: 27-Aug-2018].
[16] “(175) Pinterest.” [Online]. Available:
https://www.pinterest.com/pin/513832638705318344/?lp=true. [Accessed: 27-
Aug-2018].
[17] “Pulse Sensor and Arduino - Interfacing.” [Online]. Available:
http://www.circuitstoday.com/pulse-sensor-arduino. [Accessed: 27-Aug-2018].
[18] Pulse Sensor, “Pulse Sensor Getting Started Guide,” 2015.
[19] “SparkFun Single Lead Heart Rate Monitor - AD8232 - SEN-12650 - SparkFun
Electronics.” [Online]. Available: https://www.sparkfun.com/products/12650.
[Accessed: 27-Aug-2018].
[20] “Heart Rate Monitor AD8232 Interface Arduino.” [Online]. Available:
http://www.theorycircuit.com/heart-rate-monitor-ad8232-interface-arduino/.
[Accessed: 27-Aug-2018].
[21] “A typical ECG signal for a single heartbeat. | Open-i.” [Online]. Available:
https://openi.nlm.nih.gov/detailedresult.php?img=PMC3312444_sensors-09-
06273f4&req=4. [Accessed: 27-Aug-2018].
[22] “The Ultimate 12-Lead ECG Placement Guide (With Illustrations).” [Online].
Available: https://www.primemedicaltraining.com/12-lead-ecg-placement/.
[Accessed: 27-Aug-2018].
[23] “ECG Learning Center - An introduction to clinical electrocardiography.”
[Online]. Available: https://ecg.utah.edu/lesson/1. [Accessed: 27-Aug-2018].
[24] “Heart Electrical Activity.” [Online]. Available:
http://www.heartsite.com/html/electrical_activity.html. [Accessed: 27-Aug-2018].
[25] L. W. & Wilkins, “ECG Interpretation Made Incredibly Easy.” p. 342, 2005.
[26] “PhysioBank Databases.” [Online]. Available:
https://physionet.org/physiobank/database/#ecg. [Accessed: 27-Aug-2018].
[27] “LITFL ECG Library and clinical cases in cardiology.” [Online]. Available:
https://lifeinthefastlane.com/ecg-library/. [Accessed: 28-Aug-2018].
[28] “ECGlibrary.com:” [Online]. Available: https://ecglibrary.com/ecghome.php.
[Accessed: 28-Aug-2018].

54
55

You might also like