Sie sind auf Seite 1von 15

[Heart rate notification & alarm system]

[ Smart Heart rate monitoring device which continuously monitors, notifies the patient’s
heart rate and alarm whenever necessary to the doctors and other personnel who takes care
of the patients through their personal mobile phones using cloud services and IOT]

[DONE BY]

[MDM17B008] MAHESH A

[MDM17B023] ARUN KRISHNA

[MDM17B016] JASHWANTH

[MDM17B028] BHARATH
HEART RATE NOTIFCATION AND
ALARMING SYSTEM USING PULSE SENSOR

ABSTRACT

Pulse rate is the one of the crucial parameter which should be monitored
continuously for patients and they must be treated within time and with right
attention. The conventional heart rate measuring instrument gives alarming
sound when the patient’s pulse rate falls, only inside the patient's room and
some person like nurse has to find their way to the room only if they hear the
alarming sound or when notified by someone. This alarming system becomes out
of use when no nurse or doctors are nearby to hear the sound. In India, many
times it happens that the patient suffers severe health problem due to delay in
treatment and sometimes may also lose their lives. ICU patients in critical
condition need continuous attention. Their data of health has to be monitored
from time to time and timeliness of notification during emergency situation is
very crucial and very serious issues even loss of life could happen if the
notification of patient's emergency hasn't reached till the nurses or doctors
allotted to them within time. We present an effective solution to counter the
above mentioned problem by using pulse sensor and cloud to transfer the sensor
output continuously. In this project, by making use of IoT a patient's the patient's
health can be monitored continuously and information of the necessary
parameters of patient's health can be obtained and right action can be taken
within time even with remote control system.

1. Introduction

A heart rate monitor is a personal monitoring device that allows a subject to


measure their heart rate in real time or record their heart rate for later study.
Early models consisted of a monitoring box with a set of electrode leads that
attached to the chest. The heart rate of a healthy adult at rest is around 72 beats
per minute (bpm) & Babies at around 120 bpm, while older children have heart
rates at around 90 bpm. The heart rate rises gradually during exercises and
returns slowly to the rest value after exercise . The rate when the pulse returns
to normal is an indication of the fitness of the person. Lower than normal heart
rates are usually an indication of a condition known as bradycardia, while higher
is known as tachycardia. Heart rate is
simply measured by placing the thumb
over the subject’s arterial pulsation, and
feeling, timing and counting the pulses
usually in a 30 second period. Heart rate
(bpm) of the subject is then found by
multiplying the obtained number by 2. This
method although simple, is not accurate
and can give errors when the rate is high.
More sophisticated methods to measure the heart rate utilize electronic
techniques. Electro-cardiogram (ECG) is one of frequently used method for
measuring the heart rate. But it is an expensive device. Low-cost devices in the
form of wrist watches are also available for the instantaneous measurement of
the heart rate. Such devices can give accurate measurements but their cost is
usually in excess of several hundred dollars, making them uneconomical. We
used the LED light detector based pulse sensor which is fairly accurate,sensitive
and also economical. Fig. 1. Normal heart rates for different ages

2. Materials Required

 Pulse sensor:
Heart beat sensor is designed to give digital
output of heat beat when a finger is placed
on it. When the heart beat detector is
working, the beat LED flashes in unison with
each heart beat. This digital output can be
connected to microcontroller directly to
measure the Beats Per Minute (BPM) rate. It
works on the principle of light modulation
by blood flow through finger at each pulse.
The sensor consists of a super bright red
LED and light detector. The LED needs to be
super bright as the maximum light must
pass spread in finger and detected by detector. Now, when the heart pumps a
pulse of blood through the blood vessels, the finger becomes slightly more
opaque and so less light reached the detector. With each heart pulse the detector
signal varies. This variation is converted to electrical pulse. This signal is
amplified and triggered through an amplifier which outputs +5V logic level
signal. The output signal is also indicated by a LED which blinks on each heart
beat.

Features:

1. Biometric Pulse Rate or Heart Rate detecting sensor.


2. Plug and Play type sensor.
3. Operating Voltage: +5V or +3.3V.
4. Current Consumption: 4mA.
5. Inbuilt Amplification and Noise cancellation circuit.
6. Diameter: 0.625”
7. Thickness: 0.125” Thick

 ESP8266 WIFI module:

The ESP8266 is a low-cost Wi-Fi microchip with


full TCP/IP stack and microcontroller. This small
module allows microcontrollers to connect to a
Wi-Fi network and make simple TCP/IP
connections using Hayes-style commands. This
wifi module is connected with the
microcontroller and it is used to send the data to
the cloud at specific time intervals.

 Arduino Uno microcontroller.

 Bread board.

 Jumper wires and Wifi connection.


3. Device Fabrication:

Sensor calibration:

The output of the pulse rate sensor is the voltage. This voltage output of the
sensor has to be calibrated with the heart rate, before actually using it to
measure the heart rate. We took about four different values of the heart rate by
simply placing the thumb over the arterial pulsation, and feeling, timing and
counting the pulses usually in a 30 second period. Heart rate (bpm) is then found
by multiplying the obtained number by 2. The voltage output of the pulse rate
sensor was also noted down and shown in Fig. 2. These sensor voltage and the
corresponding heart rate was used to fit a general curve to determine the heart
rate as a function of the voltage. This curve fitting process was done in LabVIEW
software using the circuit shown in Fig. 4. We tried for various curve fit such as
exponential, polynomial etc. But finally the linear curve fit was the optimal one.
The slope and intercept of the linear equation were found out and the equation
was validated by comparing the actual heart rate to that of the heart rate got
from the equation by substituting the output voltage of the sensor in the
equation. And the equation we got was,

