BaharuddinMustaphaMFKE2008

i
DEVELOPMENT OF A PC INTERFACED BLOOD PRESSURE METER
(E-BPMS)
BAHARUDDIN BIN MUSTAPHA
A project report submitted in fulfillment of the
requirement for the award of the degree of
Master of Engineering (Electrical-Electronic and Telecommunications)
Faculty of Electrical Engineering
Universiti Teknologi Malaysia
MAY 2008
iii
DEDICATION
To my beloved wife, Raja Roziana Bt. Raja Bidin, thanks for encouragement and
never ending support.
My dearest children; Nik Muhammad Danial, Nik Nurin Nazuha, Nik Muhammad
Haziq, Nik Muhammad Wazif and Nik Nurin Batrisyia credits go to all of you for all
the joyous moments and wonderful time.
And for my whole families; my deepest appreciation for great advise, constant
sacrifices and endless understanding.
May Allah (swt) shower his blessings upon all of you.
iv
ACKNOWLEDGMENT
Firstly, my highest gratitude to my supervisor, Prof. Dr. Ruzairi B. Hj. Abdul
Rahim for his guidance and encouragement in completion my project.
Secondly, a special thanks to Mohd Hajazi Bin Mustafa who giving me inputs
and ideas in making this project succesful.
Lastly, to my wife, colleagues , course mates and to all person who involved
either directly or indirectly in giving supports, encouragement and motivations.
v
ABSTRACT
Blood pressure is one of the fundamental vital signs, and its measurement is
of great importance to medical professionals and the general public alike. Nowadays,
there are several types of blood pressure meter available manufactured from various
companies. In order to meet the demand on telemedicine and technology
advancement, a new form of blood pressure meter is desirable. This prototype of
blood pressure meter is interfaced with a personal computer (PC) which able to
simulate the measurement process in real time. The proposed system was named eBPMS (Electronic Blood Pressure Measurement System) suggests the usage of both
hardware and software in determining blood pressure reading. Hardware elements
operate on oscillometric principle which gives the results in terms of systolic,
diastolic and MAP (Mean Arterial Pressure). Furthermore, these results will be
presented and simulated on the software. The e-BPMS interface was developed by
using Visual Basic 6.0 language which highlights the user friendly attributes.
Moreover, the simulated waveform will evaluate the blood pressure and gives the
blood pressure value. This application shows significant improvement on the overall
performance and gives reliable results. The framework used to design e-BPMS is
easy to understand and it can be extended further to endorse new application area.
vi
ABSTRAK
Tekanan darah merupakan suatu penanda asas bagi mengetahui status
kesihatan pesakit oleh pengamal perubatan atau orang awam dan pengukurannya
adalah penting bagi mengetahui tahap kesihatan. Kini, terdapat pelbagai jenis alat
mengukur tekanan darah yang beroperasi menggunakan teknik-teknik yang berlainan
dikilangkan oleh pelbagai pengeluar. Kepesatan perkembangan teknologi pada masa
ini untuk mencapai aplikasi Tele-Perubatan menyebabkan keperluan untuk mencipta
satu alat mengukur tekanan darah yang baru meningkat. Projek ini bertujuan untuk
mencadangkan satu alat mengukur tekanan darah yang baru menggunakan prinsip
osilometrik di mana ianya dihubungkan dengan komputer peribadi dan boleh
mamaparkan simulasi bagaimana tekanan darah seseorang ditentukan. Prototaip alat
mengukur tekanan darah ini dinamakan e-BPMS iaitu singkatan untuk “Sistem
mengukur tekanan darah elektronik”. Sistem ini boleh dibahagikan kepada dua
elemen iaitu “hardware” dan juga “software”. Keluaran akan memberikan keputusan
analisis dalam bentuk bacaan sistolik, diastolik dan juga purata tekanan arteri.
Semuaa
bacaan
yang
dipaparkan
adalah
menggunakan
perisian
bahasa
pengaturcaraan “Visual Basic 6.0” . Projek ini telah berjaya memberi keputusan yang
dikehendaki dan berjaya memenuhi objektif dan ianya boleh diperbaiki lagi di masa
akan datang.
vii
TABLE OF CONTENTS
CHAPTER
TITLE
PAGE
DECLARATION
ii
DEDICATION
iii
ACKNOWLEDGEMENT
iv
ABSTRACT
1
v
ABSTRAK
vi
TABLE OF CONTENT
vii
LIST OF TABLES
xi
LIST OF FIGURES
xii
LIST OF SYMBOLS/ABBREVIATIONS
xvii
LIST OF APPENDICES
xviii
INTRODUCTION
1
1.1 Overview
1
1.2 Theory
2
1.2.1
Blood Pressure
1.2.2
Blood Pressure Instruments
2
4
1.2.3
Important of Blood Pressure
6
1.3 Methods of Blood Pressure Measurement
7
1.3.1
Direct Techniques
8
1.3.2
Indirect Techniques(Non-invasive)
10
viii
1.3.2.1 Auscultatory Method
11
1.3.2.2 Oscillatory Method
12
1.3.2.3 Automated Auscultatory Technique
13
1.3.2.4 Tonometry Technique
14
1.3.2.5 Infrasound and Ultrasound Technique
14
1.3.2.6 Ambulatory Blood Pressure Monitoring Technique 15
1.3.2.7 Finger Cuff Technique
16
1.3.2.8 Pulse Dynamic Technique
16
1.3.2.9 Plethysmography Technique
17
1.4 Problem Statements
17
1.5 Projects Objectives
18
1.6 Importance of Project
18
1.7 Thesis Structures
2
19
LITERATURE REVIEW
20
2.1 Blood Pressure Measurement Using Oscillometric Method
2.2 Blood Pressure Determination In The Oscillometric
20
25
2.3 Strategy For Determination of Systolic, Diastolic and Mean
30
2.4 Accuracy of Blood Pressure Measurement Devices
33
3
METHODOLOGY
36
3.1 Method
36
3.2 Instruments
38
3.2.1 Hardware
39
4
3.2.2 Software
40
3.2.3
42
System Assembling and Integration
HARDWARE DEVELOPMENT
44
4.1 E-BPMS Hardware
44
4.2 Hardware Parts
44
ix
4.2.1 Cuff & Bult
45
4.2.2 Integrated Pressure Sensor
46
4.2.3
Operational Amplifier
47
4.2.4
Differential Amplifier
48
4.2.5
Filter
50
4.2.6
Microcontroller
50
4.2.7
MAX 232
53
4.2.8
RS 232
55
4.3 Data Transmission and Receiving
5
57
4.3.1
Hardware Handshaking
58
4.3.2
Software Handshaking
59
4.4 Circuit Operation
59
4.5 Hardware Assembling
60
4.6 Hardware Testing
61
4.6.1 Alpha Testing
61
4.6.2 Beta Testing
62
4.6.3 System Testing
62
SOFTWARE DEVELOPMENT
63
5.1 Software Design
63
5.2 Interface Design
63
5.2.1 Database Menu
65
5.2.2 Measurement Interface
65
5.3 Microcontroller Initialization and Programming
6
RESULT AND DISCUSSION
6.1 Hardware Experiments
66
71
71
6.1.1 Pressure Sensor
71
6.1.2 Differential Amplifier
73
6.1.3 Filter
74
6.1.4 Microcontroller (PIC16F877)
75
6.1.5 MAX232-RS232 Interface
76
6.1.6 Blood Pressure Determination
77
x
7
6.2 Comparison of Result
81
6.3 Measurement Performance
82
CONCLUSION AND RECOMMENDATION
7.1 Conclusion
84
7.2 Project Limitation
85
7.3 Future Recommendations
85
REFERENCES
Appendices
84
A-D
87
91 - 122
xi
LIST OF TABLES
TABLE
TITLE
PAGE
1.1
Blood pressure range
3
2.1
Distribution values for the main parameter
30
2.2
Cross-relation Table between Measurement Values and
Parameters
30
2.3
Ratio Distribution for Systolic Pressure
31
2.4
Ratio Distribution for Diastolic Pressure
32
2.5
Summary of accuracy of blood pressure measurement
devices
35
5.1
Baud Rates for Asynchronous Mode (BRGH = 1)
6.1
Comparison of blood pressure measurement using Omron
Blood Pressure Meter and e-BPMS
68
82
xii
LIST OF FIGURES
FIGURE
TITLE
PAGE
1.1
Measurement of force applied to artery walls
2
1.2
Blood circulation in the heart
2
1.3
Electronic sphygmomanometer
4
1.4
Conventional sphygmomanometer
5
1.5
Aneroid sphygmomanometer
5
1.6
Blood pressure waveform, and systolic, diastolic, and mean
pressures, from an invasive monitor screen
9
1.7
Illustration of oscillometric method
10
1.8
Determination of blood pressure by using auscultatory
11
1.9
(a) Stepped deflation cuff pressure (upper trace)
12
(b) By zooming in on the cuff pressure, the small oscillations
generated by blood flow through the arteries, are visible
(lowertrace). The peak oscillation corresponds to the Mean
Arterial Pressure
12
1.10
Blood pressure waveform by using oscillometric method
13
1.11
Blood pressure instrument for ABPM
15
2.1
From top to bottom: IA blood pressure, increasing
cuff pressure, analogically hardware-filtered (HW)
and software-filtered (SW) cuff oscillation signal
(with bias) as a function of time. (VIII)
26
Determination of the scaling multiplier and characteristic
ratios (CR values) for diastolic, mean and systolic
blood pressure from the normalized cuff oscillation
curve in the oscillometric method. (VIII)
28
Flowchart diagram depicting the oscillometric method
29
2.2
2.3
xiii
3.1
Comparison between oscillometric and auscultatory
37
3.2
Basic principle of oscillometric
38
3.3
Block diagram of e-BPMS
38
3.4
Hardware development of e-BPMS
40
3.5
Software development
42
4.1
Cuff and Bult
45
4.2
Integrated pressure sensor MPX5050G
46
4.3
Expected output of pressure sensor
47
4.4
Power supply decoupling and filtering circuit
47
4.5
LM324N Operational Amplifier
48
4.6
Differential Amplifier Circuit
49
4.7
Output signal of differential amplifier
49
4.8
Frequency response of the filter
50
4.9
Pin assignment of PIC16F877
51
4.10
Test set up for MAX232
54
4.11
Expected output from MAX232
54
4.12
Pin assignment and internal configuration of MAX232
54
4.13
Pin assignment of RS232
56
4.14
Timing diagram for data transmission by using handshaking
58
4.15
PCB layout for e-BPMS
60
4.16
Schematic diagram of e-BPMS
60
4.17
E-BPMS circuit after soldering
61
5.1
Main interface e-BPMS
64
5.2
Patient database
65
5.3
Measurement value of blood pressure
66
5.4
Initialization of register ADCON1 and all ports used
67
5.5
Setting of transmission mode and baud rate
68
5.6
PC detection of START/STOP data transfer
69
5.7
Starting the Analog-to-Digital Conversion Operation
69
5.8
ADRESL and ADRESH setting for data transfer
69
5.9
Detect the end of Capture Duration
70
6.1
Differential pressure obtained from sensor
72
6.2
Differential amplifier circuit
73
xiv
6.3
Filter frequency response
75
6.4
Input / output of analog to digital converter (ADC)
76
6.5
Output of both pin T2IN and T2OUT
77
6.6
Blood pressure measurement using oscilloscope
78
6.7
Real time blood pressure measurement using e-BPMS
79
6.8
Blood pressure oscillations envelope
81
6.9
Waveform comparison of oscillation signal between theory
and e- BPMS
82
6.10
Performance measure of e-BPMS
83
7.1
Inconsistent reading when pressure > 150mmHg is applied
85
LIST OF SYMBOLS/ ABBREVIATIONS
xv
A/D - Analog-Digital
AAMI - Association of Advancement Medical Instrumentation
ABPM - Ambulatory Blood Pressure Monitoring
ADC - Analog to digital Converter
AHA - American Health Association
Ap - Attenuation
ASCII - American Standard Code for Information Interchange
atm - Atmospheric unit (pressure measurement)
CMOS - Complementary MOSFET
COM - Component Object Model
CP - Cuff Pressure signal
CPU - Central Processing Unit
CTS - Clear To Send
DIY - Do It Yourself
DSR - Data Set Ready
DTR - Data Terminal Ready
e-BPMS - Electronic Blood Pressure Measurement System
EIA/TIA-232E Serial Communication Standard
EMI - Electromagnetic Induced Voltage
FET - Field Effect Transistor
GND - Ground
GPIB - General Purpose Interface Bus
GUI - Graphical User Interface
Hz - Hertz (unit of frequency)
LCD - Liquid Crystal Display
MAP - Mean Arterial Pressure
mmHg - Unit millimeter mercury
MOSFET - Metal Oxide Semiconductor FET
MS Chart - Microsoft Chart (ActiveX function)
MS Comm. - Microsoft Communication (ActiveX function)
xvi
MSC - Multimedia Super Corridor
NIBP - Non Invasive Blood Pressure
Pa - Pascal unit (pressure measurement)
PC - Personal Computer
PIC - Peripheral Interface Controller
RC - Resistor-Capacitor
RS-232 - Serial Communication Protocol
RTS - Request to Send
RXD - Received data
SI - International System (unit of measurement)
SPBRG - Baud rate generator
TTL - Transistor-Transistor Logic
TXD - Transmit data
UART - Universal Asynchronous Receiver/Transmitter
V - Volt (unit of voltage)
VB6 - Visual Basic 6.0
VDC - Direct current Voltage
Vout - Voltage output
Vs - Voltage Supply
WHO - World Health Organization
LIST OF APPENDICES
APPENDIX
TITLE
PAGE
A
PIC Programming
91
B
Interface Program Using VB
96
xvii
C
E-BPMS Hardware Setup
109
D
Standard Blood Pressure Issued by WHO
112
E
Data Sheet
113
1
CHAPTER 1
INTRODUCTION
1.1 Overview
Blood pressure is one of most important measurements which indicate
person’s health condition. Abnormal blood pressure reading may lead to various
diseases which can be prevented by treatment. Blood pressure related diseases are
usually being referred as “silent killer”. The consequence promoted can be either
cardiac disorder or the malfunctions of our body systems. Considering these huge
effects may be too harmful for human body, thus preventive action needs to be taken.
High blood pressure is an epidemic disease which always a major concerns in
developed countries.
Statistic shows the great number of cases for the past decades, which triggers
the insight to prevent and control this disease rather than cure it. Nowadays, the need
for a reliable medical technologies and analysis is desirable, since the users prefer to
experience their medical diagnosis themselves.
Home monitoring provides an
accurate record of measurements over time helps in planning an overall personal
health regimen. Furthermore, blood pressure management is a step towards a
healthier lifestyle.
2
1.2 Theory
1.2.1
Blood Pressure
Blood pressure is defined as the pressure of the blood against the walls of the
arteries. It is the resultant of two forces. One is created by the heart as it pumps
blood into the arteries and through the circulatory system. The other is the force of
the arteries as they resist the blood flow. This phenomena can be illustrates as in
figure below.
Figure 1.1: Measurement of force applied to artery walls
Figure 1.2: Blood circulation in the heart
3
Blood pressure is measured in millimeters of mercury (mmHg) and recorded
as two numbers systolic pressure "over" diastolic pressure. For example, the doctor
might say "130 over 80" 130/80 mmHg as a blood pressure reading. The
measurement is taken when the doctor puts the cuff around patient’s arm and pumps
it up. The pressure exerted by the cuff will block the blood flow in the vessel. As the
pressure is released slowly, blood starts to flow again and the doctor can hear the
flow using a stethoscope.
The number at which blood starts flowing again is
recorded as maximum output of pressure of the heart (systolic). Then, the doctor
will continue releasing the pressure of the cuff and listens until there is no sound.
The number (80) indicates the pressure in the system when the heart is relaxed
(diastolic).
According to American Heart Association (AHA), optimal blood pressure
with respect to cardiovascular risk is less than 120/80 mmHg. However, unusually
low readings should be evaluated to rule out medical causes. If the patient exhibits
low readings every measurements, there is a potential of having low blood pressure
(hypotension). The systolic pressure of 120 to 139 mmHg or diastolic pressure of 80
to 89 mmHg is considered as at risk of having high blood pressure (pre
hypertension). Furthermore, blood pressure reading of 140/90 mmHg is considered
elevated high (hypertension). The range of blood pressure recommended by AHA is
summarized in the Table 1.1 below.
Table 1.1: Blood pressure range
4
Blood pressure reading is known to be varied between one people to another.
It is recommended by AHA that ideally, blood pressure must be checked at least
twice a year and it should be more often if it is high. Some of the factors affecting
blood pressure can be classified into several categories concerning physiological,
gender, lifestyles and many others. The elaboration of these factors will be in
following section.
1.2.2
Blood Pressure Instruments
Traditionally, a sphygmomanometer is used for measuring blood pressure in
the arteries. The word is derived from the Greek “sphygmus” (pulse), plus the
scientific term manometer was introduced by Scipione Riva Rocci, an Italian
Physician during 1896. A sphygmomanometer usually consists of an inflatable cuff,
a measuring unit (the mercury manometer), a tube to connect the two, and (in models
that don't inflate automatically) an inflation bulb also connected by a tube to the cuff.
The inflation bulb contains a one-way valve to prevent inadvertent leak of pressure
while there is an adjustable screw valve for the operator to allow the pressure in the
system to drop in a controlled manner. Presently, there are many types of
sphygmomanometer that have being used for clinical practices such as electronic
sphygmomanometer,
conventional
sphygmomanometer
and
aneroid
sphygmomanometer as shown as in figure 1.3, figure 1.4 and figure 1.5 below.
Figure 1.3: Electronic sphygmomanometer
5
Figure 1.4: Conventional sphygmomanometer
Figure 1.5: Aneroid sphygmomanometer
Due to technologies advancement, blood pressure testing devices now are
using electronic instruments or digital readouts. In these cases, the blood pressure
reading appears on a small screen or is signaled in beeps, and no stethoscope is used.
Most of digital instruments have an automatic inflation mechanism, which replace
the manual inflation bulb for simplicity and comfort. A digital system is widely
known for its convenience and robustness even in noisy environment is preferable.
Therefore, blood pressure meter now available is still adapting the same measuring
techniques with added features. Some of available blood pressure meter are table-
6
top, wristband and also finger. Considerations need to be made when designing a
digital blood pressure meter since electronic devices are very susceptible to operating
temperature and also humidity.
1.2.3 Important of Blood Pressure
High blood pressure is a very common condition in modern society. It has
been estimated that one in five Americans, around 50 million people, suffer from
high blood pressure. In general more men than women have high blood pressure, and
the number
of
sufferers of
both
genders
increases rapidly
with
age.
In around 5% of cases of high blood pressure is caused by kidney problems, but the
causes of the other 95% of cases are unknown. There are a number of factors such as
race, age, obesity, stress, smoking and lack of exercise that can contribute to the
likelihood of a person developing high blood pressure but usually no one cause is
directly responsible. The majority of people with high blood pressure experience no
symptoms, but if left untreated high blood pressure can lead to major health
problems.
Consequently the monitoring of blood pressure is vitally important in order to
detect cases of high blood pressure and treat them early before health problems can
develop. Prolonged high blood pressure damages the lining of artery walls, making
them thick and stiff. This condition is known as arteriosclerosis. Cholesterol is more
likely to cling to the damaged artery walls, narrowing the arteries and thus
preventing the blood from flowing through the body properly. The heart has to work
harder to compensate for the narrowed arteries. Over time this causes the heart to
thicken and stretch, eventually failing to function normally, and causing fluids to
back up into the lungs. If the heart cannot work hard enough to compensate for the
narrowing of the arteries then less blood can get around the body. Reduced blood
flow to the heart can cause chest pain and angina, and eventually the flow may be
stopped completely, causing a heart attack.
7
The function of the kidneys is to filter waste from the blood, but if blood flow
to them is reduced then they become less efficient and waste builds up in the blood.
Eventually they may fail completely, and dialysis or a kidney transplant will be
required. High blood pressure can also lead to brain damage and impaired vision. If a
blood clot occurs in one of the narrowed arteries leading to the brain a thrombotic
stroke may occur. Alternatively the weakened blood vessels in the brain may break
due to the high pressure leading to hemorrhagic stroke. A 25-year study of 11,000
individuals has confirmed that young men with high blood pressure are more likely
to die from heart disease or other causes than those with normal blood pressure,
translating to an estimated shorter life expectancy of two to four years. The
researchers called for increased population-wide prevention of increased blood
pressure through healthy lifestyle habits and efforts to detect rising blood pressure in
children, teenagers and young adults so that control of blood pressure can be started
early.
1.3 Method of Blood Pressure Measurement
There are few available techniques employed for blood pressure
measurements in which have their own strengths and weaknesses. Two popular
approaches can be classified into two major groups known as invasive and noninvasive methods. As the name implies, invasive method involve catheterization
(cut) where the patient need to undergone a minor surgical process. On the other
hand, the non invasive technique offers simplicity, convenience, and comfort
procedure to the patient is more preferable.
The invasive method is undoubtedly yields the most accurate measurements,
but it is rarely used since it is more risky and patient may suffer excessive blood loss.
Even today, invasive catheterization procedures are seldom used due to the risk of
infection. Although, non invasive sacrifice a degree of accuracy in the measurement,
the procedures which are considering for patient safety are widely applied. Two
major methods for non invasive measurement are known as Auscultatory
and
8
Oscillometric. In fact, there are various methods used for measuring blood pressure
which will be discussed next.
1.3.1
Direct Techniques
The operation of direct measurement techniques can be summarized in very
simple terms which they all utilize a pressure transducer that is coupled to the
vascular system through a catheter or cannula that is inserted to a blood vessel,
followed by a microcontroller unit with electronics and algorithms for signal
conditioning, signal processing and decision making. There are many advantages of
this set of techniques, including:
i.
the pressure is measured very rapidly, usually within one cardiac cycle.
ii.
the measurement is done to a very high level of accuracy and
repeatability.
iii.
the measurement is continuous, resulting in a graph of pressure against
time.
iv.
the measurement is motion tolerant.
Therefore, the direct techniques are utilized when it is necessary to accurately
monitor patients’ vital signs, for example during critical care and in the operating
room. Although direct techniques have a lot in common, there are differences in the
details of various approaches. Extravascular transducers is one the direct technique
that have being used in blood pressure measurement. According to this technique,
the catheter in this type of devices is filled with a saline solution, which transmits the
pressure to a chamber that houses the transducer assembly. As a minor disadvantage,
this structure affects the measured pressure through the dynamic behavior of the
catheter. Since the catheter has a known behavior, this effect can be minimized to
insignificant levels through computational compensation (Gibbs).
Another direct technique is intravascular transducers. The transducer is at the
tip of the catheter in this type of devices. Then, the measured signal is not affected by
the hydraulics of the fluid in the catheter. The catheter diameter is larger in this class
9
of transducers. The new technique of direct measurement is by using transducer
technology where there is a wide spectrum of transducer technologies available to
build either kind of transducer. They include metallic or semiconductor strain gages,
piezoelectric, variable capacitance, variable inductance, and optical fibers.
Appropriate driver and interface circuitry accompanies each technology (Webster,
pp. 44-88). One of the advantage of direct measurement techniques is that, they are
not limited to measuring the simple arterial pressure. They can be used to obtain
central venous, pulmonary arterial, left atrial, right atrial, femoral arterial, umbilical
venous, umbilical arterial, and intracranial pressures, by inserting the catheter in the
desired site (Hambly). Blood pressure waveform can be performed as shown as in
figure 1.6 below.
Figure 1.6: Blood pressure waveform, and systolic, diastolic, and mean
pressures, from an invasive monitor screen. (Philips).
As time goes by, direct technique are not being used due to some errors [1].
Direct blood pressure measurement systems have the flexibility of working with a
variety of transducers/probes. It is important that the probes are matched with the
appropriate compensation algorithm. Most of the modern equipment does this
matching automatically, eliminating the possibility of operator error. An additional
source of error occurs when air bubbles get trapped in the catheter. This changes the
fluid dynamics of the catheter, causing an unintended mismatch between the catheter
and its signal processing algorithm. This may cause distortions in the waveforms and
errors in the numeric pressure values extracted from them. It is difficult to recognize
this artifact from the waveforms, so it is best to avoid air bubbles in the catheter.
10
1.3.2
Indirect Techniques ( Non-invasive)
Blood pressure measurements obtained by non-invasive methods are an
indispensable procedure for evaluating and treating patients in a medical
environment. This procedure has been implemented in some ways almost automatic,
mainly with the use of equipments based on the oscillometric method, illustrated in
Figure 1.7 [ 1].
Figure 1.7: Illustration of oscillometric method
An overwhelming majority of blood pressure measurements do not require
continuous monitoring or extreme accuracy. Therefore non-invasive techniques are
used in most cases, maximizing patient comfort and safety. Currently available
devices for noninvasive measurement are:-
11
i.
Manual devices: these devices use the auscultatory technique.
ii.
Semi-automatic devices: these devices use oscillatory techniques.
iii.
Automatic devices: while a majority of these devices use oscillatory
techniques, there are some that use pulse-wave velocity or
plethysmographic methods.
1.3.2.1 Auscultatory Method
The auscultatory method is the original technique that has been used by many
doctors and remains the most common method of measuring NBP today [2]. It is
based on the principle of manually inflating a cuff around the arm (typically),
occluding the brachial artery, slowly releasing the occlusion, and listening for
Korotkoff sounds. Korotkoff sounds are caused by the hammering of the blood
against the arterial wall when the compression of the artery is released. The onset of
Korotkoff sounds denotes the systolic pressure while the complete disappearance of
Korotkoff sound signifies the diastolic pressure [3]. Figure 1.8 below can illustrate
how systolic and diastolic pressure are obtained.
Figure 1.8: Determination of blood pressure by using auscultatory.
12
1.3.2.2 Oscillatory Method
The oscillometric method of measuring is used in most bedside patient
monitors and although there are some variances between manufacturers, the principle
method is the same. With this technique, a cuff is also applied to the patient’s arm or
leg and is inflated to a point above their systolic pressure, subsequently occluding
blood flow through the artery. In Dräger Medical’s Infinity patient monitors, the cuff
is then deflated at various pressure levels, allowing blood to flow back through the
artery in steps (Figure 1.9(a) and Figure 1.9(b)).
Figure 1.9:
(a) Stepped deflation cuff pressure (upper trace).
(b) By zooming in on the cuff pressure, the small oscillations
13
generated by blood flow through the arteries, are visible
(lowertrace). The peak oscillation corresponds to the Mean
Arterial Pressure.
As the pressure in the cuff is reduced, the blood pressure pulses within the
artery distend the soft tissues of the limb. These fluctuations in arm circumference
cause pneumatic pressure oscillations in the cuff, which can be sensed by transducers
within the monitor. During the cuff deflation, the onset and increase of oscillations
denotes the supra-systole region. The maximum oscillation sensed indicates the mean
blood pressure pulse, while the diastole region is marked by a decrease and
disappearance of oscillations.
The NBP monitor deflates the cuff one step each time it detects two
oscillations of relatively equal amplitude (‘peak detection’). The time between
deflation steps depends on the frequency of these matched pulses. However, if the
NBP monitor is unable to find a pulse within several seconds, it will deflate to the
next step. The process of finding two matched oscillations at each step provides
artifact rejection due to patient movement and greatly enhances accuracy. The
arterial waveform of blood pressure by using oscillometry method as shown as in
figure 1.10 below.
Figure 1.10: Blood pressure waveform by using oscillometric method.
1.3.2.3 Automated Auscultatory Technique
14
These devices apply sound-based algorithms to estimate SBP and DBP. By
using a microphone, these devices lack validation ability. In addition to noise-artifact
sensitivity, these sound-dependent algorithms may not adequately compensate for
patient conditions such as hypotension (i.e. low blood pressure), where the Korotkoff
sounds may be muted. To make automated measurement more reliable, oscillometric
devices were created.
1.3.2.4 Tonometry Technique
This method uses a different approach where the arterial tonometry is realized
by flattening the pressure non invasively to squeeze the artery against bone. The
applied pressure required to maintain the flattened shape are recorded and
accomplished by using array of pressure sensors. An algorithm must be used to
calculate the blood pressure from the waveform obtained. Moreover, the waveform
exhibits a similar pattern as catheter measurement (invasive). However, tonometry
have several limitations which affecting its performance. Limitations like high
sensitivity to sensor position and angle, measuring peripheral circulation, low inter
operator reproducibility, and is also requires regular calibration.
1.3.2.5 Infrasound and Ultrasound Technique
Infrasound technique attempts to improve on the auscultatory method by
detecting the low frequency Korotkoff sound vibrations below 50 Hz, in which
including sub audible vibrations. On the other hand, ultrasound technique is not
commonly used for measuring blood pressure. Usually, it is use in combination with
other methods. Major feature of this method is, the values recorded by using
ultrasound can be very operator dependent.
15
1.3.2.6 Ambulatory Blood Pressure Monitoring Technique
Ambulatory blood pressure monitoring (ABPM) is a method of taking regular
blood pressure readings of patients as they conduct their normal daily activities.
Although generally used for 24 hours, ABPM can also be used for up to 48 hours if
necessary. Blood pressure is a measure of the force, or tension, of the blood in the
walls of the arteries. High blood pressure (hypertension) puts an added workload and
strain on the heart, while low blood pressure (hypotension) can lead to fainting
(syncope). Blood pressure is measured with the use of an arm cuff
(sphygmomanometer) and expressed as systolic pressure over diastolic pressure.
Systolic pressure is the highest level of the blood's pressure within the artery walls
and corresponds to the contraction of the ventricle. Diastolic pressure is the lowest
pressure at which blood stays within the aorta.
Blood pressure is measured by either a clinic reading taken at a doctor's
office or a patient self-test with a personal BP monitor or public equipment (such as
are found in most pharmacies). Both the clinic reading and the self-test BP are
considered "casual" readings. Different monitors may be used, and tests may be
completed at different times of day. For most patients, this casual BP is all that is
needed to monitor current blood pressure diagnoses or to help detect the presence of
blood pressure disorders. However, some conditions are more difficult to diagnose or
monitor. When these conditions are present, ambulatory blood pressure monitoring
(ABPM) may be useful. Figure 1.11 below shows an instrument for ABPM.
16
Figure 1.11: Blood pressure instrument for ABPM
1.3.2.7 Finger Cuff Technique
Invasive beat-to-beat arterial blood pressure monitoring is considered the
‘gold standard’, as it is both accurate and reliable. However, cannulation of radial
artery is associated with a risk of local infection, haematoma formation, or
thrombosis. Therefore, non-invasive method providing accurate and reliable data are
required. In 1973, Penaz described the volume clamp technique whereby a
continuous non-invasive arterial pressure waveform could be obtained from a finger
cuff [5]. The blood volume of the finger varies in clinical fashion with each cardiac
cycle because of the attendant variation in systemic blood pressure. This variation is
detectable by a plethysmograph attached to the finger. If a pneumatic finger cuff can
be inflated and deflated rapidly enough to maintain constant finger blood volume
then the arterial wall has been ‘unloaded’ i.e. the cuff pressure must be equal to the
intra-arterial pressure.
A display of the cuff pressure should, therefore, represent the intra-arterial
pressure waveform of the digit and the analysis of the cuff waveform would allow
measurement of systolic, diastolic, and mean blood pressure. The principles have
been embodied in the Finapres and with modifications in the Portapres. Finger blood
pressure measurement is an advance in the monitoring of patients admitted to the
emergency department. However, a final comment on its use in intensive care units is
not possible due to the lack of data.
1.3.2.8 Pulse Dynamic Technique
Pulse wave is generated by the heart as it pumps blood, and travels ahead of
the pumped blood. By solving analytical equations of fluid dynamics, it has been
17
shown that changes in blood pressure heavily depend on changes in pulse wave
velocity. Blood pressure can be continuously calculated from pulse wave velocity,
which in turn is calculated from EKG parameters and peripheral pulse wave
measured by an SpO2 probe on the finger or toe. This method is suitable for
continuous monitoring, as well as for detecting sudden changes in blood pressure to
trigger an oscillometric cycle (Williams).
1.3.2.9 Plethysmography Technique
In this method, changes in the blood volume during a cardiac cycle are sensed
using a light emitter and receiver at the finger. Tissue and blood have different
infrared light absorbance characteristics. That is, the tissue is practically transparent
to the infrared light, while blood is opaque to it. A prototype of a ring-like
sensor/signal processor/transmitter combination has been reported (Yang), (Rhee).
1.4 Problem Statement
Nowadays most of the people are reluctant to get their blood pressure being
checked regularly. Usually, when they experience the diseases then only they would
seek for professional helps. As we know blood pressure diseases are harmful to
human for instance high blood pressure (hypertension) and low blood pressure
(hypotension). Driven by this consensus, human desires a simple and reliable blood
pressure measurement instruments which can suits their lifestyle. Due to technology
advancement, blood pressure instruments come in variety of sizes equipped with
added functions. To meet these requirements, a simple low cost digital blood
pressure meter which can do a real time analysis will be introduced. In the project, a
computer is use because it has a large memory space to store abundant of data.
Therefore, PC can work as a platform for interaction for blood pressure monitoring
system.
18
1.5 Projects Objectives
Objectives of this project are :i.
To develop a digital blood pressure meter to be interfaced with a
personal computer (PC).
ii.
To display blood pressure measurement with graph view to PC.
iii.
To introduce an affordable, low cost and user friendly digital blood
pressure monitor.
1.6
Importance of Project
The development of PC based digital blood pressure meter was designed
purposely to introduce an alternative way to promote regular self monitoring for
patient. User of this project may experienced themselves for simple blood pressure
screening procedures, which is done in real-time to check their health status.
Therefore, a robust medical checking system is important to ensure the procedure can
be done with a minimal supervision. It can be done by ourself. This is an innovation
to help users execute the diagnosis all by themselves. By using this system, user is no
need go to hospital for checking their blood pressure and infacts they are able to
monitor their health status regularly. When e-BPMS is set ready for use, this device
not only will help people to get their blood pressure measured regularly, this
indirectly may promote early prevention due to blood pressure diseases. Presently
many of deadness caused by blood pressure diseases.
19
1.7 Thesis Structures
Chapter I gives a brief introduction to the theory and measurement techniques
of blood pressure. Next, this chapter tells reader the objectives of the thesis, scope of
the project, the importance of project and also problem statements.
Chapter II discusses more about the detail of the fundamental theory of blood
pressure measurement technique using oscillometric method.
This includes the
principle of oscillometric , the strategy of determination systolic and diastolic
measurement, accuracy and method design.
Chapter III explains detail of methodology including hardware and software.
This chapter will touch the overall design and assembling of e-BPMS, flowchart and
process design.
Chapter IV explains the construction of the every single part of the e-BPMS
hardware system from the pressure sensor, operational amplifier, filter circuit and
then to a microcontroller control unit.
Chapter V gives an overview of the software development such as assembly
language written by using MPLAB in order to program the microcontroller. Next, a
program which has the ability to reconstruct the image written by using Visual Basic
and subsequently discussing image reconstruction algorithm used in this project and
acquisition methods used.
Chapter VI details out the results obtained by the system where some
experiment were carried out to investigate the capability of the system. Other than
that comparison of the performance of e-BPMS and other blood pressure
measurement system. The accuracy of e-BPMS can be improved by selecting a
20
suitable point of reference in VB programming to ensure the blood pressure was
taken properly.
Chapter VII comes to end of discussion on the project, this section concludes
the overall finding of the project, problems facing throughout the project. Most
important is suggestions for future development to improve the overall performance
of this project.
21
CHAPTER 2
LITERATURE REVIEW
2.1 Blood Pressure Measurement Using Oscillometric Method
Oscillometric method was first introduced by Marey in 1876. Erlanger (1904)
further developed it and attached a Riva-Rocci cuff around the upper arm instead of
fingers. Pressure oscillations were recorded on a rotating drum. This graphic
recording was discarded by Pachon (1909), who used dual-dial gauges, one for
presenting oscillation amplitude and the other for showing cuff pressure. In those
days, it was thought that maximum oscillation amplitude indicated diastolic blood
pressure (Howell and Brush 1901). It was more than half a century later that Posey
and Geddes showed that that point actually corresponds to mean arterial pressure.
Ramsey (1979) and Yelderman and Ream (1979) verified the finding with
adults, while Kimble et al. did the same with newborn infants (1981). At around the
same time, Alexander et al. (1977) demonstrated that the cuff width should be at
least 40% of the arm circumference. Diastolic and systolic blood pressures can be
determined using special fractions of the maximum oscillation amplitude, also
known as characteristic ratios. Thus, the special fractions for systolic and diastolic
blood pressure are 50% and 80%, respectively. Friesen and Lichter (1981) used these
characteristic ratios to determine the diastolic and systolic blood pressures of infants,
neonatal and pre-term babies with excellent results: the regression line formula was
D = 0.94p + 3.53 for systolic pressure and D = 0.98p + 1.7 for diastolic pressure.
22
Geddes et al. (1982) made measurements with animals (13 dogs) using the
direct invasive method as a reference and with humans (43 adult subjects) using the
auscultatory method as a reference. Auscultatory signals inside the cuff were
recorded using a tiny piezoelectric microphone with a bandwidth of 30-300 Hz to
record Korotkoff sounds and another with a bandwidth of 0.3-30 Hz to obtain cuff
oscillations, both recorded simultaneously. For humans, the characteristic ratios were
45%-57% and 75%-86% for systolic and diastolic pressure, respectively. For
animals, these values varied between 43%-73% and 69%-83%. Inevitably, these
ratios vary considerably and more theoretical studies are needed.
Drzewiecki et al. (1994) used a mathematical model to study the theory that
the oscillation maximum appears at mean arterial pressure. Their model supported
the hypothesis. In addition, they found the average characteristic detection ratios to
be 59% for systolic and 72% for diastolic pressure. They also suggest that the
systolic ratio should be lower for hypertensive patients and that the diastolic ratio
should be lower for hypotensive patients. Cristalli et al. also conducted experimental
studies (1992-1994) using a pneumatic system. Later, they constructed mathematical
models to describe pressure distribution and the influence it has on tissue properties
under the cuff. With a computer-controlled system, they demonstrated that frequent
cuff inflations and deflations may significantly decrease the recorded diastolic and
systolic blood pressure values. With some patients, the decrease, brought about
chiefly by a decrease in Poisson’s ratio, may exceed 10mmHg.
Ursino and Cristalli (1994 and 1996) constructed a lumped parameter
mathematical model which took into account compliance of the occluding cuff,
pressure transmission from the cuff to the brachial artery through soft arm tissue and
blood changes occurring in the collapsing brachial artery under the external load. In
addition, they showed that the rigidity of the arterial wall and tissue compliance have
a significant effect on the accuracy of diastolic and systolic pressure values, causing
an error of 15%-20%. By contrast, changes in mean arterial pressure and cuff
compliance did not influence the measurement to a large degree. They also supposed
that the mean arterial blood pressure can be determined as the lowest pressure at
which cuff pulse amplitude reaches the plateau. Another finding by Ursino and
23
Cristalli was that the characteristic ratios are also greatly affected by the arterial
wall’s elasticity; thus, excessively elastic arteries may lower the systolic ratio by
25%-30% and this figure may rise to 80% with stiffened arteries. According to their
model, arterial stiffness has a considerably weaker effect on the diastolic ratio.
Typical characteristic ratio values were 46%-64% for the systolic ratio and 59%-82%
for the diastolic ratio. As a conclusion, a measurement device with fixed ratios for
determining systolic, mean and diastolic blood pressure may significantly
overestimate them.
Moraes and Cerulli (1999 and 2000) also studied the characteristic ratios
using computer-controlled linear cuff pressure deflation with 10 patients and 75
volunteers, using the auscultatory method as a reference. A fixed percentile rule
yielded a value of 56% for systolic and 76% for diastolic pressure. With these ratios,
they got an average errors and standard deviations of error of (-0.9 ± 7.0) mmHg and
(1.0 ± 6.5) mmHg for systolic and diastolic blood pressure, respectively. This format
(average ± standard deviation) will be used anytime in the text if not specified in
other terms. Applying an adaptive classification rule, they changed the ratios in
conformity with the arm circumference and mean blood pressure, i.e., the systolic
ratio was decreased from 64% to 29%, mean artery pressure was changed from less
than 70 mmHg to over 150 mmHg and diastolic pressure was increased from 50% to
75%. The obtained accuracies were (-1.5 ± 5.1) mmHg for systolic and (0.6 ± 5.9)
mmHg for diastolic pressure. As can be seen, the standard deviation decreased
slightly.
In general, the deviations in the characteristic ratios recorded by Moraes and
Cerulli ranged widely. Being dependent on the used ratios, the fixed percentile rule
will lead to erroneous readings in many measurements. In addition, motion artefacts,
the white coat effect, shivering and arrhythmia generate noise that has an adverse
effect on the accuracy of the readings. Lin et al. showed in a paper published in 2003
that, to minimize noise, different mathematical methods can be used, including
averaging, also known as smoothing, Kalman filtering or fuzzy logic discrimination
with recursive weighted regression. Colak and Isik (2003 a & b and 2004 a, b & c)
utilized neural networks and fuzzy logic to classify blood pressure profiles. Because
24
most manufacturers of automatic devices do not reveal exactly how their device
determines the pressure values, the only option available to researchers is to test
them with a large number of patients with different conditions, including hypo-,
normo- and hypertension, arterial stiffening, heart disease, arrhythmia and so forth.
Bur et al. (2000) studied the accuracy of one commercial (Hewlet Packard)
oscillometric blood pressure monitor. They tested three different cuff widths on their
subjects, who were critically ill patients, using intra-arterial (radial artery) pressure as
a reference. The authors concluded that the device significantly underestimated
arterial blood pressure and produced a high number of measurements out of the
clinically acceptable range. Therefore, this type of oscillometric blood pressure
measurement fails to achieve an adequate accuracy level with critically ill patients.
Reeben and Epler (1973 and 1983) were the first to suggest using a modified
oscillometric measurement system, where cuff pressure changes beat-to-beat on the
basis of the actual mean pressure in the artery. In 1996, Jagomägi et al. presented a
continuous differential oscillometric blood pressure method, which was capable of
continuously measuring mean arterial pressure.
The device (UT9201) used two servo-controlled cuffs around two adjacent
fingers, one for mean pressure and another for slowly changing the pressure between
a value higher and lower than the mean. Jagomägi’s measurements were carried out
on young volunteers using the volume clamp method (Finapres) as a reference. In
many of the measurements, variations in mean arterial pressure were very similar.
The achieved accuracy for mean blood pressure was (-1.1 ± 5.5) mmHg at rest, (0.5
± 6.9) mmHg in head-up tilt and (-3.6 ± 7.7) mmHg during deep breathing. Raamat
et al. (1999) studied maximum oscillation criteria and found that, with contracted
finger arteries, the method gives overestimated values of up to 19 mmHg. With
relaxed arteries, however, the error is less evident. In their next paper (2000a & b),
Raamat et al. tested accuracy during local hand heating and found no statistical error
in the absence of vasoconstriction ((0.3 ± 0.3) mmHg). With peripheral
vasoconstriction, on the other hand, there was a statistically significant difference
((6.7 ± 2.0) mmHg).
25
Raamat et al. (2001) also studied whether accuracy is affected by cooling the
arm locally; their results were statistically significant ((-1.5 ± 1.1) mmHg before
cooling and (8.8 ± 6.3) mmHg after cooling). Jagomägi (2001) recommended that
intensive vasoconstriction, which can be determined by a laser-Doppler skin flow
meter, should be avoided during measurements. Further, Raamat et al. (2001)
conducted a set of measurements during a rhythmical quadriceps exercise and
simultaneously performed static handgrip compression using a rapidly (0.2 s)
inflating and deflating occlusive cuff in the right hand. Finapres and UT9201 cuffs
were fixed around the subjects’ left hand fingers. The aim was to affect peripheral
vascular resistance and blood pressure, and the results showed that both devices
tracked mean arterial pressure similarly. The test groups’ averaged difference was
1.2 mmHg after successive inflations and 3.8 mmHg after successive deflations.
2.2
Blood Pressure Determination In The Oscillometric
In this method, the cuff pressure signal p(i) is first filtered using two-second
moving average filtering, i.e., every sample is averaged 99 samples back and 100
samples forward using the formula: p(i) = mean[p (i-99 : i + 100)], (4) where p(i) is
the value of the sample and i the corresponding index. The resulting pressure signal
ignores one hundred samples from the beginning and another hundred from the end,
which has to be considered in later calculations. The filtered signal is then subtracted
from the original pressure signal yielding a high-pass filtered oscillation signal with
negligible attenuation and phase distortion. This procedure allows the study of the
potential effects of analogue filtering on the oscillation curve. The moving average
filtered signal serves as a cuff pressure reference signal. To assess the influence of
filtering on characteristic ratios, Figure 2.1 presents both the analogically filtered
(HW filtering) and the amplified oscillation signal as well as the signal gained by
subtracting the two-second moving average filtered signal (SW filtering) from the
original cuff signal.
26
Cuff pressure was first low-pass filtered (0-14 Hz, fourth order) and then HW
band-pass filtered (1-15 Hz for the healthy group, 1.7-11 Hz for the cardiac patient
group) and, finally, amplified to an appropriate signal level. The lowest SW-filtered
signal was gained by subtracting the two-second moving average low-pass filtered
cuff oscillation signal from the original cuff pressure signal. The thus obtained signal
is a high-pass filtered signal with a very low cut-off high-pass frequency. The signal
is then amplified to an appropriate signal level using a software multiplier.
Oscillation amplitudes are determined by subtracting diastolic pressure from systolic
pressure (the lower OSC signal). Alternatively, the following lowest value can be
subtracted from the highest value (the upper OSC signal) to get an amplitude value
with pulsation amplitude levels and the corresponding cuff pressures.
Figure 2.1: From top to bottom: IA blood pressure, increasing cuff pressure,
analogically hardware-filtered (HW) and software-filtered (SW) cuff
oscillation signal (with bias) as a function of time. (VIII)
The oscillation amplitude values can be reconstituted by multiplying the amplitude
values by a multiplication table in accordance with the formula
,
27
where
is IA blood pulse pressure corresponding to the oscillation pulse number
j. This method allows the reconstruction of the oscillation amplitude signal so that it
is not affected by variations in IA pulse pressure; in other words, the pulse pressure
amplitude remains constant. The oscillation amplitude signal must then be filtered to
eliminate the effects of motion artifacts. Our experiments showed that three-point
moving median filtering is adequate for the purpose. Because the cuff pressure curve
is not linear in neither the inflating nor the deflating pressure mode, the oscillation
signal must be normalized. After normalization, the amplitude signal is multiplied by
a constant to attain the maximum value of 100. Also the corresponding pressure
signal is multiplied by a scaling multiplier such that the highest point of the
oscillation curve, or 95% of the maximum, corresponds to the average mean IA
pressure. Also Geddes et al. (1983) used a similar scaling factor.
As mentioned earlier, this “highest point” should be on the diastolic side of
the oscillation curve (Ursino and Cristalli, 1994). Figure 2.2 presents the normalized
oscillation curves before and after multiplication and the average diastolic, mean and
systolic blood pressure value as well as the value of the scaling multiplier. The
normalized amplitude signal is then interpolated such that a single integer pressure
value corresponds to the oscillation amplitude value. If straight lines are drawn up
from the averaged diastolic and systolic IA pressure values, they cross the
normalized interpolated curve at the characteristic diastolic and systolic points (the
CR values in Figure 2.2).
The measured patient was a 66-year-old woman, who was 172 cm tall,
weighed 75.2 kg and had an arm circumference of 33 cm. The width of her pressure
cuff was 13 cm. First, the average values for the mean intra-arterial systolic and
diastolic blood pressure are calculated. Then, the scaling multiplier is obtained by
multiplying the cuff pressure signal by the oscillation amplitude, to attain the 95%
amplitude level of the average mean blood pressure. These characteristic ratios are
the levels at which the multiplied signal obtains the averaged systolic and diastolic
blood pressures values.
28
Figure 2.2: Determination of the scaling multiplier and characteristic ratios (CR
values) for diastolic, mean and systolic blood pressure from the
normalized cuff oscillation curve in the oscillometric method. (VIII)
Figure 2.3 shows a flowchart of all mathematical operations performed on the
data to get the systolic, mean and diastolic blood pressure values. First, cuff pressure
is sensed by a DC coupled transducer. The signal is then amplified and band-pass
filtered using both HW and SW filtering. Amplitude values are subsequently
obtained through specific amplitude determination for both the HW and SW signals.
The data values are filtered using three point moving median filtering to eliminate
casual motion artefacts. Next, by multiplying every single pressure value by a
multiplier acquired from the IA blood pressure measurement, the data values are
normalized such that 100% marks the highest value. In addition, the data values are
filled to match every pressure integer value with a corresponding normalized
amplitude value (interpolation). Now, both signals are multiplied by the previously
determined scaling multipliers so that the 95% level corresponds to the mean intraarterial blood pressure value. Finally, the mean diastolic and systolic blood pressure
values are determined separately for both the HW and SW filtered signals using the
previously determined characteristic ratios.
29
2.3
Figure 2.3: Flowchart diagram depicting the oscillometric method.
Strategy For Determination of Systolic, Diastolic and Mean
According to ACTB Moraes (1992), 85 files (one for each patient) were
initially analyzed, containing data such as age, arm circumference size and, mainly,
30
reference blood pressure measured by the observers. The data base presented a
distribution of values as shown in Table 1.
Table 2.1: Distribution values for the main parameter
The second phase on data base analysis determined the cross-relation
between characteristic ratios and the several parameters studied. Cross-relation Table
2 shows that the main parameters in the 85 patient sample which had an influence in
systolic and diastolic pressure measurements were characteristic ratios and arm
circumference size.
Table 2.2: Cross-relation Table between Measurement Values and Parameters.
The algorithm developed in order to determine the strategy for envelope
analysis was based on characteristic ratio distribution in relation to pressure
measurements. The most relevant methods in determining systolic and diastolic
pressure were the following:
a) Fixed percentile rule (fixed ratio)
31
This rule adopted a fixed value for the systolic ratio and another fixed value
for the diastolic ratio. The fmt premise adopted for these values was the mean value
of the characteristic ratios determined in the data base study. The results were:
Systolic ratio mean = 0.5573
Diastolic ratio mean = 0.7608
b) Characteristic ration in relation to pressure rule
This rule was based on the determination of a characteristic ratio for each
pressure level and, therefore, for each oscillometric pulse. Each oscillometric pulse
was associated to its characteristic ratio value for each corresponding pressure. An
amplitude was assigned for each oscillometric pulse in order to obtain the desired
corresponding pressure (mean, systolic or diastolic). Tables 2.3 and 2.4 describe the
characteristic ratio distribution for both systolic and diastolic pressure. Each
characteristic ratio and each pressure level was adjusted as to minimize the standard
deviation between the system being tested and the reference values.
Table 2.3: Ratio Distribution for Systolic Pressure.
Mean Pressure
Ratio
 200 mmHg
