0% found this document useful (0 votes)
96 views55 pages

9B Documentation (MAJOR)

This document provides an overview of an IOT-based cardiac monitoring and alert system project. The objectives are to design a wearable system to monitor a patient's heart rate and oxygen saturation levels using a pulse oximeter and send alerts if levels are abnormal. If levels are low or critical, the IOT module will send the information to a microcontroller and then to other devices so the doctor can respond quickly. The methodology uses an IOT module to receive patient information and send alerts in emergencies. Hardware includes an Arduino board, pulse sensor, IOT module, LCD display, and GSM module. A literature review discusses the history and evolution of patient monitoring systems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views55 pages

9B Documentation (MAJOR)

This document provides an overview of an IOT-based cardiac monitoring and alert system project. The objectives are to design a wearable system to monitor a patient's heart rate and oxygen saturation levels using a pulse oximeter and send alerts if levels are abnormal. If levels are low or critical, the IOT module will send the information to a microcontroller and then to other devices so the doctor can respond quickly. The methodology uses an IOT module to receive patient information and send alerts in emergencies. Hardware includes an Arduino board, pulse sensor, IOT module, LCD display, and GSM module. A literature review discusses the history and evolution of patient monitoring systems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 55

IOT

D based cardiac monitoring integrated alert system

CHAPTER 1
OVERVIEW OF THE PROJECT
In this chapter, Overview of the project, Motivation, Objectives, Literature survey, tools
used and organization of the report are discussed.
1.1 INTRODUCTION
Cardiovascular diseases have now become the biggest cause of fatality world-
wide. Hence, continuous and non-invasive monitoring of some critical cardiac parameters
have gained much importance. Most people need a minimum oxygen saturation level of
blood i.e., the spo2 value to be 89% or more to maintain healthy cells. If in case the spo2
values are below the threshold, it can cause strain on the heart, liver, lungs and keep the
body from doing its regular chores.
On the same lines, the regular monitoring of heart rate values will enable a more
precise understanding of one’s health. However conventional methods used to measure
the cardiac values are bulky and require the presence of a physician to make sense of the
raw values. More importantly, most cardiac related accidents happen at the small hours
and nocturnal monitoring is not possible in the conventional methods.
In this project, we offer a modern-day, sensor technology and IoT based solution
for round the clock cardiac monitoring integrated with an alert system which is automated
during emergencies. Pulse oximeter is an oxygen saturation meter that is medically used
to detect the heart rate and oxygen saturation values with use of LEDs and photo
detectors.
Crux approach behind the pulse oximeter is using the discrepancy in the
absorption coefficient of light traversing through the body at dissimilar wavelengths. The
proportion of intake at two distant wavelengths is used to figure out the oxygen saturation
level in the blood. When light of about 1000nm is made incident to the blood vessels,
oxygenated hemoglobin (oxy-Hb) absorbs more light than de-oxygenated hemoglobin
(de-oxy-Hb) and converse, if light is of 650nm wavelength. These changes are observed
in the photo-detector tuned to the said wavelengths. With this methodology, the oxygen
saturation is extracted non-invasively from a patient.

Department of ECE,MRITS 1
IOT based cardiac monitoring integrated alert system

1.2 PROBLEM STATEMENT


The interface of heart monitoring devices is not that user friendly and they cannot be
accessed by everyone and they have low flexibility and also, they cannot be carried everywhere.
1.3 MOTIVATION
The cause of this project is to monitor the patient using IOT module. It checks the
patient’s heart rate pulse by pulse sensor. When the patient pulse is normal it shows normal and
when it is less than the normal pulse then it shows ‘low’. When it is high i.e., above 72 that is
critical. Whereas when the patient is critical or abnormality then the IOT module will send the
information to the micro controller and then the information is shared to other devices. So, the
doctor’s response will be quick. By this project it is easy to check the condition of patient’s
information and displays it on LCD and parallel shows the heart rate on serial monitor
1.4 OBJECTIVE
a) The main aim of the project is to design a IOT based cardiac monitoring integrated
alert system with the help of GSM.
b) The end goal of this project is to make a wearable cardiac monitoring and alert
system which can be generic or patient specific and help reduce heart-related
accidents.

1.5 METHODOLOGY ADOPTED


The methodology developed in this project is IOT module, by this the patient
information is received by the doctor. The technology defined by the IOT specification is
intended to be simpler and less expensive than other wireless personal area networks (WPANs),
such as WIFI Applications include wireless light switches, electrical meters with in-home-
displays, traffic management systems, and other consumer and industrial equipment that require
short-range low-rate wireless data transfer.

1.6 TOOLS USED


1.6.1 SOFTWARE
1. Arduino IDE
2. Embedded ‘c’

Department of ECE,MRITS 2
IOT based cardiac monitoring integrated alert system

1.6.2 HARDWARE
1. Power supply
2. ATMEGA 328 MC
3. LCD display
4. Buzzer
5. IOT module (ESP8266)
6. Pulse sensor (MAX30102)

7. GSM

1.7 ORGANIZATION OF REPORT

Chapter 2 deals with the Arduino board with microcontroller. Chapter 3 deals with the
description of hardware modules which are used in the system. Chapter 4 deals with the
implementation of heart beat sensor working and interfacing with Arduino. Chapter 5 deal with
the results obtained. Chapter 6 ends with Conclusion and future scope followed by references.

Department of ECE,MRITS 3
IOT based cardiac monitoring integrated alert system

CHAPTER 2
LITERATURE SURVEY
PATIENT MONITORING SYSTEM
A number of patient monitoring systems have been proposed by many researchers to
monitor the patient at the bedside and also at a central monitoring system. The literature survey
presented in this section includes a variety of patient monitoring systems, ranging from simple
pulse monitors, activity monitors, and portable Holter monitors, to sophisticated and expensive
implantable sensors. The history of physiological monitors looks at the technical evolution of
physiologic monitors, which incorporate a cathode ray tube (CRT) or a flat panel display.
Himmelstein and Scheiner (1952) reported that in the 1950s an instrument called
“Cardiotachoscope” found useful during surgery, featured the fundamental attributes that most
monitoring systems would eventually have. These attributes include a CRT to view the ECG, a
heart rate indicator, alarms for high and low heart rates, and a connection to a conventional
electrocardiograph for printouts. The devices of this era had monochrome displays and the
persistence of the wave was generally not sufficient to cover the screen. This meant that the ECG
waveform would show only a second or two of new data. The old data would fade away and the
trace has been described as a bouncing ball with a comet’s tail. There were no numeric
parameters or annotations on the screen. This device does not appear to have entered into
production and the “Cardiotachoscope” term is not used anymore.
Systems of the 1950s and early 1960s made less of a distinction between the equipment roles of
monitoring and defibrillation or pacing, and were often intended to be used together as a
diagnostic and, especially, therapeutic tools at the bedside or in the operating room on a mobile
cart. Most devices had an output connector to allow direct printing on a standard
electrocardiograph. Most bedside type monitors often had round screens of about 5 inches in
diameter that limit to one or two waveform traces. Controls on these monitors generally allowed
for lead selection, focus adjustment, intensity or brightness control, sensitivity or gain control,
vertical trace position control, and sweep rate adjustment.
The 1960s featured monitoring systems whose intended functions and configurations
were surprisingly similar to more modern systems. The approach of having central monitors and
bedside monitors was common even from the early part of the decade. Numerous parameters
were technically available to be monitored including ECG, EEG, invasive pressures, and

Department of ECE,MRITS 4
IOT based cardiac monitoring integrated alert system

temperatures. In the mid 1960s, several vendors offered a magnetic tape "memory-loop" feature
that served to continuously record the last 15 or more seconds of data so that alarm events could
be interpreted based on the preceding data. Automatic printing of stored data following an alarm
could occur.
The decade of the 1970s saw some significant improvements in the presentation of the
displayed waveforms and information. This was the result of the incorporation of digital
electronics and, eventually, microprocessors. Real time arrhythmia analysis appeared at the
beginning of the decade and evolved over the duration of the 1970s.
Healy et al (1977) described a hospital patient monitoring and display system employing
a number of bedside consoles, concealable from the patient and including input for various
patient sensors such as ECG, pulse rate, patient temperature and blood pressure. The central
station includes signal processing and display apparatus to allow the patient data to be displayed
on a conventional commercial black and white or color television set along with alpha numerics
related to each respective patient. The display is coupled to the hospitals normal entertainment
television distribution network, if any, allowing the patient data to be displayed on any television
set throughout the hospital. A remote control operation via a radio frequency link may be carried
by a patient's doctor and may be operated at any time or place within reception range of the
central control to freeze the display for better examination and automatic printout of a
reproduction. After a preset period, the display resumes.
The 1980s witnessed further significant evolution in patient monitors. Arrhythmia
analysis became available at the bedside. Monitors began using color displays, monitoring.

