Вы находитесь на странице: 1из 98

Microcontroller-Based Digital Peak Flow Meter System

------------------------A Thesis Topic Proposal


Presented to the Faculty of the
Department of Electronics & Communication Engineering
College of Engineering, De La Salle University
------------------------In Partial Fulfillment of
The Requirements for the Degree of
Bachelor of Science in Electronics & Communication Engineering
-------------------------CO, Jan Christian H.
GACUSAN, Bryan Gabriel D.
HONG, Bible T.
JUANSON, Joseph Anthony C.
October, 2010

CHAPTER 1
Introduction
1.1 Background of the Study
Changes brought about by the modern world are undeniable. Together with the
advancement of technology come new diseases that continue to challenge human
existence. There is an increase in the number of respiratory-related illnesses brought
about by the worlds continuous growth. There are developments in the field of
electronics that aims to provide sensors and components that could lead to portable, userfriendly and improved lung capacity measuring devices [1]. Spirometry is a physiological
test that measures how an individual inhales or exhales volumes of air as a function of
time. The primary signal measured in spirometry may be volume or flow. There are
numerous parameters obtained during a spirometry test. It varies depending on the nature
of the procedure, may it be for diagnosis or monitoring. One of particular parameter used
in monitoring lung capacity is called Peak Expiratory Flow (PEF). It is the highest flow
achieved from a maximum forced expiratory test from a maximum lung inflation

[9]

It is

used to monitor lung conditions, one of which is asthma. Chronic Obstructive Pulmonary
Diseases (COPD) is a type of disease commonly associated with the lungs

[2]

. The most

common types of this respiratory ailment are emphysema, chronic bronchitis, and asthma.
According to a study done by the World Health Organization (World Health Statistics
2008), they estimated that 210 million people have COPD, 23 million died from it over
the past year [8]. They also predicted that at this rate, it would be the 3rd leading cause of

death worldwide. The study focuses on developing a microcontroller based digital peak
flow meter system. It provides an alternative to lung capacity testing and monitoring that
are currently done in local hospitals. The system also provides features that are
convenient with regards to monitoring a patients lung condition since the device can be
interfaced to a computer to view the results. The data can be viewed by the doctor
through a website obtained from its database.

1.2 Statement of the Problem


In an era when heart disease and cancer are declining, COPD is on the rise in
developing countries such as the Philippines

[8]

. Spirometry is the most common test that

is used to measure the lung capacity and the volume of a persons lung through inhalation
and exhalation of air. It includes different types of tests that doctors use either to diagnose
or to monitor the patients lung condition. Since asthma is one of the main causes of
absences during school. It can be caused by a lot of factors that are not yet fully
understood by researchers.

It is one of the important chronic respiratory diseases

requiring daily monitoring at home [10].


For monitoring the lung condition of a patient, a peak flow meter is used. Peak
expiratory flow (PEF) meter is a portable device widely used by asthmatic patients,
providing the peak expiratory flow (PEF) by a simple self-test

[10]

. A peak flow meter is

used to help monitor the medical situation of a patient, asthma being one of this. The
most common type of peak flow meters available in the market is the spring type peak
flow meter. It is an analog device commonly used in local hospitals today to determine
the lung capacity of the patient. An indicator will provide a gauge of how well the

patient's lung functions. This is being determined by reading graduations on the device.
The acceptability of the result is subject to the proper interpretation of the user. Thus, the
data is subject to human error. The data is manually plotted, afterwards presented to a
doctor for assessment. The prototype aims to provide an alternative to this method by
providing a digital output in the evaluation process and remote monitoring of the patient.
The groups prototype aims to provide assistance to the doctor by allowing the
results of the test to be sent to a computer with use of the Bluetooth technology as its
medium. The information can be then sent to a database that can be viewed by the doctor.
This functionality will allow the doctors to monitor the data through a website that
contains the patients information from the server and will allow them to have a better
way of gathering data from the patients.

1.3 Significance of the Study


In numerous occasions, chronic pulmonary medical conditions are often
misinterpreted as minor lung ailments. Disregarding COPD ailments can lead to major
complications in the lung passageways.

This study aims to integrate the field of

electronics to the medical world in monitoring pulmonary medical condition by providing


patients with a device that can assess lung air capacity and send them to the computer to
be further viewed and analyzed. Lung obstructions and restrictions can be easily
monitored by the electronic peak flow meter by acquiring the accurate peak expiratory
flow measurements.
The groups prototype is a digital peak flow meter that would assess the lung
functionality of a patient. The prototype would determine the flow rate. Peak flow meters

available in hospitals and clinics are not digital and is prone to parallax error since the
results depends on proper human interpretation. The device is also portable, allowing
ease of use whenever the patient has to perform the tests required for a day. The LCD
screen would display the results obtained from the test. The push buttons will be used for
the operation of the device. It can be interfaced to a computer through Bluetooth
technology allowing wireless capability. The prototype that the group is proposing can
also provide remote data access through web based feature. The doctors can view the
results remotely; make their recommendations as soon as they get the results from the
database.

1.4 Objectives
1.4.1 General Objective
1.4.1.1 Develop a microcontroller-based digital peak flow meter that would
measure lung capacity and send the obtained data to a computer wirelessly.

1.4.2 Specific Objectives


1.4.2.1 To use a flow sensing circuit to determine lung air flow
1.4.2.2 To program the microcontroller to output flow rate and send the data to a
computer by adapting Bluetooth technology.
1.4.2.3 To display the test result through the LCD.
1.4.2.4 To build the device with an accuracy of 90% as compared to a Mechanical
Peak Flow Meter

1.4.2.5 To use a Graphic User Interface (GUI) that would display the data sent to
the computer.
1.4.2.6 To view the data in a Website that can be accessed by the doctor to view
the data obtained by the system.

1.5 Scope and Delimitation


The patient should be able to understand the procedure therefore he/she cannot
be; unconscious, heavily sedated, incapable of understanding the instructions and/or
incapable of forcibly exhaling through the tube. The group would consult a medical
physician regarding the data gathering method to be used and results obtained. The
consultation would also provide us knowledge, guiding us suppose an error occurs. The
system shall focus only on obtaining the peak expiratory flow (PEF) that is used to
monitor asthmatic condition through lung response. The system will not diagnose the
type of lung illness. Data shall be sent to the computer through the Bluetooth interface
and the results shall be listed and compiled as well as its graph for data gathering
purposes. The computer will be the master, the device which initiates the connection, and
the hand-held device will be the slave with regards to the use of the Bluetooth interface.
The patient should have a Bluetooth-enabled personal computer together with the
software that would display the output of the device. The computer used by the doctor
should contain the graphical user interface (GUI) that would be used to access the
database. The patient should also have the GUI in order to input his or her data and
perform the test. With accordance to the pulmonologist, a test per day should be
sufficient to follow the monitoring of the patients lung condition. The device is intended

for home use. The system, specifically the website for the doctor, is only accessible
through local area network using a router since the proponents will be using DLSU-Ms
internet connection for the development of the system. The setup with the router is for
demo purposes only.

1.6 Description of the Project


The block diagram of the prototype is shown below:

Figure 1.1:Block Diagram of the System

1.6.1 Sensor Block


The sensor block will be used to gather the data from the patients lungs as
he breathes into the tube. The output obtained from the sensor will be sent to the
microcontroller for processing.

1.6.2 Push Button and LCD Block


The Push buttons and LCD would serve as the input/output (I/O) devices
of the prototype. The LCD will be used to display the test results. On the other
hand, the push buttons will enable the user to operate the device. The push buttons
will serve as the reset button for the MCU and Bluetooth, while switches will be
used to turn the MCU and Bluetooth on and off

1.6.3 Microcontroller Unit


The microcontroller will process and utilize the data obtained from the
sensor. It would perform the operations needed to determine the flow rate of air
from the patients lungs. Using these data, it would output the lung capacity
parameters for monitoring purposes. The data gathered can be then sent to the
computer through the Bluetooth feature. A graphical representation of the test can
be viewed and further analyzed by the user.

1.6.4 GUI (client and server)


Two key GUIs will be used for the system; one will be used for the
clients computer, another will be used for the server which contains the patients
information.

1.6.5 Website
The website will provide the means by which the doctor can view the
results. It contains the patients information, allowing the doctor to view the
results over a network

1.7 Methodology
In this thesis, the group shall be responsible in performing tests on the hardware.
The group shall perform 20 tests per patient (see Appendix A for calculation). The data
that would be used as reference for the operation of the device will be the spring type
PEF available in the local market.

The group would consult a specialist in lung

functionality in order to gain more knowledge about Peak Expiratory Flow. In


constructing the prototype, the group would also be responsible in studying the
specifications of the microcontroller and Bluetooth technology through the use of their
respective datasheets. Also, the group would study the algorithm of programming the
microcontroller so that it would follow the algorithm of the thesis project. The group
would also study the software necessary to gather data from the microcontroller unit and
transfer it to the computer. The group would create a database for the doctors reference
on each patient. In building the peak flow meter, the group shall search for resources to

aid them in constructing the hardware of the system which includes the flow tube,
calculating system for the flow rate which is determined through the use of sensors, and
the LCD to display results.

1.8 Gantt Chart

Activity
Brainstorming of Proposal
Preparation of Proposal
Preparation of Materials
Purchasing of Materials
Building of Project Prototype
Programming of Microcontroller
Integration of Prototype
Testing
Evaluation of Results
Recommendation of Adviser

2009
2010
May June July Aug Sept Oct Nov Dec Jan Feb March April

1.9 Estimated Budget


Mouthpiece and tubing

P100

Bluetooth

P1500

LCD Display

P300

Flow sensing Circuit

P5000

Miscellaneous

P7000
Total:

P13,900

