nhịp tim iot
nhịp tim iot
2020; 1(2): 69 - 76
Published online October 31, 2020 (https://agribusinessedu.com/ijmirr-journal/)
DOI: 10.5281/zenodo.4309738
ISSN: 2709-6289 (Online)
Email address:
[email protected] (P. Haque).
Abstract: Internet of Things (IOT) has many applications in the medical field. With remote-information gathering,
healthcare professionals can evaluate, diagnose and treat patients in remote locations using telecommunications
technology. This study aimed to develop a small-scale electrocardiogram (ECG) monitoring device that will measure heart
rates and waveforms and send the data in a database and a web server. An ECG acquisition device was developed using a
single-lead heart rate monitor sensor and an Arduino microcontroller. The goal of this study is to use sensor technologies
to develop a smart platform for health monitoring. Our platform consists of a sensor node, a firebase server and a health
cloud. Through this system we can get the electrocardiography (ECG) signals. The sensor node can detect the QRS pick
value. Through this system most normal ECG can be filtered out, and the abnormal ECG is further analyzed in the health
cloud. The average of the QRS sensitivity and positive prediction is above 99%. The device was deemed functional and
reliable. The main purpose of our project is to measure the heart rate using Wi-Fi Module and the ECG sensor with using
an app.
1. Introduction
As the population is becoming progressively older, higher quality of health and medical care is now expected in countries
with significant again problems. This care is particularly important for countries with 75% of the elders suffering from
chronic diseases. Health conditions of aged people usually need to be checked more frequently, which poses a greater
challenge to existing medical systems. Therefore, how to identify human diseases in a timely and accurate manner with low
costs has been paid an increasing attention. Due to the dominance in the diagnosis of heart-related diseases,
electrocardiogram (ECG) monitoring has been widely applied in both hospitals and medical research. The study focuses on
developing a small-scale heart monitoring system using Electrocardiogram (ECG) technology. The device is composed of a
single-lead heart rate monitor sensor which converts the ECG signal into analog data. The data is sent to an external
computer where it will be processed into ECG rates and waveforms by a MATLAB program. The proposed design is
capable of measuring heart-rate and ECG of the patient and sending results using internet. In our system, we use peer to
peer connection for getting the right signal for ECG. For ECG, the sampling rate will be 40 HZ. So, for 40 HZ frequency
we use the peer to peer connection which is directly connected with mobile phone and NODMCU through Wi-Fi hotspot.
Through this process we can get data and waveforms for the ECG and monitoring the heart rate.
2. Literature Review
A) Heart rate monitoring using fingertip: This paper presents the design and development of a microcontroller based
heart rate monitor using fingertip sensor. The device uses the optical technology to detect the flow of blood through the
finger and offers the advantage of portability over tape-based recording systems (Dogan et.al. 2003;Mohamad et.al.
2009;Naazneen et.al. 2013;). The system provides an LCD screen to output the measured heartbeat rate. Also, this display
is used when entering user and configuration data. The system consists of an infra red (IR) LED as transmitter and an IR
photo-transistor as a receiver that acts as a fingertip sensor. The results show agreement with the analogue measurements,
with errors of around 1.4%. The data presented in indicates that the zero-crossing count technique resulted in an average
error of 4.1%.This is in line with the inherent counting errors in such systems (Hashem et.al. 2009;Mohamed et.al.
2007;Sukkar et.al. 2000;John,2008;Van,2005). With an error of ±1 during a 10 sec period, the total error can be as high as
±6 when the 1-minute rate is computed resulting in an overall 8.3% total error.
2 P. Haque : IOT Based Mobile Health Monitoring Coupling with ECG Sensor
B)E-Health Monitoring system: These monitoring devices which were only available in the hospitals were constantly on
the patient's body. Many of them are not user friendly and it is important that the patient have a portable device that can
always be used to measure these parameters when no one is around. The system monitors the heart beat and temperature of
a patient simultaneously with the pulse sensor and the temperature sensor by populating a centralized database with its
readings at defined intervals. When the readings are abnormal, or have risen beyond preset threshold, the device makes use
of the GSM/GPRS/GPS shield to send the readings and location coordinates to the patient's doctor/guardian to quickly
track and examine/diagnose the patient's condition and take early precaution to save the patient's life. The system is setup to
constantly measure these parameters and reduce mortality rate for the elderly (Hashem et.al. 2009;Mohamed et.al.
2007;Sukkar et.al. 2000;John,2008;Van,2005).
C) Photo-Plethysmography system: In this project, a real-time heart rate measurement technique called Photo-
Plethysmography (PPG) is implemented using simple infrared transmitter and receiver circuit . Arduino Uno board has
been used for calculating the heart rate from the fingertip. The obtained heart rate values are initially displayed on a Liquid
Crystal Display (LCD) and sent serially to Raspberry Pi which is used as an Internet of Things (IoT) gateway. The values
are then sent to the cloud through Message Queuing Telemetry Transport (MQTT) protocol. The designed system updates
the user with their heart rate through electronic mail (email), Short Message Service (SMS). and real-time plots and
provides name and address of a nearby prominent hospital in case of an emergency(Hashem et.al. 2009;Mohamed et.al.
2007;Sukkar et.al. 2000;John,2008;Van,2005) .
3. Objectives of Research
In our system we use the ECGAD8232 sensor module that is worked as a differential amplifier. Also for the Wi-Fi module
we use the ESP8266 module. We choose the peer to peer connection for graph plotting. the sampling which is directly
connected with mobile phone and NODMCU through Wi-Fi hotspot. In this system we get data as analog pin output and
time. The heart rate can be measured with the process of filter that is worked as a QRS detector. We measured the Instant
heart rate and also the average heart rate. We use a mobile App for signal processing and graph plotting. Then we can get
the heart rate. The heart rate can be different with various purposes. But, we used only the perfect pick value for getting the
perfect heart rate.
3. Methodology
In our system we use the ECGAD8232 sensor module that is worked as a differential amplifier. Also for the Wi-Fi module
we use the ESP8266 module. We choose the peer to peer connection for graph plotting. the sampling which is directly
connected with mobile phone and NODMCU through Wi-Fi hotspot. In this system we get data as analog pin output and
time. The heart rate can be measured with the process of filter that is worked as a QRS detector. We measured the Instant
heart rate and also the average heart rate. We use a mobile App for signal processing and graph plotting. Then we can get
the heart rate. The heart rate can be different with various purposes. But, we used only the perfect pick value for getting the
perfect heart rate.
4. Proposed System
In our system, AD8232 module is connected with the ESP8266 module that works as a Wi-Fi module. Through this system
when we get data then that data was sent into server. We used Google’s Firebase server. When server response then we can
get signal and graph through mobile application. Then ultimately we get the heart rate and we measure the condition.The
block diagram of fig 3.1 shows the process of working. Each block has its individual functionality. The first block
represents the AD8232 module. It works as a differential amplifier. The next block represents the ESP8266 module.it
works as a Wi-Fi module. The microcontroller is the heart of system. This microcontroller sends data in the server. Here we
used the Firebase server for to get current data. Then the server sends data in mobile application. This app receive data and
shows signal. This part is called the signal processing and Graph plotting. From the App and through the IP address of Wi-
Fi hotspot we get the heart rate and condition report.
International Journal of Multidisciplinary Informative Research and Review 2020; 1(2): 69-87
5. Implementation Technique
The main part of the project is graph plotting. This can be solved with two ways. One is Firebase and the other is peer to
peer connection. Here firstly we use the peer to peer connection then we convert it into Firebase. With this connection
when we get the sampling it will be directly connected with the mobile phone and NODMCU through Wi-Fi hotspot.
Through this process we can get two types of data.
a) Voltage or Analog pin output
b) Time
For to differentiate between analog pin output and time, we used comma (,) When we access data through server
connection then it gives a screen. When we got the screen then we used a split function to divide the screen. This gives us
an output. We convert that output into integer. Then we did plotting. We took first output as-
VOLTAGE=Y AXIS
TIME=X AXIS
Note that: For time measuring we used a variable that is called “Data point variable”. Through this variable we pushed data
continuously for plotting.
Heart rate measuring:
INSTANT HEART RATE(IHR):
To measure the heart rate, we used a filter that is QRS DETECTOR. This filter can detect the pick value. Filter can detect
the pick value by using-
Low pass Filter-CUT OFF Line=16 HZ
High pass Filter-CUT OFF Line=8HZ
Then we did the moving average and differentiate. That creates the “Time Domain Filter”. Here’s the getting output will
have converted into average. We waited minimum for 100 data as if we can get a CUT OFF Window. This CUT OFF Line
is adoptive. That is Average Cut Off Line.
Average Cut Off Line*2/3=QRS pick value
For the QRS pick value we waited minimum 500 Ms. When we will note time, the difference should be-
Next Time-Previous Time=Result/60
Then we can get the INSTANT HEART RATE(IHR).
If two QRS pick value is above the 1200 ms then we should be ignoring that value. When we ignore that The (Time 0) will
be moved the left side. Then we added the new time value with the(Time0) and made it adoptive.
Note that: We sent request through SOCKET Connection from App to IP address. Then IP address accepted that request
and reposed. Then we read that data as server response. When it is off the solution gets into the tank by drain outlet. After
all the solution is gone into the tank the process is repeated.
4 P. Haque : IOT Based Mobile Health Monitoring Coupling with ECG Sensor
The whole system is designed with the help of the above fig 2. The software implementation of this system has followed fig
1. First of all, the system starts with the microcontroller device AD8232 module and ESP8266 Wi-Fi module. This
microcontroller sends data to the server and server response that data and send request to the mobile app for the signal and
plotting of graph. Through this app we can measure the heart rate.
For this system we prepared the mobile application with the program of JAVA SOCKET CONNECTION. Here we used
the Google’s Firebase server. Firstly, we used peer to peer connection and then we convert it to firebase for the frequency
of ECG that is 40HZ.Through this mobile application we mainly get the signal for heart rate measuring. We used this
application through the Wi-Fi hotspot and then we insert the IP address. Then we can able be to get the signal. Exactly we
measured the real time data, QRS detector parameters and QRS filer.
25 99% 99
23 96% 95
19 99.93% 99
21 99.87% 96
20 99.89% 97
24 99.97% 98
26 98% 99
65 70% 72
50 86% 90
85 53% 52
Here we see that, first row shows the instantons heart is 52bpm.it’s proved that the rate is not normal. Because of the
healthy people’s heart range is (80-99) bpm .so, we say that it’s not normal. Again, we see the second row shows the heart
rate is 99 bpm. So, its normal. So, we will be able to know the one’s heart rate conditions before going to the hospital or
health care centers.
7. Conclusion
In today's fast moving world, human body is getting more prone to heart related diseases and there is an increase in number
of deaths due to heart diseases. So this paper describes the design and development of a heart rate monitoring system which
tells the heart beat rate of the person. If the exact heartbeat of the person is known, then the problems related to heart can be
detected and cured. This system has been developed by other researchers also but they followed different algorithms. In our
system we can easily measure the heart rate. This processing will not be very costly so others can easily maintain to their
heart rating. If anyone want, then they can check their heart rate with this technology and using this app system without
going to doctor’s chamber. This is a prototype of our main target. It has some future scope if we can overcome the
limitations and can implement the ideas what we gained during the project.
Copyright
The authors' publications in IJMIRR are distributed under Creative Commons Attribution (CC BY) license
(http://creativecommons.org/licenses/by/4.0/). The license was created for the purpose of promoting open access, i.e. free
immediate access and unlimited reuse of all forms of original works.
8 P. Haque : IOT Based Mobile Health Monitoring Coupling with ECG Sensor
References
[1] Dogan Ibrahim1 Kadri Buruncuk, HEART RATE MEASUREMENT FROM THEFINGER USING A LOW-COST
MICROCONTROLLER', Near East University,Faculty Of Engineering, TRNC 1Department of Computer Engineering,
Department of Electrical and Electronic Engineering (2003).
[2] Mohamad Ashekur Rahman, Atanu Barai, Md. Asadul Islam, M.M.AHashem, 'Development of a Device for Remote
Monitoring of Heart Rate andBody Temperature', Department of Computer Science and EngineeringKhulna University
of Engineering & Technology (KUET)Khulna 9203, Bangladesh(2009).
[3] Naazneen M. G., Sumaya Fathima, Syeda Husna Mohammadi, Sarah IramL. Indikar, Abdul Saleem, Mohamed Jebran
ISSN: 2319-5967 ISO 9001:2008 Certified International Journal ofEngineeringScience and Innovative Technology
(IJESIT) Volume 2, Issue 3,May 2013
[4] Ken Li CHONG u2554259 David HOLDEN u2544548 Tim OLIN u2560340heart pulse received on the skin by
electrodes is a result of traveling electrical activity from the heart. At the skin
[5] M.M.A. Hashem, Rushdi Shams, Md. Abdul Kader, and Md. AbuSayed Department of Computer Science and
Engineering Khulna University of Engineering & Technology (KUET) Khulna 9203, Bangladesh (2009).
[6] Mohamed Fezari, Mounir Bousbia-Salah, and Mouldi Bedda Department of electronics, University of Badji Mokhtar,
Annaba Microsystems,microcontroller, real-time, heart rate monitoring, zero crossing algorithm. Received November 30,
2006; accepted June 12, 2007
[7] Cardiovascular Consultants 2006, 'Heart Anatomy Anatomy', viewed (December2010), Cleveland Clinic 2009, Your
Heart and Blood Vessel, viewed (May 2011).
[8] M.Y.Sukkar, H.A.EL-Munshid, M.S.M.Ardawi,”Concise Human Physiology”,Saudi Arabia( 2000).
[9] John G, Webester 'Medical Instrumentation and Application design',Editor, fourth edition(2008).
[10] J.Van Der 'Design and characterization of a Band-pass Filter' .University ofPennsylvania .Department of Electrical
and Systems Engineering ESE206(2005).
[11] http://electronics.howstuffworks.com/microcontroller1.htm
[12] http://www.best-microcontroller-projects.com/16F877A.html(12\07\2015)
[13] Heart Rate Variability During Sleep,( December 27, 2011
[14] http://www.livestrong.com/article/134189-heart-ratevariability-during-sleep
[15] http://whatis.techtarget.com/definition/light-emitting-diode-LED copyright
[16] http://www.physics.ucc.ie/fpetersweb/FrankWeb/courses/PY3108/Labs/PD_Info.pdf
[17] 'Heart rate measurement from fingertip' ,http://embeddedlab.com/blog/?p=1671 January 29, 2012