Neonatal and pediatric Pulse Oximeter-The pulse oximeter has become a vital instrument in the
care of infants and children with cardiopulmonary disease. Recent advances in pulse oximetry
technology have improved some aspects of pulse oximeter performance. However, the reliability,
accuracy, and clinical utility of pulse oximetry remain problematic in some types of patients
under certain conditions. Improved signal processing technology has substantially improved the
ability of certain oximeters to work reliably under conditions of poor perfusion and motion
artifact.

System architecture of a wireless body area sensor network for ubiquitous health monitoring:
One of the most promising applications of sensor networks is for human health monitoring.

Department of ECE,MRITS 5
IOT based cardiac monitoring integrated alert system

A number of tiny wireless sensors, strategically placed on the human body, create a
wireless body area network that can monitor various vital signs, providing real-time feedback to
the user and medical personnel. The wireless body area networks promise to revolutionize health
monitoring. However, designers of such systems face a number of challenging tasks, as they
need to address often quite conflicting requirements for size, operating time, precision, and
reliability.
Wireless Sensor Networks in Structural Health Monitoring Based on Bluetooth Technology:
Wireless sensor networks for structural health monitoring
Structural health monitoring (SHM) using wireless sensor networks (WSNs) has gained
research interest due to its ability to reduce the costs associated with the installation and
maintenance of SHM systems. ... The high data collection rate of WSNs for SHM pose
unique network design challenges.

2.1 CONCLUSION:
In this chapter, reference links have been referred and the analysis of the literature review
was discussed.

Department of ECE,MRITS 6
IOT based cardiac monitoring integrated alert system

CHAPTER 3
ARDUINO BOARD WITH MICROCONTROLLER

3.1 INTRODUCTION
In this chapter, Arduino Board with ATmega328 microcontroller will be discussed.
3.2 ARDUINO WITH MICRO CONTROLLER
Arduino is an open-source computer hardware and software company, project and user
community that designs and manufactures kits for building digital devices and interactive objects
that can sense and control the physical world. Arduino boards may be purchased pre-assembled,
at the same time the hardware design information is available for those who would like to
assemble an Arduino from scratch. An Arduino board consists of an Atmel 8-16 or 32-bit AVR
microcontroller with complementary components that facilitate programming and incorporation
into other circuits. An important aspect of the Arduino is its standard connectors, which lets
users connect the CPU board to a variety of interchangeable add on modules known as shields.
Some shields communicate with the Arduino board directly over various pins, but many shields
are individually addressable via an I²C serial bus so many shields can be stacked and used in
parallel. Official Arduino’s have used the mega AVR series of chips, specifically the ATmega8,
ATmega168, ATmega328, ATmega1280 and ATmega2560. A handful of other processors have
been used by Arduino compatibles. Most boards include a 5-volt linear regulator and a 16 MHz
crystal oscillator (or ceramic resonator in some variants), although some designs such as the Lily
Pad run at 8 MHz and dispense with the onboard voltage regulator due to specific form-factor
restrictions. An Arduino's microcontroller is also preprogrammed with a boot loader that
simplifies uploading of programs to the on-chip flash memory, compared with other devices that
typically need an external programmer. This makes using an Arduino more straightforward by
allowing the use of an ordinary computer as the programmer.
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 center
positive plug into the board's power jack. Leads from a battery can be inserted in the Gnd and V in
pin headers of the POWER connector. the Arduino board with micro controller is shown in fig
3.1

Department of ECE,MRITS 7
IOT based cardiac monitoring integrated alert system

Fig 3.1: Arduino board with micro controller


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.
3.2.1 The Power Pins Are as Follows
a) 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). It can
supply voltage through this pin or if supplying voltage via the power jack, access it
through this pin.
b) 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 the board.
c) 3V3. A 3.3-volt supply generated by the on-board regulator. Maximum current draw
is50 mA.
d) GND. Ground pins.
e) IOREF. This pin on the Arduino board provides the voltage reference with which the
microcontroller operates. A properly configured shield can read the IOREF pin voltage
and select the appropriate power source or enable voltage translators on the outputs for
working with the 5V or 3.3V.

Department of ECE,MRITS 8
IOT based cardiac monitoring integrated alert system

f) The ATmega328 has 32 KB (with 0.5 KB used for the bootloader). It also has 2 KB of
SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM
library). Each of the 14 digital pins on the Uno can be used as an input or output, using
pin Mode (), digital Write () and digital Read () functions. They operate at 5 volts. Each
pin can provide or receive a maximum of 40 mA and has an internal pull up resistor
(disconnected by default) of 20-50 kilo ohm.
g) In addition, some pins have specialized functions:
h) Serial: 0 (RX) and 1 (TX). 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.
i) 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. See the attach Interrupt () function for
details.
j) PWM: 3, 5, 6, 9, 10 and 11. Provide 8-bit PWM output with the analog Write () function.
k) SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI
communication using the SPI library.
l) LED: 13. There is a built-in LED connected to digital pin 13. When the pin is
HIGH value, the LED is on, when the pin is LOW, it's off.
m) The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of
resolution (i.e., 1024 different values). By default, they 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.
n) Additionally, some pins have specialized functionality:
o) TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the
Wire library. There are a couple of other pins on the board:
p) AREF. Reference voltage for the analog inputs. Used with analog Reference ().
q) 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.
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

Department of ECE,MRITS 9
IOT based cardiac monitoring integrated alert system

board channels this serial communication over USB and appears as a virtual com port to
software on the computer. The '16U2 firmware uses the standard USB COM drivers and no
external driver is needed. However, on Windows, an information 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, see the documentation for details. For SPI
communication, use the SPI library.
The Arduino Uno can be programmed with the Arduino software (download). Select
"Arduino UNO from the Tools Board menu (according to the microcontroller on board). The
ATmega328 on the Arduino Uno comes pre-burned with a bootloader that allows to upload new
code to it without the use of an external hardware programmer. It communicates using the
original STK500 protocol (reference, C header files). It can also bypass the boot loader and
program the microcontroller through the ICSP (In-Circuit Serial Programming) header using
Arduino ISP or similar; see these instructions for details.
The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is
available. The ATmega16U2/8U2 is loaded with a DFU boot loader, which can be activated by
below commands.
a) On Rev1 boards: connecting the solder jumper on the back of the board (near the map of
Italy) and then resetting the 8U2.
b) On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to ground,
making it easier to put into DFU mode.
The use Atmel's FLIP software (Windows) or the DFU programmer (Mac OS X and
Linux) to load a new firmware or use the ISP header with an external programmer (overwriting
the DFU boot loader).
Rather than requiring a physical press of the reset button before an upload, the Arduino
Uno is designed in a way that allows it to be reset by software running on a connected computer.
One of the hardware flow control lines (DTR) of the ATmega8U2/16U2 is connected to the reset

Department of ECE , MRITS 10


IOT based cardiac monitoring integrated alert system