CHAPTER2
Review of Related Literature
2.1 A Differential Pressure Approach to Spirometry
(Flow Rate Measurement)
In developing the prototype, it is imperative that we understand the flow
measurement part of the design. In order to meet the requirements of the PEF test, we
must choose carefully the sensors to be used to obtain the best results. In our work, we
are to take into consideration the different aspects of flow measurement to determine the
flow rate needed. We are to obtain a, volumetric flow rate for our thesis so one of the
options that we could consider is the use of differential pressure sensing.
In this particular article describes a possible implementation of the prototype. This
follows the theory set forth by Bernoulli in his equation. The main principle which
underlies differential pressure flow measurements is the mathematical expression of
Bernoullis theorem which states that introducing a constriction within a tube would
generate a difference in pressure. The equation shown below can describe the relationship
between the parameters needed.

In this equation Cd is described as the coefficient of dispersion, typically 0.97. A2 and


A1 are the area of the inner and outer parts of the tube, while (p1-p2) is the pressure
difference across the tube. Rho is the fluid density of air expressed in kg/m^3. The choice
of the sensor is crucial for the performance. The device has to cope with flow rates up to
14 L/s with an accuracy of 0.2 L/s. Due to the non linear relation between pressure and
flux, the very large range of 3500 Pa with an accuracy of 0.12 Pa must be achieved. To
match these specifications, they used sensors: a large dynamic range sensor and a low
dynamic range sensor, but with high accuracy, were coupled. The first one (Honeywell
24PCEFA6D) is able to measure up to 3449 Pa whereas the second sensor (AllSensor
1mbar D-4V 6M67) has a maximum range of 100 Pa and an accuracy of 0.1 Pa suitable
for the requirements.
In our groups design, however, we are concerned only on the PEF reading so we
dont have to couple a low range sensor since it may not be able to read the maximum
expiration of the patient since it will saturate at a lower level.

2.2 Peak expiratory flow meter capable of Spirometric


test for asthma monitoring
Asthma is one of the important chronic respiratory diseases requiring daily
monitoring at home. Peak expiratory flow meter (PEFM) is a portable device widely used
by asthmatic patients, providing the peak expiratory flow (PEF) by a simple self-test.
Commercial PEFM produces displacement of a spring connected plate by the force
generated on the plate by patient's expiratory flow. The patient reads the maximum
displacement position on scale of the marker moving with the plate during increased flow

period In developing the prototype, we should be able to understand the principles behind
PEF measurement as well as the electronic components used in the design. There are
various ways on achieving a flow measurement with regards to the flow sensor to be
used. In this particular article, the proponents used a differential pressure sensing device.
Air chamber pressure signal was sensed by 3 differential pressure transducer (MPX2010,
Motorola, U.S.A.), amplified and filtered appropriately. A digital circuit was followed for
ADC conversion and data output with the RS232C serial communication protocol.

2.3 Spirometry (Peak Expiratory Flow or PEF Test


Guidelines and Equipment Specifications)
Spirometry is a test in which lung ailments and diseases such as Chronic
Obstructive Pulmonary Disease can be easily diagnosed. Spirometry is a physiological
test that measures how an individual inhales or exhales volumes of air as a function of
time. The primary signal measured in spirometry may be volume or flow. It is invaluable
as a screening test of general respiratory health in the same way that blood pressure
provides important information about general cardiovascular health. However, on its
own, spirometry does not lead clinicians directly to an aetiological diagnosis.
Spirometry can be undertaken with many different types of equipment, and
requires cooperation between the subject and the examiner, and the results obtained will
depend on the factors varying with each patient. Test performed are either used to
diagnose a certain ailment, or monitor a patients lung condition over a certain time
period. It can be performed at home as instructed by the physician.

In monitoring a patients lung condition, for example an asthma patient, he or she


can perform a Peak Expiratory Flow test. PEF is the highest flow achieved from a
maximum forced expiratory maneuver started without hesitation from a position of
maximal lung inflation. When it is obtained from flowvolume curve data, it is expressed
at BTPS in liters/sec. The defining characteristics of the flowtime curve, in relation to
PEF, are the time taken for flow to rise from 10% of PEF to 90% of PEF, i.e. the rise time
(RT), and the duration that flow is .90% of PEF, called the dwell time (DT). When PEF is
obtained with portable monitoring instruments, it is expressed in liters/min.
Ideally, PEF should be recorded by an instrument that primarily records flow.
Measuring PEF requires an instrument that has a flat frequency response (5%) up to 15
Hz.Although there is evidence of significant frequency content in PEF up to 20 Hz, it is
recommended, at this stage, that manufacturers achieve a goal of recording fidelity up to
15 Hz.The PEF must be measured with an accuracy of 10% or 0.3 liters/sec (20 L/min),
whichever is the greater.
PEF is dependent on effort and lung volume, with subject cooperation being
essential. PEF must be achieved as rapidly as possible and at as high a lung volume as
possible, in order to obtain the maximum value. The subject must be encouraged to blow
as vigorously as possible. The neck should be in a neutral position, not flexed or
extended, and the subject must not cough. A nose clip is not necessary. After the point of
full lung inflation, the subject must deliver the blow without any delay. Hesitating for as
little as 2 s or flexing the neck allows the tracheal visco-elastic properties to relax and
PEF to drop by as much as 10%. Tonguing,spitting or coughing at the start of the blow
may falsely raise the recorded PEF in some devices.In the laboratory, the subject must

perform a minimum of three PEF manoeuvres. When PEF is a self-administered


recording, it is important that the subject has been adequately taught how to perform the
test, when to perform it and what action to take depending on the resting value obtained.
Regular checks of the patients PEF technique and meter are an important part of the
follow-up.

2.4 Development of a Prototype Digital Spirometer


(Sensors)
The growing world comes at a price. We have become more exposed to hazardous
elements that prove to be a challenge to the human body. There are developments in the
field of electronics that can provide user friendly, portable and improved spiromety
systems.

In the work of Chin-Wann Lin, Di-Ho Wang, and Hao-Chien Wang entitled

Prototype development of a digital Spirometer, they studied the development of a


prototype digital spirometer. Specifically, their work discussed design principles,
including sensors that could be used in the development of a portable model. They've
stated that the basic spirometer design falls down into two categories, flow-sensing and
volume-sensing. Yet, for most modern designs, flow-sensing would prove to be practical
not only from developments brought about by advancements in modern electronics, but
because of its compact size compared to volume-sensing models. It is a suitable
component to use in designing portable spirometers. They gave four examples of
transducers that the developer can use in their model: 1. a pneumotachometer for pressure
difference, 2. a hot wire anemometer for any temperature difference across the valve, 3.
turbinometer for revolutions per unit time of a certain propeller of a turbine, 4. ultrasound

for transient time across the lumen. In the design of their prototype, they used a used a
hotwire sensor with an end connected to a Whetstone bridge and then excited with a
constant voltage level without a negative feedback. Their thermal bridge is then
connected to an analog to digital converter (ADC) and a microprocessor to process the
data. Their prototype also included the use of a keyboard, LCD, audio components, 32K
EPROM for the algorithm, 32K SRAM that is used to process the data, and a UART for
serial communication. From the flow-time curve, volume-time curve and the flowvolume curve gathered, and then the pulmonary parameters that are used in spirometry
(FEV1, FVC, FEV1/FVC) are computed and compared accordingly from the these
curves.

2.5. Bluetooth in Wireless Communication


In 1994, L. M. Ericsson of Sweden just invented the future of wireless
communication. Named after the king of Denmark in 940 A.D., Bluetooth technology
was introduced. Competing with IrDA and HomeRF, Bluetooth took wireless
communication to much greater heights. Improving IrDAs 1 meter separation for
transmission and its line-of-sight propagation requirements, Bluetooth has 10 meters of
range and can be further increased depending on the strength of the receiver. It does not
require line-of-sight propagation which will be suitable for our thesis, a portable
spirometer. It is clearly a better tool for PC-to-peripheral connection compared to IrDA
for our thesis because the thesis aims to be portable, thus it can and must be located
slightly away from the PC and must not use line-of-sight propagation to give the doctors
and patients flexibility while testing.

With the help of the journal, we will be able to further understand Bluetooth
technology as we aim to implement our thesis using the technology. The journal includes
details about Bluetooth such as the basic configurations, frame formats, hardware and
software implementation and protocols together with the architecture and network
topology of Bluetooth, which is very helpful for our thesis. With the increase of
companies taking part in the Bluetooth Special Interest Group (SIG), the implementation
of our thesis using Bluetooth only makes sense in order to keep in pace with todays
technology.
The journal also talks about essential components in order to establish a Bluetooth
connection such as devices that will serve as the master and slave, host controller
interface, the establishment of connection of each layer, link manager and how to
disconnect or end the connection. With this information the group will able to have a
grasp of the technology. This part of the thesis is essential as it will be the one to transfer
the data from the spirometer to the computer, which is monitored by the doctor, so proper
knowledge of Bluetooth will be imperative. This journal will be a great help to the group
as they try to learn and understand the different components that comprises their thesis to
be able to properly integrate them.

CHAPTER 3
Theoretical Considerations
3.1 Flow Measurement
3.1.1 Differential Pressure Sensor

Figure 3.1 Inside a differential pressure sensor (MP3V5004DP Datasheet)

Figure 3.2 Differential pressure sensor (MP3V5004DP Datasheet)

A silicon chip acts as the pressure-sensitive element on micromechanical


piezoresistive pressure sensor which is etched on the chip which forms a cavity.
At the high stress points on the membrane atoms that are locally implanted in the
silicon crystal, zones with an altered conductivity are formed which electrically

function as a resistor. In the moment an external pressure is applied, the molecular


