Upload
richurachel
View
83
Download
2
Embed Size (px)
Citation preview
GPRS BASED HEART RATE MONITORING
SYSTEM
Mr. Marimuthu .C Assistant Professor
Department of Electronics and Instrumentation
Karunya University
Coimbatore
Richu Rachel George
Department of Electronics and Instrumentation
Karunya University
Coimbatore
Abstract— The electrocardiogram is a test that records the
electrical activity of the heart .This can be used to study the
number and regularity of heart beats. So the study of ECG
waveform helps in easy diagnosis of heart diseases by finding the
abnormality in rhythm of heart rate. If one is a heart patient he
will have to depend on hospital regularly even if it is at a larger
distance from his home. If the facility to observe his ECG and
find number of heart beats is available at home it would be easy
for him. To facilitate this, a heart rate monitoring device using
lpc2378 is proposed. The ECG waveform can be observed in
graphical LCD interfaced with the kit. If any abnormality is
found in the number of heart beats then we alert the doctor using
the sim900 module interfaced with it.
Keywords- ECG; LPC2378; heart rate; real time; LCD128*6;.
I. INTRODUCTION
Due to changes in lifestyle the number of heart patients in
the world has increased a lot. Young and old alike die of heart
attack. So it is important for everyone to have a heart rate
monitoring system at home so that he can observe his heart
rate from home. There are several benefits for portable Heart
rate monitoring systems. They help in continuous and regular
monitoring of ECG signal from home itself instead of
travelling to hospitals and thus help in reducing medical cost.
Also if we transmit the result directly to the doctor who is at a
different place then it is possible for him to give his diagnosis
early and can help in emergency situations. Early diagnosis of
heart related problems help reduce the number of death due to
heart attack a lot. By researching the ECG features and regular
of the disease, we can make the early prediction to the
pathological change and prompt diagnosis. If arrhythmia was
detected earlier and first-aid measures are taken promptly,
most of patients may avoid dying. Therefore, long-time
recording electrocardiogram of patient has extremely
important clinical value. Most of the monitors available in the
market are of large size, more power consumption and not real
time. The main objective of the monitor introduced in this
project is as follows: it can monitor ECG in real time, display
the ECG waveform on graphical LCD; also it processes the
digital signal to find the number of heart beats, and sends out
alarm when exception is detected. The ECG monitoring
system with 8 bit or 16 bit MCU has some disadvantages, less
computing speed, low capacity of storage, lack of interaction.
So the processor used here is an arm processor which is a 32
bit RISC processor. This uses GPRS module to send alarm
information automatically when ECG signals are abnormal.
II. METHODOLOGY
A. Block diagram
In this project we develop a continuous heart rate
monitoring system which acquire ECG signal from cardiac
patient and analyzed for any change in abnormality. If any
abnormality is found then it alerts the doctor who is at a
remote site of the patient condition. The block diagram of the
system is as given below.
Fig.1 Block diagram for heart rate monitoring system
Different types of electrodes are available commercially.
We use three ring electrodes to acquire signal from body. ECG
signal is a kind of body signal with 0.05Hz to 100Hz
bandwidth and about 1 mV peak to peak voltage, and mixed
with noise. As the ECG is usually in the 0.05-100Hz
frequency, the signal we acquired is also subject to high
frequency and low frequency noise. So output ECG signal
must be through a band-pass filter. This band-pass filter
consists of a high-pass filter and a low-pass filter in series
form. The output of this stage is also in mV range, a second
level amplifier is also used to raise the signal to around 1V.
These processes are done in the bio kit we use to acquire
signal.
The controller we use is LPC2378 which has an arm7
core (32 bit). This also has an inbuilt A/D convertor which can
be used to convert the ECG wave we obtained to digital form.
The ADC in the LPC2378 controller has input range of about
0V-3.3V .The signal from the bio kit is in this range and so is
given directly to the ADC.
The processor calculates the heart beat from ECG wave
form by finding the RR interval of the ECG signal. R wave
being sharp, narrow and steep, is most sensitive one and any
International Conference on Emerging Technological Trends in Advanced Engineering Research [ICETT 2012], 2012 February 20-21.
ISBN : 978-93-80624-62-4 http://www.icett.com/ Baselios Mathews II College of Engineering, Kollam, Kerala, India.
irregularity will instantly reflect on it .In order to find the time
interval between to r wave focus is on upper half of r wave.
The program is written to calculate heart rate in bpm.
Beats per minute (bpm) = 60000 (1)
Time between two RR waves
From the obtained value the possibility of heart attack is
analyzed. The heart rate for normal person is 60-100 so RR
interval is from 600-1000. If this range differs it declares a
panic situation.
Once panic situation is declared, the system will send alarm
information via GPRS module automatically thus alerting the
doctor of any abnormality. The system is also connected to an
LCD module so as to display the waveform acquired. The
patient can observe the ECG waveform himself.
LPC2378 ARM7 CONTROLLER
The LPC2378 Micro-controller is based on a 32/16 Bit
ARM7TDMI-s CPU with real time Emulation and Embedded
Trace support that combines with the microcontroller with
embedded high-speed 512KB flash memory. It can work with
16-bit Thumb Mode. This microcontroller incorporate a
10/100 Ethernet MAC, USB 2.0 Full Speed interface, four
UARTs, two CAN channels, an SPI interface, two
Synchronous Serial Ports (SSP), three I2C interfaces, an I2S
interface, and a Mini Bus. It has 8-bit data/16-bit address
parallel bus is available.
SIM900 GSM/GPRS MODULE:
This is a GSM/GPRS-compatible Quad-band cell phone,
which works on a frequency of 850/900/1800/1900MHz and
which can be used not only to access the Internet, but also for
oral communication (provided that it is connected to a
microphone and a small loud speaker) and for SMSs.
Externally, it looks like a big package (0.94 inches x 0.94
inches x 0.12 inches) with L-shaped contacts on four sides so
that they can be soldered both on the side and at the bottom.
Internally, the module is managed by an AMR926EJ-S
processor, which controls phone communication, data
communication (through an integrated TCP/IP stack), and
(through an UART and a TTL serial interface) the
communication with the circuit interfaced with the cell phone
itself.
The processor is also in charge of a SIM card (3 or 1,8 V)
which needs to be attached to the outer wall of the module.
In addition, the GSM900 device integrates an analog interface,
an A/D converter, an RTC, an SPI bus, an I²C, and a PWM
module. The radio section is GSM phase 2/2+ compatible and
is either class 4 (2 W) at 850/ 900 MHz or class 1 (1 W) at
1800/1900MHz. The TTL serial interface is in charge not only
of communicating all the data relative to the SMS already
received and those that come in during TCP/IP sessions in
GPRS (the data-rate is determined by GPRS class 10: max.
85,6 kbps), but also of receiving the circuit commands (in our
case, coming from the PIC governing the remote control) that
can be either AT standard or AT-enhanced SIMCom type.
The module is supplied with continuous energy (between 3.4
and 4.5 V) and absorbs a maximum of 0.8 A during
transmission.
OGM12864 LCD
We use 128*64 pixel graphic LCD for displaying the
ECG wave form. The graphic LCD is used to display
messages in form of drawings and bitmaps. The OGM12864
LCD is driven by 2 64 x 64 pixel Samsung KS0108 drivers.
There are 8192 pixels on a 128 X 64 pixel screen and each is
pixels is control by a series of instructions. The process of
selecting where on the screen the bit is going to go is just a
narrowing process. CS1 and CS2 narrow it down to half the
screen. Y address narrows it down to a 1 bit wide stripe of
height 64 in that half of the screen. X page picks an 8 bit
chunk of this 64 bit stripe and write data writes 8 bits to that
chunk. This is the essence of putting bits on the screen.
III. RESULTS AND ANALYSIS
Using ring electrode and Biokit ECG signal is
acquired. The ECG voltage was found around 1.44 Vpp and
the frequency of the signal around 1.01 Hz. Since the ECG
waveform from the kit is of 1.6 V it can directly be given to
ADC pin of the processor.
There are 8 channels available in the lpc2378 for
ADC. To configure the ADC we need to first set PCADC bit
in PCONP register. In the PCONP register, set bits PCADC.
Clock: In the PCLK_SEL0 register, select PCLK_ADC. To
scale the clock for the ADC we use CLKDIV. Select ADC
pins and pin modes in registers PINSELn and PINMODEn. To
enable interrupts in the ADC. The bits in ADCR register
should also be set accordingly.
The values from ADC was plotted on LCD .The
contrast of the LCD can be adjusted using potentiometer. The
most important (or most commonly used and confused)
control bits are R/W, D/I, E. Enable must be set low and then
high in order for an operation to be passed to the LCD. In
addition there must be a delay of at least 2 ms in between
operations for the cycle time of the enable bit. This timing can
cause lot of errors because if it is not delayed properly, a good
instruction will not provide the desired result. R/W and D/I are
used to determine the mode of operation that the LCD is in.
There are three basic steps that must be done in order to
determine where the pixels will go. First, the Y address must
be set. The Y address actually has a counter so it need only be
set once and then every time there is a data write it will be
incremented to the next line. This allows the driver to scan
through the lines and display the proper data. The next step
that must be completed is setting the X page. This determines
which column of the screen will now be written to. The third
step is issuing a data write command. Whatever data bits are
high will be darkened on the Y address line in the X page.
International Conference on Emerging Technological Trends in Advanced Engineering Research [ICETT 2012], 2012 February 20-21.
ISBN : 978-93-80624-62-4 http://www.icett.com/ Baselios Mathews II College of Engineering, Kollam, Kerala, India.
The SIM900 module is connected to the ARM
processor using UART. The communication is enabled using
AT command. The heart rate found if less than 60 or more
than 100 shows that there is arrhythmia, and hence alert the
doctor by sending SMS using the module.
The flow chart for the complete process is as below
As we need to display ECG wave form and calculate
heart rate at the same time we need to do multitasking. This is
made possible by using μCOS-II. μCOS-II is a portable, ROM
able, scalable, preemptive, real-time deterministic multitasking
kernel for microprocessors, microcontrollers and DSPs,
written mainly in the C programming language. It is intended
for use in embedded systems. To start we first declare each
task as standard C function and give a task ID for each task.
Next we enter application through main function and we call
function to start operating system. After operating system has
been initialized the control is passed to the task. When task is
created it is also assigned priority. As we need to run both the
task at the same time each task are given the same priority.
This also provides for task management and time
management. The most basic of timing service provided is to
have system delay. A task is similar to procedure call, but a
task must contain a while loop, once started it never terminates
and runs forever. By making use of this we can continuously
acquire signal to calculate the number of heart beats and also
display ecg waveform for patient to observe.
IV. CONCLUSION
The development of heart rate monitoring system
using LPC2378 helps in monitoring ECG waves in real time.
As we are using an ARM7 processor which supports μCOS-II
multitasking is possible. This helps in continuous evaluation
of ECG wave form along with displaying the wave. The ECG
wave form is to be displayed on LCD module. Also we are
using a GPRS module to alert the doctor of any abnormality in
the patient. As GPRS uses packet switching rather than circuit
switching we need to pay only for the amount of data we are
transmitting. We can alert the doctor using SMS.
REFERENCES
[1] Alzate, E.B., Martinez, F.M, “ECG monitoring system based on ARM9
and mobile phone technologies”2010 andescon, , pp:1-6,11 November 2010
[2] Lihuang She1, Jinshuan Zhao1, Shi Zhang1, Guohua Wang1, Gang Wang “A Novel Portable One Lead ECG Monitor with Low-Cost and Long-Time Recording Based on NUC501”, 2010 Chinese Control and Decision Conference,pp:276-279, 28 May 2010
[3] Xiuxia Yu , Kebing Wu , Zhengxiong Hou “Design and Implementation of ECG Wireless Transmission System Based on ARM9”, 2010 International Conference on Computer Control and Electronic Engineering ,volume:5, pp:211-213, 25 October 2010
[4] Tang Yawei,Jiang Kai,Fu Xiuquan,Li Dingli “Low Power dual-core Holter Systerm Based on MSP430 and ARM7” 3rd International conference on Bioinformatics and Biomedical Engineering, ,pp:1-3, 11-13 June 2009
[5] P. Kaewfoongrungsie, N. Theera Umpon, and S. Auephanwiriyakul, “ECG Holter Recorder via Mobile Phone,” Proceedings of the International Symposium on Biomedical Engineering (ISBME), pp: 180–183, November 2008.
[6] Fan Aihua, Bian Chunhua, Ning Xinbao, He Aijun, Zhuang Jianjun, “Portable electrocardiogram monitor based on ARM” International Conference on Information Technology and Application in Biomedicine, China,pp:481-483, 18 July 2008
International Conference on Emerging Technological Trends in Advanced Engineering Research [ICETT 2012], 2012 February 20-21.
ISBN : 978-93-80624-62-4 http://www.icett.com/ Baselios Mathews II College of Engineering, Kollam, Kerala, India.
[7] Mohamed Fezari, Mounir Bousbia-Salah, and Mouldi Bedda” Microcontroller Based Heart Rate Monitor” The International Arab Journal of Information Technology, Vol. 5, No. 4, pp:153-157, October 2008
[8] M Triventi, E Mattei, F Censi, G Calcagnini, F Mastrantonio, D Giansanti, G Maccioni, V Macellari, P Bartolini” SMS-Based Platform for Cardiovascular Tele-Monitoring” Computers in Cardiology issue:35;pp:1009−1012,nov 2008
[9] Li Jia, Wu Shui-cai, Li Yan-zheng, and Bai Yan-ping,” The Design of a Wireless ECG Monitoring System Based on Linux and GPRS”pp:1-4,may 2008
[10] Cheng Wen a, Ming-Feng Yeh a, Kuang-Chiung Chang a,*, Ren-Guey Lee” Real-with mobile phone platform”pp:1-5,may 2008
International Conference on Emerging Technological Trends in Advanced Engineering Research [ICETT 2012], 2012 February 20-21.
ISBN : 978-93-80624-62-4 http://www.icett.com/ Baselios Mathews II College of Engineering, Kollam, Kerala, India.