line of the ATmega328 via a 100 Nano farad capacitor. When this line is asserted (taken low),
the reset line drops long enough to reset the chip. The Arduino software uses this capability to
allow to upload code by simply pressing the upload button in the Arduino environment. This
means that the boot loader can have a shorter timeout, as the lowering of DTR can be well
coordinate with the start of the upload.
This setup has other implications. When the Uno is connected to either a computer
running Mac OS X or Linux, it resets each time a connection is made to it from software (via
USB). For the following half second or so, the boot loader is running on the Uno. While it is
programmed to ignore malformed data (i.e., anything besides an upload of new code), it will
intercept the first few bytes of data sent to the board after a connection is opened. If a sketch
running on the board receives one time configuration or other data when it first starts, make sure
that the software with which it communicates waits a second after opening the connection and
before sending this data.
The UNO contains a trace that can be cut to disable the auto-reset. The pads on either
side of the trace can be soldered together to renewable it. It's labeled "RESET-EN". It may also
be able to disable the auto-reset by connecting a 110-ohm resistor from 5V to the reset line.
The Arduino UNO has a resettable poly fuse that protects the computer's USB ports from shorts
and over current. Although most computers provide their own internal protection, the fuse
provides an extra layer of protection. If more than 500 mA is applied to the USB port, the fuse
will automatically break the connection until the short or overload is removed. The maximum
length and width of the UNO PCB are 2.7 and 2.1 inches respectively, with the USB connector
and power jack extending beyond the former dimension. Four screw holes allow the board to be
attached to a surface or case. Note that the distance between digital pins 7 and 8 is 160 mil
(0.16"), not an even multiple of the 100-mil spacing of the other pins.
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 an AC to DC adapter or battery to get started.

Department of ECE,MRITS 11
IOT based cardiac monitoring integrated alert system

3.2.2 ATmega328
The ATmega328 is a single chip microcontroller created by Atmel and belongs to the
mega AVR series. The ATmega328 is shown in Fig 3.2

Fig 3.2: AT mega 328 micro controller


The Atmel 8-bit AVR RISC-based with read-while-write capabilities, 1 KB EEPROM, 2
KB SRAM, 23 general purpose I/O lines, 32 general purpose working registers, three flexible
timer/counters with compare modes, internal and external interrupts, serial programmable USART, a
byte oriented 2-wire serial interface, SPI serial port, 6-channel 10-bit Analog to digital converter
(8-channels in TQFP and QFN/MLF packages), programmable watch dog timer with internal
oscillator and five software selectable power saving modes. The device operates between 1.8-5.5
volts. The device achieves throughputs approaching 1MIPS per MHz.
Table 3.1 Pin Configuration of ATmega328
Features ATmega328/P
Pin Count 28/32
Flash (Bytes) 32K
SRAM (Bytes) 2K
EEPROM (Bytes) 1K
General Purpose I/O Lines 23
SPI 2
TWI (I2C) 1
USART 1
ADC 10-bit 15Ksps
ADC Channels 8
8-bit Timer/Counters 2
16-bit Timer/Counters 1

A common alternative to the ATmega328 is the "Pico Power" ATmega328P.A


comprehensive list of all other member of the ATmega AVR series can be found on the Atmel
website.

Department of ECE,MRITS 12
IOT based cardiac monitoring integrated alert system

Pin Diagram of ATmega328:

The pin diagram of ATmega328 as shown in Fig 3.3.

Fig 3.3 Pin diagram of ATmega328


Today the ATmega328 is commonly used in many projects and autonomous systems
where a simple, low-powered, low-cost micro controller is needed. Perhaps the most common
implementation of this chip is on the popular Arduino development platform, namely the
Arduino UNO and Arduino Nano models.
3.3 CONCLUSION
In this chapter, Arduino board with microcontroller ATmega328 has been discussed.

Department of ECE,MRITS 13
IOT based cardiac monitoring integrated alert system

CHAPTER 4
DESCRIPTION OF HARDWARE MODULES
4.1 INTRODUCTION
In this chapter, description of hardware peripherals or equipment’s like sensors and
modules are discussed.
4.2 SENSORS
PULSE SENSOR(MAX30102)
A heart beat monitor is a personal monitoring device that allows one to measure one's
heart beating real time or record the heart beat for later study. It is largely used by performers of
various types of physical exercise. heart beat sensor is shown in fig 4.1

Fig 4.1 pulse sensors (MAX30102)


The MAX30102 is an integrated pulse oximeter and heart rate monitor biosensor module. It
integrates a red LED and an infrared LED, photodetector, optical components, and low-noise
electronic circuitry with ambient light suppression. The MAX30102 features a 1.8V power
supply and a separate 5.OV power supply for internal LEDs. It is used in wearable devices for
heart rate and blood oxygen acquisition, and is worn on fingers, earlobes, and wrists. 

Department of ECE,MRITS 14
IOT based cardiac monitoring integrated alert system

PULSE SENSORS WORKING:


Pulse oximetry monitors the oxygen saturation in blood by measuring the magnitude of
reflected red and infrared light. Pulse oximeter’s can also approximate heart rate by analyzing
the time series response of the reflected red and infrared light . The MAX30102 pulse
oximeter is an Arduino-compatible and inexpensive sensor that permits calculation of heart
rate using the method described.

Fig 4.2 Working pulse sensor (MAX30102).

The pulse oximetry principle is based upon the red and infrared light absorption characteristics of
oxygenated and deoxygenated (or reduced) hemoglobin. Oxygenated hemoglobin absorbs more
infrared light and allows more red light to pass through. Deoxygenated hemoglobin absorbs more
red light and allows more infrared light to pass through. Red light is in the 600-750 nm
wavelength light band, while infrared light is in the 850-1000 nm wavelength light band. The
pulse oximeter can measure and display pulse rate simultaneously with the SpO2 level. This is a
non-invasive, real-time technique particularly in vital sign monitoring during an operation or
under anesthesia. this product will shorten design time to market for wearables and other types of
healthcare solutions. The IC is low power, operating on a single 1.8V supply with a separate 5V
supply for the internal LEDs and small footprint so that it easily can be integrated into the
wearables market. The analog integration is central to the performance of this chip which
integrates red and IR LEDs to modulate LED pulses for oxygen saturation (SpO2) and heart rate
measurements. The IC also integrates the photo-detectors, optical elements, and low-noise
electronics with ambient light rejection, using an integrated cover glass to improve accuracy of
the measurement. The IC has high SNR to allow for robust artifact resilience as well.

Department of ECE,MRITS 15
IOT based cardiac monitoring integrated alert system

Features:
a) Tiny 12.7mm x 12.7mm (0.5in x 0.5in) Board Size
b) Free Algorithm
c) Highly-integrated, small-size sensor
d) Non-chest based heart-rate/SpO2 detection
e) Ultra-low power consumption
Application:

a) Digital Heart Rate monitor.


b) Wearable Devices
c) Fitness Assistant Devices
Specifications:
Table:4.1 specifications of pulse sensor
PARAMETER VALUE
Operating Voltage 3.3v -5DC regulated
Operating current 20mA
Output data level 5V TTL Level
Heart beat detection indicated by LED and output high pulse
Viewing angle 160

4.3 MICRO CONTROLLER - ATMEGA328


The Atmega328 is commonly used in many projects and autonomous systems where
a simple, low-powered, low-cost micro-controller. This will allow to use Arduino code in
custom embedded project without having to use an actual Arduino board. To get this chip
working with Arduino IDE, It need an external 16MHz crystal or resonator, a 5V supply, and
a serial connection. If not comfortable doing this recommend purchasing the Arduino
Duemilanove or Uno board that has all of these built into the board. Atmel's ATMega328 8-bit
Processor in 28 pin DIP pacakage.

Department of ECE,MRITS 16
IOT based cardiac monitoring integrated alert system

It's like the ATmega168, with double the flash space. 32K of program space.23 I/O
lines, 6 of which are channels for the 10-bit ADC.Runs up to 20MHz with external crystal.
Package can be programmed in circuit. 1.8V to 5V operating voltage.
The Uno differs from all preceding boards in that it does not use the FTDI USB-to-
serial driver chip. Instead, it features the Atmega8U2 programmed as a USB-to-serial converter.
"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, moving forward. The Uno is the
latest in a series of USB Arduino boards, and the reference model for the Arduino platform for a
comparison with previous versions, Arduino boards Atmega328 is shown in fig 4.3

Fig 4.3 Atmega328

Features:

a) 28-pin AVR Microcontroller


b) Flash Program Memory: 32 Kbytes
c) EEPROM Data Memory: 1 Kbytes
d) SRAM Data Memory: 2 Kbytes
e) I/O Pins: 23
f) Timers: Two 8-bit / One 16-bit
g) A/D Converter: 10-bit Six Channel
h) PWM: Six Channels

Department of ECE,MRITS 17
IOT based cardiac monitoring integrated alert system

i) RTC: Yes with Separate Oscillator