structure of the silicon crystal will be deformed when the silicon membrane dents.
In the resistor areas the piezo effect is observed. When the mechanicl crystal
shifts it creates a measurable change in their electric value and if the said resistors
are connected up as a Wheatstone Bridge, when there is an impressed current or
voltage, a differential signal in volts will be generated.
Differential pressure can be defined as the pressure difference between
two distinct points and so, when measuring differential pressure, two pressures
are compared. With most pressure sensors, it is often the case that only one
pressure ratio, namely P1/P2 1 or P1/P2 1, can be evaluated and the
measurement of pressure under the said condition is referred to as "differential
pressure measurement".
Differential Pressure sensors can only determine a specific range of
pressure and is only suitable in the pressure range they are relevant. It applies to
most that P1-P2 Pmax or P2-P1 Pmax, where Pmax is determined by the
technical conditions and is specified. Two conditions can be observed about
pressure sensors when it reaches a certain pressure, the proof and burst pressure.
The proof pressure is the maximum pressure which may be applied without
causing durable shifts of the electrical parameters of the sensing element while the
burst pressure is the maximum pressure which may be applied without causing
damage to the sensing element or leaks from the housing. These conditions must
be taken into account when the user connects up the pressure to the sensing
element. Overall, pressure can be measured due to the amount of dent the

membrane exerts on the silicon crystal. When there is no dent, there is no pressure
exerted and when the dent gradually increases, the pressure measured also
increases.

3.1.2 Bernoullis Equation


In measuring the volumetric flow rate of fluids, one of the most commonly
used methods is differential pressure measurement. By having a constriction
across, a tube would have a change in pressure. This change in pressure can be
translated into flow rate by computation. There are different flow tubes that are
used for different differential pressure measurement systems but they all follow
the Bernoulli equation. Bernoullis equation, named after Daniel Bernoulli, states
that an increase in flow speed of a fluid denotes a corresponding decrease in
pressure.

Equation 3.1. Bernoullis Equation

Where:
h
h

h
h

Since flow rate is constant all throughout the tube, furthermore, the volumetric
flow rate is expressed as,

, and

, at initial and throat point

respectively, we have

Equation 3.2. Relationship between volumetric flow rate at initial and throat sections

Where

is the cross sectional area of the initial section and

is the

cross sectional area of the throat section. In order to solve for the constant that is
to be used for the programming of the microcontroller to output the corresponding
volumetric flow rate from the sensor reading, we must first determine Q1 which is
the volumetric flow rate. Simplifying Bernoullis equation to get Q1 we must first
solve for V1 from Equation 3.1.

is constant in the equation, we can use

Assuming that the altitude

equation 3.2 to equation 3.1, we can now isolate

to get,

Equation 3.3
By isolating

and

, we can simplify the equation since

denotes the fluid density of the fluid in.

Equation 3.4

Equation 3.5
Where

the diameter of the initial is section and

is the diameter of the throat. With

cancellation of similar terms we get,

Equation 3.6
We now have a value for V1 given the venturi tube diameter at the opening and at
the throat. In determining the volumetric flow rate Q, we can multiply V1 and the
cross sectional area of the corresponding section of the tube.

From this equation, we can now determine the volumetric flow rate needed.

3.1.3 Flow Tubes


The following are the different types of flow tubes that follow
Bernoullis Equation. They are described below.

3.1.3.1 Orifice Plate

Figure 3.3 Orifice Plate Diagram

An orifice tube is a type of flow tube that introduces a constriction


to the inner section of the pipe through an element known as an orifice
plate. An orifice plate is a circular plate inserted in the flow tube that has a
hole in the middle. This hole introduces a constriction in the middle which
pushes the fluid flowing to converge. This in turn, increases the fluid
velocity of the fluid with a corresponding decrease in pressure. The
pressure difference is measured before and after the orifice plate.

3.1.3.2 Pitot Tube

Figure 3.4 Pitot Tube Diagram

A Pitot tube is another type of flow tube used for flow rate
measurement. In this flow tube however, instead of an orifice
plate, an impact probe is inserted in the tube. This impact probe is
faced directly to the flow. A pressure difference can be measured
as fluid flows through the probe.

3.1.3.3 Venturi Tube

Figure 3.5 Venturi Tube Diagram

The venturi tube is a flow tube that has a larger pipe


diameter at the ends then gradually constricts in the middle. The

constriction in the middle is known as the throat. As the fluid flows


through the tube and into the converging section, it increases its
velocity as the cross sectional area decreases. This corresponds
also to a drop in pressure from the wider section. A difference in
pressure is obtained across the pressure taps located at the throat
and the initial section. This can be measured by a u-tube or by a
differential pressure sensor.

3.2 Microcontroller Unit


A microcontroller unit (MCU) is a circuitry that involves the use of a
microcontroller that serves as the brain of a system. It has a single chip that contains the
central processor (CPU), non-volatile memory for the program, read-only memory
(ROM) as an example, and volatile memory for the input and output, like random access
memory (RAM). Microcontrollers come in different sizes and architectures that choosing
the right type of microcontroller greatly depends on the application.

Figure 3.6 Basic Microcontroller

Microcontrollers are designed for embedded applications, which is why the group
decide to consider using it for the project. Microcontrollers are commonly used in
automated systems to control the system with respect to all the inputs and outputs. The

MCU is a very critical part of the system because it will send out the necessary
information to the whole system so that it will work the way it should be.

3.2.1 Microcontroller Specifications


A critical part of selection of microcontrollers is the specification
and

computing

power

that

the

microcontroller

can

provide.

Microcontrollers are usually classified according to their arithmetic


registers and index registers. This groups are more commonly known as 8, 16-, 18-, 32- bit groups. The cost of each group is also proportional to its
features, capabilities and limitations.

3.2.1.1 Microcontroller Resources


Microcontroller units have an on-chip resource that allows
it to attain higher level of integration and reliability. An on-chip
resource is defined as a block built inside the MCU so that it can
perform different functions that can be used by the microcontroller.
Since these resources are built-in, it increases the overall reliability
of the MCU because external circuitry will be unnecessary to be
able to use the said functions. Popular on-chip resources that are
commonly used are memory devices, which include random access
memory

(RAM),

read

only

memory

(ROM),

erasable

programmable read only memory (EPROM), Electrically Erasable


Programmable

Read-Only

Memory (EEPROM),

memory, timers, system clock, oscillator, and I/O.

and

flash

3.3 Bluetooth
Bluetooth is one of the newest networking technology that use a low transmission
power setting, typically 1 milliwatt. Bluetooth technology is ideal for mobile battery
operated devices and systems. Bluetooth can also instantly connect, detect and
communicate to other Bluetooth devices without relying on a user input. Bluetooth
technology primarily relies on two important things; a radio frequency technology that
will allow the communication between two devices, and software with a set of protocols
that will enable and control traffic between two devices in transmitting and receiving data
to each other.

3.3.1 Radio Frequency Properties


The principal transmission system used in Bluetooth technology is low
energy radio waves. The frequency of operation of Bluetooth devices are typically
2.40 GHz to 2.48 GHz, which is a radio frequency reserved for medical, industrial
and scientific devices.

3.3.2 Bluetooth Connection


Bluetooth devices can interact with one or more Bluetooth devices. When
there are only two devices connected with each other, wherein one acts as the
master and the other the slave, the connection made is called point to point. But
when Bluetooth devices connected together where in one acts as a master and the
others act as the slaves, this ad-hoc network is usually called as a Bluetooth
piconet. There can be a maximum of 7 active slaves in a piconet. Bluetooth

devices in a piconet integrate and synchronize their frequency-hopping to keep in


touch with each other. Finally, a scatternet is a group of Bluetooth piconets
interconnected together.

Figure 3.7 Bluetooth Connections: (a)Point to Point (b) Piconet (c) Scatternet

Since every device in a Bluetooth piconet is synchronized in frequencyhopping there is minimal risk of two Bluetooth piconets interfering with each
other. Piconets also change frequencies 1600 times per second making a collision
between two piconets to last only a fraction of a second.

3.3.3 Bluetooth Power Classes


There are 3 types of power classification when using Bluetooth
technology.
These are the following:
Type

Power Level Operating Range

Class 3 Devices 100mW

Up to 100 meters

Class 2 Devices 10mW

Up to 10 meters

Class 1 Devices 1mW

0.1-10 meters

Table 3.1 Bluetooth Power Classes

3.3.4 Bluetooth Interfacing


There are a lot of ways to implement Bluetooth technology in a system.
For our thesis, the group has decided to make use of a Bluetooth module that will
connect with the universal asynchronous receiver/transmitter (UART) pin of the
microcontroller unit. This type of interface will make use of the Bluetooth module
as the bridge to connect the MCU to the computer for data interpretation. The
Bluetooth will incorporate the serial port profile (SPP) that will emulate a serial
cable connection so that it could be interfaced with the UART of the
microcontroller unit.

3.3.4.1 Bluetooth Serial Port Profile


The EGBT 9830 incorporate a Bluetooth Serial Port Profile (SPP)
that allows it to communicate to the PIC16F877as serial port module. The
SPP defines how to set-up virtual serial ports on two devices and
connecting them with Bluetooth technology. When the two devices
connect, the Bluetooth units emulate a serial cable using Recommended
Standard 232 (RS-232) control signaling. RS-232 is a common interface
standard for data communications equipment; primarily used on the serial
port of a personal computer. The profile ensures that data transmission can
speed up to 128 kbit/sec. The profile defines the roles of the two devices;
who will take the initiative to connect (Master) and another who will wait
for a connection to be requested (Slave) The whole profile emulates serial
port communication and the figure below will show how it is being
emulated.

Figure 3.8 Figure showing serial port emulation


