Microcontroller Based Heart Rate Monitor
Microcontroller Based Heart Rate Monitor
Abstract: 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. The important feature of this research is the use
of Discrete Fourier Transforms to analyse the ECG signal in order to measure the heart rate. Evaluation of the
device on real signals shows accuracy in heart rate estimation, even under intense physical activity. The
performance of HRM device was compared with ECG signal represented on an oscilloscope and manual pulse
measurement of heartbeat, giving excellent results. Our proposed Heart Rate Measuring (HRM) device is
economical and user friendly.
1. INTRODUCTION than less active people. Babies have a much higher heart rate
at around 120 bpm, while older children have heart rates at
Heart rate is the number of heartbeats per unit of time, around 90 bpm. The heart rate rises gradually during
typically expressed as beats per minute (bpm). Heart rate can exercises and returns slowly to the rest value after exercise.
vary as the body's need to absorb oxygen and excrete carbon The rate at which the pulse returns to normal is an indication
dioxide changes during exercise or sleep. The measurement of the fitness of the person. Lower than normal heart rates are
of heart rate is used by medical professionals to assist in the usually an indication of a condition known as bradycardia,
diagnosis and tracking of medical conditions. It is also used while higher than normal heart rates are known as
by individuals, such as athletes, who are interested in tachycardia 0.
monitoring their heart rate to acquire maximum efficiency.
The wave interval is the inverse of the heart rate 0. Most HRM devices use a design where the signal is acquired
from the subject and a filtering function is applied to remove
Changes in lifestyle and unhealthy eating habits have resulted the high order harmonics and noise from the signal. This is
in a dramatic increase in incidents of heart and vascular then followed by a hardware or software that uses a zero
diseases. Furthermore, heart problems are being increasingly crossing algorithms to count the number of beats during a
diagnosed on younger patients. Worldwide, Coronary heart given time interval (e.g. 0 and 0). The zero-crossing
disease is now the leading cause of death 0. Thus, any algorithm may lead to false readings caused by local noise
improvements in the diagnosis and treatment tools are that may result in multiple local zero crossings.
welcomed by the medical community. In a clinical
environment, heart rate is measured under controlled In this paper, we eliminated the zero-crossing problems by
conditions like blood measurement, heart beat measurement, the use of Fourier Transform of the digitised signal 0. This is
and Electrocardiogram (ECG) 0. However, there is a great a reliable technique that guarantees the automatic filtering of
need that patients are able to measure the heart rate in the any transient noise in the signal. The design and development
home environment as well 0. A heart rate monitor (HRM) is a of a low powered HRM device is presented. The device
simple device that takes a sample of the heartbeat signal and provides an accurate reading of the heart rate using optical
computes the bpm so that the information can easily be used technology. We incorporated the optical technology using
to track heart conditions. The HRM devices employ electrical standard infrared Light Emitting Diode (LED) and photo-
and optical methods as means of detecting and acquiring sensor to measure the heart rate using the index finger. A
heart signals. microcontroller is programmed to acquire the signal using its
embedded analogue to digital converter, ADC, and use the
Heartbeat rate is one of the very important parameters of the readings to compute the heart rate; eventually, the reading is
cardiovascular system. The heart rate of a healthy adult at rest digitally displayed on an LCD. In case the HRM device is
is around 72 bpm. Athletes normally have lower heart rates used in a continuous monitoring mode 0, the device would
47
Sharief F. Babiker et al. / UofKEJ Vol. 1 Issue 2 pp. 47-51 (October 2011)
alert the medical professional or the person accompanying of 2.1 Fingertip Sensor
the patient, if the heart rate falls outside a given range. A
local audible alarm is also provided. The rest of the paper The sensor consists of an IR light emitting diode transmitter
provides a discussion on the system overview; describes the and an IR photo detector acting as the receiver. The IR light
full description of the HRM device and lists the experimental passes through the tissues. Variations in the volume of blood
results. within the finger modulate the amount of light incident on the
IR detector. Two practical configurations could be
2. SYSTEM HARDWARE implemented to achieve this function. In the first
configuration, the finger can be placed between the
The proposed HRM device is intended to have the following transmitter and the receiver as shown in Fig. 2. In the second
Transmitter
Tx LCD
Amplifier &
Finger Filter
Rx MCU GSM
Receiver
Keypad Buzzer
48
Sharief F. Babiker et al. / UofKEJ Vol. 1 Issue 2 pp. 47-51 (October 2011)
∑ g (t i )e − j 2πft
frequency noise components present in the signal. A capacitor
G( f ) =
of 1µF value at the input of each stage is required to block the N
i
dc component in the signal. (3)
i =1
2.3 Physical Properties The real and imaginary components are thus given as:
HRMax = ⎨
Fourier Transform of the heartbeat signal. Assuming a
∫
Endif
G ( f ) = g (t )e − j 2πft dt (1)
EndForever
49
Sharief F. Babiker et al. / UofKEJ Vol. 1 Issue 2 pp. 47-51 (October 2011)
4. RESULTS AND DISCUSSION with the analogue measurements, with errors of around 1.4%.
The data presented in [1] indicates that the zero-crossing
Fig. 4 shows the analogue signal acquired by the sensors and count technique resulted in an average error of 4.1%. This is
input to ADC port of the microcontroller. The signal is in line with the inherent counting errors in such systems.
consistent with the standard ECG signals used to measure the With an error of ±1 during a 10 sec period, the total error can
heartbeat rate and is also used in other types of clinical be as high as ±6 when the 1 minute rate is computed resulting
diagnosis. In Fig. 5 we show the frequency analysis of a in an overall 8.3% total error.
typical heartbeat signal. The Fourier Transform of the 5sec Another experiment was conducted where we measured the
interval shows a dominant peak power spectral density bpm of two male volunteers at rest. The volunteers then
obtained from the Fourier Transform at 72 bps. The second underwent a jogging exercise for five minutes and their
largest peak, i.e. the second harmonic of the heartbeat rate, is heartbeat rate was subsequently measured. The readings of
located at 144bps. Note that the algorithm implemented in the device were compared against the manual measurement.
this study searches only for the rate with the highest spectral The manual measurements were taken by counting the pulse
density. from the wrist. Overall, the results are in an acceptable
The final device was used to measure the heartbeat rate of a agreement with the actual readings. We further note that the
number of male and female volunteers. The results as well as deprecated method of estimating the pulses by counting the
the bps measured simultaneously using the heartbeat pattern pulse directly by pressing on the veins is indeed a rough and
of the same volunteers as displayed on the oscilloscope are unreliable estimate.
shown in Table. 1. These results show excellent agreement
Im(G(f))
|G(f)|
0.6
G(f)
0
0 50 100 150
50
Sharief F. Babiker et al. / UofKEJ Vol. 1 Issue 2 pp. 47-51 (October 2011)
[1]
Female 19 75 75 0
Female 20 69 71 2.81 M.M. A. Hashem, Rushdi Shams, Md. Abdul Kader,
Female 22 83 85 2.35 and Md. Abu Sayed, Design and Development of a
Heart Rate Measuring Device using Fingertip,
Table 2. Measurements of heartbeat rate before and after Department of Computer Science and Engineering,
exercise using the developed device together wrist Khulna University of Engineering & Technology
[2]
measurements. (KUET), Khulna 9203, Bangladesh, 2010.
Age Condition HR HR, manual S.Allender, V.Peto, P.Scarborough, A.Boxer and
24 Before exercise 65 64 M.Rayner ,Coronary heart disease statistics, , British
Health Promotion Research Group, Heart Foundation
After exercise 90 88 Department of public health, University of Oxford,
15 Before exercise 91 88
[3]
2007.
After exercise 110 100 Mohamed Fezari, Mounir Bousbia-Salah, and Mouldi
Bedda, “Microcontroller Based Heart Rate Monitor”,
5. CONCLUSIONS The International Arab Journal of Information
[4]
Technology, Vol. 5, No. 4, 2008.
In this paper, the design and development of a low cost HRM Dogan Ibrahim, Kadri Buruncuk,“Hear Rate
device has been presented. The device is ergonomic, portable, Measurement from the Finger using a low cost
durable, and cost effective. The HRM device is efficient and Microcontroller”http://www.emo.org.tr/ekler/a568a2a
[5]
easy to use. Tests have shown excellent agreement with a8c19a31_ek.pdf
actual heartbeat rates. This device could be used in clinical Boashash, B., “Time-Frequency Signal Analysis and
and nonclinical environments. It can also be easily used by Processing: A Comprehensive Reference”, Oxford:
[6]
individual users, e.g. athletes during sporting activities. The Elsevier Science, 2003.
device could also be used as a monitoring instrument R. Fensli, "A Wireless ECG System for Continuous
exploiting the SMS capabilities provided by this system. Event Recording and Communication to a Clinical
This study used the standard Fourier Transform to compute Alarm Station", Proc of the 26th Annual International
[7]
the spectral density. The overall efficiency of the device Conference of the IEEE EMBS, 2004.
could be improved by the use of Fast Fourier Transforms. http://www.brianmac.co.uk/maxhr.htm, Accessed on
The device could be further developed into a continuously 02/09/2011
monitoring device that could be used to detect the heart beat .
anomalies associated with certain heart conditions. This
would be made possible by analyzing the heartbeat signal in
the frequency domain.
51