j) MSSP: SPI and I²C Master and Slave Support

k) USART: Yes
l) External Oscillator: up to 20MHz
Specification:
a) Microcontroller ATmega328
b) Operating Voltage 5V
c) Supply Voltage (recommended) 7-12V
d) Maximum supply voltage (not recommended) 20V
e) Digital I/O Pins 14 (of which 6 provide PWM output)
f) Analog Input Pins 6
g) DC Current per I/O Pin 40 mA
h) DC Current for 3.3V Pin 50 mA
i) Flash Memory 32 KB (ATmega328) of which 0.5 KB used by boot loader
j) SRAM 2 KB (ATmega328)
k) EEPROM 1 KB (ATmega328)
l) Clock Speed 16 MHz
4.4 BUZZER:
A buzzer or beeper is an audio signaling device, which may be mechanical,
electromechanical, or piezoelectric. Typical uses of buzzers and beepers include alarm devices.
Sound emitter may be extremely low or ear piercing.
Types of buzzers:
Electromechanical:
Early devices were based on an electromechanical system identical to an electric bell
without the metal gong. Similarly, a relay may be connected to interrupt its own actuating
current, causing the contacts to buzz. Often these units were anchored to a wall or ceiling to use
it as a sounding board. The word "buzzer" comes from the rasping noise that electromechanical
buzzers made. Electromechanical buzzer is shown in 4.4

Department of ECE,MRITS 18
IOT based cardiac monitoring integrated alert system

Fig 4.4 electromechanical buzzer

Mechanical:
A joy buzzer is an example of a purely mechanical buzzer. They require drivers
mechanical buzzer is shown in fig 4.5

Fig 4.5 Mechanical buzzer

Piezoelectric:

Fig 4.6 Piezoelectric disk beeper

Department of ECE,MRITS 19
IOT based cardiac monitoring integrated alert system

A piezoelectric element may be driven by an oscillating electronic circuit or other audio


signal source, driven with a piezoelectric audio amplifier. Sounds commonly used to indicate
that a button has been pressed are a click, a ring or a beep.

A piezoelectric buzzer/beeper also depends on acoustic cavity resonance or Helmholtz


resonance to produce an audible beep. piezoelectric buzzer is shown in fig 4.7

Fig 4.7 Piezoelectric buzzer

Applications:
While technological advancements have caused buzzers to be impractical and
undesirable, there are still instances in which buzzers and similar circuits may be used. Present
day applications include:
a) Novelty uses
b) Judging panels
c) Educational purposes
d) Annunciator panels
e) Electronic metronomes
f) Game show lock-out device
g) Microwave ovens and other household appliances
h) Sporting events such as basketball games
i) Electrical alarms
j) Joy buzzer (mechanical buzzer used for pranks)

Department of ECE,MRITS 20
IOT based cardiac monitoring integrated alert system

4.5 IOT MODULE

The ESP8266 is a system on a chip (SOC) Wi-Fi microchip for Internet of Things (IoT)
applications produced by Espressif Systems.
Given its low cost, small size and adaptability with embedded devices, the ESP8266 is
now used extensively across IoT devices. Although it’s now been succeeded by the newer
generation ESP32 microcontroller chip, the ESP8266 is still a popular choice for IoT developers
and manufacturers.
In this article, we’ll explain the main features of ESP8266 modules and development
boards and their application within the world of IoT.

Fig 4.8 IOT module

The ESP8266 module enables microcontrollers to connect to 2.4 GHz Wi-Fi, using IEEE
802.11 bgn. It can be used with ESP-AT firmware to provide Wi-Fi connectivity to external host
MCUs, or it can be used as a self-sufficient MCU by running an RTOS-based SDK. The module
has a full TCP/IP stack and provides the ability for data processing, reads and controls of GPIOs.

ESP8266 Functions
ESP8266 has many applications when it comes to the IoT. Here are just some of the
functions the chip is used for:
 Networking:  The module’s Wi-Fi antenna enables embedded devices to connect
to routers and transmit data

Department of ECE,MRITS 21
IOT based cardiac monitoring integrated alert system

 Data Processing:  Includes processing basic inputs from analog and digital sensors
for far more complex calculations with an RTOS or Non-OS SDK.
 P2P Connectivity:  Create direct communication between ESPs and other devices
using IOT P2P connectivity.
 Web Server:  Access pages written in HTML or development languages.

Specifications:

a) Processor: L106 32-bit RISC microcontroller


b) Memory: 32 KB instruction RAM
c) External QSPI flash: up to 16 MB is supported
d) IEEE 802.11 b/g/n Wi-Fi
e) 17 GPIO pins
f) SPI
g) I^2C (software implementation)
h) I^2S interfaces with DMA (sharing pins with GPIO)
i) UART on dedicated pins, plus a transmit-only UART can be enabled on GPIO2
j) 10-bit ADC

Applications:

The ESP8266 modules are commonly found in the following IoT devices:

 Smart security devices, including surveillance cameras and smart locks


 Smart energy devices, including HVACs and thermostats 
 Smart industrial devices, including Programmable Logic Controllers (PLCs) 
 Smart medical devices, including wearable health monitors

Department of ECE,MRITS 22
IOT based cardiac monitoring integrated alert system

MCU projects:
To connected a device to other device wireless we IOT technology for easy MCU
interfacing.
4.6 LCD Display

A liquid-crystal display (LCD) is a flat-panel display or other electronically modulated


optical device that uses the light-modulating properties of liquid crystal combined
with polarizers. Liquid crystals do not emit light directly, instead using a backlight or reflector to
produce images in color or monochrome. LCDs are available to display arbitrary images (as in a
general-purpose computer display) or fixed images with low information content, which can be
displayed or hidden.

 For instance: preset words, digits, and seven-segment displays, as in a digital clock, are all
good examples of devices with these displays. They use the same basic technology, except that
arbitrary images are made from a matrix of small pixels, while other displays have larger
elements. LCDs can either be normally on (positive) or off (negative), depending on the polarizer
arrangement.

For example, a character positive LCD with a backlight will have black lettering on a
background that is the color of the backlight, and a character negative LCD will have a black
background with the letters being of the same color as the backlight. Optical filters are added to
white on blue LCDs to give them their characteristic appearance.

LCDs are slowly being replaced by OLEDs, which can be easily made into different shapes,
and have a lower response time, wider color gamut, virtually infinite color contrast and viewing
angles, lower weight for a given display size and a slimmer profile (because OLEDs use a single
glass or plastic panel whereas LCDs use two glass panels; the thickness of the panels increases
with size but the increase is more noticeable on LCDs) and potentially lower power consumption
(as the display is only "on" where needed and there is no backlight).

Department of ECE,MRITS 23
IOT based cardiac monitoring integrated alert system

Fig 4.9 LCD pin diagram

Fig 4.10 LCD display

ARCHITECTURE OF LCD TECHNOLOGY:

Top Polarizer: Light is horizontally polarized at the top polarizer. The function of the polarizer
is to improve color and definition, making it possible to see the screens of LCDs. If polarizers
were removed from LCDs, it would be impossible to recognize letters or graphics. When two
polarizing films are placed one on the top of the other in parallel, the screen of the LCD will be at
its brightest. However, when placed on the top of and perpendicular to each other, the screen will
look as though it is black. Hence as described, the optical characteristics of LCDs, such as
brightness and contrast, are greatly influenced by the properties of polarizing films.

Bottom Polarizer: Polarizer is made by stretching a plastic-like material to lengthen its fibers,


then dipping the material in iodine to further lengthen and organize the material’s fibers into a
grid of darkened parallel lines that are invisible to the human eye. This is like a filter that only
allows light waves in a vertical orientation to pass through, and rest of the light waves are
blocked off.

Department of ECE,MRITS 24
IOT based cardiac monitoring integrated alert system

Common Electrode: It is made from the transparent indium-tin-oxide (ITO) for applying the
voltage to liquid crystal layer. Common electrode plays a critical role in maintaining the uniform
pixel voltage across the whole LCD screen. In color screens, the ITO is now separated into three
colors: red, green, and blue (RGB).