From the figure, the baseband, Link Management Protocol (LMP)
and Logical Link Control Adaptation Protocol (L2CAP) are the Open
Systems Interconnection (OSI) layer 1 and 2 Bluetooth protocols. Radio
Frequency Communication (RFCOMM) is a Bluetooth adaptation that
provides a transport protocol for serial port.

3.4 TCP/IP
3.4.1 TCP/IP Model
Prior to the development of the 7 OSI Layer, there existed an earlier model
called the Transmission Control Protocol/Internet Protocol (TCP/IP). It is the
basic communication language or protocol of the Internet. The TCP/IP model
involves a set of general design guidelines and implementations of specific
networking protocols to allow communication of computers over a network.

TCP/IP provides an end-to-end connection which specifies the matter at which


data should be formatted, addressed, transmitted, routed and received at the
destination. When setting up a direct access to the Internet, every computer is
provided with a copy of the TCP/IP program. TCP/IP is a two-layer program. The
higher layer, Transmission Control Protocol, handles the encoding or assembling
of a message or file into smaller packets that is sent over the Internet. A receiving
unit, which also has a copy of the TCP/IP program, decodes or disassembles the
message or file to its original form. The lower layer called the Internet Protocol
handles the address of each packet to ensure that the message arrive at its rightful
destination.
TCP/IP uses a client/server model of communication in which a user
(client) requests and is provided a service by another computer (server) in the
network. TCP/IP communication is point-to-point. TCP/IP and the higher-level
applications that use it are collectively said to be "stateless" because each client
request is considered a new request unrelated to any previous one and by stateless
it means that it frees the network paths so that anyone can use it continuously.
Taking note however that the TCP layer is not stateless until all the packets in a
message are received by the requesting client.
TCP/IP is sometimes referred to as the Internet model. It has
four abstraction layers as defined in RFC 1122. Shown below is the TCP/IPs
corresponding layers used at each hop.

Figure 3.9 TCP/IP Connection and Abstraction Layers

Figure 3.10 Encapsulation of application data descending through the TCP/IP layers

3.4.2 The Link Layer


The Link Layer is practically the scope in networking of the local
connection in which a host is attached. The Link Layer is used to move
packets of two different hosts on the same link between each of their
Internet Layer. It is under this layer that the process of transmitting and
receiving packets can be controlled in the software device driver for the
network card, firmware or specialized chipsets. These perform data link
functions such as adding a frame header to prepare it for transmission over
a physical medium. It is also under this layer that the process of sending
can be chosen whether it would be over a virtual private network or
networking tunnel.

3.4.3 The Internet Layer


The Internet Layer answers the problem about sending packets
across one or more networks. Internetworking requires sending data from
a source network to a specific destination. This process is called routing.
The Internet Protocol has two basic functions. First is the Host Addressing
and Identification and this is accomplished through the use of IP address.
The second function is the Packet Routing which is the basic task of
getting packets of data (datagrams) from a source to a destination by
sending the packets to the next network node (routing) closest to the
destination.

3.4.4 The Transport Layer


The Transport Layer is the one responsible for the end-to-end
message transfer capabilities regardless of underlying network along with
error control, flow control, congestion control, and application addressing
(port numbers). End-to-end messaging or connecting application at the
transport layer can be categorized as either connection-oriented, such as in
Transmission Control Protocol (TCP), or connectionless, such as in User
Datagram Protocol (UDP).
In laymans term, the transport layer can be thought of as a
transport mechanism such as a vehicle responsible to ensure the safe
arrival of its goods/passengers to the destination. It is practically safe to
say that the Transport Layer is the first stack of the TCP/IP to offer
reliability. Protocols above transport also offer reliability.

3.4.5 The Application Layer


The Application Layer is the higher-level protocol that is
commonly used by most applications for networking communication.
Some examples of the application layer protocols are the File Transfer
Protocol

(FTP)

and

the

Simple

Mail

Transfer

Protocol

(SMTP).Application Layer generally treat the transport layer and lower


protocols as black boxes which provide a stable network connection
across the device to which it communicates. Transport and lower level

layers are largely unconcerned with the specifics of application layer


protocols.

3.5 Programming Software and Languages


3.5.1 C# Language
Microsoft C# is a new programming language designed for wide range
applications that run on the .NET framework. It is considered as an evolved
version of the Microsoft C and Microsoft C++. It is mostly simple, modern, type
safe, and object oriented. C# codes are compiled as managed codes which benefits
from the services offered by common language runtime. It is designed to work as
an integration of the capabilities of both Microsoft C++ and the Visual Basic
along with Java programs. The services available include language operability,
garbage collection, enhanced security, and improved versioning support. The
library for Visual C# programming is the .NET Framework.

3.5.2 Microsoft SQL 2008

Figure 3.11 Microsoft SQL server 2008

Structured Query Language (SQL) is a computer language used as


database management for relational database management system (RDBMS). Its
scope comprises of data insert, query, update and delete, schema creation and

modification and data access control. It is practically used to manipulate database


information with the help of programming languages such as Visual C# by
establishing connection strings to the SQL Manager.

3.5.3 ASP.NET Programming

Figure 3.12 ASP.Net

ASP.NET is a web application tool developed by Microsoft to allow users


to develop dynamic web sites, web applications, and web services. ASP.NET is
the next generation of ASP. However, it is a misnomer to say that ASP.NET is the
upgraded version of ASP. ASP.NET is a completely new technology for serverside scripting. ASP.NET is a part of the Microsoft .NET Framework and it is a
powerful scripting tool for creating dynamic and interactive pages. It is built on
the Common Language Runtime (CLR) which allows programmers to write
ASP.NET code using any supported .NET Language.

3.5.4 Internet Information Services (IIS)


IIS, formerly called Internet Information Server, is a web server
application created by Microsoft to support web publishing. IIS is a group of
Internet servers (including a Web or Hypertext Transfer Protocol server and File
Transfer Protocol server) with additional capabilities for Microsoft's Windows
NT and Windows 2000 Server operating systems. It is a Windows component that

comes along with Windows Operating System. IIS allows web pages developed to
be published either on local area network, wide area network or internet based
network. This web application is accomplished by creating virtual directories
wherein requested pages by users are directed to that virtual directory.

3.5.5 Browser
A browser is a web application used for retrieving, presenting and
traversing information resources on the World Wide Web. A protocol is used to
establish an understanding between the requesting party and the browser. This
protocol is called the Hyper Text Transfer Protocol (HTTP).
A browser understands HyperText Markup Language (HTML) codes only.
Usually, upon typing the URL in the browser, we easily see the webpage that we
wish to view. However, behind that, a lot of processes occur before we are able
to view the page. When a URL, also called a domain name, is typed in the
browser, the domain name is analyzed in the Domain Name System. The Domain
Name System (DNS) handles all the public IP addresses and the corresponding
domain names of each and every website available in the web. When the DNS
finds the corresponding IP address, it returns the value to the browser and the
browser directs a request to the web server with the IP address. The web server
processes the request then sends the requested page back to the browser in HTML
format. Finally, the received page is then displayed to the user.

3.6 Human Lungs

Figure 3.13 Anatomy of the human lungs

The lungs are responsible for breathing. It is a machine in our body that supplies
oxygen to the blood that transports it to all of the cells of the body for sustaining the
processes each of them are performing. It moves out CO2 out of the lungs, which is the
byproduct of the metabolic process performed by the cells. The lungs under normal
conditions of rest normally breathe in 500ml of air per inhalation. On the average, a
person takes 12 breathes per minute. This translates to 6L/min during one breathing
cycle.

3.7 Peak Expiratory Flow


Peak Expiratory Flow or PEF is defined as the maximum forced expiration made
after maximal lung inhalation. It should be performed without hesitation to achieve the
best possible maneuver. The patient should be at rest. The test is usually performed
sitting upright or standing up straight. Either way the patient should be as relaxed as

possible to be able to perform his best exhalation through the PEF device. It is expressed
in terms of volumetric flow rate (Liters/min). PEF is ideally recorded by a device that
determines flow rate. It is a lung function exam usually taken at home to monitor the
patients response to medication and lung condition.

3.7.1 Test Procedure


The accuracy of the test is entirely dependent on the patients
understanding of the procedure. After full lung inhalation, the subject must
be able to blow out without any delay or obstruction to the PEF device.
Variables such as improper lip fitting, incorrect posture, and hesitation can
render the test null and therefore should be repeated again. Hesitating for a
moment, even for as little as 2 seconds, or flexing the neck may affect the
results. Tonguing, spitting or coughing at the start of expiration can falsely
raise the value of the PEF. It is important that the subject is briefed
accordingly as to the conditions of peak flow measurements. Before home
use, the doctor shall instruct and patient regarding the proper measures
taken before the test. Commonly, the PEF test is repeated 3 times during a
trial. The acceptable values are noted during tests and the highest value is
recorded on the PEF monitoring sheet provided by the doctor. The patient
writes down the time and day that they took the test. They chart also
contains zones. These zones are namely green, yellow and red. These
zones indicate the performance of the patients tests, usually based on the
best reading. Green is 100%-80% of the best reading. Yellow is 80%-50%
of the best reading. And lastly, red is 50% or below of the best reading.

3.7.2 Peak Flow Meter Device

Figure 3.14 Mechanical Peak Flow Meter Device

The typical peak flow meter device is a mechanical device that has
a spring or a thin metal plate that pushes the cursor as it receives the air
coming from the patients lungs. This cursor moves along the graduations.
On the average, these devices measure from 50 to 700 L/min. PEF devices
can be used at the doctors office or at home depending on the treatment
plan prescribed by the doctor. In most cases, is device is used at home for
lung condition monitoring. It comes with a PEF test chart that is used to
record the value, time and date of each PEF test. This chart is then brought
back to the doctor to be reviewed.

