FPGA Implementation of IoT-Based Health Monitoring System
FPGA Implementation of IoT-Based Health Monitoring System
Monitoring System
2021 15th International Conference on Telecommunication Systems, Services, and Applications (TSSA) | 978-1-6654-2892-7/21/$31.00 ©2021 IEEE | DOI: 10.1109/TSSA52866.2021.9768261
Shaker F. K. Abushukor, Infall Syafalni, Rahmat Mulyawan, Nana Sutisna, Nur Ahmadi, and Trio Adiono
University Center of Excellence on Microelectronics, Bandung Institute of Technology, Bandung, Indonesia
School of Electrical Engineering and Informatics, Bandung Institute of Technology, Bandung, Indonesia
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY WARANGAL. Downloaded on October 15,2024 at 18:54:44 UTC from IEEE Xplore. Restrictions apply.
Fig. 3. Proposed QRS Block Diagram
as a consumer interface.
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY WARANGAL. Downloaded on October 15,2024 at 18:54:44 UTC from IEEE Xplore. Restrictions apply.
6) ECG module: The AD8232 is an integrated signal con- 3) Derivative Filter: After passing through the band pass
ditioning block for ECG and other biopotential measurement filter, the ECG signal which now has left its optimal frequency
applications. It is designed to extract, amplify, and filter small will be differentiated in order to obtain slope information. This
biopotential signals in the presence of noisy conditions, such differentiation system is implemented based on the equation:
as those created by motion or remote electrode placement [9]. 1
7) Temperature Sensor: We use an analog thermometer 3950 y(n) = [2x(n) + x(n − 1) − x(n − 3) − 2x(n − 4)] (8)
8
NTC (negative temperature coefficient) with a steel-head NTC 4) Square Function: The process carried out on the next
thermistor. Its voltage range is 3.0V to 5V. And, it measures signal is squaring with the aim of obtaining the absolute
temperatures from -55C to +105C. This sensor has a nominal value of the signal. This process occurs in the block quadratic
resistance of 10k at 25C and an accuracy of 1%. function system, which in this implementation is designed as a
8) Modul NodeMCU ESP8266: NodeMCU is an electronic block consisting of a 10 × 10 bit multiplier with both operands
board based on the ESP8266 chip with the ability to run mi- being x(n). So, it represents (x(n))2 .
crocontroller functions and also an internet connection (WiFi). 5) Integration: In this block, the system is integrated with
There are several I/O pins so that they can be developed into a the aim of obtaining a graph of the trend of the signal value for
monitoring and controlling application for IOT projects. The a certain period. The technique used is to find the average value
NodeMCU ESP8266 can be programmed with the Arduino of the input during the period. In the system implemented this
compiler, using the Arduino IDE. time, the period used is 32 sampling, meaning that the value
taken is the result of the sum of the previous 32 inputs then
C. Proposed ECG Signal Processing divided by 32. This value of 32 is the best multiple of two
This section explains the processing steps that the system of the simulated results. Thus, the following equation for the
is set to perform on the ECG signal, with the goal of getting moving window integral is obtained:
the person’s heart rate as shown in Fig. 4. The QRS detection 1
y(n) = [x(n − 32) + x(n − 31) + . . . + x(n)]
algorithm used in this system is Pan-Tompkins method [1]. Fur- 32
thermore, it will be explained about the implementation of the 32
1 X
QRS detection system in the VHDL program architecture. The = x(n − i) (9)
32 i=0
designed VHDL program architecture is divided into 5 blocks
according to the block in the Pan-Tompkins QRS detection 6) Threshold: The next block of the system to be realized
algorithm where for each block it will be further divided into is the threshold block. In this block, a limit value of the signal
several sub-blocks that adapt to the block’s working system. from the output of the integration block will be given, where
Then it will be implemented on the FPGA board. In this a signal that has a value above the threshold will be identified
algorithm, the principle used in detecting the QRS complex as a signal peak and given a value of ’1’, while values below
is to perform signal processing in the form of signal filtering the threshold will not be identified and assigned a value of ’0’.
at the optimal frequency where the QRS complex works.In
IV. R ESULTS AND D ISCUSSIONS
its implementation, each block of the Pan-Tompkins algorithm
system will be translated into the architecture of the VHDL A. System Simulation On Vivado IDE
program. Firstly, The system tested by ECG signal generated on ECG
1) Low Pass Filter: In this block a system will be designed simulator on several frequencies and positions. The system
that can limit the frequency of the input signal, the frequency gives a correct response and results the signals that are gen-
used here is around 11 Hz with a sampling of 200 samples per erated by the ECG simulator. Moreover, the system need to
second so that according to the Pan-Tompkins algorithm the be tested in real time through the implementation of the ECG
difference filter equation used is: sensor that connect with the FPGA. The verification has to be
no errors in the testbench simulation.
y(n) = 2y(n − 1) − y(n − 2) The generated ECG signal is set to output a normal ECG
+ x(n) − 2x(n − 6) + x(n − 12) (6) signal with a heart rate of around 60-70 bpm as shown in Fig. 7.
Generally, the system has been capable to detect all data of
2) High Pass Filter: After passing through the low pass signal QRS complex that is generated in the testbench when
filter, the ECG signal will then undergo a second filtering which the system is tested. The tested system is shown in Fig. 5.
this time is used to limit the low frequencies that will be passed. B. Testing the Implementation Results on ZYBO
The cut off frequency used is 5 Hz with the difference equation
of the filter: After the simulation on Vivado IDE is done, since the tested
result is correct and working properly, the next step is to
implementation of the ECG sensor and temperature sensor that
y(n) = y(n − 1) + x(n − 16) − x(n − 17) connect with FPGA on real time. The ECG signal comes from
1 ECG sensor that connects directly to the FPGA through FPGA’s
− [x(n) − x(n − 32)] (7) ADC to convert the signal from the analog to the digital form.
32
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY WARANGAL. Downloaded on October 15,2024 at 18:54:44 UTC from IEEE Xplore. Restrictions apply.
2
Generated Heart Pulse
1.5
Amplitude (mv)
1
50
Detected Heart Pulse
25
Detected Data
−25
−50
0 100 200 300 400 500
Clock Cycle
Fig. 6. Web page as interface system
Fig. 8. Detected Heart Pulse by the Proposed System
Fig. 8 is shown a plot of the ECG signal that generated
from the ECG sensor and acquired by the system. The signal R EFERENCES
evaluation shows that the algorithm is capable to avoid false [1] J. Pan and W. J. Tompkins, “A Real-Time QRS Detection Algorithm,”
QRS detections during the T wave while its amplitude is IEEE Transations on Biomedical Engineering, pp. 230-236, 1985.
[2] J. Heaffey, et. al., “Live demonstration: Wearable device for remote EMG
superior to the R peak. As seen in the Fig. 8, the signal has and muscle fatigue monitoring,” IEEE Biomedical Circuits and Systems
little noise caused by the moving of the person while doing the Conference (BioCAS), pp. 1–5, 2015.
test. [3] Toshiyo Tamura, et. al., “Wearable photoplethysmographic sensors—past
and present,” Electronics, pp. 282–302, 2014.
V. C ONCLUSIONS [4] T. Shany, et. al., “Sensors-based wearable systems for monitoring of
human movement and falls,” IEEE Sensors journal, 12.3, pp. 658–670,
The IoT-based health monitoring system design using FPGA 2011.
[5] Adam Page, et. al., “Low-power manycore accelerator for personalized
to monitor heart rate and body temperature has been suc- biomedical applications,” Proceedings of the 26th edition on Great Lakes
cessfully implemented. This system is based on the Pan and Symposium on VLSI, pp. 63–68, 2016.
Tompkins algorithm and optimized to be implemented in FPGA [6] Patrick S. Hamilton, Willis J. Tomkins, “Quantitative investigation of
QRS detection rules using the MIT/BIH arrhythmia database,” IEEE
board (ZYBO) using the VHDL language to create custom IP Transactions on Biomedical Engineering, No. 12, pp. 1157-1165, 1986.
core for heart rate detection on Vivado IDE. The results of the [7] Richard E. Klabunde, Cardiovascular Physiology Concepts, Lippincott
project’s test show that the system is able to give reliable data Williams and Wilkins, 2011.
[8] Mohcin Mekhfioui, et. al., “Hardware Implementation of Blind Source
on the real-time heart rate and temperature of the user. The web Separation Algorithm Using ZYBO Z7 and Xilinx System Generator,”
page displays the result on the smart device while connecting to 2020 REDEC, pp. 1-5, 2020.
internet server and it makes easier user experience. The design [9] AD8232, Data Sheet. “Single-Lead, Heart Rate Monitor Front End”,
Analog Device, 2013.
is useful for health monitoring devices.
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY WARANGAL. Downloaded on October 15,2024 at 18:54:44 UTC from IEEE Xplore. Restrictions apply.