Bottom Glass Substrate (Backplane): Special glass used as a starting substrate for the thin film
transistor (TFT) manufacturing process. The liquid crystal is normally 'sandwiched' between two
polarizing filters at 90 degrees to each other. Polarized light enters the back of the liquid crystal
from the back-lit LED.

Top Glass Substrate: Special glass used for the color filter manufacturing process.

Liquid Crystal: Liquid crystals change orientation under an applied electric field and can thereby
block or pass light. Liquid crystals are rod-shaped molecules that twist when an electric current is
applied to them. Each crystal acts like a shutter, either allowing light to pass through or blocking
the light. The pattern of transparent and dark crystals forms the image. The liquid crystals in an
LCD display are in a naturally twisted form.
Types of LCDs:
Based on the structure of LCDs, they are classified into different types:
1. Twisted Nematic Display: The TN (Twisted Nematic) LCDs production can be done most
frequently and used different kinds of displays all over the industries. These displays most
frequently used by gamers as they are cheap & have quick response time as compared with other
displays. The main disadvantage of these displays is that they have low quality as well as partial
contrast ratios, viewing angles & reproduction of color. But these devices are sufficient for daily
operations.

2. In-Plane Switching Display: IPS displays are considered to be the best LCD because they
provide good image quality, higher viewing angles, vibrant color precision & difference. These
displays are mostly used by graphic designers & in some other applications, LCDs need the
maximum potential standards for the reproduction of image & color.

Department of ECE,MRITS 25
IOT based cardiac monitoring integrated alert system
  
3. Vertical Alignment Panel: The vertical alignment (VA) panels drop anywhere in the
vertical alignment (VA) panels drop anywhere in the centre among Twisted Nematic and in-plane
switching panel technology. These panels have the best viewing angles as well as colour
reproduction with higher quality features as compared with TN type displays. These panels have
a low response time. But these are much more reasonable and appropriate for daily use.
4. Advanced Fringe Field Switching (AFFS): AFFS LCDs offer the best performance & a
wide range of color reproduction as compared with IPS displays. The applications of AFFS are
very advanced because they can reduce the distortion of color without compromising on the
broad viewing angle. Usually, this display is used in highly advanced as well as professional
surroundings like in the viable airplane cockpits.
5. Passive and Active Matrix Displays: The Passive-matrix type LCDs works with a
simple grid so that charge can be supplied to a specific pixel on the LCD. The grid can be
designed with a quiet process and it starts through two substrates which are known as glass
layers. One glass layer gives columns whereas the other one gives rows that are designed by
using a clear conductive material like indium-tin-oxide.
ADVANTAGES:
a. LCDs consumes less amount of power compared to CRT and LED.
b. LCDs are consisting of some microwatts for display in comparison to some mill watts for
LED’s.
c. LCDs are of low cost.
DISADVANTAGES:
a. Require additional light sources
b. Range of temperature is limited for operation
c. Low reliability

4.7 POWER SUPPLY:

Step down Bridge Filter circuit Regulator


transformer rectifier Section

Fig 4.11 Block diagram

Department of ECE,MRITS 26
IOT based cardiac monitoring integrated alert system

A power supply is an electronic device that supplies electric energy to an electrical load.
The primary function of a power supply is to convert one form of electrical energy to another. As
a result, power supplies are sometimes referred to as electric power converters. Some power
supplies are discrete, stand-alone devices, whereas others are built into larger devices along with
their loads. Examples of the latter include power supplies found in desktop computers and
consumer electronics devices.

Every power supply must obtain the energy it supplies to its load, as well as any energy it
consumes while performing that task, from an energy source. Depending on its design, a power
supply may obtain energy from various types of energy sources, including electrical energy
transmission systems, energy storage devices such as a batteries and fuel cells, electromechanical
systems such as generators and alternators, solar power converters, or another power supply.

All power supplies have a power input, which receives energy from the energy source,
and a power output that delivers energy to the load. In most power supplies the power input and
output consist of electrical connectors or hardwired circuit connections, though some power
supplies employ wireless energy transfer in lieu of galvanic connections for the power input or
output. Some power supplies have other types of inputs and outputs as well, for functions such as
external monitoring and control.

Specifications:

The suitability of a particular power supply for an application is determined by various


attributes of the power supply, which are typically listed in the power supply's specification.
Commonly specified attributes for a power supply include:

a) Input voltage type (AC or DC) and range.


b) Efficiency of power conversion.
c) The amount of voltage and current it can supply to its load
d) How stable its output voltage or current is under varying line and load conditions.
e) How long it can supply energy without refueling or recharging (applies to power
supplies that employ portable energy sources).
f) Operating and storage temperature ranges.

Department of ECE,MRITS 27
IOT based cardiac monitoring integrated alert system

Features:
a) Simultaneous digital display of both voltage and current.
b) Ten-turn front panel voltage and current controls for high resolution setting of the
output voltage and current from zero to the rated output.
c) Automatic mode crossover into current or voltage mode.
d) Front panel push button control of output standby mode and preview of voltage, current, or
over voltage protection (OVP) set points. Front panel light emitting diode (LED) indicators for
voltage and current mode operation, OVP, remote programming mode, and shutdown. Front
panel control of OVP.
e) Multiple units can be connected in parallel or series to provide increased current or voltage.
f) Thermal shutdown, latching or auto reset.
g) Remote analog voltage and current limit programming with selectable programming ranges.
h) External monitor signals for output voltage and current.
i) Isolated analog remote programming control of the output voltage or current and
isolated readback of output voltage and current with the optional ISOL Interface.
j) Optional internal GPIB or RS-232 computer control for remote digital programming
and readback capability.
k) Rack mount brackets at the front panel are standard.

4.8 CONCLUSION:

In this chapter, the block diagram, sensors (like pulse sensor) and Modules like IOT module,
microcontroller atmega328, Buzzer, LCD display, power supply has been discussed.

Department of ECE,MRITS 28
IOT based cardiac monitoring integrated alert system

CHAPTER 5

IMPLEMENTATION OF PATIENT HEALTH MONITORING AND


INFORMATION SYSTEM USING IOT MODULE
5.1 INTRODUCTION
In this chapter, block diagram overview of the project, motivation, objectives,
literature survey, tools used and organization of the report are discussed

5.2 BLOCK DIAGRAM FOR INFORMATION PROVIDENCE USING IOT


MODULE
The block diagram of patient information providence using IOT module is shown in Fig
5.1.

Fig 5.1 Block diagram of smart heart rate monitoring

Department of ECE,MRITS 29
IOT based cardiac monitoring integrated alert system

5.3 IMPLEMENTATION

Implementing the hospital bed side patient information providence using IOT module, to
design this system which is used to monitor the patient condition using IOT module. By this
project the patient in the ICU needs constant monitoring of their heart beat, if any abnormality
felt by the patient is indicated by a buzzer signal.

The project involves any abnormality felt by the patient is indicated through IOT receiver
by the help of heart beat sensor by detecting the pulse through plug, then it sends through LCD
display and then its parallel shows in serial monitor. The IOT transmitter is having Vcc 5V and

th
GND, the Tx is connected to Arduino 10 th pin and Rx is connected to Arduino 9 pin. The IOT
enable pin connected to the 9th pin of Arduino, IOT reset pin is connected to 10th pin of
Arduino, VCC of heart beat sensor is connected to an intermediate board and then to the
Arduino, as same mentioned before the GND is connected to the Arduino.

5.4 INTERFACING PULSE SENSOR WITH ARDUINO

MAX30102 sensor is used to detect blood oxygen and heart rate. First, infrared radiation is

sent and reflected by hitting the finger, and then the amount of oxygen in the blood is determined

by measuring the wave amplitude. Heart rate is also obtained by analyzing the time series

response of this radiation.

The MAX30102 is an integrated module compatible with the Arduino and STM32. It

integrates a red LED with an infrared LED, a photoelectric detector, an optical device, and a low

noise electronic circuit for ambient light suppression. Heart rate and blood oxygen data are also

transmitted to the Arduino or other microcontrollers via I2C communication.

Department of ECE,MRITS 30
IOT based cardiac monitoring integrated alert system

Fig 5.2 interfacing pulse sensor with Arduino

The circuit connections are made as follows:

A4, A5 of Arduino connected to SDA, SDL of heart beat sensor.

GND of Arduino connected to GND of heart beat sensor.