Chapter 4
Design Considerations
4.1 General System Block Diagram
The figure below is the general system block diagram:

Figure 4.1 General Block Diagram of the System

This figure gives a description of the whole system, including the different
components it contains. The Peak Flow Meter System includes a flow sensing circuit that
is responsible for obtaining the Peak Expiratory Flow. The data is processed to the MCU
and it performs the necessary operations that translate the signal coming from the sensor
into a digital output that can be displayed to the LCD. The Bluetooth module is
responsible for sending the data to the computer. In the computer, a GUI handles the data
coming from the Bluetooth module. Two key GUIs would be needed for the whole

system; one would be the GUI for the computer receiving the data directly from the
device and the other for the computer handling the server. The third part would be the
Website. The website allows the doctor to view the test results obtained by the device
remotely. The website obtains the data from the server.

4.2 Flow Measurement


Here is the block diagram of the Flow Sensing Block:

Figure 4.2 Block Diagram of the Flow Measurement Block

4.2.1Differential Pressure Sensor


Pressure Sensor Schematic Diagram and Board Design:

Figure 4.3 Sensor Circuit for MP3V5004DP

For our pressure sensor, the group used the MP3V5004DP Differential
pressure sensor. It has a pressure rating of 3.9KPa and has an output of 0.6 to 3V.
The output voltage of the sensor responds to variations in pressure difference
introduced in it. It has a wide range of applications, moslty revolving around
microcontroller and microprocessor based systems since its output pin can be
directly coupled to the ADC input of the MCU. The sensor also has compensation
for temperature variations within it operating temperature (0 to 85 degrees
celsius) . This is important since changes in temperature is directly proportional to
the pressure introduced to the sensor. For minimizing the effects of noise in the
silicon pressure sensor, an effective general approach would be a low pass filter.
The low pass filter with a cutoff frequency of 650 Hz is recommended for the
system. A 470 pF ceramic capacitor have been determined to give the best results
since it provides a decent output to the ADC of the microcontroller. From the
noise point of view, adequate decoupling is also important. A 1.0 mF ceramic
capacitor in parallel with a 0.01 mF ceramic capacitor works well for this
purpose. Also, with respect to noise, it is preferable to use a linear regulator rather
than a relatively noisier dc regulated power supply 5 volt output.

Figure 4.4 Differential Pressure Sensor PCB (MP3V5004DP)

4.2.2 Venturi Tube


In the groups thesis, the concept of differential pressure measurement was
used. This was chosen since it provides higher accuracy as compared to other
flow measurement techniques. This is done by measuring the pressure difference
across a tube that in which fluids flow in. This method employs different types of
tubes as discussed in the previous chapter.
Considering the application however, the proponents used Venturi Tube.
This device is a hollow tube that is wider at the ends then gradually constricts in
the middle. As the fluid flows inside the tube, it would gain velocity as the cross
sectional area of the tube decreases as it reaches the middle. An increase in the
velocity is accompanied by a change in pressure. This pressure difference
translates into volumetric flow rate through the use of Bernoullis equation. The
group used a Venturi Tube since it has has no mechanical or movable parts inside.
This would make the cleaning of the device to be easier as compared to the other
flow tubes. It also offers minimum head loss, as compared to other flow tubes
using differential pressure flow measurement. Also, they can be very accurate. A
well calibrated tube can measure with high accuracy, having readings within
5%.

Figure 4.5 Venturi Tube of the Prototype

The dimensions of the device are given below:


D1 (initial Diameter) = 27mm
D2 (throat Diameter) = 13.5mm
The opening of the tube was chosen to conform to standard peak flow
meter mouth pieces. The throat diameter of the device, which is 13.5mm, was
used to follow the specifications of a Venturi Tube. The common ratio of the
throat diameter and Inner diameter is given below:

The converging and diverging angles of the device are 21 and 15


respectively. These are optimal values for the said sections since they make the
device less expensive by making the tube generally shorter. Solving for the
constant to be used in the programming of the Microcontroller, we have to use the
equation in the previous chapter regarding volumetric flow rate and substitute the
dimensions of the device.

Recall that,

And,

We now substitute the values which are 27mm and 13.5mm, representing the D1,
and D2 respectively. In order to get the constant for the program of the MCU,
assume a pressure difference of 1PA (P1-P2 = 1) and substitute:

Equation. 4.1

To solve for Q1 (Volumetric Flow Rate)


(Eq.3. 3)

Converting to L/min

x 0.97 (Cd)
A dispersion coefficient Cd is assumed to be .97 for smaller tubes as
provided for Venturi tube specifications.
Finally we get,

For a pressure difference of 1Pa, the group obtained a value


of

Equation 4.2
By relating the constant derived from equation 4.2, which is 10.77592772,
to the voltage level per pressure difference of the sensor, we can now output the
value of the volumetric flow rate. Using the equation from the sensors datasheet,
we can determine the corresponding pressure difference per voltage output. Let P
be the pressure difference,

Equation 4.3
But

Equation 4.4

Simplifying 4.3 we get

Equation 4.5

Isolating P we get,

Equation 4.6

Equation 4.7
Dividing both sides by 0.2 to isolate P we get,

Equation 4.8
By using the value of P, solved from determining the flow sensing
circuits Vout and Vs, the value of Q can now be outputted.

4.3 Microcontroller Unit


The microcontroller unit (MCU) serves as the intelligence of the whole system. It
processes all inputs and produce corresponding outputs according to the specification
made by the user, which is the program burned to the microcontroller. Selection of proper
microcontroller is imperative for the success of the system. Several factors must be
considered such price, availability, manufacturer support, development tools and
specifications. It is a must to be able to determine the needs of the system before
selecting a microcontroller. For the system, the group selected to PIC16F877a

Microcontroller because its features fits the system. The pin diagram of PIC16F877a is
show in the figure below.

Figure 4.6 Microcontroller Pin Diagram from Datasheet

4.3.1 PIC16F877a Specifications


It is important to understand the specifications of PIC16F877a to be able
to see if it fits perfectly to the system. Coming from the datasheet, PIC16F877a
has the following specifications that can be used for the system: 8K x 14 words of
Flash Program memory, 368 x 8 bytes of Data Memory (RAM), Synchronous
Serial Port (SSP) with SPI (Master Mode) and I2C (Master/Slave), Universal
Synchronous Asynchronous Receiver Transmitter with 9-bit address detection,
and up to 8-bit Analog to Digital converter (ADC).

4.3.1.1

Universal

Synchronous

Asynchronous

Receiver Transmitter
PIC16F877a has two serial I/O modules, one of which is the
USART module. The USART module of PIC16F877a can be configured
as a full-duplex asynchronous system or as a half-duplex synchronous
system that can communicate with peripheral devices such as a personal
computer.

4.3.1.2 Analog to Digital Converter


PIC16F877a analog to digital conversion results in a corresponding
10-bit digital number and has the ability to be able to operate even when
the device is in sleep mode. The A/D converter is very critical as it will
convert the pressure reading, in terms of analog voltage, of the sensor and
then it will proceed to different arithmetic process in order to compute for
the correct value.

4.3.2 Microcontroller Algorithm


For the system to run properly, a proper algorithm must be implemented.
The flowchart below summarizes the algorithm that can be implemented to the
microcontroller in order process and compute for the parameters needed by the
system. One of the advantages of using PIC16F877a, which is manufactured by
Microchip Technology Inc., is the abundance of compilers and different
programming languages available that can be used in order to program it. For the

system, the group incorporated the program in the C language and used MikroC
as the compiler. Below is a summary of different commands that can be used for
the system that can be found in the help of MikroC.
Command Name

Type

Lcd_Init

Void

Lcd_Cmd

Void

Usart_Init
Usart_Write

Void
Void

Usart_Data_Ready Unsigned short


Adc_Read

Unsigned

Description
Initializes LCD to a specific port with default
pin settings
Sends command to LCD. Predefined LCD
commands can be found in the MikroC Help.
Initializes USART module with the desired
baud rate.
Sends a data byte via USART module
A function used to test if data in the receive
buffer is ready for reading.
Initializes PICs internal Analog to Digital
Converter module to work with RC clock.

Table 4.1 Key commands for the MCU algorithm

Figure 4.7 Microcontroller Flow Process Chart

START

Blow in the tube

Compute for the flow


rate and initialize
variables

Is the flow
rate greater
than
previous
test?

NO

YES
Display result in LCD
and initialize Bluetooth

Is
Bluetooth
module
ready?

YES
Send Data to PC via
Bluetooth

END

NO

4.3.3 Microcontroller Interfacing


4.3.3.1 LCD
The device used a 2x16 SC162A3 LCD. Since the group is using
PIC16F877A, the group has adapted the schematic diagram for LCD
configuration as provided by MikroC, which serves as the compiler of the
MCU. The LCD will be used to display the results, informing the user of
his Peak Expiratory Flow. From the schematic diagram we made a board
design.

Figure 4.8 MikroC LCD interfacing configuration,

Figure 4.9 LCD Schematic diagram

Figure 4.10 Microcontroller PCB with LCD

4.3.3.2 Bluetooth
The system involves the transmission of data wirelessly through
Bluetooth technology. The group decided to use the EGBT 9830
Bluetooth module due to its availability. The Bluetooth module allows the
microcontroller unit to send the data obtained from the test wirelessly
using the Bluetooth Serial Port Profile (SPP) and be connected directly to
the Universal Synchronous/Asynchronous Receiver/Transmitter (USART)
port of a microcontroller. The product manual provided by the supplier has
given the group the basic design and pin configuration to interface the
module to the MCU. The interfacing of the EGBT 9830 module to the
microcontroller unit is shown below:

Figure 4.11 EGBT 9830

Figure 4.12 Bluetooth Module PCB

4.3.3.2.1 Bluetooth Initialization