H  190.421V  97.12 (3.1)

Where H is the heart rate in BPM and V is the sensor output voltage in Volts.

The whole front panel image is shown in Fig. 3.


Fig. 2. Array showing the heart rate (bpm) vs corresponding output voltage (V) values

Fig. 3. Front panel of the LabVIEW program (red colour line in the graph shows the function 3.1 the
white line shows the actual readings)
Fig. 4. Block diagram of the LabVIEW program

Wifi Module connection:


Fig. 5. Circuit connection of wifi module with the arduino

The connection is made according to the diagram shown in Fig. 5. The only
change we made is, we connected the yellow wire to digital port 7 and blue wire
to digital port 6.

Pulse rate sensor connection:


Fig. 6. Circuit connection of pulse rate sensor with the arduino

The circuit connection between the pulse rate sensor and arduino was made
exactly as same as shown in Fig. 6.

Thingspeak and IFTTT login:

To upload the data into the cloud we need to select the cloud server
to which we need to transfer the data. We chose the “Thing speak” cloud.
ThingSpeak is an open-source Internet of Things (IoT) application and API to
store and retrieve data from things using the HTTP and MQTT protocol over the
Internet or via a Local Area Network. ThingSpeak enables the creation of sensor
logging applications, location tracking applications, and a social network of
things with status updates. To upload data to the “Thingspeak” cloud we created
an account in “thingspeak.com” website from which we got our “channel ID” and
“API key”. These two are mandatory to transfer our heart rate data to the
“Thingspeak” cloud because the arduino code defined by the thingspeak library
to edit single a field requires these as inputs.
The next is to create an account in ifttt.com for using the IFTTT( if this then
that) services.

Coding :

We installed the “Thingspeak” library by matlab in the arduino software which


can be done by selecting the “manage library option” from the “tools”. Then we
opened the “write single field” code provided int the “Thingspeak” library. This
can done by (Files->examples->Thingspeak->ESP8266->programdirectly-> write
single field). The code provided by the “Thingspeak” library is to send the
variable “number” to the cloud every 20 second. We adjusted the code in such a
way that the sensor output voltage is substituted in the equation 3.1 to get the
heart rate for every second. This heart rate for every second is averaged out for a
time period of 30 seconds. This averaged heart rate is sent to the cloud for every
30 seconds. The code is shown below

Arduino Code
Secret.h header file code

Here in this code the inputs are taken in this secret.h file which is imported to the
main code. SECRET_SSID is the wifihotspot name and SECRET_PASS is the
password of that. SECRET_CH_ID is the channel number SECRET_WRITE_APIKEY
is the channel API key which we got while creating account in the
“thingspeak.com”

Conditioning :

For making the thinkspeak cloud to react to the data entered. We placed “react”
which can be accessed by clicking the “apps” after logging. In that react we
placed a condition that if the pulse rate is below 50 perform the “thing http”. This
is done every time when a new data is entered.

Fig. 7. React condition


Now we went to the IFTTT website we created an applet with choosing the
“webhook” for “this” and “email” for “that” to send us an email with the event
name “low heart rate”. After creating this this IFTTT gives us a link, which is a
trigger link. Whenever it is triggered the email action will be performed.
Similarly we did the same thing for getting SMS. Only on change is for the “that”
part we chose “SMS”. Then we opened the “Thinghttp” then we copied the trigger
link and pasted in in the “Thinghttp”. Then we finally matched the “react” with
the “Thinghttp” based on the “Thinghttp’s” name (can be seen in Fig. 7
“pulselow”). This will tell the “react” which “Thinghttp” should be called which
contains the trigger for email or SMS. Whenever the “Thinghttp” is called by the
corresponding “react”, the event is triggered.

4. Working

When we place the pulse rate sensor on any vein, it gives some voltage signal as
output. This is read by the analog input port of the arduino and this converted
into heart rate by using the calibrated equation (3.1). This process happens for
every one second, since we gave the delay as one second. This heart rate reading
is averaged out for 30 seconds and this averaged heart rate is sent to the
“Thingspeak” cloud by the wifi module using the wifi connection and the
“Thingspeak” channel ID and API key. The Wifi module has a limitation of data
sending rate. It can send only one data per ten seconds. After the data is reached
the “react” checks for the condition (less than 50bpm or greater than 100bpm), if
the condition matches it calls the “Thinghttp” which in turn triggers the link of
the IFTTT which either sends us email or sms notification based on the trigger.
Fig. 8. Block diagram of the device

Also the Thingspeak cloud automatically plots the entered data with time which
can be viewed my multiple people even from remote location. This can be clearly
seen in Fig. 9.

Fig. 9. Plot of the heart rate with time (continuous) and


Fig. 10. Email and SMS notification when the BPM<50

5. Conclusion

Many researchers are focusing towards the application of emerging IoT


technology in several industries including health care. IT technology provides
possible openings for the development of smart systems for health care. It is
portable and cost effective. It is a very efficient system and very easy to handle
and thus provides great flexibility and serves as a great improvement over other
conventional monitoring and alert systems because our system notifies and
alarms each of the person through their personal mobile phones thereby it
reduces the risk of not addressing the emergency situation within the time and
could save a lot of lives. Also it is very flexible because the patient’s heart rate
can be monitored even in remote location. This project could be extended even
to make calls when the patient’s health is going risky by making a condition on
the slope of the decrease or increase in the heart rate for a particular time
interval.

Das könnte Ihnen auch gefallen