+5V of Arduino connected to VCC of heart beat sensor.

Heart beat sensor is used blood pressure and body temperatures are very important
parameters to known for human body. We go to doctors that use different kinds of apparatuses to
know the heartbeat of a human. In this tutorial, we are going to make our own heart beat sensor
that will tell us the heart rate. We will make an Arduino based heart beat sensor that will tell us
the number of pulses in a minute when we will place a finger on it.

The module uses an infrared led (IR) and a photo transistor to detect the pulse of the
finger and whenever a pulse is detected red led flashes. There will be led on the light side of the
finger and a photo transistor on the other side of the finger. Photo transistor is used to obtain the
flux emitted. The resistance of the photo resistor will change when the pulse will change.

5.5 INTERFACING LCD WITH ARDUINO

Interfacing an Arduino microcontroller with an LCD display consists of two parts, wiring
and programming.

Department of ECE , MRITS 31


IOT based cardiac monitoring integrated alert system

5.5.1 LCD WIRING THOUGH ARDUINO

A typical LCD display consists of 16 pins that control various features of the screen. The
Arduino microcontroller can output voltages of either 5V or 3.3V, so the LCD can be powered
by wiring Vss and Vdd to the ground and 5V pins on the microcontroller.

The Hitachi HD44780 chipset or compatible LCD’s generally have a very standard pin
set. Those without backlights may have only 14 pins, omitting the final two pins powering the
light.

Solder the headers on to the LCD panel and insert the LCD panel into a solder less bread
board. Wire the bread board with 5V and GND from the Arduino

RS pin of the LCD module is connected to digital pin12 of the Arduino/W pin of the
LCD is grounded. Enable pin of the LCD module is connected to digital pin11 of the Arduino. In
this project, the LCD module and Arduino are interfaced in the 4-bit mode.

This method is very simple, requires less connections and that can almost utilize the full
potential of the LCD module. LCD through Arduino is shown in fig 5.3

Fig 5.3 LCD through Arduino

Department of ECE,MRITS 32
IOT based cardiac monitoring integrated alert system

5.5.2 LCD PROGRAMMING

Once all of the wiring us complete the Arduino can write text to the LCD via programs
that are loaded onto the microcontroller. Programs utilizing the JAVA programming language
can be uploaded to the microcontroller via free open-source software made by Arduino. A library
made by Arduino called “Liquid Crystal” can download and used in any programs written to
interface with the LCD display. The “Liquid Crystal” library contains a variety of built-in
functions that allow an Arduino to control an LCD. These functions allow the user to do things
like print text strings to the screen, initialize the screen cursor to a certain pixel, scroll the screen
left or right, clear the display, as well as a variety of other things. One of the main reasons that
LCD displays have become so common in recent years is due to the ease at which they can be
interfaced with. Although an Arduino microcontroller was used to demonstrate this ability in this
application note, a variety of other microcontrollers can be used to achieve the same result. On a
similar note, much more can be accomplished with an Arduino microcontroller and an LCD
display than what was demonstrated in this application note. By adding further hardware to the
circuit described here things like real time clocks and thermometers can be added, allowing the
LCD to display the current time and temperature. The simplicity of their design and ease of
interface allows for LCD screens to be used in a variety of projects on both a large and small
scale.

5.6 INTERFACING BUZZER WITH ARDIUNO

If a buzzer operates from a low enough voltage and draws low enough current, it can be
interfaced directly to an Arduino Uno pin as shown in Fig 5.6.

The buzzer used in this example can operate from a voltage between 3 to 28V and draws
only 4mA of current at 12V. When the current drawn by the buzzer was measured at 5V, it was
found that it only drew about 1.1mA which is well within the drive capability of an Arduino Uno
pin. Interfacing of buzzer with Arduino is shown in fig 5.4.
5.7 CONCLUSION

In this chapter, Implementation of patient using Arduino and interfacing of modules,


pulse sensors and lm358 with the Arduino have been discussed.

Department of ECE,MRITS 33
IOT based cardiac monitoring integrated alert system

CHAPTER 6
RESULTS AND DISCUSSION

6.1 INTRODUCTION

In this chapter Results and Discussion On Determination of SPO2 and heart rate using
Bluetooth module are discussed.

6.2 RESULTS

Determination of Spo2 and heart rate using IOT module, if the count of the heart beat
pulse is less than the normal pulse per minute then doctor gets alert through the buzzer and
message is sent to his/her owners through IOT module. This is the main hardware kit for project.
The output will be shown in LCD connected to the micro controller. The LCD module is
connected to the port P2 Arduino Uno board, as shown in fig 6.1

Fig 6.1 Hardware kit for smart heart rate monitoring system using SPO2 and IOT
module

Department of ECE,MRITS 34
IOT based cardiac monitoring integrated alert system

In the fig 6.2, the heart beat sensor that is connected to analog input A0 to the
microcontroller which senses the pulse and displays the reading on LCD module as shown in Fig
6.2.

Fig 6.2 heart beat sensor connected to IOT module

The main aim of the project is to know whether Determination of SPO2 and heart rate
using Arduino patient conditions is critical then pulse sensor sense the pulse and IOT module
gets activated and is displayed on LCD as shown in Fig 6.3 and buzzer is alarmed.

Fig 6.3 Heart beat information in serial monitor.

Department of ECE,MRITS 35
IOT based cardiac monitoring integrated alert system

In the project, if the condition of patient is displayed on LCD the information is


also displayed parallel Android app in mobile shown in Fig 6.4.

Fig 6.4 Heart beat information in IOT module.

6.3 CONCLUSION

In this chapter, Results and Discussion on Determination of SPO2 and heart rate using
Arduino.

Department of ECE,MRITS 36
IOT based cardiac monitoring integrated alert system

CHAPTER 7

CONCLUSION AND FUTURE SCOPE

7.1 CONCLUSION

From the above designed project, we can conclude that we are able to transmit the data
which is sensed from remote patient to the doctor’s PC by using wireless transmission
technology, Bluetooth. Using Bluetooth at receiver the data is received and displayed on the PC.

With the fast development of the industrialization and urbanization process in the world
and hence with the increase of busyness of people it has become difficult to monitor the health
conditions of a patient continuously. Also, with the increase in the number senior citizens and
chronic diseases, the number of elderly patients who need constant assistance has increased. One
key point of all critical care for elderly patient is the continuous monitoring of their vital signs.
To avoid unexpected health problems and obtain higher accuracy in diagnosis of the health
conditions of a patient, efficient and comprehensive data collecting, monitoring and control play
an important role to improve the health care system more reliable and effective.

7.2 FUTURE SCOPE

Wireless sensor networks, a well-known technology consist of small, battery-powered


"motes" with limited computation and radio communication capabilities. This technology has the
potential to impact the delivery and study of resuscitative care by allowing vital signs to be
automatically collected and fully integrated into the patient care record and used for real-time
triage, correlation with hospital records, and long-term observation. This network technology
provides a better solution for remote monitoring of post-operative patients in a hospital, elderly
patients at home and patients affected by COPD and PD during their rehabilitation period in
ambulatory environments.
There are many other extensions possible to the current work that can be studied further. The
direct extension is to use artificial intelligence in wireless sensor networks to explore simple
parallel distributed computation, distributed storage, data robustness and auto classification of
sensor readings to help the physicians in the early interpretation of diseases. With sensor

Department of ECE,MRITS 37
IOT based cardiac monitoring integrated alert system

networks on the verge of deployment, security issues pertaining to the sensor networks are in the
limelight. Due to the sensitiveness of medical data, austere privacy and security are inevitable for
all parts of healthcare systems. The IPv6 over Low power Wireless Personal Area Networks
(6LoWPAN) standard offers an alternative because it employs the IPv6 protocol and can operate
equally well over wireless and wired connections. The presence of a single actuator in sensor
networks eliminates the need for coordination and communication between actuators and a
sparsely connected network eliminates the need for location management. Our current work can
also extend further to monitor sports personalities and patients affected by other specific diseases
during their normal routine activities.

Department of ECE,MRITS 38
IOT based cardiac monitoring integrated alert system