The module is initialized by default at baud rate of 9600, 8
data bit, 1 stop bit and no parity. In order to use the Bluetooth
module, the device must be initialized with correct Bluetooth
address by sending 13 bytes to the module before it becomes
operational. The sequence of the bytes is as follows:
02 52 27 06 00 7F XX XX XX XX XX XX 03
The six XX bytes represent the address that you will
assign to the module. After initializing a valid Bluetooth address,
the Bluetooth core of the module needs to be activated to be able
for the module be operational. The following 7 bytes must be sent:
02 52 66 00 00 B8 03
All the bytes are sent by the microcontroller after it has
been physically connected and powered up. The flowchart below
summarizes the whole design in order to use the module.

Figure 4.13 Bluetooth Flow Process Chart

START

Initialize
Bluetooth
Address: Send
13 bytes

Is the
address
valid?

NO

YES
Start Bluetooth
Core: Send 7
bytes

Is the
core
ready?

YES
END

NO

4.4 Graphic User Interface


The Graphical User Interface (GUI) shall be constructed using Microsoft Visual
Studio C# Language. C# Language was used in this thesis to take advantage of its
networking capabilities along with its ability to use both Microsoft C++ programming
and Visual Basic. The data from the device is sent to the GUI (called the Chat Client) and
the GUI shall act as a path in which data could be sent to the server over Internet through
TCP/IP. The server computer is another GUI (called the Chat Server) that monitors for
connections and online users. The server acts as a storage for the database of all the
patients and doctor. The layout and design of the 2 GUIs are shown below:

Figure 4.14 Patient Login Interface

Figure 4.15 Patient Sample Data Interface

Figure 4.16 Chat Server Interface

Figure 4.17 Chat Server Interface detects a client to be online

Figure 4.18 Chat Server Interface detects a client has logout.

4.4.1 Chat Client


Field Name/Method Name

Type

InitializeConnection

Void

CloseConnection

Void

ReceiveMessages

Void

SetsUpdate

Void

Description
Initialize parameters to enable the user to
connect to the server
Disconnects the thread connection of the
user from the server.
Called for every time a new message is
received from the thread.
Updates the set number if changes occur
in the database.

FillData

Void

Registration

Void

Complete

Void

UpdateLog

Void

PatientData

Void

RegistrationDetails

Void

Append

Void

AppendRegister

Void

InitializeLog

Void

CloseLog

Void

WrongData

Void

PEFData

Void

Fills a table with PEF values that serves


as the data source for plotting.
A method called to inform user that
registration was unsuccessful.
A method called to inform user that
registration was successful.
Called when the status textbox needs to
be updated with new message.
Called to enable user interface when
login is successful.
Called to fill the combo box with
registered doctors names in the database.
Called to append username and password
to be sent to the server for checking.
Called to append registration details to be
added to the server database
Initializes sending of username and
password to the server to check validity.
Disconnects the user from the server and
disables patient interface.
Called when the input username or
password is not valid.
Sets the value of the label box equal to
the obtained PEF value.

Table 4.2 Variables and methods used in the lines of codes of the Chat Client

4.4.2 Chat Server


Field Name/Method Name

Type

Description

StatusChangedEventArgs

Class

Handles the method that updates the server


text box when changes occur.

Class that handles the methods for database


ChatServer
Class
manipulation.
Adds a user to the database when
AddUser
Void
registration requirements are met.
Adds the username of the user to the Doctors
AddUsertoDoctorsComment Void
Comments database.
Adds the username of the user to the
AddUsertoPEFData
Void
PEFData database.
Retrieves the data of the user when login is
RetrievedataUser
String
successful.
Retrieves the comments of the doctor for the
RetrieveComment
String
specific user.

RetrievePEF

Retrieves the PEF values of the user for the


specific set number.
Retrieves the names of the doctors registered
String
in the database.
Retrieves the number of set as listed in the
String
database for the specific user
Updates the PEF data of the patient when
String
new value is received by the server
Method that changes the status text box of
Void
the server when changes occur.
Method that opens a thread to listen for
Void
connection requests.
Method that continuously allows the server
Void
to listen for connection.
Class which handles the method that
Class
receives the requests
Method which opens a thread for each
Void
requesting user
Closes the thread, stream sender and stream
Void
receiver when the user disconnects.
Method which handles all received messages
Void
from the user.
String

RetrieveDoctors
RetrieveSets
UpdatePEF
OnStatusChanged
StartListening
KeepListening
Connection
Connection
CloseConnection
AcceptClient

Table 4.3 Variables and methods used in the lines of codes of the Chat Server

4.4.3 Database
Database

PatientData

PEFData

DoctorsComments

Description

Database which stores the


personal information of each
patient registered.
Database which stores the
PEF values of each specific
patient.
Database which stores
comments made by the
doctor over the website.

Table 4.4 Database used in the Chat Server code

Figure 4.19 Flow Process Chart of the GUI

4.5 Website
Figure 4.20 General Process Flow of the Website

The website is constructed using ASP.NET programming. Unlike the previous


generation called ASP, ASP.NET allows call functions which lessens the usual tedious
programming. Moreover, ASP.NET supports dynamic and interactive communication
with the server. Since the thesis has login functions and data retrieval, it needs to be
constructed dynamically. SQL statements are again used to retrieve the data from the
database. The server used for the websites server is the same server used by the patients
to allow consistency with the data. This website shall only be accessible within a Local
Area Network. Shown below is the simplified structure of the system.

Figure 4.21 Structure of the System

Field Name/Method Name

DoctorsName
Login
User
View

Type

Description

Retrieves the doctors information in the


String
DoctorsData database.
Retrieves the information of those patients
Void
registered to the user
Retrieves the username of the patients
String
registered to the doctor
Retrieves the information of the selected
Void
patient and displays the plot menu.

Plot

Void

Submit

Void

Retrieves and plots the PEF data of the


selected patient and displays the zones.
Updates the DoctorsComments database
when the button is clicked.

Table 4.5 Variables and Methods used in development of the website

4.5.1 Database
Database

PatientData

PEFData

DoctorsComments

DoctorsData

Description

Database which stores the


personal information of
each patient registered.
Database which stores the
PEF values of each specific
patient.
Database which stores
comments made by the
doctor over the website.
Database which stores the
personal information of
each doctor registered.

Table 4.6 Database used in the development of the website

4.6 Device Supply


4.6.1 Regulator Board
The group designed a regulator circuit that would contain the voltage
regulators needed by the components of the device. For the Microcontroller, the
group used LM7805 Voltage regulator having an output of 5V. For the
Differential Pressure Sensor and Bluetooth Module, which requires 3.3V each, the
group used SPX2815AU Voltage regulator. This regulator requires a 10uF
capacitor for the input and output pins for noise reduction.

Figure 4.22 Voltage Regulator PCB

Figure 4.23 Voltage Regulator


Board Schematic Diagram

4.6.2 Battery
The device is supplied by an 8.6V 2100mAh battery. It is to supply the
Microcontroller, Differential Pressure Sensor, and Bluetooth Module that requires
5V, 3.3V and another 3.3V respectively. When these components are connected
together, they draw 210mA of current. With the current rating of the battery, it
can power up the prototype sufficiently.

Figure 4.24 8.6V 2100mAh Battery

Chapter 5
Data and Results
5.1 System Testing
In the testing setup, the device was tested both in patients and in controlled
air. There are 4 patients with 20 tests each. In testing the device using controlled air,
the group used 4 different pressure readings. The transmission accuracy was likewise
tested by sending 90 varying data points in the Chat Client. Lastly, the theoretical
Bluetooth range for class 2 radios was likewise tested in order to find out the
maximum range at which the device is capable of transmitting data to the computer.
The following tests were done to meet the objectives of this thesis.

Figure 5.1 Mechanical Peak Flow Meter

Figure 5.2 Digital Peak Flow Meter

5.1.1 Peak Flow Meter Device (Patient Testing)


5.1.1.1 Objectives
5.1.1.1.1

To use a flow sensing circuit to determine lung air flow.

5.1.1.1.2

To display the test result through the LCD.

5.1.1.1.3

To build the device with an accuracy of 90% as compared

to a Mechanical Peak Flow Meter.


5.1.1.2 Materials
5.1.1.2.1

Digital Peak Flow Meter Device

5.1.1.2.2

Mechanical Peak Flow Meter

5.1.1.3 Procedures
1. Turn on the power supply for the Digital Peak Flow Meter Device.
2. Latch the first push button to turn on the microcontroller.
3. Have the patient hold the Venturi Tube at a horizontal position
perpendicular to him/her.
4. Have the patient stand firm or sit upright and inhale at his/her
maximum breathing capacity.
5. Have the patient empty out the air in his/her lungs in the Venturi
Tube.
6. Record the resulting flow rate as seen in the LCD.
7. Repeat steps 3-6 using the Mechanical Peak Flow Meter.
8. Repeat the procedures to 4 patients.

5.1.1.4 Data and Results

Figure 5.3 LCD with PEF Result

Figure 5.4 Flow Sensing Circuit

5.1.1.4.1
Trial
1
2
3
4
5
6
7
8
9
10
11

Patient 1

Flow Rate
(Mechanical) L/min
600
370
690
640
670
680
660
690
550
690
630

Flow Rate
(Digital) L/min
608
358
717
677
621
694
656
748
578
694
662

%difference

Accuracy

1.33333333
3.243243243
3.913043478
5.78125
7.313432836
2.058823529
0.606060606
8.405797101
5.0909090901
0.579710145
5.079365079

98.66667
96.75676
96.08696
94.21875
92.68657
97.94118
99.39394
91.5942
94.90909
99.42029
94.92063

12
13
14
15
16
17
18
19
20

650
630
670
690
620
660
650
690
670

