Content uploaded by Ferenc Ender
Author content
All content in this area was uploaded by Ferenc Ender on Oct 09, 2014
Content may be subject to copyright.
Web Server Based Remote Health Monitoring System
István Bosznai, Ferenc Ender, and Hunor Sántha
Department of Electronics Technology,
Budapest University of Technology and Economics, Budapest, Hungary,
1111 Budapest, Goldmann Gy. t. 3., building V2
Phone: +36 1 463 3730, Fax: +36 1 463 4118, boris@ett.bme.hu
Abstract: In this paper a new solution of a home monitoring system is presented. Home monitoring
makes possible for the patient to measure different physical parameters at home, and for the physician
to check the results anywhere without personal meeting. Contrary to conventional home monitoring
systems, the realized system uses distributed data storage of patients’ data, instead of using a remote
server to store all the data. A fully functional home monitoring system has been realized, that contains
a microcontroller based web server to store patient data. This unit collects data via Bluetooth from a
small size wearable Electrocardiograph (ECG) device designed and constructed by the authors. The
size of the realized web server is 9·11·3 cm - w·l·h, and the power consumption is only 2W. The stored
data can be accessed via internet. The remote client runs a Java application stored on the
microcontroller based web server. The physician uses this Java application to access and view
patients’ data in a remote location and to form a diagnosis.
1. INTRODUCTION
Home Health Care means any type of care
given to a person in their own home. Home Health
Care aims to make it possible for people to remain at
home rather than use residential, long-term, or
institutional-based nursing care. Home Monitoring is
a subsection of Home Health Care that uses a remote
device to monitor the vital signs of a patient. This
vital sign can be for example the temperature, oxygen
saturation, heart rate, etc. of the patient. A typical
home monitoring system consists of two parts: a
device at the patient’s location that records the patient
data, and a device that displays the patient data at the
physician’s office.
Diseases of the heart and cardiovascular system
(cardiovascular disease or CVD) are the main cause of
death in EU: accounting for over 2 million deaths
each year. Nearly half (42%) of all deaths in the EU
(46% deaths in women and 39% deaths in men) are
from CVD - slightly less than for Europe as a whole.
Between a third and a half of deaths from CVD are
from Coronary Heart Disease (CHD) and around a
quarter are from stroke. CHD by itself is also the
single most common cause of death in the EU:
accounting for over 741,000 deaths in the EU each
year. Around one in six men (16%) and over one in
seven women (15%) die from the disease. [1]
Electrocardiogram is the recording of the
electrical activity of the heart over time via skin
electrodes. It is a noninvasive recording produced by
an electrocardiograph. The impulses from the
sinoatrial node stimulate the muscle fibers of the heart
to contract. The generated electrical waves can be
measured at selectively placed electrodes (electrical
contacts) on the skin. Electrodes on different sides of
the heart measure the activity of different parts of the
heart muscle. An ECG displays the voltage between
pairs of these electrodes. [2]
Using an ECG recorder in Home Monitoring
System cardiac arrhythmias, including fibrillation,
bradycardia, and tachycardia can be detected. This
system also can be used to monitor post heart-attack
status of a patient, early recognition of unexpected
lesions occurring invasive cardiological intervention
is possible by such a device as well. Another area of
this Home Monitoring system is the early recognition
of dysfunction of the pacemaker in pacemaker
wearing patients and the continuous monitoring of
newly implanted pacemaker patients. [3]
A Home monitoring system that records ECG at
the patients’ home can be used to monitor almost all
CHD, arrhythmias, and post heart-attack events,
which means a huge market potential.
Our Research and Technological Development
(RTD) work aimed to create a small size, easy to use,
low cost, low power consumption unit that can replace
the centralized high power consumption database
servers, and can mean an other approach, instead of
the actually proposed, centralized e-Health systems.
By reducing the power consumption and making the
patient data distributed the cost of establishing a home
monitoring system could be dramatically reduced.
2. EXPERIMENTAL
2.1. Literature survey
Before creating the Home Monitoring System, a
literature survey has been done using ScienceDirect,
database of European Patent Office and Google to
find out whether such device exists in the market or
not. During the search 13 systems were examined
from different aspects (size, price, GSM connectivity,
internet connectivity, multiple recording units,
connects to remote server, uses distributed data
storage) with the following results: 9 of the 13
systems connects to the physician through the internet,
6 of the 13 provides accessibility and display of the
measurements via World Wide Web, and only 3
systems support multiple devices, not only an ECG,
and all the examined systems connect to a remote
server to store the patient data, none supported
distributed data storage. The survey resulted that
developing a Home Monitoring System that uses
distributed data storage, handles multiple devices, is
small, and power saving may be a useful alternative in
certain applications.
2.2 Hardware development methods
The schematic diagram and the layout of the Web
Server was created in OrCAD 15.7 and was designed
to fit in a standard size box. The size of the whole
Web Server is quite small (9·11·3 cm - w·l·h).
The main part of the Web Server is a PIC18F67J60
microcontroller from Microchip Inc. that contains an
embedded Ethernet control module. The storage is a
Kingston 2 GB memory card; the EEPROM is a 256
Kbit
2
IC
module from Microchip. The display unit is
an EA-DOGM 162E Liquid Crystal Display (LCD)
that can be accessed via SPI. The Real Time Clock
(RTC) is made by Maxim, and it also communicates
via the SPI bus. The Bluetooth module is a WT12
module that is produced by Bluegiga.
2.3 Software development methods
The firmware of the Web Server unit was written
in C programming language, and the compiler that
was used is the CCS C from Custom Computer
Services, the compiler is used in Microchip’s MPLAB
GUI. The firmware contains pre-written OEM
libraries such as the SD card handling routines, or the
TCP/IP stack that controls every Ethernet
communication, including the Web Server module,
every other library had to be written, these include the
library for the EEPROM, LCD, and the RTC. Every
self created library consists of three parts:
initialization, data reading part and data writing part.
The application on the remote client was written in
Sun’s Java that derives much of its syntax from C and
C++ but has a simpler object model and fewer low-
level facilities. Another advantage of the Java
application is that besides the universal Java Virtual
machine (that required viewing lots of web pages)
nothing needs to be installed on the client computer.
2.4 Holter ECG as sensor input
The ECG recorder was developed by the authors in
2006 as a Student’s Scholarly Circle. [4] The device
records the signal of two standard Einthoven leads, EI
and EII. The 1 mV ECG waves are amplified 1000
times so the microcontroller samples an 1 V signal
(Fig. 1.). The sampling frequency of the signals is
500 Hz and the resolution is 10 bits, which means
1024 steps, using 3.3 V supply voltage the smallest
voltage increase/decrease that the recorder can detect
is 3.2 mV.
The device communicates via Bluetooth, and the
communication speed is 115200 bits/sec
(11.2 Kbyte/s).
The data transmission speed is 1.95 Kbytes/sec,
this amount data is easily transmitted with the
11.2 Kbyte/s maximum bandwidth.
Figure 1: The schematic diagram of the ECG recorder
The ECG recorder uses a Lithium-ion battery as the
main power source. The capacity of the battery is
1100 mAh, the total current consumption of the
device is 32.3 mA, so the ECG can operate 34 hours
continuously.
The complete ECG recorder can be seen in Fig. 2. The
coloring of the electrode connectors is according to
the European ECG color standard.
Figure 2: The ECG recorder with the disposable 3M
electrodes
The red electrode goes to the right arm, the yellow
electrode goes to the left arm, the green electrode goes
to the left leg and the black electrode goes to the right
leg.
2.5 Validation methods
The system was tested on almost 40 healthy
volunteers, including young and adult people from
both sexes. The web server recorded, and stored their
data successfully; the measured data were accessible
via the Java application. Five measurements were
taken on a day, after all the measurements were done
the Web Server was left at the university and a
cardiologist evaluated all the measurements from a
remote location.
3. RESULTS
3.1. The system plan
The aim was to create a system that can record
biological signs of a patient, can be accessed
remotely, is application specific, small in size and low
power consumption, easy to use, in terms, that the
system automatically sets the settings. After creating
the diagram (Fig. 3.) of the system the components
were chosen.
Figure 3: The system plan for the Home Monitoring
System
For the Human sensor an ECG device was chosen
because of the reasons mentioned in the introduction
part. The device that controls the ECG is a Web
Server, this device ensures two things: the data
storage, and the remote accessibility of the data. The
communication between the ECG recorder and the
Web Server is established by Bluetooth. Because
small size and low cost is required a microcontroller
was chosen to realize the web server. The remote
interface at the physician’s location is a Personal
Computer (PC) that runs a Java applet stored on the
microcontroller based Web Server module.
3.2. The realized Home Monitoring System
The system consists of two hardware and one software
parts (Fig. 4.):
An ECG recorder which records the
physiological signs of the patient
A web server which stores the data, and
communicates with the ECG unit via
Bluetooth, and the Remote Client via TCP/IP
A Java application which displays the
recorded ECG on the remote PC
Figure 4: The schematic diagram of the home
monitoring system
While the patient makes the measurement the Web
Server unit stores the data locally on an SD (Secure
Digital) memory card. The realized Web Server also
communicates with the recording unit, initiates-, stops
the measurement, and displays the data on a LCD. The
communication protocol is Bluetooth, so not only an
ECG unit can be connected to the Web Server unit,
but e.g.: a Photoplethysmograph (PPG) or Blood
Pressure (BP) meter having a Bluetooth data link. The
physician accesses these data remotely, using internet.
The Java application, which displays the ECG curves,
patient data and several other properties, is stored
locally on the web server, so the physician needs only
a web browser to view the results.
3.2. The web server and data storage unit
The Web Server can be separated into seven parts
(Fig. 5.). The chosen microcontroller has an
embedded Ethernet controller, which is a complete
connectivity solution, including full implementations
of both Media Access Control (MAC) and Physical
Layer transceiver (PHY) modules. Two pulse
transformers and a few passive components are all
that are required to connect the microcontroller
directly to an Ethernet network. This family
introduces a new line of low-voltage devices with the
foremost traditional advantage of all PIC18
microcontrollers namely, high computational
performance and a rich feature set at an extremely
competitive price point. These features make the
selected microcontroller family is a logical choice for
many high-performance applications where cost is a
primary consideration. [5]
The microcontroller manages the connection to
other Bluetooth devices; it controls the devices via the
Serial Peripheral Interface Bus (SPI bus). It is a
synchronous serial data link standard that operates in
full duplex mode. Devices communicate in
master/slave mode where the master device initiates
the data frame. There are four SPI enabled parts in the
Web Server unit. The first is the EEPROM that stores
data even after the device is turned off, these data
includes the current date, setup settings, MAC address
of the unit, etc. The next SPI unit is the LCD that
displays information to the patient, such as the date,
the IP address of the unit, or the status of the
measurement.
Figure 5: The schematic diagram of the Web Server
The third unit is the SD memory card that holds
the patient data such as birth date, identification, etc.
and the measurements. A Kingston 2 GB SD card can
store approximately 12 days of data. The SD card was
chosen of the many memory card types because it can
be accessed via SPI witch almost all the peripherals
use. The maximum data transfer that can be achieved
with the SPI mode is 25 Mbit/s. A 24 hour
measurement with the 1.95 Kbyte/sec transmission
would take 164 Mb, this could be transmitted in 52
seconds to the client PC. The last component is a Real
Time Clock that keeps track of the current time. This
is needed to add timestamp to every measurement.
Most RTCs use a 32.768 kHz crystal oscillator, this
frequency is exactly
15
2
cycles per second, which is a
convenient rate to use with simple binary counter
circuits. The Bluetooth transceiver and the USB
communicate via serial connection that is
implemented in the microcontroller.
A low power Class II (10 meters range) low-cost
transceiver chip was selected. Bluetooth makes it
possible for these devices to communicate with each
other when they are in range. [6]
3.3. The firmware of the Web Server unit
The main program first initializes the peripherals,
like the SD card, EEPROM, the LCD, reads the
current date, initializes the Ethernet module, etc. after
that Web Server is ready string is written to the LCD.
When the initialization is done the program enters the
Web Server state, where it listens to incoming http
requests. This is the state where the physician can
remotely access all measurement data. Meanwhile the
Bluetooth module is continuously searches for the
ECG recorder, when it is connected the main program
changes to measure mode and the Web Server starts
the measurement. The unit does not write the received
raw data to the memory card directly, but uses a FIFO
to store the incoming data while the memory card
allocates new space, and cannot accept data. After the
measurement is done the Web Server turns the ECG
recorder off, closes the measurement file, sets the new
parameters and the program gets back to the web
server mode. (Fig. 6.)
Figure 6: The block diagram of the firmware
3.4. The realized Web Server
The completed Web Server unit can be seen in
Fig. 7. The power consumption was measured, the
unit consumes 0.55 A, the supply voltage is 3.3 V,
this gives a total power consumption of
0.55 A·3.3 V = 1.815 W. By reducing the power
consumption and making the patient data distributed
the cost of establishing a home monitoring system
could be dramatically reduced. The average power
consumption of a PC based web server exceeds more
than 300 W.
Figure 7: The completed Web Server unit
3.5. The application on the remote client
The aim was to create an application that can be
run on any operating system.
Figure 8: The Java application at the remote client with
the recorded ECG signals
The whole application is stored on the Web Server
unit making the measurements accessible almost
everywhere, and compatible with every PC. The
application organizes the measurements according to
date (Fig. 8.).
It was mentioned previously that the ECG recorder
records only two standard Einthoven leads, but the
application draws six leads. This is possible because
only two of the six leads are independent; the other
four can be easily calculated. The formulas for the
other four leads are:
EIII EII EI
(3.1)
2
EI EII
aVR
(3.2)
2
EI EIII
aVL
(3.3)
2
EII EIII
aVF
(3.4)
Leads aVR (augmented vector right), aVL
(augmented vector left), and aVF (augmented vector
foot) are augmented limb leads. They are derived from
the same three electrodes as leads I, II, and III.
However, they “view” the heart from different angles.
The recorded ECG signals are superimposed with
noise for example 50 Hz and muscle movement noise.
A Finite Impulse Response (FIR) low pass filter is
realized in the Java application to filter the previously
mentioned noises added to the signals (Fig. 9.).
Figure 9: The ECG signal without and with filtering
3.6. The measuring process
The measurement is fully automatic; it can be
divided into 5 steps:
The patient places the ECG electrodes to the
arms and the legs
The patient turns the ECG recorder on
The Web Server connects with the ECG
recorder
The measurement takes as much time as the
physician previously defined
The Web Server closes the connection to the
ECG module and turns it off
As we can see the patient only have to put the
electrodes on, and turn on the ECG recorder, besides
that the whole measurement is automatic. After the
measurement is done the physician can access the
data.
4. CONCLUSIONS
During the development a fully operational Home
Monitoring system was realized, that can be used to
monitor various heart diseases. The system uses a
wearable ECG to monitor the heart activity of the
patient. The whole measurement process is fully
automatic, the only task of the patient is to put the
ECG electrodes on and turn the ECG device on. The
remote Java application displays the measurement
data. The application is stored on the Web Server unit,
thus the physician needs only a web browser to
display the results. A complete test including 40
healthy volunteers has been taken out, where the
system recorded and displayed their ECG
successfully.
REFERENCES
[1] CVD mortality in Europe
http://www.heartstats.org/datapage.asp?id=754
[2] The Complete Guide to ECGs by James O'Keefe,
Stephen Hammill, Mark Freed, and Steven Pogwizd
(Paperback - Oct 3, 2008)
[3] Ede Kékes, “The real value of the transtelephonic ECG
system in the clinical cardiological practice”, vol 148,
(issue 31), pp. 1443-1451, Aug. 2007.
[4] István Bosznai, Zoltán Kovács, “Design and
Realization of a Wireless ECG Processing and
Recording System” Student’s Scholarly Circle paper,
2006
[5] A datasheet of PIC18F67J60 microcontroller
http://www.microchip.com/wwwproducts/Devices.aspx?dD
ocName=en026445
[6] Newton, Harold. (2007), Newton’s telecom dictionary.
New York: Flatiron Publishing.