REFERENCES
1. J. Salyer, "Neonatal and Pediatric Pulse Oximetry", Respiratory Care, pp. 286-289, 2003.
2. C. Otto, A. Milenkovic, C. Sanders, E. Jovanov, "System architecture of a wireless body area
sensor network for ubiquitous health monitoring", Journal of Mobile Multimedia, vol. 1, pp.
307-326, 2006.
3.. Dusit Niyato, Ekram Hossain, Sergio Camorlinga, "Remote Patient Monitoring Service using
Heterogeneous Wireless Access Networks Architecture and Optimization", IEEE JOURNAL
ON SELECTED AREAS IN COMMUNICATIONS, vol. 27, no. 4, MAY 2009.
4. CC2430 Data Sheet (rev. 2.1) SWRS036F. A True System-on-Chip solution for 2.4 GHz
IEEE 802.15.4 Bluetooth(TM)Texas Instruments..
5. Xiang-dong JIANG, Yu-liang TANG, Ying LEL, Wireless Sensor Networks in Structural
Health Monitoring Based on Bluetooth Technology.

Department of ECE,MRITS 39
IOT based cardiac monitoring integrated alert system

APPENDIX-A

SOURCE CODE

#include <Wire.h>
#include "MAX30105.h"
#include "spo2_algorithm.h"

MAX30105 particleSensor;

#define MAX_BRIGHTNESS 255

#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168__)


//Arduino Uno doesn't have enough SRAM to store 100 samples of IR led data and red led data in
32-bit format
//To solve this problem, 16-bit MSB of the sampled data will be truncated. Samples become 16-
bit data.
uint16_t irBuffer[100]; //infrared LED sensor data
uint16_t redBuffer[100];  //red LED sensor data
#else
uint32_t irBuffer[100]; //infrared LED sensor data
uint32_t redBuffer[100];  //red LED sensor data
#endif

int32_t bufferLength; //data length


int32_t spo2; //SPO2 value
int8_t validSPO2; //indicator to show if the SPO2 calculation is valid
int32_t heartRate; //heart rate value
int8_t validHeartRate; //indicator to show if the heart rate calculation is valid

byte pulseLED = 11; //Must be on PWM pin


byte readLED = 13; //Blinks with each data read

void setup()
{
  Serial.begin(115200); // initialize serial communication at 115200 bits per second:

  pinMode(pulseLED, OUTPUT);
  pinMode(readLED, OUTPUT);

  // Initialize sensor
  if (!particleSensor.begin(Wire, I2C_SPEED_FAST)) //Use default I2C port, 400kHz speed
 {
    Serial.println(F("MAX30105 was not found. Please check wiring/power."));
    while (1);
 }

Department of ECE,MRITS 40
IOT based cardiac monitoring integrated alert system

Serial.println(F("Attach sensor to finger with rubber band. Press any key to start conversion"));
  while (Serial.available() == 0) ; //wait until user presses a key
  Serial.read();

  byte ledBrightness = 60; //Options: 0=Off to 255=50mA


  byte sampleAverage = 4; //Options: 1, 2, 4, 8, 16, 32
  byte ledMode = 2; //Options: 1 = Red only, 2 = Red + IR, 3 = Red + IR + Green
  byte sampleRate = 100; //Options: 50, 100, 200, 400, 800, 1000, 1600, 3200
  int pulseWidth = 411; //Options: 69, 118, 215, 411
  int adcRange = 4096; //Options: 2048, 4096, 8192, 16384

  particleSensor.setup(ledBrightness, sampleAverage, ledMode, sampleRate, pulseWidth,


adcRange); //Configure sensor with these settings
}

void loop()
{
  bufferLength = 100; //buffer length of 100 stores 4 seconds of samples running at 25sps

  //read the first 100 samples, and determine the signal range
  for (byte i = 0 ; i < bufferLength ; i++)
 {
    while (particleSensor.available() == false) //do we have new data?
      particleSensor.check(); //Check the sensor for new data

    redBuffer[i] = particleSensor.getRed();
    irBuffer[i] = particleSensor.getIR();
    particleSensor.nextSample(); //We're finished with this sample so move to next sample
Serial.print(F("red="));
Serial.print(redBuffer[i], DEC);
Serial.print(F(", ir="));

Department of ECE,MRITS 41
IOT based cardiac monitoring integrated alert system

Serial.println(irBuffer[i], DEC);
 }

  //calculate heart rate and SpO2 after first 100 samples (first 4 seconds of samples)
  maxim_heart_rate_and_oxygen_saturation(irBuffer, bufferLength, redBuffer, &spo2,
&validSPO2, &heartRate, &validHeartRate);

  //Continuously taking samples from MAX30102.  Heart rate and SpO2 are calculated every 1
second
  while (1)
 {
    //dumping the first 25 sets of samples in the memory and shift the last 75 sets of samples to the
top
    for (byte i = 25; i < 100; i++)
  {
      redBuffer[i - 25] = redBuffer[i];
      irBuffer[i - 25] = irBuffer[i];
  }

    //take 25 sets of samples before calculating the heart rate.


    for (byte i = 75; i < 100; i++)
  {
      while (particleSensor.available() == false) //do we have new data?
        particleSensor.check(); //Check the sensor for new data

      digitalWrite(readLED, !digitalRead(readLED)); //Blink onboard LED with every data read

      redBuffer[i] = particleSensor.getRed();
      irBuffer[i] = particleSensor.getIR();
      particleSensor.nextSample(); //We're finished with this sample so move to next samplE

Department of ECE,MRITS 42
IOT based cardiac monitoring integrated alert system

      //send samples and calculation result to terminal program through UART


      Serial.print(F("red="));
      Serial.print(redBuffer[i], DEC);
      Serial.print(F(", ir="));
      Serial.print(irBuffer[i], DEC);

      Serial.print(F(", HR="));
      Serial.print(heartRate, DEC);

      Serial.print(F(", HRvalid="));
      Serial.print(validHeartRate, DEC);

      Serial.print(F(", SPO2="));
      Serial.print(spo2, DEC);

      Serial.print(F(", SPO2Valid="));
      Serial.println(validSPO2, DEC);
  }

    //After gathering 25 new samples recalculate HR and SP02


    maxim_heart_rate_and_oxygen_saturation(irBuffer, bufferLength, redBuffer, &spo2,
&validSPO2, &heartRate, &validHeartRate);
 }

Department of ECE , MRITS 43


IOT based cardiac monitoring integrated alert system

APPENDIX-B

ARDUINO SOFTWARE

OVERVIEW

Arduino
Arduino is a tool for making computers that can sense and control more of the physical
world than desktop computer. It's an open source physical computing platform based on a simple
microcontroller board, and a development environment for writing software for the board.

Arduino can be used to develop interactive objects, taking inputs from a variety of
switches or sensors, and controlling a variety of lights, motors, and other physical outputs.
Arduino projects can be stand alone, or they can be communicated with software running on
computer (e.g. Flash, Processing, Max MSP.) The boards can be assembled by hand or
purchased preassembled; the open source IDE can be downloaded for free.

The Arduino programming language is an implementation of Wiring, a similar physical


computing platform, which is based on the Processing multimedia programming environment.

Feature
a) Schematic design of the open source development interface free download, and
also according to the needs of their own changes
b) Download the program is simple and convenient.
c) Simply with the sensor, a wide range of electronic components connection (such as:
LCD, buzzer, etc.), make all sorts of interesting things.
d) Using the high-speed micro-processing controller (ATMEGA328).
e) The development of language and development environment is very simple, easy to
understand, very suitable for beginners to learn.

Performance
a) Digital I/O 0~13.
b) Analog I/O 0~5.( R3 is 0~7 )
c) Support ISP Download Function
d) Input voltage: when connected to the USB without external power supply or

Department of ECE, MRITS 44


IOT based cardiac monitoring integrated alert system

external 5 V ~ 9V dc voltage input. Output Voltage: 5V dc voltage output and


3.3V dc voltage output and external power input.

e) Atmel Atmega328 micro-processing controller. Because of its many supporters,


the company has developed 32- bit MCU Arduino platform support.

f) Arduino size: width of 70 mm X high 54 mm.

Special Port

a) 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). The supply voltage through this pin, or, if supplying voltage via the power
jack, access it through this pin.
b) AREF. Reference voltage for the analog inputs. Used with analogReference().