652
623
728
753
675.8
720
703
755
690

0.307692308
1.111111111
8.656716418
9.130434783
9
9.090909091
8.153846154
9.420289855
2.985074627

99.69231
98.88889
91.34328
90.86957
91
90.90909
91.84615
90.57971
97.01493

Table 5.1 PEF Results for Patient 1

5.1.1.4.2

Trial
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

Patient 2

Flow Rate
(Mechanical) L/min
550
650
570
510
520
450
640
610
430
610
620
690
490
510
550
530
520
570
690
540

Flow Rate
(Digital) L/min
588
612.19
563
503
524.45
485
605
605
402
671
653
727
523.9
469.7
580
554
497
601
755
563

%difference

Accuracy

6.909090909
5.816923077
1.228070175
1.37254902
0.855769231
7.777777778
5.46875
0.819672131
6.511627907
10
5.322580645
5.362318841
6.918367347
7.901960784
5.454545455
4.528301887
4.423076923
5.438596491
1.951219512
4.259259259

93.09091
94.18308
98.77193
98.62745
99.14423
92.22222
94.53125
99.18033
93.48837
90
94.67742
94.63768
93.08163
92.09804
94.54545
95.4717
95.57692
94.5614
98.04878
95.74074

Table 5.2 PEF Results for Patient 2

5.1.1.4.3
Trial
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

Patient 3

Flow Rate
(Mechanical) L/min
400
370
370
490
410
370
390
386
440
440
360
380
360
460
440
410
390
360
370
390

Flow Rate
(Digital) L/min
396.23
403
341
537
433
402
394
370
400
423
380
412
328
502
423
444
417
385
383
424

%difference

Accuracy

0.9425
8.918918919
7.837837838
9.591836735
5.609756098
8.648648649
1.025641026
4.14507772
9.090909091
3.863636364
5.555555556
8.421052632
8.888888889
9.130434783
3.863636364
8.292682927
6.923076923
6.944444444
3.513513514
8.7179

99.0575
91.08108
92.16216
90.40816
94.39024
91.35135
98.97436
95.85492
90.90909
96.13636
94.44444
91.57895
91.11111
90.86957
96.13636
91.70732
93.07692
93.05556
96.48646
91.28205

Table 5.3 PEF Results for Patient 3

5.1.1.4.4
Trial
1
2
3
4
5
6
7
8
9
10
11
12
13
14

Patient 4

Flow Rate
(Mechanical) L/min
650
700
650
670
640
630
650
660
690
680
680
670
690
690

Flow Rate
(Digital) L/min
607
768
633
676
601
626
682
689
758
702
721
657
667
754

%difference

Accuracy

6.615384615
9.714285714
2.615384615
0.895522388
6.09375
0.634920635
4.923076923
4.393939394
9.855072464
3.235294118
6.029411765
1.940298507
3.333333333
9.275362319

93.38462
90.28571
97.38462
99.10448
93.90625
99.36508
95.07692
95.60606
90.14493
96.76471
93.97059
98.0597
96.66667
90.72464

680
670
690
660
670
660

15
16
17
18
19
20

644
697
747
644
720
636

5.294117646
4.029850746
8.260869565
2.424242424
7.462686567
3.636363636

94.70588
95.97015
91.73913
97.57576
92.53731
96.36364

Table 5.4 PEF Results for Patient 4

5.1.2 Peak Flow Meter Device (Controlled Air Testing)


5.1.2.1 Objectives
5.1.2.1.1 To test the Peak Flow Meter Device using controlled air.
5.1.2.1.2 To determine the accuracy of the device under controlled air
condition.
5.1.2.2 Materials
5.1.2.2.1

Digital Peak Flow Meter

5.1.2.2.2

Mechanical Peak Flow Meter

5.1.2.3 Procedures
1. Turn on the power supply for the Digital Peak Flow Meter Device.
2. Latch the first push button to turn on the microcontroller.
3. Set the value of the pressurize container to an initial value.
4. Place the nozzle at the center of the Venturi Tubes entrance.
5. Record the flow rate as shown in the LCD.
6.

Repeat steps 3-5 using the Mechanical Peak Flow Meter.

7. Repeat the procedures to 4 different pressures.

5.1.2.4 Data and Results


5.1.2.4.1

Pressure of 10 psi

Trial
Flow Rate (Mechanical) L/min Flow Rate (Digital) L/min
185
186
1
200
195
2
190
201.92
3
195
157.706
4
190
186.16
5
185
172.52
6
190
192.62
7
190
165.27
8
185
168.94
9
190
157
10
190
182.85
11
185
172.52
12
200
172.52
13
185
172.52
14
200
157.7
15
200
198.87
16
200
176.03
17
190
179.47
18
200
168.94
19
200
186.16
20
Average
192.5
177.5358
Table 5.5 PEF Results for Pressure of 10 psi

Theoretica l Experiment al

%difference

100

192.5 177.5358

Theoretica l
192.5
Accuracy 100% %difference 100% 7.7736104% 92.22639%

5.1.2.4.2
Trial
1
2
3
4
5
6

100 7.7736104%

Pressure of 20 psi

Flow Rate (Mechanical) L/min Flow Rate (Digital) L/min


350
343
340
375
350
343
340
408
330
377
345
383

345
340
330
340
360
320
350
350
350
350
340
355
345
335
343.25

7
8
9
10
11
12
13
14
15
16
17
18
19
20
Average

383
388
323
360
336
377
326
358
365
367
323
382
350
365
361.6

Table 5.6 PEF Results for Pressure of 20 psi.

%difference

Theoretica l Experiment al

343.35 361.6

100 5.345957757%
Theoretica l
343.35
Accuracy 100% %difference 100% 5.345957757% 94.65404%

5.1.2.4.3
Trial
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

100

Pressure of 30 psi

Flow Rate (Mechanical) L/min Flow Rate (Digital) L/min


400
415
450
397
430
365
460
373
430
396
430
367
410
455
450
417
440
430
400
415
440
400
400
425
460
385
440
445
470
408
450
440
440
380

460
500
470
441.5

18
19
20
Average

412
425
409
407.95

Table 5.7 PEF Results for Pressure of 30 psi

%difference

Theoretica l Experiment al

100

509 499.0635

Theoretica l
509
Accuracy 100% %difference 100% 1.952161% 98.04784%

5.1.2.4.4

100 1.952161%

Pressure of 40 psi

Trial
Flow Rate (Mechanical) L/min Flow Rate (Digital) L/min
500
461.82
1
550
457.83
2
530
464.46
3
530
513.26
4
540
522.71
5
500
485.08
6
550
513.26
7
450
504.85
8
460
512.07
9
540
492.59
10
550
445.64
11
520
502.42
12
500
474.88
13
440
503.64
14
500
492.59
15
570
530.84
16
450
569.75
17
460
481.28
18
490
534.29
19
550
518.01
20
509
499.0635
Average
Table 5.8 PEF Results for Pressure of 40 psi.

%difference

Theoretica l Experiment al

100

441.5 407.95

100 7.599093998%
Theoretica l
441.5
Accuracy 100% %difference 100% 7.599093998% 92.40091%

5.1.3 GUI and Website


5.1.3.1 Objectives
5.1.3.1.1

To program the microcontroller to output flow rate and send


the data to a computer by adapting Bluetooth technology.

5.1.3.1.2

To use a Graphical User Interface (GUI) that would display the


data sent to the computer.

5.1.3.1.3

To develop a website that can be accessed by a doctor to view


the data obtained by the system.

5.1.3.2 Materials
5.1.3.2.1

Laptop

5.1.3.2.2

Bluetooth

5.1.3.2.3

Chat Client

5.1.3.2.4

Chat Server

5.1.3.2.5

Router

5.1.3.3 Procedures
5.1.3.3.1

Graphical User Interface (GUI)

1. Input the IP Address of the web server to connect to.

Figure5.5 GUI: Inputting Server IP

2. Input the registered username and password of the user.

Figure 5.6 GUI: Inputting Username Password

3. If the user is not yet registered, he/she could register by clicking


the register button.

Figure 5.7. GUI: Register Interface

4. Use the control buttons to view the desired operation of the


interface.

Figure 5.8 GUI: Control Buttons

5. Follow the following procedures for reading of data.


a. Establish the connection with the Bluetooth.

Figure 5.9 Icon to connect to Bluetooth Serial Port Function

Figure 5.10 Bluetooth Establishing Serial Port Connection

b. Click the Read Value Details and set it the same as the
value of the Bluetooths COM Port.

Figure 5.11 GUI: Setting Bluetooth COM Port

c. Make sure that the patient has already taken the test
before clicking the Read button.
d. Wait for at least 5 seconds after the test before clicking
the Read button.
e. Click the Update button to add the data in the users
database.
6. Logout the account after use to avoid wrong data from being
stored in the users database.
5.1.3.3.2

Website

1. Join the network of the web server.


2. Access the web server by typing http://(webserverIP) or
http://(webserverName) in the browser.

Figure 5.12 Website: Inputting Web Server Name

3. Input the registered username and password of the doctor.

Figure 5.13 Website: Inputting Username and Password

4. Choose the name of the desired patient information to view.

Figure 5.14 Website: Choosing which Patient Information to view

5. Choose the desired points to plot.

Figure 5.15 Website: Plotting of Data

6. Leaving of comment is optional.

Figure 5.16 Website: Leaving of Doctors Comment

7. The Zones are only available for plots with 90 data points.

Figure 5.17 Website: Viewing Zones

8. Logout the account to ensure security.

5.1.3.4 Data and Results

Figure 5.18. Digital Peak Flow Meter Bluetooth System

Figure 5.19. Intelligence Board of the System.

5.1.3.4.1
Trial
1
2
3
4
5
6
7
8
9
10
11
12