0.5
 150 mmHg
0.29
 135 mmHg
0.45
 120 mmHg
0.52
 110 mmHg
0.57
 70 mmHg
0.58
< 70 mmHg
0.64
The algorithm in programming can be written as below:
ifMean Pressure > 200 mmHg
ifnot, $Mean Pressure > 150 mmHg ratio = .29
ifnot, ifMean Pressure > 135 mmHg ratio = .45
ifnot, ifMean Pressure > I20 mmHg ratio = .52
ifnot, ifMean Pressure > 110 mmHg ratio = .57
ifnot, ifMean Pressure > 70 mmHg ratio = .58
32
ifnot, ratio = .64
ratio = .5
Table 2.4: Ratio Distribution for Diastolic Pressure
Pressure
 180 mmHg
 140 mmHg
 120 mmHg
 60 mmHg
 50 mmHg
< 50 mmHg
Ratio
0.75
0.82
0.85
0.78
0.60
0.50
The algorithm in programming can be written as below:
ifpressure > 180 mmHg ratio = .75
ifnot, ifpressure > 140 mmHg ratio = .82
ifnot, ifpressure > 120 mmHg ratio = .85
ifnot, ifpressure > 60 mmHg ratio = .78
ifnot, ifpressure > 50 mmHg ratio = .60
if not, ratio = .50
Two possibilities were considered in order to determine mean pressure:
a) Mean pressure corresponding to the highest amplitude pulse (envelope peak);
b) Mean pressure corresponding to the lowest pressure on the highest envelope
plateau.
In the first case it is only necessary to search for the highest amplitude pulse
among all existing pulses; the pressure corresponding to this pulse is considered the
patient's mean pressure. In the second case a plateau close to the peak at the top of
the envelope is chosen and the value to be adopted as mean pressure is the pressure
corresponding to the inferior limit for this plateau, because it would be, intuitively,
33
less sensitive to small variations in plateau form. Observe that the same concept was
also used for systolic and diastolic pressure determination. The values obtained with
both methods were tested in order to diminish differences with envelope peak results,
always considering the lowest pressure in the plateau. Our analysis estimated the
characteristic value ratio in 0.97. URSINO e CRISTALLI developed a mathematical
study of some biomechanical factors affecting the oscillometric blood pressure
measurement and obtained a characteristic ration approximately equal to 0.99 [4]. It
is very important, however, to point out that their value was obtained using
simulations over a mathematical model. Finally, the strategy was used in a
oscillometric blood pressure measurement system with very good results, according
to a comparative study using a simulator [3].
2.4
Accuracy of Blood Pressure Measurement Devices
Blood pressure measurement devices play an important role in medicine, as
they measure one of the fundamental vital signs. In addition to this traditional use,
non-invasive blood pressure devices, especially the automated ones, have become
ubiquitous in the homes, regularly used by lay people. Two widely used protocols for
testing the accuracy of these devices are those set by the Association for the
Advancement of Medical Instrumentation (AAMI), a pass/fail system published in
1987 and revised in 1993, and the protocols of the British Hypertension Society
(BHS), an A-D graded system, established in 1990 and revised in 1993. These
protocols describe in detail the process manufacturers should follow in validating the
accuracy of their devices. Their numeric accuracy thresholds can be summarized as
follows. A device would pass the AAMI protocols if its measurement error has a
mean of no more than 5 mmHg, and a standard deviation of no more than 8 mmHg.
The BHS protocol would grant a grade of A to a device if in its measurements 60%
of the errors are within 5 mmHg, 85% of the errors are within 10 mmHg, and 95%
within 15 mmHg. BHS has progressively less stringent criteria for the grades of B
and C, and assigns a grade D if a device performs worse than C.
34
The European Society of Hypertension introduced in 2002 the International
Protocol for validation of blood pressure measuring devices in adults (O’Brien
2002). The working group that developed this protocol had the benefit of analyzing a
large number of studies performed according to the AAMI and BHS standards. One
of their motivations was to make the validation process simpler, without
compromising its ability to assess the quality of a device. They achieved it by
simplifying the rules for selecting subjects for the study. Another change was to
devise a multi-stage process that recognized devices with poor accuracy early on.
This is a pass/fail process, using performance requirements with multiple error
bands. Whether blood pressure measurement devices are used by professionals or lay
people, their accuracy is important. Yet, most devices in the market have not been
evaluated for accuracy independently, using the established protocols (O’Brien
2001). In their study, O’Brien et al. surveyed published independent evaluations of
manual sphygmomanometers, automated devices for clinical use, and automated
devices for personal use. If a device was found acceptable by AAMI standards, and
received a grade of A or B by BHS standards, for both systolic and diastolic
measurements, then it was “recommended”. Otherwise it was not recommended. Few
studies they surveyed had issues such as specificity, so devices reported in those
studies were “questionably recommended”.
Table 2.5: Summary of accuracy of blood pressure measurement devices
Table 2.5 summarizes the result of their survey. It is interesting to note that of
the four clinical grade sphygmomanometers, a kind that is highly regarded by health
35
care providers, only one was “recommended”. Overall, the number of devices “not
recommended” is more than the number of “recommended” devices. What one
should take away from this analysis is that at every level of quality, price, and target
market, it is essential to research the accuracy of a device before investing in it and
relying on it.
36
CHAPTER 3
METHODOLOGY
3.1 Method
This project employs the oscillometric method for measurement of blood
pressure. The cuff is connected to the main unit and wrapped around the arm.
Circuits within the cuff sense the small oscillations in pressure against the cuff
produced by the expansion and contraction of the arteries in the arm in response to
each heart beat. The amplitude of each pressure waves is measured,converted to
millimeters of mercury, and displayed on the PC as a digital value. The deflation
control valve maintains the deflation rate at 2 to 5 mmHg/sec irrespective of
differences in arm size.
This method measures the blood pressure by detecting the pulsation of the
artery which is caused by the contraction of the heart, as the pressure oscillation in
the cuff. When the cuff around the upper arm is fully inflated, blood flow stops but
pulsation of the artery continues and causes oscillation of the pressure in the cuff. As
the pressure in the cuff is decreased slowly, the magnitude of the pressure oscillation
in the cuff gradually increases and eventually reaches a peak. Further decrease of the
cuff pressure causes the oscillation to decrease. The relationship between the changes
of cuff pressure and its oscillation is stored in memory and used to determine blood
pressure. Namely, cuff pressure when the oscillation increases rapidly is taken as the
systolic pressure, and that when the oscillation decreases rapidly is taken as the
37
diastolic pressure. Cuff pressure when the oscillation reaches a peak is taken as the
mean arterial pressure (MAP).
The oscillometric method does not determine blood pressure instantaneously
unlike the auscultatory method and microphone type automatic blood pressure
monitor, but determines it from the curves of the changes of the pressure and its
oscillation as described above. This feature gives it antinoise characteristics as it is
not affected by external noise or electric surgical units ( see figure 3.1).
Figure 3.1: Comparison between oscillometric and auscultatory.
Furthermore, it is easy to understand and yields rather satisfactorily results
since it uses mean values. This would not only help the practitioners but also it
enhanced public understanding on how to do measurements by themselves. Figure
3.2 shows the basic principle of oscillometric method.
38
Figure 3.2: Basic principle of oscillometric
3.2
Instruments
This project involved of both hardware and software. The roughly block
diagram of this project as shown as in figure 3.3 below.
Figure 3.3: Block diagram of e-BPMS
The cuff is manually inflate by user in order to measure blood pressure. The
pressure is known as input signal. The pressure from the cuff will be send to the
integrated sensor , then the signal is translated by few signal conditioning circuits in
the sensor and it will amplified with differential amplifier. The output signal from the
39
op-amp will separates two way either direct to microcontroller or through filter
which is two poles RC filter. Output from the microcontroller is transmitted through
USB-RS 232 cable for serial communication with a Notebook or personal computer.
The output signal will be displayed and analyzed by the program provided by the
software. E-BPMS software is set with a user-friendly environment which helps user
to understand and run the procedures accordingly. Some of improvements promotes
by this system are the measurement can be display graphically so that user can see
their blood pressure. Furhermore, every process took place in real time and user may
observe how the measurements being taken.
3.2.1
Hardware
In order to develop the hardware part of e-BPMS system, few sub
components or sub circuits involved. Those designed circuits were the requirements
to complete this hardware. Since this system adapted oscillometric techniques, the
hardware needs to differentiate between systolic reading, diastolic reading and also
mean arterial pressure (MAP) reading. Later, these signals will be used to determine
blood pressure reading during measurement [28]. Signal conditioning circuits are
vital to produce desired measurement results are used in designing e-BPMS such as
amplifier, high pass filter, analog to digital converter and also microcontroller. The
system designed should tolerate certain range of noise in order to preserve accuracy
of measurement. The detail explanation on circuit design will be explained in
Chapter 4 (Hardware Development). Figure 3.4 below shows the flowchart of
hardware development for this project.
40
Figure 3.4: Hardware development of e-BPMS
3.2.2
Software
Visual Basic 6.0 (VB6) was selected as the programming tool to develop eBPMS software. Originally, it is based on a programming language for beginners
called BASIC. Other programming language such as Microsoft C, C++ and JAVA
require much more study than VB6 before one can use them effectively. It was
chosen due to several factors like VB is known for its ability to develop user friendly
graphical user interface, simple commands, and intuitive approach to develop a
project and have quite powerful features. It has an easy to use interface where the
user may draws on their desired control such as button. This shows that VB is very
user friendly. The code window is simple yet effective and the menus at the top can
easily help user to navigate. It has an efficient debugging system which can be done
line by line. The compiler is good since it allows the user to customize various things
about the output file.
41
Visual Basic can also handle very powerful code for instance creating a three
dimensional area. It also has a high performance native code compiler to create
applications for both client and server side. Other than that Visual Basic 6.0 has a
good data environment designer which visually describes the reusable set of
command objects with drag-drop functionality. Moreover, the functionality helps to
bind multiple data resources for data aggregation and manipulation. Other than that,
Visual Basic 6.0 has several key advantages for instance it is excellent for enabling
the development for rapid applications, the databases features to allocate various data
type resources.
By using Visual Basic 6.0 the problem in displaying waveforms or graph also
can be solved easily. This control enables the usage of different type of charts and
graphs whether it is directly acquired from the system or plotted by it self. The
benefit of employing this control is due to its location independent property.
Regardless of the location, the control can be accessed by typing only single
command.
E-BPMS software was developed in a way that users may go through the
procedures easily all by themselves. Moreover, the user will be guided by means of
instruction page to help them. Figure 3.5 below show the routine of software
designed. The details on software development will be provided in Chapter 5.
42
HARDWARE
ROUTINE
MAIN SCREEN
BUTTON CLICK
START
Click the
button for
start
measure
the blood
pressure
at real
time
STOP
Click the
button to
stop
measure
immediately
RECORD
KEY IN
VALUE TO
ALL
REQUIRED
FIELD IN
DATABASE
SAVE
Save data
to
database
LOAD
Load old
data
CLS
Clear
screen
Edit
Save
Acquired
data from
hardware
Display the
waveform
Gives BP
value
Figure 3.5: Software development
3.2.3 System Assembling and Integration
E-BPMS software and hardware is connected via an interfacing scheme
known as RS232 which provides serial communication. The data collected from
hardware is digitized into sequence of zeros and ones before transmitting it into the
software. RS 232 was chosen since it is more familiar working with VB. The e-
43
BPMS system does not require for very fast transmission therefore made RS 232
adequate for measurement purpose. Other than that, a control function defined by
VB6 which is MS Comm. tool was used to realize this serial communication. This
function is activated by Active X components which is the specialty of VB6 in
developing such application. Information on how the integration will be realized is
further discussed in Chapter 4.
44
CHAPTER 4
HARDWARE DEVELOPMENT
4.1
E-BPMS Hardware
In the purpose of developing e-BPMS hardware circuit, there are few
components involves. All these required items have their own functions in order to
realize this circuit operation. Hardware will have direct connection with the user
since it is located at the first end of e-BPMS system. It also important in the sense
that the data acquired which will be used later by the system should be correct. The
designed on this circuitry was done after careful considerations were made prior to
develop e-BPMS. Moreover, by understanding the oscillometric principle which
underlies the circuit operation helps to figure out what are the requirements needed in
terms of e-BPMS hardware. The hardware consists of pressure sensor, differential
amplifier, two poles resistance-capacitance (RC) high pass filter, a microcontroller
which function as analog to digital converter, level converter (MAX232) and finally
the serial communication cable (RS232). Explanation on each part is provided in the
next section.
4.2
Hardware Parts
Hardware in this project can be categorized into three parts which are:-
45
i.
Input component such as cuff and integrated pressure sensor.
ii.
Signal processing component such as op-amp, differential amplifier, filter
and microcontroller.
iii.
4.2.1
Output component such as notebook or personal computer
Cuff and Bult
Cuff and bult will be used to give an arterial pressure of the patient. This is
input signal to the pressure sensor. It should manually pump by the user as showns as
in figure 4.1 below.
Figure 4.1: Cuff and Bult
46
4.2.2
Integrated Pressure Sensor
MPX5050GP (as shown as in figure 4.2) is a series piezoelectric transducer
made from monolithic silicon. A non toxic substances and environmentally friendly
is important in producing medical devices. It is designed such that is suitable for
wide range application employing microcontroller or microprocessor with A/D
inputs. The sensor known to be accurate due to its bipolar processing, and gives high
level output signal that is proportional to the applied pressure. This 50 kPa integrated
pressure sensor which yields a pressure range between 0 mmHg to 300 mmHg
equipped with internal operational amplifier for signal conditioning purposes. In this
circuit design, the output from the sensor is split into two paths for two different
purposes. Cuff pressure signal (CP) is directly interfaced to analog to digital
converter for digitization. On the other hand, Mean Arterial Pressure (MAP) signal
will pass through an amplifier for extraction of the amplified version of CP. The
output from the sensor is known to be equal to the voltage applied to provide a ratio
metric reading which is desired for system accuracy.
Figure 4.2: Integrated pressure sensor MPX5050G
The sensor was tested with respect to its datasheet. Some of the tests involved
were functionality and operational. This step is important to ensure the sensor works
within its specification and gives reliable output to be used in the circuit. Figure 4.3
and figure 4.4 shown an expected output and power supply decoupling and filtering
circuit.
47
Figure 4.3: Expected output of pressure sensor
Figure 4.4: Power supply decoupling and filtering circuit
4.2.3
Operational Amplifier
The operational amplifier is needed to attenuate the CP signal therefore the
baseline of oscillation will be constant and have a same reference level for
comparison. LM324N(see figure 4.5) is a fourteen pins quad operational amplifier
with true differential inputs. The common mode input range which includes the
negative supply eliminates the need for external biasing. It is made using four
compensated, two stage operational amplifiers. Whereby the first stage is used to
implement first stage gain function, transconductance reduction and also level
shifting. On the other hand, the second stage consists of standard current source load
48
amplifier stage. In this application, the differential inputs are desirable making the
evaluation between the two signals became easier. This op-amp was used in
designing the differential amplifier and eventually being used by two poles high pass
RC filter. Transconductance is an expression of the performance of the bipolar
transistor or a field effect transistor (FET). In general, the larger the
transconductance figure of a device will give greater amplification gain while other
factors are held constant. Formally, for a bipolar device, transconductance is defined
as the ratio of the change in collector current to the change in base voltage over a
defined, arbitrarily small interval on the collector-current-versus-base-voltage curve.
Figure 4.5: M324N Operational Amplifier
4.2.4
Differential Amplifier
In this design, the output from the sensor was known to be very small in
magnitude. Therefore there is a need to use an amplifier to amplify the signal. The
amplification factor was chosen to be 150 which given by the 150 kW resistor. This
is due to the reason when resistor value is too large it gives no contribution to the
circuit. On the other hand it would give amplification factor when located as a
feedback in the circuit. After the amplification, the oscillation signal output should
vary between 1 mmHg to 3 mmHg which translated to be within 5mV to 3.5V. The
circuit was tested for its functionality by observing the output signal at pin 1. This
differential amplifier was designed with higher impedances compared to sensor
impedance. Other than that, the amplifiers have low bias currents to avoid
49
unacceptable input offset errors. Ground variations of a few tens of milli volts AC
(60 Hz) are not of concern since such small variations do not often present major
safety issues, but they can make remote voltage measurements difficult.
One approach is to make sure that the sensor being measured is grounded
only at the amplifier inputs. For active sensors, the technique is more difficult to use
because voltage drops along the return lead can lift the ground at the sensor milli
volts or even volts above the ground at the amplifier inputs. The problem of ground
variations can be eliminated by using a differential output sensor, which will cancel
out a few hundred milli volts of sensor ground error. Transducers often output
microvolt signals, and you encounter difficulties when you try to accurately measure
such small signals. The major difficulties are intrinsic noise from the sensor and the
amplifier, thermal errors, and EMI.
Figure 4.6: Differential Amplifier Circuit
Figure 4.7: Output signal of differential amplifier
50
4.2.5
Filter
The output from the sensor travels in two different paths which are oscillation
signal and CP signal. This filter consists of two resistor-capacitor (RC) networks
which used to block the CP signal before the amplification of the oscillation signal.
Furthermore, it is used to determine two cutoff frequencies to specify the frequency
range of the circuit. Hence, two poles are carefully chosen to ensure the oscillation
signal is not distorted or lost. Poles can be determined directly from the RC network
provided by the circuit. Finally, the frequency response of the filter was plotted to
determine its functionality as shown as in figure 4.8.
Figure 4.8: Frequency response of the filter
4.2.6
Microcontroller
Microcontrollers are very efficient at processing digital numbers, but they
cannot handle analog signals directly [30]. In this project, the microcontroller that
have being used is PIC16F877. An analog-to-digital converter converts an analog
voltage level to a digital number. The microcontroller can then efficiently process the
digital representation of the original analog voltage. Microcontroller is a famous
alternative for digitization. By experiments, the input range is set to be in the range
between 0 to 3.8 VDC. If the input voltage falls outside this range, the conversion
value will be inaccurate. The input range is set by high and low voltage references.
51
These define the upper and lower limits of the valid input range. In addition to it, the
range of ADC is compressed around 0 mmHg to 300 mmHg that will suit human’s
blood pressure reading. The output of an ADC is a quantized representation of the
original analog signal. Quantization refers to subdividing a range into small but
measurable increments with the total allowable input range is divided into a finite
number of regions with a fixed increment.
The ADC determines the appropriate region to assign the given input voltage.
For instance, the step or increment is one-tenth of a volt. The process of quantization
has the potential to introduce an inaccuracy known as quantization error, which is
similar to a rounding error. It should be noted that the minimum quantization error
for the ADC peripheral in the PIC devices is 500 micro volts. Therefore, the smallest
step size for each state cannot be less than one milli volt.
Figure 4.9: Pin assignment of PIC16F877
Another important factor is known as resolution where it defines the number
of possible analog-to-digital converter output states. PIC16F877 is a 40 pins IC with
10 input channels of analog to digital converter (ADC). This ADC is able to give 210
quantization levels or equivalent to range starts from 0 to 1023. In order to maximize
the resolution, a separate voltage sources is needed to power up the microcontroller.
If the input range remains constant, a higher resolution converter will have less
quantization error because the range is divided into smaller steps. This is similar in
concept to the process of rounding a number to the nearest hundredths, having
potentially less error than rounding to the nearest tenths. Acquisition time is the time
52
required to charge the holding capacitor on the front end of ADC. The holding
capacitor must be given sufficient time to settle to the analog input voltage level
before the actual conversion is initiated. If sufficient time is not allowed for
acquisition, the conversion will be inaccurate. The required acquisition time is based
on two factors which are the impedance of the internal analog multiplexer and the
output impedance of the analog source. An increase in the source impedance will
increase the required acquisition time. Maximum recommended source impedance
for 8 and 10 bit converters is
and
for the 12-bit devices.
Furthermore, the microcontroller has in built SCI (Serial Communications
Interfaces) which can be used to talk to the outside world via the function of
universal asynchronous receiver/transmitter (UART). Since PIC16F877 has ADC
built in along with the UART or SCI, then direct connection of the hardware can be
established by using RS-232 line driver (MAX232). As a result, the chip count can
be minimized and the printed circuit board (PCB) is much smaller in size. In addition
to it, the microcontroller used is best to support asynchronous transmission. E-BPMS
application requires only slow speed transmission in the range of 2400 to 9600 bits
per second.
The time required for the successive approximation conversion and writing of
the final value to the result register is the conversion time. Conversion time is the
result of multiplying analog to digital clock period with number of bits of resolution
plus the two to three additional clock periods for the settling time. The number of
additional clock periods required for the settling time is specified in the ADC section
of the specific device data sheet. Upon completion of the conversion, the result is
written to the result register for use by the digital circuitry in the microcontroller.
There are multiple sources for the analog to digital converter clock. These are the
main oscillator frequency divided by 2, 8 or 32, or a dedicated internal RC clock that
has a typical period of 4 or 6 μs. Since the conversion time is a function of the ADC
clock speed, a faster clock will result in a faster conversion time. It must be
remembered that the typical minimum period for the clock is 1.6 μs. In addition there
is a maximum period for the ADC clock. This is typically 10 μs. If these
specifications are not met, the conversion results will be inaccurate. It is necessary to
53
refer back to analog-to-digital converter section of device data sheet for the
minimum ADC clock period for microcontroller.
4.2.7
MAX232
In order to convert TTL level of a microcontroller to voltage level, MAX232
is required. MAX232 is line driver/receivers which intended for communication
interfaces for all EIA/TIA-232E and V.28/V.24 where the ±12 V is not available. It
is especially useful for battery operated device since their low power shutdown mode
reduces power dissipation less than 5μ W. It is known that MAX232 pins are
compatible with MAX243 differing only in fault protection for RS232 cable.
Therefore, CTS and RTS signals can be either driven or float without interrupting
communication. Usually, high output tells the serial transmission to stop sending data
since the receiver output goes high whenever input is driven negative, left floating or
grounded. In order to avoid this to happen, the control lines must be driven to
positive voltage levels.
The MAX232 is a dual receiver that includes a capacitive voltage generator
to supply EIA232 voltage levels from a single 5V supply. Each receiver converts
EIA232 inputs to 5V TTL/CMOS levels. These receivers have a typical threshold
1.3V and a typical hysterisis of 0.5V therefore it can accept ± 30 V inputs. Each
driver converts TTL/CMOS levels into EIA232 levels. There are three modes of
operation available such as full speed receive (normal active), three states (disabled)
and also low power receive (enable receiver to operate in low data rate).
On the other hand, transmitter operates on two modes namely full speed
transmit and three states. EIA/TIA232 and V.28 application define a voltage level
greater than 3V as logic 0 hence making all receivers invert. In addition to it, input
thresholds is set to be at 0.8V and 2.4V making all receivers respond to TTL level
inputs as well as EIA/TTL232 and V.28 levels. By taking the hysterisis properties, a
clear output transitions can be produced with slow moving input signals. The
54
receiver propagation delay is typically 600ns and is independent of voltage swing.
Figure 4.10 shows the process setting for MAX232 configuration.
Figure 4.10: Test set up for MAX232
Figure 4.11: Expected output from MAX232
Figure 4.12: Pin assignment and internal configuration of MAX232
55
4.2.8
RS 232
Serial is a device communication protocol that is standard on almost every
PC. Most computers include two RS-232-based serial ports. Serial is also a common
communication protocol for instrumentation in many devices, and numerous
GPIBcompatible devices come with an RS-232 port. Furthermore, it can be use for
data acquisition in conjunction with a remote sampling device. Serial interface
transmit data in series. Usually it will take a byte of data and transmit the byte one at
time. The advantage of having serial communication is that a serial port only need
single wire to transmit data, lower cost and has smaller cable. RS-232 uses a single
ended signal to indicate the data.
There are also other signals that may be used, including hardware
handshaking signals. Transceiver usually used to convert between the logic levels of
a microcontroller and the RS-232 voltage levels. In determination for RS-232
functionality, some prior considerations were made for instance, the operational baud
rate, data bits, and speed of data to be transferred. RS-232 recognized ‘mark’ signal
value of 1 as the range of negative voltages from -25 to -3 V. On the other hand,
‘space’ or zero value signal known to be from 3 to 25 V. Cable loss is ensures to be
at minimum if the hardware employ serial transfer.
Serial Communication reduces the pin count of these since only two pins are
commonly used, Transmit Data (TXD) and Receive Data (RXD). Before each byte
of data, a serial port sends a start bit, which is a single bit with a value of 0. After
each byte of data, it sends a stop bit to signal that the byte is complete. It may also
send a parity bit. Serial ports, also called communication ports, are bi-directional.
Bidirectional communication allows each device to receive data as well as transmit
it. Serial devices use different pins to receive and transmit data using the same pins
would limit communication to half-duplex, meaning that information could only
travel in one direction at a time which is used in developing e-BPMS. Figure 4.13
shows the pin assignment of RS232 serial interface.
56
Figure 4.13: Pin assignment of RS232
The concept of serial communication is simple where serial port sends and
receives bytes of information one bit at a time. Although this is slower than parallel
communication, which allows the transmission of an entire byte at once, it is simpler
and can be use over longer distances. The usage of serial is to transmit ASCII data.
They complete communication using three transmission lines that is ground (GND),
transmit (TXD), and receive (RXD). Because serial is asynchronous, the port can
transmit data on one line while receiving data on another. Few important serial
characteristics to ensure two ports communicate are baud rate, data bits, stop bits,
and parity.
Baud rate is a speed measurement for communication that indicates the
number of bit transfers per second. For example, 300 baud is 300 bits per second. If
the protocol calls for a 4800 baud rate, the clock is running at 4800 Hz. This means
that the serial port is sampling the data line at 4800 Hz. Baud rates greater than these
are possible, but these rates reduce the distance by which engineers can separate
devices. They use these high baud rates for device communication where the devices
are located together, as is typically the case with GPIB devices.
Baud rate measures the actual data bits in a transmission. When the computer
sends a packet of information, the amount of actual data may not be a full 8 bits.
Standard values for the data packets are 5, 7, and 8 bits. The setting chosen are
depends on what information being transmitted. For example, standard ASCII has
values from 0 to 127 (7 bits), extended ASCII uses 0 to 255 (8 bits) or simple text
(standard ASCII), sending 7 bits of data per packet is sufficient for communication.
A packet refers to a single byte transfer, including start or stop bits, data bits, and
parity. Stop bits are used to signal the end of communication for a single packet.
57
Typical values are 1, 1.5, and 2 bits. Since the data is clocked across the lines and
each device has its own clock, it is possible for the two devices to become slightly
out of sync. Therefore, the stop bits not only indicate the end of transmission but also
give the computers some room for error in the clock speeds. The more bits used for
stop bits, the greater the possible in synchronizing the different clocks, but the slower
the data transmission rate.
Parity bit is a simple form of error checking mechanism used in serial
communication. There are four types of parity namely even, odd, marked, and
spaced. No parity can also be made where it is conditional. For even and odd parity,
the serial port sets the parity bit (the last bit after the data bits) to a value to ensure
that the transmission has an even or odd number of logic-high bits. For example, if
the data is 011, for even parity, the parity bit is 0 to keep the number of logic-high
bits even. If the parity is odd, the parity bit is 1, resulting in 3 logic-high bits. Marked
and spaced parity does not actually check the data bits but simply sets the parity bit
high for marked parity or low for spaced parity. This allows the receiving device to
know the state of a bit so the device can determine if noise is corrupting the data or if
the transmitting and receiving device clocks are out of synchronization.
4.3
Data Transmission and Receiving
Handshaking is the concept for data transmitted and received in serial
communication. This RS-232 communication method allows for a simple connection
of three lines (TXD, RXD, and GND). However, for the data to be transmitted, both
sides must be clocking the data at the same baud rate. Although this method is
sufficient for most applications, it is limited in responding to problems such as
overloaded receivers. This is where serial handshaking can help. The most popular
forms of handshaking with RS-232 are hardware handshaking and software
handshaking.
58
Figure 4.14 shows the timing diagram of data transmission that is 2-character
(10-bit) by using handshaking. When CTS (Clear To Send) is set to high, RTS
(Request To Send) will also set to high, and then the data will be transmitted via
TXD until it found the RTS line is low. The RTS line is low when CTS line becomes
low.
Figure 4.14: Timing diagram for data transmission by using handshaking
4.3.1
Hardware Handshaking
This method uses actual hardware lines. One is the output and the other is the
input. The first sets of lines are RTS (Request to Send) and CTS (Clear to Send).
When a receiver is ready for data, it asserts the RTS line, indicating it is ready to
receive data. This is read by the sender at the CTS input, indicating it is clear to send
the data. On the contrary, DTR (Data Terminal Ready) and DSR (Data Set Ready)
are mainly for modem communication because they allow the serial port and the
modem to communicate about their status. The general rule of thumb is to use the
DTR/DSR lines to indicate the system is ready for communication and the RTS/CTS
lines for individual packets of data.
59
4.3.2
Software Hanshaking
This method uses data bytes as control characters similar to the way GPIB
uses command strings. It also incorporates the simple three line set of TxD, RxD, and
GND because the control characters are sent over the transmission line like regular
data. With the SetXMode function, two control characters, XON and XOFF can be
activated. The data receiver sends these characters to pause the transmitter during
communication. Major drawback to this method is also the most important fact to
that is decimal 17 and 19 are no longer available for data values. This problem will
not affect in ASCII transmissions because these values are non-character values.
However, if the data is transmitted via binary, it is very likely that these could be
transmitted as data and the transmission would fail.
4.4
Circuit Operation
E-BPMS hardware will take effect when user hook up to the system. Later,
the user will place the cuff around his arm and begin to inflate the bulb. When the
occlusion reached the optimum level, the sensor took the pressure reading and
converts the signal into voltage level. This obtained signal is splits into two
directions. One portion will pass through an amplifier identified as cuff pressure
signal (CP). Another signal is directly feed into the analog to digital converter is the
oscillation signal. CP signal travels to an amplifier for amplification, meanwhile the
amplified signal will be filtered by two poles high pass RC filter. Designed for
comparison purpose, two resistors (R5 and R6) are connected to power supply
caused the voltage given by pressure sensor output equal to voltage applied
subsequently produce a ratio metric system. Digitization took place when the signals
are pass on the analog to digital converter. Then the digitized output from hardware
will be transmitted to the software via RS 232 cable.
60
4.5
Hardware Assembling
Hardware must be assemble properly in order to make sure the quality of the
signal and the output of the project. Before start assembling the whole circuit, we
must consider the condition of all component in good and allocate carefully because
electronic component quiet sensitive. While soldering the component, the circuit
layout (PCB) must clearly stated. The layout of the circuit as shown as in figure 4.15
and schematic circuit as shown as in figure 4.16. Figure 4.17 shows the complete
circuit of e-BPMS after soldering.
Figure 4.15: PCB layout for e-BPMS
61
Figure 4.16: Schematic diagram of e-BPMS
Figure 4.17: E-BPMS circuit after soldering
4.6
Hardware Testing
Testing is the most important things should be done before run any project.
The hardware testing include alpha testing, beta testing and system testing. These are
common testing required before completing any electronic project.
4.6.1
Alpha Testing
62
Prior to this application development, the alpha testing is referred as the
independent testing or partial testing. The testing was focused on sub circuit’s
functionality. Most of the time, the testing can be verified with the datasheets given
from the manufacturer. Results and data analysis done with respect to this testing is
provided in Chapter 6.
4.6.2
Beta Testing
Beta testing is referred as module testing. As the name suggest, moduletesting
is done upon the completion alpha testing. Generally the testing emphasize on
operation of fully assembled sub circuits. Finally, the circuit operation was validated
from the calculations made earlier or comparing with simulation results. This
detailed analysis also will be discussed in Chapter 6.
4.6.3
System Testing
System testing indicates full circuit functionality. The newly build system
which is e-BPMS should gives an accurate and reliable results of blood pressure
reading. Furthermore, the verification of reading is done based on the standard given
by AAMI and WHO.
63
CHAPTER 5
SOFTWARE DEVELOPMENT
5.1
Software Design
A friendly GUI is essential in order to measure reliability of a system being
developed. E-BPMS interface system was built by using Visual Basic 6.0. As
mentioned earlier, VB is a powerful tool in building GUI. Moreover, there are
functions in VB known as component object model (COM) which enable the
encapsulation between component and objects, ActiveX function to represent flow of
data and control. The requirements in designing e-BPMS include it must be simple
and concise, understandable, exhibits simple procedures and demonstrates user
friendly environment. Besides, in order to set the PIC to work, assembly
programming is required and will be discussed in depth.
5.2
Interface Design
64
Microsoft Visual Basic is popular software for user interface. Figure 5.1
shows the user interface for e-BPMS. This main screen will prompt to PC display
after user double click of e-BPMS execute file.
Button menu
Measurement
value
indicator
Graph
measurement
area
Figure 5.1: Main interface e-BPMS
Main screen is the main interface where user will be using most of the time.
The interface is equipped with a button menu that consists of start, stop, record, save,
load and clear screen. Besides that, there are some displays indicator fields which
will be filled during the measurement namely “Systolic”, “Diastolic”, “MAP” that
give the reading of blood pressure. All these values are recorded in standard unit
millimeter mercury (mmHg). Moreover, part 3 shows the portion where the
65
waveform will be displayed during measurement. In addition to the waveform, all
points required to determine blood pressure reading will also be justified. In the
button menu, doctor or physician can have patients database when click the button
record.
5.2.1
Database Menu
A database feature was added to the e-BPMS system. The advantage of
implementing database to this system eventually will help to store user data. With the
data available in the system, user may retrieve their latest medical record. Basic
information on user for instance references. Furthermore, these details will be
displayed in the form of text document which can be printed out easily. Figure 5.2
shows file database for the patients.
Figure 5.2: Patient database
66
5.2.2
Measurement Interface
As the hardware acquire data from measurement, the values of “Systolic”,
“Diastolic” and “MAP” will be filled up. In conjunction to give user an accurate
evaluation, the range of determining blood pressure level is being revise with the
standard outlined by WHO and also AAMI. Figure 5.3 below shows the
measurement value for blood pressure.
Blood pressure value
Figure 5.3: Measurement value of blood pressure
The measurement of blood pressure can be justified from the waveform
generate. Generally, the waveform ensemble the oscillation signal produced with the
points for systolic, diastolic and mean arterial pressure being marked as figure above.
5.3
Microcontroller Initialization and Programming
67
Microcontroller was the important part of this project where we need to
consider as a major matter. Before the main program acquire data from hardware,
microcontroller should be initialize with the port first. In order to program
PIC16F877 as an ADC (10-bit), assembly programming is used. This source code
will instruct to perform desired task and each part of the program will be discussed
accordingly. Before starting the program, the initialization or set the registers and
ports used in PIC need to be done. ADCON1 is set as A/D result Right Justified (bit
7 =1). This explained where 6 Most Significant Bits of ADRESH are read as ‘0’ for
second packet. The A/D port Configuration Control bits of ADCON1 (bit 3 to bit 0 =
1001) indicate no external reference voltage is applied, with fixed VREF+ = VDD
and VREF- = VSS. Moreover, the actual ports are also needed. Generally, four types
of the port are used (TRISA, TRISB, TRISC and TRISD). For TRISA (port A), RA6
to RA0 are defined as input from amplifier signal, for this project one channel is
used. Thus RA0 is selected as an ADC input. TRISB (port B) is use for the input of
CTS line. At the moment, RB7 is used as input for CTS line. TRISC (port C) is set as
Receiver (RC7) and Transmitter (RC6). RC5 to RC0 will act as the outputs. RC6 is
use in the project to transfer digitized signal to PC. TRISD is used for RTS line
(RD7) and as POWER ON indicator (RD6).
Figure 5.4: Initialization of register ADCON1 and all ports used
68
Figure 5.5 below shows the code to set data transmission via serial port in 8bit per character, asynchronous transfer mode, high speed. From the program below,
Transmission Status and Control Register is set to ‘00000100’, which indicate clock
is applied from external source (bit 7), using 8-bit transmission (bit 6), transmit is
enable (bit 5), in asynchronous mode with high speed (bit 4 and bit 2) and full
Transmit Shift Register (TSR).
Figure 5.5: Setting of transmission mode and baud rate
The oscillator used in this project is 4 MHz. The Baud Rate Generator
(SPBRG) is set to ‘00001000’ B = 8 D = 8 H. From the table below, the actual baud
rate generated is 27.798 kbps rather than 28.8 kbps. This cause the transmission error
is about 3.55% which can be reduce by employing both software and hardware
handshaking. On the other hand, if 3.6864 MHz oscillator is used, with SPBRG
Value = 7 (28.8 kbps) it can reduce the error to 0% [30]. Table 5.1 below shows the
baud rates for asynchronous mode.
Table 5.1: Baud Rates for Asynchronous Mode (BRGH = 1)
69
Later, RTS line is set to HIGH given by Figure 5.6. Then PIC will check CTS
line either it is HIGH or LOW. When the CTS line detected HIGH, PIC will stop its
infinite looping (loop1) and go to ADCSTART subroutine. The ADCSTART
subroutine will turn on the ADC and start the conversion of analog input from port
RA0 After a number of loop passed, PIC will then transfer the ADC values into two
8 bit registers which are ADRESL (AD Result Low) and ADRESH (AD Result
High). ADRESL contain the lower 8-bit of the ADC values, while, ADRESH contain
the remaining 2-bit. This coding is shown in Figure 5.7.
Figure 5.6: PC detection of START/STOP data transfer
Figure 5.7: Starting the Analog-to-Digital Conversion Operation
From the programming in Figure 5.8 below, the lower ADC value (digitized
signal) will be moved into TXREG through w register. Transmission will start by
Enable Transmission (bit 5 = 1) and with High Transmission Speed (bit 2 = 1) from
TXSTA. Transmission will continue until TRMT is set. The next process will be the
transmission of upper ADC value into TXREG that is ADRESH. The process is
similar to the transmission of ADRESL.
70
Figure 5.8: ADRESL and ADRESH setting for data transfer
Figure 5.9 show the program in detection of time expired. By setting RTS
(RB7) to low, and keep the POWER ON indicator (RB6) high, PIC will stop sending
the information. If the CTS low is not found, then the microcontroller will make
infinite loop. This will indicate the capture time or duration has end. For complete
program codes please refer to Appendix A.
Figure 5.9:
Detect the end of Capture Duration
71
CHAPTER 6
RESULT AND DISCUSSIONS
6.1
Hardware Experiments
E-BPMS is a project consists of hardware and software. Experiments were
done prior to each components involved in realizing e-BPMS hardware. Then
experimental results will be evaluated based on calculations and theories implied
Other than that, the results between integration of both hardware and software also
are discussed. Explanation on all related parts is provided in this chapter.
6.1.1
Pressure Sensor
Verification on the operation of pressure sensor MPX5050GP was proven
from the experiment done. The pressure sensor was connected to the bulb tube while
72
the cuff was located at the upper arm. Later, it was tested for the output voltage.
Pressure was measured in kilo pascal (kPa) and the voltage obtained was plotted as
shown as figure 6.1 below.
Figure 6.1: Differential pressure obtained from sensor
It can be observed that the output voltage is linear as the pressure increases.
When the pressure reached 40 kPa the output voltage saturates at 4.5 V. The
saturation happens due to the property of monolithic silicon used by this sensor
which limits its operation to this value. According to the graph, the sensor nominal
transfer function is given by this equation:
Vout ( ) erro= Vs 0.018× P × 0.04 ± r ..…...…………………..…(6.1)
Temperature factor is variable to different temperature. For this experiment which is
done at room temperature the factor equals to one. The error function is given by this
equation:
Error = ± Pr essure _ error ×Temp. factor × 0.018×Vs………..(6.2)
73
Later the voltage supply is known to be:
Vs = 5.0V ± 0.25Vdc…………………………………….(6.3)
Pressure error is found to be:
Pressure Error = ±1.00kPa……..………………………..(6.4)
Finally, this translates the voltage of oscillation signal which is the output of
the sensor is between 12mV to 36 mV.
6.1.2
Differential Amplifier
The amplifier is needed to amplify the oscillation signal. Amplifier gain was set to be
150 given by the
resistor. When resistance is too large, it has no contribution
to the circuit, thus it was located as feedback to gives amplification to the circuit. The
amplification factor thus:
Resistor
and
act as a voltage divider and gives input voltage to pin 3 of
LM324N. As a result the oscillation signal varies between 1mmHg to 3 mmHg.
Figure 6.2 below shows the set up circuit for differential amplifier.
74
Figure 6.2: Differential amplifier circuit
6.1.3 Filter
The amplifier circuit also acted as a filter. Filter is needed in order to
eliminate unwanted noise from the circuit [31]. There are two poles selectively
chosen to differentiate between cuff pressure signal and also oscillation signal. These
poles also are important to set the operating frequencies of e-BPMS. The pole for
oscillation signal is given by:
Moreover, the pole for cuff pressure signal is:
Later, the attenuation is found to be 10dB at 1 Hz pole
The oscillation signal became found to be in the range of 3.8mV to 11.4 mV.
Therefore, the amplified version of oscillation signal is:
Minimum voltage value: 150 x 3.8 mV= 0.57 V….……………………(6.9)
75
Maximum voltage value: 150 x 11.4 mV= 1.71 V……………………..(6.10)
The amplified oscillation signal is within output limit of amplifier, which is known to
be in the range of 5mV to 3.5V. By using step input 5V, we obtained an exponential
curve as the output response as shown as in figure 6.3 below.
Figure 6.3: Filter frequency response
6.1.4
Microcontroller (PIC16F877)
The function of analog to digital conversion is performed by PIC16F877
microcontroller. In terms of PIC testing, the input to the PIC is set to 50 Hz
sinusoidal wave, with 4V peak-peak analog signal. Since this PIC has in built 10 bit
ADC function, the quantization levels is given by:
Quantization level =
……………………………....(6.11)
= 1024
76
= 0 - 1023 levels
Finally, the resulted output range was determined to be within 0 to 5 V and given by
Figure 6.4. Indirectly, this range reflects human blood pressure range which is 0 to
300 mmHg. Thus the resolution of e-BPMS system is:
Figure 6.4: Input / output of analog to digital converter (ADC)
6.1.5
MAX232-RS232 Interface
Functional testing between both interfacing was done by using oscillator
frequency (Fosc) of 4 MHz and SPBRG register value of 8. It is known that the result
obtained must comply with value of mark and space of RS232 transfer scheme:
Mark signal “1” = +3 to +15 V…………………………(6.13)
Space signal “0” = -3 to -15 V………………………….(6.14)
77
The speed of connection of e-BPMS is obtained from this formula:
Then, error during transmission is determined by using this equation:
16)
It can be seen that, the error during transmission is very small and this effect
can be eliminated if value of crystal oscillator frequency used is change to 3.6864
MHz or the value of X is change to 7 instead of 8. The waveform obtained is given
by figure 6.5 where pin T2IN is the response from PIC while T2OUT is the PC
transmission line.
78
Figure 6.5: Output of both pin T2IN and T2OUT
6.1.6
Blood Pressure Determination
This output is obtained from the end of hardware before being displayed on
the PC. It is known that the scale used is set to 1 V/50 mmHg. Later, the blood
pressure reading is calculated from this set of equations:
Figure 6.6 shows an example of blood pressure by using oscilloscope.
Figure 6.6: Blood pressure measurement using oscilloscope
79
Figure 6.7 below shows the real time measurement of patient blood pressure in
graphically ( waveform ) by using e-BPMS. It looks same with the measurement by
using oscilloscope above.
Inflation process
Systolic
Diastolic
Figure 6.7: Real time blood pressure measurement using e-BPMS
The example of blood pressure waveform obtained is shown in Figure 6.6
above. In conjunction to it, the determination of blood pressure reading is realized
by using the formula:
Systolic =
80
Diastolic =
Where,
For example, to calculate diastolic blood pressure based on figure above, we
obtained calculation as below;
Systolic blood pressure can be calculate by using the same concept as below:
Mean arterial pressure can be calculate by using the formula:
For example if follow the figure above, MAP can be obtained as below:
81
Moreover, the reading is taken from the envelope of the waveform obtained
[32]. The highest point is where the MAP point is located. Systolic is given by the
first rapid oscillation detected. Lastly, the diastolic is the value where the oscillations
diminished. Figure 6.8 below suggest the envelope of blood pressure oscillation of a
human.
Figure 6.8: Blood pressure oscillations envelope
6.2
Comparison of Result
The result obtained by this project seems like as the theory as shown as in
figure 6.9 below and Table 6.1 below. Figure 6.9 shows the blood pressure waveform
of output amplifier. One of them is extracted oscillation signal according to theory
and another one is extracted from the real measurement by using e-BPMS. We can
see that the characteristic and shapes of the waveform are same. It means e-BPMS
are reliable and follow the standard.
82
Figure 6.9: Waveform comparison of oscillation signal between theory and eBPMS
Table 6.1:
Name
Baharuddin
Aziem
Md Nor
Bahari
Fadilah
Hazwani
Comparison of blood pressure measurement using Omron Blood
Pressure Meter and e-BPMS
Age
36
30
37
40
38
25
Omron blood
pressure meter
Systolic Diastolic
121
82
124
83.5
126
84
130
87
117.5
79
121.5
79.5
e-BPMS
Systolic
119.5
122
125
131
118
123
Diastolic
80.5
83
83.5
87.5
80
82
83
6.3
Measurement Performance
Performance measurement is important to verify whether the designed system
is working appropriately or not. There are four main characteristics rules out to
measure the system performance in terms of: percentage of accuracy, error,
consistency and also execution time. Figure 6.10 below shows the procedure of
performance measure by e-BPMS.
Figure 6.10: Performance measure of e-BPMS
First, the optimum percentage of accuracy should lie between ± 3 mmHg or
approximately around 2% of readings for blood pressure and ± 5%for pulse reading
as suggested by AAMI. Other than that, accuracy comparison with readily available
instruments also was carried out. Secondly, it is known that errors during
measurements may degrade the system performance. Some error factors have been
identified such as: cuff inflated improperly (too loose/ too tight) and user movement.
User also is advised not to engage in heavy exercise, do not smoking and do not eat
within 30 minutes before taking measurement, or it will effect the result. The
consistency of e-BPMS is always being verified with standard chart provided by
84
WHO and also AAMI and this is applicable to all walks of life. Finally, the system
response must be within specified execution time to ensure reliability of the
developed system.
CHAPTER 7
CONCLUSION AND RECOMMENDATION
7.1
Conclusion
There are three major conclusions can be drawn from this project. Firstly, this
electronic blood pressure measuring system (e-BPMS) exhibits a full working
system. The system which operates on oscillometric principle is suitable to be
located at any medical institutions such as private clinics, government hospital and
even can be employed at home. It is also suggested that by using this instrument,
85
people may save their time to travel, and get their blood pressure being check
regularly. Indirectly, this shows the benefit of e-BPMS to meet the demand of health.
Secondly, e-BPMS adapted the technology of simulation and serial
communication which enable the user to view blood pressure waveform on the
computer screen. This caused the measurement procedures become interactive and
also inform the user on how blood pressure is measured. Three important indicators
for blood pressure include systolic, diastolic and mean arterial pressure (MAP) and
all these points can be justified from the waveform displayed. Thirdly, it can be seen
that e-BPMS proposed new prototype for medical instrument which can be used as a
medium for Telemedicine application. Furthermore, this instrument has a potential to
be improved in the future.
7.2
Project Limitations
While developing e-BPMS few problems occurred. Firstly, the problem
contributed by unwanted notch and jitters which system mistakenly identified it as a
true signal. This error has greater effect when dealing with higher amplitude signals.
Other than that, e-BPMS shows instability in measuring pressure higher than 150
mmHg. The signal obtained could not detect the variations on the blood pressure
oscillation waveform as given by Figure 7.1 This error may be generated by
rounding error occur during quantization process.
Figure 7.1: Inconsistent reading when pressure > 150mmHg is applied
86
Moreover, transfer error has been identified to be 3.5486% for e-BPMS
prototype. Actually, this error can be eliminated by using register value of 7 instead
of 8 and crystal oscillator frequency of 3.6864 MHz.
7.3
Future Reccomendations
As compliment to this project, some recommendations were made prior to the
usage of e-BPMS application. Moreover, with added values it is expected that eBPMS could serve a better blood pressure measurement system as compared to those
available nowadays. Some of the suggestions are:
i.
In order to enhance e-BPMS, more medical check-up features should be
included to establish a complete health kiosk. For example, fat/calories
meter, diabetes indicator, body mass index (BMI) calculator, pulse meter
and others.
ii.
A web based system also can be developed to affix e-BPMS with
telemedicine application. Server application can be easily programmed by
using Visual Basic (VB6) which is compatible with e-BPMS system.
iii.
Moreover, a USB port can also be used to replace serial RS232 cable to
integrate both hardware and software. In addition to USB usage, the
transfer rate can be increase which indirectly increase the speed on eBPMS
87
REFERENCES
1. Webster J.G, Medical Instrumentation, Application and Design,. 2nd Ed.,
USA: Brooks/Cole Publishing Company, 1992.
2. Raghbir Singh, Biomedical Instrumentation Technology and Application,
McGraw Hill, 2003
3. Tatsuo Togawa, Toshiyo Tamura, P. Ake Oberg, Biomedical Transducers
and Instruments, CRC Press, 1991
4. Chua, C.S. and Siew, M.H., Digital Blood Pressure Meter. Singapore:
Freescale Semiconductor Incorporated,1997
5. Fung, P., et. al. (2004). ,Continuous Noninvasive Blood Pressure
Measurement by Pulse Transit Time. Proceedings of the 26th Annual
International Conference of the IEEE EMBS. 738–741.
6. C.S. Chua and Siew Mun Hin, Digital Blood Pressure Meter Sensor
Application Engineering, Singapore, A/P.
88
7. Lucas, Bill (1991), An Evaluation System for Direct Interface of the
MPX5100 Pressure Sensor with a Microprocessor,Freescale Application
Note AN1305
8. Coleman AJ, Steel SD, Ashworth M, Vowler SL, Shennan A., Accuracy of
the pressure scale of sphygmomanometers in clinical use within primary
care. Blood Pressure Monitoring 2005 Aug:10(04): 181-8.
9. ABC of Hypertension, 4th edition published by BMJ Books and reviewed in
BMJ 2001; 322:981-985.
10. K.G, Ng and C.F, Small, Survey of Automated Non Invasive Blood Pressure
Monitors, Journal of Clinical. Engineering., 1994, vol. 19, pp 452- 475.
11. S.Mieke, H.Grob, M.Ulbrich, G.Papadopoulus and U.Frucht, Non Invasive
Blood Pressure Measurement, Anaesthesist., 1993, vol. 42, pp 38 – 43.
12. J.N, Amoore, W.B, Geake and D.H.T, Scott, The Effect Of Pulse Rate,
Artefact And Pulse Strength On Oscillometric Non Invasive Blood Pressure
Measurement, Proceeding of the 1996 IEEE International. Conference .in
Medical and Biology Society, Amsterdam, IEEE, 1996.
13. M.W, Millar Craig, Ambulatory Blood Pressure Recording; Principles and
Practice, IEEE, Savoy Place, London, pp 311-312, 1998.
14. J.W, Miao, A Computer Aided Method For Design Of Non Invasive Indirect
Measurement Of Arterial Blood Pressure, IEEE International Proceeding on
Medical Instrumentation, October 1992.
15. K.Yamakoshi, A.Kamiya, H.Shimazu, H.Ito and T.Togawa, Non Invasive
Automatic Monitoring of Instantaneous Arterial Blood Pressure Using The
Vascular Unloading Technique, Journal of Medical & Biology. Engineering
& Computing, no 21,1983, pp 557-565.
89
16. W.B, Geake, J.N, Amoore and D.H.T Scott, An Automated System for The
Functional Evaluation of Oscillometric Non Invasive Blood Pressure
Monitors, Journal of Medical. Engineering & Technology, vol 19, 1995, pp
162-176.
17. Takao Wada, Kiyoyuki Narimutu, Non Invasive Technique for Analysis of
Feedback Relationship Between Heart Rate and Beat–to-Beat Blood
Pressure
Fluctuations, IEEE International Proceeding on Statistical Modeling, 1994,
pp 1260-1261.
18. R J, Riggs, Use of Database to Develop Algorithms for Ambulatory Blood
Pressure Measurement, Abingdon: Oxford Medical Ltd, pp 100-103, 1996.
19. Michael J. Randall, Jean Pierre DeJean and Jack W. Frazer, Computer
Automation of Blood Pressure Measurement, International. Proceeeding of
IEEE, Oct 1975, pp 1399-1403.
20. S. Colak and C. Isik, Fuzzy Oscillometric Blood Pressure Classification, 10th
Annual International Conference of IEEE Engineering in Medicine &
Biology Society, 2003, vol 13, pp 208-213.
21. JCTB Moraes, M Cerulli and PS Ng, A Strategy for Determination of
Systolic, Mean and Diastolic Blood Pressures from Oscillometric Pulse
Profiles, International Conference of IEEE in Computers in Cardiology,
2000, pp 211-214.
22. JCTB Moraes, M Cerulli and PS Ng Development of a New Oscillometric
Blood Pressure Measurement System, International Conference of IEEE in
Computers in Cardiology, 1999, pp 467-470.
23. Michael J. Randall, Jean Pierre DeJean and Jack W. Frazer Computer
90
Automation of Blood Pressure Measurement, International Proceeeding of
IEEE, Oct, 1975, pp 1399-1403.
24. R.M, Rangayyan, Biomedical Signal Analysis: A Case Study, New Jersey:
IEEE Press, 2002.
25. Dogan Ibrahim, PIC Basic: Programming and Projects, Oxford: Newnes,
2001.
26. G.D, Baura, System Theory and Practical Applications of Biomedical Signals,
USA: John Wiley & Sons INC, 2002.
27. OMRON, Automatic and Manual Blood Pressure Monitors, available at
http://www.omronhealthcare.com, 2003. Accessed on 5th February 2006.
28. CITIZEN, Digital Blood Pressure Meter, available at:
http://www.meharhealthcare.com/bp.html, 2001. Accessed on 7th February
2006.
29. BIPITONE, Electronic Blood Pressure Meter, available at:
http://www.eeconnet.com. Accessed on 7th February 2006.
30. HEALTH-O-METER, Blood Pressure Monitors, available at:
http://www.healthometer.com. Accessed on 2nd January 2006.
31. LUMISCOPE, Digital Blood Pressure Meters, available at:
http://www.lumiscope.net, 2001. Accessed on 3rd January 2006.
32. FORECARE, Blood Pressure Monitors, available at:
http://www.forecare.com, 2001. Accessed on 5th February 2006.
33. Wikipedia Online Library, Torr, available at: http://www.wikipedia.org.
Accessed on 2nd March 2006.
91
APPENDIX A
PIC PROGRAMMING
1. Program for ADC setup
#include <pic.h>
/* Basic A2D sample code for an PIC16F87x device.
* This code willl set up the A2D module to return an
* 8-Bit result. If greater precision is needed, a 10-Bit
* result can be returned if read_a2d() is modified to
* return the short ((ADRESH<<8)+(ADRESL)). Note also that
* ADCON1 should be set to 0x80 in the init_a2d() routine
* instead of zero.
*
* This code will sample an A2D value on analog port RA0, and it's value
* will be used to move a LED's position across PORTB.
*
* This project can be demonstrated on the Microchip PICDEM2 board.
*/
__CONFIG(DEBUGEN & WDTDIS & LVPDIS); // Setup the configuration word
for ise with ICD2
/* Sample code to set up the A2D module */
void init_a2d(void){
ADCON0=0; // select Fosc/2
ADCON1=0; // select left justify result. A/D port configuration 0
ADON=1;
// turn on the A2D conversion module
}
/* Return an 8 bit result */
unsigned char read_a2d(unsigned char channel){
channel&=0x07;
// truncate channel to 3 bits
ADCON0&=0xC5; // clear current channel select
ADCON0|=(channel<<3); // apply the new channel select
ADGO=1;
// initiate conversion on the selected channel
while(ADGO)continue;
return(ADRESH);
// return 8 MSB of the result
}
void main(void){
92
unsigned char x;
init_a2d();
// initialise the A2D module
GIE=0;
// we don't want interrupts
TRISB=0xF0; // the lower four bits of POTRB will be used in output mode
for(;;){
x=read_a2d(1);
// sample the analog value on RA0
PORTB = (8>>(x>>6));
// Use the 2 MS Bits of the result to
select the bit position of the LED on PORTB
}
}
2. Main program for PIC
#include <pic.h>
#include “usart.h”
unsigned char AdL,AdH;
//*** USART Routine **//
void 92omm._init(void)
{
SPBRG = 51;
//8MHz BRGH=1, 9600
TXSTA = 0x04;
RCSTA = 0x80;
}
/* output one byte */
void putch(unsigned char byte)
{
while(!TXIF) /* wait if still sending */
continue;
TXREG = byte;
}
/* input one byte */
unsigned char getch(void) {
unsigned char d=0;
//if(FERR){
//
d = RCREG;
//
return 0;
//}
if(RCIF==1)
/* set when data in register */
d = RCREG;
return d;
}
void PutHex(unsigned char d)
93
{
unsigned char HX;
HX=((d>>4)&0x0F)+’0’;
if(HX>’9’) HX+=7;
putch(HX);
HX=(d&0x0F)+’0’;
if(HX>’9’) HX+=7;
putch(HX);
}
//*** USART Routine **//
//*** ADC Routine **//
void AdInit(void){
ADCON0=0;
ADCON1=0x80;
ADON=1;
}
// select Fosc/2
// select right justify result.
// turn on the A2D conversion module
void AdRead(unsigned char AdCh){
ADCON0=((AdCh<<2)|0x01);
GODONE=1;
the selected channel
while(GODONE)continue;
AdH=ADRESH;
AdL=ADRESL;
return;
}
//*** ADC Routine **//
// apply the new channel select
// initiate conversion on
void Delay(unsigned int DlyCnt)
{
unsigned int MyDly;
MyDly=DlyCnt;
while(MyDly) MyDly--;
}
void main(void){
unsigned char input,cnt=0;
INTCON=0; // purpose of disabling the interrupts.
GIE=0;
// we don’t want interrupts
//RCIE=0;
AdInit();
// 93omm.93lize the A2D module
TRISB=0xFE; // set RB0 as output
TRISC=0xBF;// set RC6 as TX output
94
//94omm._init();
init_comms(); // set up the USART – settings defined in usart.h
Delay(1000);
//TXEN = 1;
//CREN = 1;
RB0 = 1;
Delay(30000);
putch(‘O’);
putch(‘K’);
putch(0x0d);
putch(0x0a);
Delay(30000);
input = getch();
// read to clear incoming buffer
RB0 = 0;
while(1){
//input = 0; //getch(); // read a response from the user
if(PIR1 & 0x20){
RB0=1;
input=RCREG;
if(input<’0’ || input >’2’){
putch(input);
}else{
if(input==’0’ || input==’2’){
AdRead(0);
PutHex(AdH);
PutHex(AdL);
}
if(input==’1’ || input==’2’){
AdRead(1);
PutHex(AdH);
PutHex(AdL);
}
}
RB0=0;
}
}
}
3. Program for USART
#include <pic.h>
#include <stdio.h>
#include "usart.h"
void
putch(unsigned char byte)
{
95
/* output one byte */
while(!TXIF) /* set when register is empty */
continue;
TXREG = byte;
}
unsigned char
getch() {
/* retrieve one byte */
while(!RCIF) /* set when register is not empty */
continue;
return RCREG;
}
unsigned char
getche(void)
{
unsigned char c;
putch(c = getch());
return c;
}
96
APPENDIX B
INTERFACE PROGRAM USING VB
1. Main frame program
Option Explicit
Const CHMAX = 1
Const SCALEH = 512
Const SCALEW = 800
Const RESOLUTION = 1024
Const VOLTMAX = 5#
Const OFFSETY = 516
Const RNDH = 20
Const PMAX = 520
Const PMIN = 28
Const PRANGE = 200 '375#
Const JMAX = 512
Const JHI = 380
Const JLO = 40
Dim ComFlag As Boolean
Dim ComStr As String
Dim ComCmd As String
Dim TestFlag As Boolean
Dim ScanFlag As Boolean
Dim DatCnt As Long
Dim Adc1 As Integer
Dim Adc2 As Integer
Dim AdPos As Integer
Dim LY1 As Single
Dim LY2 As Single
Dim Color1 As Long
Dim Color2 As Long
Dim AdcBuf(SCALEW, CHMAX) As Integer
Private Sub ComOut(Cmd As String)
ComCmd = Cmd
MSComm1.Output = Cmd
ComFlag = False
97
ComStr = ""
End Sub
Private Sub ComStart()
On Error GoTo CommError
MSComm1.CommPort = Val(txtCommPort.Text)
txtCommPort.Text = MSComm1.CommPort
MSComm1.PortOpen = True
On Error GoTo 0
DatCnt = 0
picGraph.Cls
'picGraph.AutoRedraw = False
linVert.Visible = False
cmdStop.Enabled = True
cmdStart.Enabled = False
cmdRekod.Enabled = False
cmdSave.Enabled = False
Timer1.Interval = Val(txtIntv.Text)
Timer1.Enabled = True
ComOut txtAdCh.Text
lblInfo.Caption = "Reading"
ScanFlag = True
Exit Sub
CommError:
MsgBox Err.Description, vbOKOnly + vbInformation, "Com Port Error : " &
Err.Number
End Sub
Private Sub ComStop()
cmdStart.Enabled = True
cmdStop.Enabled = False
cmdRekod.Enabled = True
cmdSave.Enabled = True
MSComm1.PortOpen = False
Timer1.Enabled = False
lblInfo.Caption = "Ready"
ScanFlag = False
picGraph.AutoRedraw = True
End Sub
Private Sub GraphData(DatY1 As Integer, DatY2 As Integer)
Dim Volt As Single
'Show binary data
lblBin1.Caption = DatY1 & " "
lblBin2.Caption = DatY2 & " "
'Show voltage data
Volt = DatY1
Volt = (Volt / RESOLUTION) * VOLTMAX
98
lblVolt1.Caption = Format(Volt, "0.00 ")
Volt = DatY2
Volt = (Volt / RESOLUTION) * VOLTMAX
lblVolt2.Caption = Format(Volt, "0.00 ")
End Sub
Private Sub GraphDraw(DatY1 As Integer, DatY2 As Integer)
Dim Y1 As Single
Dim Y2 As Single
'Store into data buffer
AdcBuf(DatCnt, 0) = DatY1
AdcBuf(DatCnt, 1) = DatY2
'
GraphData DatY1, DatY2
'
Y1 = DatY1
Y1 = (Y1 / RESOLUTION) * SCALEH
Y1 = OFFSETY - Y1
Y2 = DatY2
Y2 = (Y2 / RESOLUTION) * SCALEH
Y2 = OFFSETY - Y2
'
If DatCnt > 0 Then
'picGraph.Line (DatCnt, 0)-(DatCnt + 2, picGraph.ScaleHeight),
picGraph.BackColor, BF
picGraph.PSet (DatCnt - 1, LY1)
picGraph.Line -(DatCnt, Y1), Color1
picGraph.PSet (DatCnt - 1, LY2)
picGraph.Line -(DatCnt, Y2), Color2
End If
LY1 = Y1
LY2 = Y2
DatCnt = DatCnt + 1
If DatCnt >= SCALEW Then
DatCnt = 0
If chkAuto.Value = 1 And ScanFlag Then
ComStop
Judge
End If
End If
End Sub
Private Sub Judge()
Dim C As Integer
Dim D As Integer
Dim I As Integer
Dim J As Integer
Dim F0 As Integer
99
Dim F1 As Integer
Dim F2 As Integer
Dim F3 As Integer
Dim X As Single
J=0
F0 = 3
For I = 1 To SCALEW - 1
If AdcBuf(I, 0) >= JMAX Then J = I
Next I
'
C=0
For I = J To J + 10
D = AdcBuf(I, 0) - AdcBuf(I + 1, 0)
If D < 0 Then C = 0 Else C = C + 1
If C >= F0 Then
J=I
End If
Next I
'
lblHigh.ToolTipText = AdcBuf(J, 0)
lblHigh.Caption = Pressure(AdcBuf(J, 0))
X=J
picGraph_MouseDown 1, 1, X, 0
'
C=0
F1 = 3
F2 = 10
F3 = 3
For I = J To SCALEW - 10
D = AdcBuf(I, 1) - AdcBuf(I + F1, 1)
If Abs(D) > F2 Then C = 0 Else C = C + 1
If C >= F3 Then
J=I
GoTo QUITJ
End If
Next I
QUITJ:
lblLow.ToolTipText = AdcBuf(J, 0)
lblLow.Caption = Pressure(AdcBuf(J, 0))
X=J
picGraph_MouseDown 1, 1, X, 0
End Sub
Private Function Pressure(PVal As Integer) As String
Dim MyStr As String
Dim P As Single
If PVal < PMIN Then
P = PMIN
100
ElseIf PVal > PMAX Then
P = PMAX
Else
P = PVal
End If
P = (P - PMIN) * PRANGE / (PMAX - PMIN)
MyStr = Format(P, "0.0")
Pressure = MyStr
End Function
Private Sub chkRandom_MouseUp(Button As Integer, Shift As Integer, X As Single,
Y As Single)
If chkRandom.Value = 1 Then
DatCnt = 0
Adc1 = 512
Adc2 = 512
picGraph.Cls
GraphDraw Adc1, Adc2
Timer2.Enabled = True
Else
Timer2.Enabled = False
End If
End Sub
Private Sub cmdCh_Click()
If TestFlag Then Exit Sub
MSComm1.PortOpen = True
TestFlag = True
ComStr = ""
ComOut txtAdCh.Text
Timer1.Enabled = True
End Sub
Private Sub cmdCls_Click()
picGraph.Cls
End Sub
Private Sub cmdLoad_Click()
Dim I As Integer
Dim MyName As String
MyName = Trim(txtData.Text)
If MyName = "" Then
MsgBox "Please Input Filename.", vbOKOnly + vbInformation, "Save Data"
txtData.SetFocus
Exit Sub
End If
On Error GoTo OpenError
Open App.Path & "\" & txtData.Text & ".txt" For Input As #1
On Error GoTo ReadError
101
DatCnt = 0
picGraph.Cls
While Not EOF(1)
Input #1, Adc1, Adc2
GraphDraw Adc1, Adc2
Wend
Close #1
Exit Sub
OpenError:
MsgBox Err.Description, vbOKOnly + vbInformation, "Open Error : " &
Err.Number
Exit Sub
ReadError:
MsgBox Err.Description, vbOKOnly + vbInformation, "Open Error : " &
Err.Number
Close #1
End Sub
Private Sub cmdRekod_Click()
frmRekod.Show vbModal
If DATAFILE <> "" Then txtData.Text = DATAFILE
End Sub
Private Sub cmdSave_Click()
Dim I As Integer
Dim MyName As String
MyName = Trim(txtData.Text)
If MyName = "" Then
MsgBox "Please Input Filename.", vbOKOnly + vbInformation, "Save Data"
txtData.SetFocus
Exit Sub
End If
Open App.Path & "\" & txtData.Text & ".txt" For Output As #1
For I = 0 To SCALEW - 1
Print #1, AdcBuf(I, 0) & ", " & AdcBuf(I, 1)
Next I
Close #1
End Sub
Private Sub cmdStart_Click()
ComStart
End Sub
Private Sub cmdStop_Click()
ComStop
End Sub
Private Sub Form_Load()
Line1.X2 = SCALEW
102
Line2.X2 = SCALEW
Line3.X2 = SCALEW
Color1 = QBColor(10)
Color2 = QBColor(12)
picCol1.BackColor = Color1
picCol2.BackColor = Color2
MSComm1.RThreshold = 1
End Sub
Private Sub Label20_Click()
End Sub
Private Sub lblHigh_Click()
lblHigh.Caption = Pressure(AdcBuf(AdPos, 0))
End Sub
Private Sub lblInfo_Click()
Judge
End Sub
Private Sub lblLow_Click()
lblLow.Caption = Pressure(AdcBuf(AdPos, 0))
End Sub
Private Sub lblMap_Click()
lblMap.Caption = lblLow.Caption + (lblHigh.Caption - lblLow.Caption) / 3
End Sub
Private Sub MSComm1_OnComm()
Dim L As Integer
If MSComm1.InBufferCount > 0 Then
ComStr = ComStr & MSComm1.Input
L = Len(ComStr)
If ComCmd = "0" Then
If L = 4 Then
Adc1 = Val("&H" & ComStr)
GraphDraw Adc1, Adc2
ComFlag = True
End If
End If
If ComCmd = "1" Then
If L = 4 Then
Adc2 = Val("&H" & ComStr)
GraphDraw Adc1, Adc2
ComFlag = True
End If
End If
If ComCmd = "2" Then
103
If L = 8 Then
Adc1 = Val("&H" & Left$(ComStr, 4))
Adc2 = Val("&H" & Right$(ComStr, 4))
GraphDraw Adc1, Adc2
ComFlag = True
End If
End If
End If
End Sub
Private Sub picGraph_MouseDown(Button As Integer, Shift As Integer, X As
Single, Y As Single)
Dim I As Integer
I=X
If I <= SCALEW Then
AdPos = I
GraphData AdcBuf(I, 0), AdcBuf(I, 1)
linVert.Visible = False
linVert.X1 = I
linVert.X2 = I
linVert.Visible = True
lblInfo.Caption = I & " : " & AdcBuf(I, 0) & " " & Pressure(AdcBuf(I, 0))
End If
End Sub
Private Sub Timer1_Timer()
If TestFlag Then
Timer1.Enabled = False
TestFlag = False
MSComm1.PortOpen = False
Exit Sub
End If
If ComFlag Then
ComOut ComCmd
Else
ComStop
lblInfo.Caption = "Time Over !!!"
End If
End Sub
Private Sub Timer2_Timer()
Dim I As Integer
If DatCnt >= SCALEW Then DatCnt = 0
'
I = RNDH * Rnd - (RNDH / 2)
Adc1 = Adc1 + I
If Adc1 >= RESOLUTION Then Adc1 = RESOLUTION - 1
If Adc1 < 0 Then Adc1 = 0
104
'
I = RNDH * Rnd - (RNDH / 2)
Adc2 = Adc2 + I
If Adc2 >= RESOLUTION Then Adc2 = RESOLUTION - 1
If Adc2 < 0 Then Adc2 = 0
'
GraphDraw Adc1, Adc2
End Sub
2. Program for frame record
Option Explicit
Dim ListIdx As Integer
Private Sub DataClear()
txtNAMA.Text = ""
txtAGE.Text = ""
txtHEIGHT.Text = ""
txtWEIGHT.Text = ""
optMale.Value = False
optFemale.Value = False
End Sub
Private Sub DataShow()
ListIdx = List1.ListIndex
PID = List1.ItemData(ListIdx)
DataClear
With Adodc1.Recordset
.MoveFirst
.Find "PID=" & PID
If .EOF Then
MsgBox "There are no record"
Else
txtNAMA.Text = !NAMA
txtAGE.Text = !AGE
txtWEIGHT.Text = !WEIGHT
txtHEIGHT.Text = !HEIGHT
txtDATAFILE.Text = !DATAFILE
If !GENDER = "M" Then
optMale.Value = True
Else
optFemale.Value = True
End If
End If
End With
End Sub
105
Private Sub GetDataList()
Dim I As Integer
List1.Clear
With Adodc1.Recordset
If .RecordCount = 0 Then Exit Sub
.MoveFirst
While Not .EOF
List1.AddItem !NAMA
List1.ItemData(List1.NewIndex) = !PID
.MoveNext
Wend
End With
End Sub
Private Sub GetRecordCount()
With Adodc1.Recordset
If .RecordCount > 0 Then
.MoveLast
.MoveFirst
End If
lblRecCnt.Caption = .RecordCount
End With
End Sub
Private Sub cmdAdd_Click()
NewData = True
cmdUpdate.Enabled = True
'cmdEdit.Enabled = False
DataClear
txtNAMA.SetFocus
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub cmdEdit_Click()
NewData = False
List1_Click
cmdUpdate.Enabled = True
'cmdEdit.Enabled = False
End Sub
Private Sub cmdSelect_Click()
NAMA = txtNAMA.Text
DATAFILE = txtDATAFILE.Text
cmdSelect.ToolTipText = DATAFILE
End Sub
106
Private Sub cmdUpdate_Click()
Dim MyName As String
MyName = Trim(txtNAMA.Text)
If MyName = "" Then
MsgBox "Please input NAME", vbOKOnly + vbInformation, "Update"
Exit Sub
End If
If optMale.Value = False And optFemale.Value = False Then
MsgBox "Please select GENDER", vbOKOnly + vbInformation, "Update"
Exit Sub
End If
With Adodc1.Recordset
If NewData Then
.AddNew
End If
!NAMA = MyName
!AGE = Val(txtAGE.Text)
If optMale.Value Then
!GENDER = "M"
Else
!GENDER = "F"
End If
!HEIGHT = Val(txtHEIGHT.Text)
!WEIGHT = Val(txtWEIGHT.Text)
!DATAFILE = txtDATAFILE.Text
.Update
If NewData Then
.MoveLast
PID = !PID
List1.AddItem MyName
ListIdx = List1.NewIndex
List1.ItemData(ListIdx) = PID
Else
List1.List(ListIdx) = MyName
End If
End With
cmdAdd.Enabled = True
cmdEdit.Enabled = True
cmdUpdate.Enabled = False
End Sub
Private Sub Form_Load()
Set Me.Icon = frmMain.Icon
Adodc1.ConnectionString = CnStr
Adodc1.RecordSource = "Select * From PERSON"
Adodc1.Refresh
GetRecordCount
GetDataList
NAMA = ""
107
End Sub
Private Sub List1_Click()
If List1.ListIndex = -1 Then
cmdEdit.Enabled = False
Exit Sub
End If
cmdEdit.Enabled = True
cmdAdd.Enabled = True
cmdUpdate.Enabled = False
DataShow
End Sub
3. Program for modules BPMS
Option Explicit
Public CnStr As String
Public DbName As String
Public AppPath As String
Public NewData As Boolean
Public PID As Long
Public NAMA As String
Public AGE As Integer
Public GENDER As Integer
Public HEIGHT As Single
Public WEIGHT As Single
Public DATAFILE As String
Public Status As Byte
Sub Main()
'Initialize
ChDir App.Path
AppPath = App.Path & "\"
DbName = App.Path & "\BPMS.mdb"
CnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DbName &
";Persist Security Info=False"
'
frmMain.Show
End Sub
Public Function GetWord(WordStr As String, SapStr As String) As String
Dim I As Integer
Dim L As Integer
If WordStr = "" Then GetWord = "": Exit Function
I = InStr(1, WordStr, SapStr, vbTextCompare): L = Len(WordStr)
108
If I = 0 Then
GetWord = WordStr
WordStr = ""
Exit Function
End If
GetWord = Left(WordStr, I - 1): WordStr = Right(WordStr, L - I)
'Trim(Right(WordStr, L - I))
End Function
109
APPENDIX C
E-BPMS HARDWARE SETUP
1. PCB Layout
110
2. Component Listing and Configuration
111
3. E-BPMS Schematic Diagram
112
APPENDIX D
STANDARD BLOOD PRESSURE ISSUED BY WHO
113
APPENDIX E
DATA SHEET
1. Pressure Sensor MPX5050 Series
114
115
116
117
2. MAXIM RS 232
118
119
3. Microcontroller PIC16F87X Series
120
121
122