Professional Documents
Culture Documents
Design and Development of A Wireless Internet-Based ECG Monitoring System For Ambulatory Applications
Design and Development of A Wireless Internet-Based ECG Monitoring System For Ambulatory Applications
3, 2010 257
Vivek Agarwal*
Applied Power Electronics Lab,
Department of Electrical Engineering,
Indian Institute of Technology Bombay, Mumbai, India
E-mail: agarwal@ee.iitb.ac.in
*Corresponding author
Ranganadh Thatha
Multimedia and Streaming Solutions Department,
N K Electronics,
Plot 42, Sector 12,
Vashi, Navi Mumbai 400703, India
E-mail: ranganadh@iitbombay.org
E-mail: thatha.ranganadh@gmail.com
C. Chandramouli
Applied Power Electronics Lab,
Department of Electrical Engineering,
Indian Institute of Technology Bombay, Mumbai, India
E-mail: cmouli@iitb.ac.in
1 Introduction
Heart attack is the most common cause of death among the heart related disorders.
Heart failure is a serious condition and can be cured only with timely detection and
diagnosis followed by proper medication. Heart attack occurs when the blood supply to a
part (myocardium) of the heart muscle is severely reduced or stopped. Deposition of fats
on the walls of coronary arteries, which supply blood to the heart, leads to their
blockage – a condition known as Coronary Heart Disease (CHD) (Santamore et al., 2004;
American Heart Association). A heart related disorder can also occur due to variations in
the wall thickness of the heart chambers and improper closure and opening cycles of the
valves.
The sino-atrial node in the right atrium of the heart initiates an electrical impulse
causing opening and closure of valves enabling the blood pumping activity. This impulse
spreads a voltage difference on the skin surface, which can be measured by placing
special (Ag-AgCl) electrodes at specific locations on the human body. The signals
measured through electrodes constitute the ECG of the heart – basically a set of
waveforms in time domain representing the electrical activity of the heart. A typical ECG
waveform of a healthy person is shown in Figure 1. In 1895, Dutch Physician Einthoven
published one of his seminal papers in which he identified and labelled five ECG waves
P, Q, R, S and T as marked in Figure 1. As ECG measurements are non-invasive,
it is widely accepted but proper location and electrical connection must be ensured
between the skin and the electrode to minimise the contact resistance. The electrodes are
fixed on the skin by tapes, and conductive gel is applied at the point of contact.
Development of a wireless internet-based ECG monitoring system 259
A major issue with the treatment of heart ailments (as also in other types of disorders) is
the lack of specialist doctors within close proximity of the patient. In a heart attack case,
any delay in administering the required medication to the patient can have serious
repercussions. Even if the patient is driven to a nearby hospital (i.e., if it exists) in an
ambulance, there is a need for constant medical supervision. It is for such situations that
the internet is really handy. Internet provides a full duplex large bandwidth channel with
sufficient speed for the transfer of real-time diagnostic data and medical supervision.
Though appropriate signal conditioning (e.g., converting analogue ECG data into digital
domain) is required, it provides a reliable and fast communication medium.
Figure 2 shows an analogue data collection unit with an ethernet link for transmission
of data over internet. The concept of telemedicine came into existence due to the broad
bandwidth communication available for transfer of large amount of data that includes
voice and video streaming. A telemedicine system using internet through GPRS is
discussed by Ping et al. (2005). Research has also been done on deploying telemedicine
and choosing critical medical parameters for online diagnosis (Kong et al., 2000;
Kyriacou et al., 2001). The transfer of data through the commercially available wireless
channels like IEEE 802.11b/g, IP over GSM, CDMA networks and WiMAX provide
enough bandwidth, which improves the system reliability and the positioning of
local transceiver stations is optional in case of GPRS and CDMA link as the
data is routed through existing mobile towers. In the case of WiMAX, the distance
between adjacent transceiver stations can be 30 kms. The systems that are supposed
to communicate with each other via the internet need only have to communicate
using TCP/IP protocols. The medical diagnosis of a patient generates a large amount
of data, but this is hardly a problem because (Santamore et al., 2004) TCP/IP protocol
supports bulk transfer of data. Lovell et al. (2001) have discussed the storage of bulk
medical data, retrieved online during medical diagnosis. The following are the
advantages of such a system:
• It is possible to access the system via the web from any corner of the world.
For example, the ECG of a patient, suffering from a heart ailment, can be monitored
by a specialist doctor sitting hundreds of miles away.
• Irrespective of the place and time, diagnosis can be performed and suggestions can
be given by specialists in their respective fields.
260 V. Agarwal et al.
The usefulness and convenience of operation, makes this system an obvious choice for
remote applications. As discussed earlier, monitoring of the heart condition is a perfect
case for web-based telemedicine and is the focus of this paper. This application needs
processing of ECG signals, which involves signal conditioning (e.g., to remove noise, to
amplify the weak signals, etc.) and Analogue-to-Digital (A/D) data conversion.
The logged data should then be packed with the protocol headers and transmitted over the
ethernet. Wireless connection to the internet provides flexibility to the transfer of data
while the equipment is on the move. Thus, an ECG measurement integrated with a
wireless Embedded Web Server (EWS) on an ambulance vehicle will enable critical data
available for online diagnosis during emergency situation. The scheme for data transfer
from an ambulance vehicle is shown in Figure 3.
The aim of the work is to develop a portable, highly configurable and future proof model
of ECG data acquisition system, which would be able to acquire up to three ECG signals
and can easily be integrated with any of the wireless internet technologies (IEEE
802.11b/g, IP over GSM, CDMA networks and WiMAX). The proposed system is unique
in the following manner:
• It can be connected to Local Area Network (LAN) if the client and server are
connected to the same LAN.
• It could be connected to internet if client and server are far away from each other.
• It is easily configurable.
• It uses embedded Linux and has a rich set of peripherals. It is easily programmable.
The platform allows us to design a future proof system. The system is designed in such a
way that the digital data from the ECG can be coupled to any future wireless internet
technologies.
It must be pointed out that although this paper focuses on the ECG application, the
system can, in fact, be used for other applications like Electroencephalogram with
minimal modifications in the hardware and software.
A web server mimics the function of a terminal server, but with application specific
hardware and software. Its operation is briefly explained here. A measurement system
with an ethernet interface operated in a remote location logs the data and sends it to the
control (monitor) room upon request. Here, the measurement system is the server
(data supplier) and the control and evaluation facility is the client (data consumer).
The server capabilities are embedded in to the data acquisition system, hence the name
“Embedded Web Server (EWS)-based data acquisition system” (Finkelstein et al., 1998;
Szymanski, 2000; Gupta and Ganz, 2004). Figure 4 gives an idea of this concept. In the
work presented in this paper, the EWS-based system is the ECG equipment, which acts as
the server and provides data (graphical/numeric) to the client through an internet browser.
A Linux kernel 2.4.14 resides in the hardware, hence necessary settings need to be made
to prioritise this application on the system. The architecture of the web server is shown in
Figure 5.
262 V. Agarwal et al.
The details of the various hardware components are briefly summarised here.
• Processor core: The processor acquires the data as well as communicates with the
ethernet controller. Therefore, it must have enough computing power to handle the
data acquisition and the ethernet control functions.
• Ethernet controller chip: To decrease the overhead on the master processor, a
separate dedicated processor is used to communicate with the internet. It takes care
of different protocols on the physical layer used in different types of networks.
• Memory: External memory is important for this application, because the on-chip
memory is not sufficient. One must add both SDRAM and permanent memory
(generally flash memory in development stage, ROM for final product) to store the
operating system and application software. A serial memory is used to store
permanent data (to store configuration data).
• Data acquisition: It is part of the ‘input device’ and includes transducers, analogue
multiplexers, sample and hold circuits and A/D converters.
• Display device: It is part of the ‘output device’ and is used for local display of the
status of the system. LED’s or LCD displays may be used for this purpose.
• Serial and parallel ports: These ports are used to interface any external devices and
for debugging purpose.
• RJ-45 connector and wireless connectivity: This is required to connect the EWS to
the LAN. The embedded devices may also be connected to the internet through a
MODEM for dial-up connection (telephone line). An IEEE 802.11 based wireless
LAN can be used to provide the data transfer path to the nearest node.
• Auxillary circuits: These circuits are essential for successful operation of the system.
They are clock, reset and booting circuit. Regulated power supply is necessary for all
the devices in the system. The system can be alternatively operated with a battery
power also.
Development of a wireless internet-based ECG monitoring system 263
This section deals with general aspects of ECG and also discusses the importance of
various components (filters and amplifiers) of the ECG signal acquisition system.
The heart is a muscle, which pumps blood for circulation. During its contraction and
expansion, it creates a bio-potential. This potential generates electrical currents, which
originate from heart and spread throughout the body. Owing to these electrical currents,
electrical potential is generated all over the body, which can be recorded. The waveform
produced by these potentials is called the ‘ECG’.
The magnitude of the ECG signal, obtained from the body of a human being, is in the
frequency range 0.05–100 Hz with typical amplitude of 1–2 mV (Carr and Brown, 2001).
Hence, the signal must be amplified before A/D conversion. As the signal is mixed with
low-frequency noise due to interference, the direct conversion after amplification
will contain the noise frequency components, so the amplification is done in two
phases – pre-amplification and main amplification, interleaved with high- and low-pass
filters.
264 V. Agarwal et al.
Lower frequency components are filtered using a high-pass filter with a cut-off
frequency of 0.05 Hz and the higher frequency components are filtered out using a
low-pass filter with a cut-off frequency of 100 Hz. Signal voltage is amplified to a
suitable level before connecting to the A/D converter. Figure 7 shows the various
subparts of an ECG amplifier circuit.
Generally, first two types of electrodes are used for a short period of time. Column-type
electrodes, which are generally used for monitoring a patient for a longer period, have
been used in this work. The electrode consists of a metallic button, which is
manufactured with Ag-AgCl metal. Column between this button and the body of the
patient is filled with a conducting gel, which reduces the impedance between the
electrode and the skin.
Figure 9 Schematic diagram of the high-pass filter for diagnostic quality ECG
patient after amplification. To minimise the current flow, the common mode voltage is
fed to a voltage follower circuit instead of directly connecting to the inverting amplifier.
This circuit acts as a feedback loop to reduce the common mode noise to a low level.
As discussed in earlier subsections, a pre-amplifier with gain 26, a high-pass filter
with a cut-off frequency 0.05 Hz, a low-pass filter with a cut-off frequency 100 Hz and
an amplifier with a gain of 100 were designed and tested. The total gain of the ECG
amplifier is about 2600. This gain is fine tuned during calibration. A similar circuit has
been designed for the remaining two leads (lead 2 tapped from LL and LA, lead 3 tapped
from LL and RA).
In the next stage, the three signals are multiplexed before giving to the ADC.
Burr-Brown’s ADS574 A/D converter has been used (Data sheet of ADS574). Data bits
of the ADC are connected to the parallel port of the Axis communication’s developer
board. The control bit of the A/D converter and the selection lines of the multiplexer are
connected to the control pins of the parallel port. The complete schematic diagram of the
hardware for Lead 1 is shown in Figure 13.
Figure 13 Schematic diagram of the ECG amplifier for one of the channels
268 V. Agarwal et al.
4 Software
The software for EWS includes both application specific software and TCP/IP protocol
suite. Figure 14 shows the required protocols for the web server and the various layers,
which constitute a TCP/IP stack. These are briefly explained next.
a Link layer. This layer includes the device drivers in the operating system and the
corresponding network interface card in the computer. Together, they handle all the
hardware details of the physical interface with the cable.
b Network layer. This layer, sometimes called the internet layer, handles the movement
of packets around the network. Routing of packets, for example, Internet Protocol
(IP) and Internet Control Message Protocol (ICMP) constitutes the network layer in
the TCP/IP protocol suite.
c Transport layer. In the transport layer there are two major protocols, which offer two
different kinds of services:
• TCP, which is a reliable delivery service and
• UDP, which offers an unreliable service.
TCP also offers flow control for re-transmission of segments and acknowledgement
of received segments.
d Application layer. The application layer handles the details of a particular
application. Common TCP/IP applications include:
• Dynamic Host Configuration Protocol (DHCP)
• Telnet for remote login (Telnet)
• Browser support for displaying web pages (HTTP)
• File transfer applications (FTP)
• E-mail applications (SMTP).
The three lower layers take care of communication details only.
programs have input, processing and output paradigms. Application programs are mainly
concerned with processing, whereas the details of input and output are left to the
underlying operating system. Input and output hardware devices, such as keyboards, disk
drivers and monitors can only be accessed through special programs called device
drivers. Direct access to the devices is not permitted by the operating system,
so an application program has to go through device drivers to gain access (Khan, 2002).
Figure 15 shows how application programs communicate indirectly with the devices.
Device driver programs are modules that are basically part of the underlying
operating system, and are executed inside the memory space of the operating system
kernel. Most of the operating systems (for example, Linux) treat them as files.
The application program can open, close, read and write to these device driver files.
But application programs are not allowed to open and close some device drivers like
keyboard and screen files – they are always open.
final kernel image does not exceed the flash memory partition size. After completing the
kernel configuration, the configuration settings are saved in .config file.
Linux parallel port device driver, ppdev has been used to control the A/D converter
and the multiplexer, connected to the parallel port. This facilitates:
• examination of status lines
• setting up the control lines
• setting/examining the data line (and controlling the direction of the data lines)
• waiting for an interrupt (triggered by one of the status lines)
• setting up a response to an interrupt
• using IEEE 1284 negotiation (for instructing the peripheral which transfer mode to
use)
• transferring of data using a specified IEEE 1284 mode.
A program has been developed to change the status of the pins of the parallel port using
ppdev.
Figure 16 Flow chart for accessing the signals from the ADC
272 V. Agarwal et al.
Figure 17 Signals from each of the three leads: (a) ECG signal acquired between RA and LL;
(b) ECG signal acquired between LA and RA and (c) ECG signal acquired between
LA and LL
(a)
Development of a wireless internet-based ECG monitoring system 273
Figure 17 Signals from each of the three leads: (a) ECG signal acquired between RA and LL;
(b) ECG signal acquired between LA and RA and (c) ECG signal acquired between
LA and LL (continued)
(b)
(c)
Figure 18 shows how the ECG signals would appear on a web browser to a remotely
located specialist.
The selection of the processor and operating system involves careful consideration of
the following factors:
• the processor should have enough computing power and ports to schedule the
process and resources
• availability of cross compilers, development software and source codes
• the System On Chip (SOC) should support as many peripherals as possible to
minimise the cost and size of the system.
274 V. Agarwal et al.
The system has rich set of peripherals (parallel port, serial port, USB) and embedded
Linux, which enabled the testing of the developed system with various Wireless internet
technologies. The system has been tested with wired ethernet (IEEE 802.3), wireless
ethernet (IEEE 802.11b/g), IP over GSM and CDMA from remote locations on the IIT
Bombay campus. The performance of the system is found to be consistent and
encouraging. The system can be easily integrated with future wireless internet
technologies such as WiMAX. As a future work, it is proposed to integrate this system
with appropriate software to enable logging in of data related to the medical history of the
patients.
Development of a wireless internet-based ECG monitoring system 275
References
Carr, J.J. and Brown, J.M. (2001) Introduction to Biomedical Equipment Technology, Pearson
Education Asia, New Delhi, India.
Finkelstein, J., Cabrera, M.R. and Hripcsak, G. (1998) ‘Web-based monitoring of asthma
severity: a new approach to ambulatory management’, IEEE International Conference
on Information Technology Applications in Biomedicine, Washignton, USA, pp.139–143.
Guo, Z. and Moulder, J.C. (2004) ‘An internet based telemedicine system’, Proceedings of the
IEEE Conference on Engineering in Medical and Biology, Washignton, USA, Vol. 2, No. 4,
pp.3076–3079.
Gupta, S. and Ganz, A. (2004) ‘Design considerations and implementation of a cost-effective,
portable remote monitoring unit using 3G wireless data networks’, 26th International
Conference IEEE Engineering in Medicine and Biology Society, San Francisco, CA, USA,
Vol. 2, pp.3286–3289.
Khan, A.A. (2002) Practical Linux Programming: Device Drivers, Embedded Systems, and the
Internet, Charles River Media, INC., Hingham, Massachusetts.
Kim, K.K, Lim, Y.K. and Park, K.S. (2004) ‘The electrically non contacting ECG measurement on
the toilet seat using capacitively-coupled insulated electrodes’, Proceedings of 26th IEEE
Conference on Engineering in Medicine and Biology, San Francisco, CA, USA, Vol. 1,
pp.2375–2378.
Kong, K.Y., Ng, C.Y. and Ong, K. (2000) ‘Web-based monitoring of real-time ECG data’,
Computers in Cardiology, Vol. 27, pp.189–192.
Kyriacou, E., Pavlopoulos, S., Koutsouris, D., Andreou, A.S., Pattichis, C. and Schizas, C. (2001)
‘Multipurpose healthcare telemedicine system’, Proceedings of the 23rd IEEE Annual EMBS,
Istanbul, Turkey, Vol. 4, pp.3544–3547.
Lin, C-C., Chiu, M-J., Hsiao, C-C., Lee, R-G. and Tsai, Y-S. ((2006)) ‘Wireless health care service
system for elderly with dementia’, IEEE Transactions on Information Technology and
Biomedicine, Vol. 10, No. 4, pp.696–704.
Lovell, N.H., Magrabi, F., Celler, B.G., Huynh, K. and Garsden, H. (2001) ‘Web-based acquisition,
storage and retrieval of bio medical systems’, IEEE Engineering in Medicine and Biology,
Vol. 20, No.4, pp.38–44.
Ping, W., Jin-gang, W., Xiao-bo, S. and Wei, H. (2005) ‘The research of telemedicine system
based on embedded computer’, Proceedings of the 27th Annual IEEE Conference on
Engineering in Medicine and Biology, Shanghai, China, pp.114–117.
Santamore, W.P., Homko, C., Marble, J., Wald, J. and Bove, A.A. (2004) ‘Improving heart failure
care by using a telemedicine system’, Proceedings of the IEEE Conference on Engineering in
Medical and Biology, San Francisco, CA, USA, Vol. 2, pp.3076–3079.
Szymanski, J.W. (2000) ‘Embedded internet technology in process control devices’, Factory
Communication Systems, Proceedings, Porto, Portugal, September, pp.301–308.
Websites
American Heart association, http://www.americanheart.org/ presenter.jhtml?identifier=4578
Data sheet of ‘AVR460 Embedded Web Server’, Atmel corp, http://www.atmel.com/atmel/
acrobat/doc2396.pdf
Data sheet of Analog to Digital converter ADS574, http://www-s.ti.com/sc/ds/ads574.pdf
Document on ‘The Linux 2.4 Parallel Port Subsystem’, on parallel port programming using
‘parport’ device driver, http://people.redhat.com/twaugh/parport/html/parportguide.html