Device
Reading
364.052
383.6865
295.408
276.4126
448.3833
533.1442
528.5347
471.0057
493.8306
332.4328
508.4783
514.4583

Graphical User Interface (Accuracy of Reading)


Login
Successful
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes

Received
Data
364.05
383.6865
295.40
276.1426
448.3833
533.1442
528.53
471.0057
493.8306
332.4328
508.4783
514.4583

Data
Plotted
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes

Data
Updated
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

543.3727
295.408
442.8924
291.237
332.4328
427.429
324.9888
451.1036
375.6302
313.4196
539.9847
264.8348
291.237
269.4149
490.1002
403.8815
562.1856
295.408
440.1213
337.9082
417.2906
317.3703
402.364
440.1213
415.822
435.9316
343.2963
391.5772
408.4001
405.3934
373.9981
409.8953
467.0931
482.5531
369.0586
276.1426
255.4283
299.5209
350.3515
428.8579
502.427
352.0932
370.7124
474.886

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes

543.3727
295.408
442.8924
291.237
332.4328
427.429
324.9888
451.1036
375.6302
313.4
539.9847
264.8348
291.237
269.4149
490.1002
403.8815
562.18
295.408
440.1
337.9082
417.2906
317.3103
402.3
440.1213
415.822
435.9316
343.2963
391.5
408.4
405.3934
373.9981
409.89
467.09
482.55
369.0
276.1426
255
299.5209
350.3515
428.8579
502.427
352.0932
370.7
474.886

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes

57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90

492.592
544.4978
350.3515
456.4956
449.74
456.4956
527.376
552.3057
481.2837
552.3057
386.8621
418.754
438.7292
460.4983
764.9926
346.841
409.8953
415.822
534.2904
601.0995
534.2904
468.401
529.6908
468.401
607.1749
305.5866
452.4576
522.7157
341.5097
478.7349
543.3727
341.5097
390.0118
447.0169

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes

492.5
544.4
350.35
456.495
449.74
456.4956
527.376
552.3057
481.2837
552.3057
386.8621
418.754
438.7292
460.498
764.992
346.841
409.8953
415.822
534.2904
601.099
534.290
468.401
529.6908
468.401
607.1749
305.5866
452.45
522.715
341.5097
478.7349
543.37
341.5097
390.0118
447.016

Table 5.9 GUI: Accuracy of Reading

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes

Figure 5.20. Website resulting graph after 25 tests

Figure 5.21 GUI resulting Graph after 25 tests

Figure 5.22 Website resulting graph after 50 tests.

Figure 5.23. GUI resulting graph after 50 tests

Figure 5.24. Website resulting graph after 90 tests

Figure 5.25. GUI resulting graph after 90 tests

Figure 5.26. Website resulting Zones after 90 tests

Figure 5.27. GUI resulting Zones after 90 tests

5.1.3.4.2
Trial
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

Website

Web
Accessed
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes

Login
Successful
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes

View
Successful
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes

Plotting
Successful
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes

Table 5.10 Website: Accuracy of Data Accessibility

5.1.4 Bluetooth Range Test


5.1.4.1 Objective
5.1.4.1.1

To test whether the Bluetooth device can operate up to its


maximum of 10 meters.

5.1.4.2 Materials
5.1.4.2.1

Laptop

5.1.4.2.2

Peak Flow Meter Device

5.1.4.2.3

Bluetooth

5.1.4.2.4

Measuring Tape

5.1.4.3 Procedures
1. Using the footsteps method, count how many steps are covered for a
certain distance (e.g. 6 steps/ 3 meters). Perform the method for at
least 3 times then take the average. Use this as a reference to measure
distance when performing the test.
2. Power up the Peak Flow Meter Device.
3. Run the Bluetooth application in the Laptop.
4. See if the Bluetooth icon for the Peak Flow Meter Device is shown in
the screen as devices available within the area.

Figure 5.28 Digital Peak Flow Meter Bluetooth Icon

5. If the device is visible, check whether transmission is possible then


increase the distance between the Laptop and the device by a meter
and reset the Bluetooth. Otherwise, stop the test.
6. Repeat Steps 2-5.

5.1.4.4 Data and Results


5.1.4.4.1

Footstep Method
Trial
Number of Steps
1
6
2
7
3
6
Average
6.33333 6

Table 5.11 Average number of steps for every 3 meters

5.1.4.4.1.1 Length of the measuring tape = 3 meters


5.1.4.4.1.2 Steps covered within the length of the measuring tape = 6
5.1.4.4.1.3 Steps / meter
5.1.4.4.2

6steps
2steps / meter
3meters

Bluetooth Visibility

5.1.4.4.2.1 Theoretical Bluetooth Range for Class 2 radios = 10 meters


Distance (m)
1
2
3
4
5
6
7
8
9
10
11

Bluetooth Visibility
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes

Transmission Successful
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No

Table 5.12. Bluetooth Visibility and Transmission Range

CHAPTER 6
Conclusion and Recommendation
6.1 Conclusion
In reference to the data and results obtained from the testing done on the device
and under the given time frame, the systems performance met the objectives made
during the early stages of the study. The group was able to use a flow sensing circuit that
measures Peak Expiratory Flow or PEF through the use of differential pressure
measurement. The flow measurements made with the venturi tube, together with the
differential pressure sensor, was able to match the mechanical peak flow meter used
commercially with an accuracy of 90%. The device was able to display the results done
during the tests through the LCD. It was also able to transmit the data wirelessly from the
device to the computer by adapting Bluetooth technology.
A critical part with the development of the thesis was the consultations made to
health care professionals regarding the lung function testing procedures and parameters.
Note that the testing of the PEF values was consulted with a doctor to get the results that
would satisfy the objectives of the study. This gave light to the areas of the system that
needed medical expertise, such as the GUI and Website Layout. For the venturi tube,
consultations made to a mechanical engineer proved to be vital since they gave the
proponents knowledge on the theories regarding flow measurement, specifically
differential pressure flow measurement.

6.2 Recommendation
For future directives, one aspect of the prototype that can be improved would be
its compatibility for WAN. Since the device works on Local Area Network, increasing
the network size can help increase the prototypes effectiveness as far as remote access is
concerned. Also, students looking into this research work can also publish the website,
making it available over the internet.
Another improvement that could be done would be to decrease the device size by
using SMD or Surface Mount Device for the circuit components that would be used in its
development. Decreasing the device dimensions would mean making it more portable.
This in turn could lead to the patients increased chances of taking the test whenever it is
scheduled since it can be brought with them with ease.
For the flow measurement block, one development would be providing a
symmetrical design for the Venturi Tube. This would make the flow measurement
bidirectional. Improvement in this block would add features to the device since it can
now measure other parameters used in spirometry. This would make it ready for
inhalation and not just exhalation.

References:
[1] Chii-Wann Lin, Di-Ho Wang, Hao-Chien Wang, Huey-Dong W. PROTOTYPE
DEVELOPMENT OF DIGITAL SPIROMETER
[2] K.A.Nagaraja, Nanda.S. Electronic Spirometer for the Assessment of Lungs
Functionality
[3] Moonie SA, Sterling DA, Figgs L, Castro M.Retrieved in June 17, 2009 from
website: http://www.ncbi.nlm.nih.gov/pubmed/16457681

[4] Martinez FD. Genes, environments, development and asthma: a reappraisal.Retrieved


in June 18, 2009 from website: http://www.ncbi.nlm.nih.gov/pubmed/17197483

[5] Spirometry.Retrieved in June 18, 2009 from website:


http://www.patient.co.uk/showdoc/27000436/
[6] Become an expert in Spirometry. Retrieved in June 18, 2009 from website:
http://www.spirxpert.com/usefulness.htm
[7] College of Physicians and Surgeons in Alberta. Spirometry and Flow Volume
Measurements: Standards and Guidelines
[8] World Health Statistics. World Health Organization

Retrieved in August 26, 2009 from website:


http://library.asti.dost.gov.ph/gsdl/collect/actamedi/index/assoc/HASH01ea.dir/do
c.pdf

Retrieved in August 26, 2009 from website:


http://my.clevelandclinic.org/services/surgery/hic_how_to_use_an_incentive_spir
ometer.aspx

[9] M.R. Miller, J. Hankinson, V. Brusasco, F. Burgos, R. Casaburi, A. Coates, R.


Crapo, P. Enright, C.P.M. van der Grinten, P. Gustafsson, R. Jensen, D.C. Johnson,
N. Maclntyre, R. McKay, D. Navajas, O.F. Pedersen, R. Pellegrino, J, Wanger and
G.Viegi. 2005. Standardization of spirometry. April 5, 2005.
[10] K.A. Kim', J.H. Lee', T.S. Lee', E.J. Cha''CKlntemational Co., Ltd.'Dept. of
Biomedical Engineering, Chungbuk National University, Cheongju361-763, Korea
Peak expiratory flow meter capable of spirometric test for asthma monitoring,
[11] R. Carta1, D. Turgis, B. Hermans, P. Jourand, R. Onclin and R. Puers
1K.U.Leuven, ESAT-MICAS Department, Kasteelpark Arenberg 10, B-3001 Leuven,
Belgium A differential Pressure Approach to Spirometry
[12] R. L. Daugherty, J. B. Franzini, E. J. FInnemore. Fluid Mechanics with
Engineering Applications. McGraw-Hill Book Company 1985
[13] (Cooney, Biomedical Engineering Principles, 1976)
WEBSITES:
http://archive.chipcenter.com/circuitcellar/march01/c0301cg2.htm
http://www.swedetrack.com/usblue4.htm
http://www.bluetooth.com/English/Technology/Works/pages/spp.aspx/
www.ebay.com
myrespiratorysupply.com

Вам также может понравиться