SAINSMART UNO R3
UNO R3
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. Performance Revision 3 is
the last SainSmart UNO development board version.

Parameter

a) 3.3V/5V Supply Voltage and IO Voltage can be switched at the same time.
b) More 3.3V modules supported, such as Xbee module, Bluetooth module, RF
module, GPRS module, GPS module, LCD5110 Backlight and so on, but the
original version can only support 5V IO.

c) Controller uses SMD MEGA328P-AU chip. Add A6/A7 port.

d) 5V Electric current : 500MA

e) 3.3V Electric current : 50MA


f) Input Voltage: 7-12V

Department of ECE,MRITS 45
IOT based cardiac monitoring integrated alert system

Improvement of R3
a) Working voltage 3.3V/5V is optional.
b) Arduino can only work at 5V voltage. When it comes to 3.3V Level module, IO
can’t be connected to it. The Level should be changed, like the SD card, Bluetooth
module and so on.

c) Sainsmart UNO R3 can work at 3.3V voltage by switching on the button. At this
time, IO port is 3.3V and it can work with 3.3V Level module. (R3 can directly use
the electronic building blocks on I / O port and elicit G, V, S).
SAINSMART MEGA2560 R3
Description
This is the new MEGA2560 R3. In addition to all the features of the previous board, the
MEGA now uses an ATMega16U2 instead of the ATMega8U2 chip. This allows for faster
transfer rates and more memory. No drivers needed for Linux or Mac (inf file for Windows is
needed and included in the Arduino IDE), and the ability to have the Uno show up as a keyboard,
mouse, joystick, etc.

The MEGA2560 R3 also adds SDA and SCL pins next to the AREF. In addition, there are
two new pins placed near the RESET pin. One is the IOREF that allow the shields to adapt to the
voltage provided from the board. The other is a not connected and is reserved for future
purposes. The MEGA2560 R3 works with all existing shields but can adapt to new shields which
use these additional pins.

Features

a) Microcontroller ATmega2560
b) Operating Voltage 5V
c) Input Voltage (recommended) 7-12V
d) Input Voltage (limits) 6-20V
e) Digital I/O Pins 54 (of which 15 provide PWM output)
f) Analog Input Pins 16
g) DC Current per I/O Pin 40 mA

h) DC Current for 3.3V Pin 50 mA

Department of ECE,MRITS 46
IOT based cardiac monitoring integrated alert system

i) Flash Memory 256 KB of which 8 KB used by bootloader


j) SRAM 8 KB
k) EEPROM 4 KB
l) Clock Speed 16 MHz

ARDUINO C GRAMMAR
Arduino grammar is built on the basis of C/C + +, in fact is also the basic C grammar,
Arduino grammar not only put some related parameters Settings are function change, we have no
need to understand his bottom, let us to know AVR micro control unit (MCU) friend can also
easy to fit in. So here I'll simple comment the Arduino grammar.

Control Structures
a) If
b) if...else
c) for
d) switch case
e) while
f) do... while
g) break
h) continue
i) return
j) goto

Further Syntax
a) ;
b) {}
c) //
d) /* */
Operators
a) ++
b) --
c) +=
d) -=

Department of ECE,MRITS 47
IOT based cardiac monitoring integrated alert system

e) *=
f) /=
g) =
h) +
i) -
j) *
k) /
l) %
m) ==
n) !=
o) <
p) >
q) <=
r) >=
s) &&
t) ||
u) !

Data Type

a) boolean
b) char
c) byte
d) int
e) unsigned int
f) long
g) unsigned long
h) float
i) double
j) string
k) array
l) void

Department of ECE,MRITS 48
IOT based cardiac monitoring integrated alert system

Constant

HIGH | LOW Said digital IO port level, HIGH Said high level(1), LOW Said low electric
flat(0).

INPUT | OUTPUT Said digital IO port direction, INPUT Said input (high impedance state)

OUTPUT Said output (AVR can provide 5 v voltage and ma current).

TRUE | FALSE true (1),false (0).

Structure

Voidsetup ()

The setup() function is called when a sketch starts. Use it to initialize variables, pin
modes, start using libraries, etc. The setup function will only run once, after each power up or
reset of the Arduino board.

Voidloop()

After creating a setup() function, which initializes and sets the initial values, the loop()
function does precisely what its name suggests, and loops consecutively, allowing program to
change and respond. Use it to actively control the Arduino board.

Function
a) Digital I/O
pinMode(pin, mode)pin 0~13, mode is input or output.
digitalWrite(pin, value)pin 0~13, value is HIGH or LOW.
intdigitalRead(pin)pin 0~13, value is HIGH or LOW.
b) Analog I/O
IntanalogRead(pin)pin 0~5.
analogWrite(pin, value)pin 3, 5, 6, 9, 10, 11, value is 0 to 255.
Time
a) Delay(ms)Pauses the program for the amount of time (in miliseconds) specified
as parameter. (There are 1000 milliseconds in a second.)(unitms).
b) delayMicroseconds(us).

Department of ECE,MRITS 49
IOT based cardiac monitoring integrated alert system

OLED Program
Here, we will learn use Arduino IDE serial interface tools to show the contents that
we want to display in the computer.
void setup()
{
Serial.begin(9600);// opens serial port, sets data rate to 9600 bps
Serial.println("Hello World!");
}
void loop()

{
}
Explain

Display connects to Arduino using only four wires – two for power and two for data, making
the wiring very simple. The data connection is I2C (I²C, IIC or Inter-Integrated Circuit). This
interface is sometimes called TWI (Two Wire Interface).
At the very lowest level, the Arduino Wire library is used to communicate with the display.
Libraries are available that make it easy to start using the display right away to display text and
graphics. These libraries are installed in this tutorial.

Fig 7.1: OLED with Arduino


Operation
1. Download code to Arduino.
2. After download, click “tool”, pick up relevant Arduino board, and relevant
com. Then click “serial Monitor”, on the new open up window’s bottom
right, choose the relevant rate. OLED Sample Compilation is shown in fig
7.2

Department of ECE,MRITS 50
IOT based cardiac monitoring integrated alert system

Fig 7.2: OLED Sample Compilation


OLED Sample Program

 0.96 inch monochrome OLED display from Geekcreit is connected or interfaced to an Arduino.
Libraries are then installed and some example programs run which show how to use the display
in an Arduino sketch.
The display connects to Arduino using only four wires – two for power and two for data, making
the wiring very simple. The data connection is I2C (I²C, IIC or Inter-Integrated Circuit). This
interface is sometimes called TWI (Two Wire Interface).

Fig 7.3: OLED Connected to Arduino

Department of ECE,MRITS 51
IOT based cardiac monitoring integrated alert system

The first and most important thing to note is that some of the displays may have the GND and
VCC power pins swapped around. Check your display to make sure that it is the same as the
image below. If the pins are swapped, make sure to change the connections to the Arduino –
OLED VCC connects to 5V on the Arduino, OLED GND to GND on the Arduino.
#include <Wire.h>
#include <Adafruit_SSD1306.h>
#include <Adafruit_GFX.h>

// OLED display TWI address


#define OLED_ADDR 0x3C

Adafruit_SSD1306 display(-1);

#if (SSD1306_LCDHEIGHT != 64)


#error("Height incorrect, please fix Adafruit_SSD1306.h!");
#endif

void setup() {
// initialize and clear display
display.begin(SSD1306_SWITCHCAPVCC, OLED_ADDR);
display.clearDisplay();
display.display();

// display a pixel in each corner of the screen


display.drawPixel(0, 0, WHITE);
display.drawPixel(127, 0, WHITE);
display.drawPixel(0, 63, WHITE);
display.drawPixel(127, 63, WHITE);

// display a line of text


display.setTextSize(1);

Department of ECE,MRITS 52
IOT based cardiac monitoring integrated alert system
IOT based cardiac monitoring integrated alert system

Smart heart rate monitoring using bluetooth modul

display.setTextColor(WHITE);
display.setCursor(27,30);
display.print("Hello, world!");

// update display with all of the above graphics


display.display();
}

void loop() {
// put your main code here, to run repeatedly:

Department of ECE,MRITS 53
IOT based cardiac monitoring integrated alert system
Smart heart rate monitoring using bluetooth module

Department of ECE,MRITS 59

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy