Professional Documents
Culture Documents
MAY 2008
iii
ACKNOWLEGEMENT
First of all, I would like to thank Allah for HIS firm hands in guiding me in
the course of completing this thesis writing. It is by HIS grace and mercy that I am
able to embark on the project within such a limited time. Alhamdulillah.
I also would like to thank all my fellow friends for their contribution in giving
me a moral support throughout the project development period. Last but not least, to
all my beloved family members who were always by my side to encourage, advice,
comfort, cherish and support me during this entire project.
ABSTRACT
This project consists of two subsystems, which are hardware system and
software system. Basically, the hardware system consists of microcontroller and
other electronic circuits for detecting the heart pulse rate. The software system
consists of application program to connect the Bluetooth dongle at the computer to
the Bluetooth transmission module and microcontroller.
There are a number of methods that can be used to detect the presence of the
heart pulse. For example, the ECG wave can be used to produce a synchronized pulse
corresponding to each beat of the heart. Other techniques utilize pressure differentials
due to the pulse or optical methods that cause the pressure pulse to interfere with a
light beam. The second part of this project is to construct a communication link
between the transmitter and receiver. The transmitter unit transmits electrical
impulses produced by the contraction of the heart to the receiver. The receiver
samples the heart rate over pre-determind time period. The last part of this project is
to view the signal wave of the heart on a PC. The challenge of this system
development is to develop the connection between Bluetooth transmission module,
and the hardware system which consists of sensor unit and microcontroller.
vi
ABSTRAK
Projek ini mengandungi dua subsistem, iaitu sistem perkakasan dan sistem
perisian. Umumnya, sistem perkakasan terdiri daripada mikropengawal dan litar-litar
yang lain untuk mengesan kadar degupan jantung. Sistem perisian pula mengandungi
program- program aplikasi yang dapat berfungsi sebagai penghubung di antara
bluetooth dongle dan juga mikropengawal.
TABLE OF CONTENT
TITLE i
DECLARATION ii
DEDICATION iii
ACKNOWLEDGEMENT iv
ABSTRACT v
ABSTRAK vi
TABLE OF CONTENTS vii
LIST OF TABLES x
LIST OF FIGURES xi
LIST OF ABBREVATION xiii
LIST OF APPENDICES xv
1 INTRODUCTION
1.1 Background 1
1.2 Objective 2
1.3 Scope 3
1.4 Development Challenges 3
1.5 Thesis Outline 4
2 LITERATURE REVIEW
4 SOFTWARE DEVELOPMENT
4.1 MicroC 26
4.2 Programming the Microcontroller 27
4.2.1 Transfer the program to PIC microcontroller 27
4.2.2 Baud rate 29
4.3 Setup PC for Bluetooth interface 30
4.3.1 USB dongle setup (IVT BlueSoleil) 30
4.4 UART setting 33
ix
5 HARDWARE DEVELOPMENT
6.1 Hardware 43
6.1.1 Sensor module 44
6.1.2 Microcontroller module 44
6.1.3 Bluetooth transmitter module 45
6.2 Result Analysis 46
6.3 Discussion 48
7.1 Conclusion 49
7.2 Suggestions 50
REFERENCES 52
LIST OF TABLES
LIST OF FIGURES
LIST OF ABBREVIATIONS
A - Ampere
PC - Personal Computer
LANs - Local Area Network
PAN - Personal Area Network
USB - Universal Serial Bus
CPU - Central Processing Unit
EEPROM - Electricity Erasable Read-Only Memory
GUI - Graphic User Interface
IR - Infrared
MCU - Microcontroller Unit
PIC - Programming Interrupt
RAM - Read Access Memory
ROM - Read Only Memory
V - Voltage
DC - Direct current
D.O.F - Degree of freedom
RF - Radio Transceiver
LM - Link Manager
SPP - Serial Port Profile
USART - Universal Synchronous Asynchronous Receiver Transmitter
BRG - Baud Rate Generator
MEDAC - Medical Association Counsils
PPG - Plethysymography
IBI - Inter beat interval
ISM - Indusrial Scientific Medical
SCI - Serial Communication Interface
xiv
LIST OF APPENDICES
CHAPTER 1
INTRODUCTION
1.1 Background
Telemedicine is the most important step in cutting costs and increasing service
quality in health care [1]. The traditional telemedicine systems mostly enable
communication between health professionals in order to give doctors in remote locations
access to specialist’s knowledge and monitoring of patients remotely for home care or
emergency applications. Essentially, these systems provide an extension of hospital
environment and connect diagnostic equipment at home with hospitals using fixed
telephone or satellite networks. Although these systems provide many benefits for its
users there are still many limitations.
2
One of the main limitations is the lack of mobility that hinders their usage in
many scenarios. Beside that, a more general problem of today’s health care is the
insufficient availability of data conceding the status and medical history of the patient,
both to the medical personnel and to the patient himself. Frequent measurements of vital
signs could give indications about the current status of chronic illnesses and are necessary
for optimization of the treatment, but would incur significant cost.
1.2 Objective
The main objective of this project is to construct a heart rate monitor by using the
wireless transmission to a receiver which displays the heart rate measured in beats per
minute.
Basically, the system consists of software and hardware system. The software
consists of Bluetooth file transfer module. At hardware part, system consists of heart rate
detector circuits and microcontroller circuits. The microcontroller is continuously waiting
for the data from censor circuits before transmit the data to Bluetooth module.
3
1.2 Scope
The scope of the project covers the construction of the following modules;
• Sensor module
• Transmitter Module
• Receiver Module
• Base Station Module
The main challenge for this project is to build a Bluetooth connection between the
computer and the Bluetooth device. At the computer, before a Bluetooth connection is
established some settings need to be done at computer such as device management and
device discovery. At the hardware part, in order to connect to the computer, command is
send from the microcontroller to KC-21 (Bluetooth Device).
Another challenge is the unstable and high sensitivity nature of the KC-21. As
KC-21 is very sensitive, every time when the input voltage is changed, the Bluetooth
connection will be lost. This problem always occurs when the sensor circuit is on. When
sensor circuit is on, input voltage for KC-21 will change as more voltage is needed at the
sensor circuit. In order to solve this problem, 2 power supplies are needed; 1 for the
Bluetooth and the other 1 for the sensor circuits.
4
Chapter two covers the details of research undertaken at the start of the project.
Bluetooth profile, Bluetooth architecture and Bluetooth protocol as well as useful books
and websites on relevant topics are covered extensively. Introduction to
Plethysysmography and microcontroller are also discussed in this chapter.
Chapter three entitled “Methodology and Approach” discusses the overall system
of the project. Block diagrams of the project system are formed based on the research
conducted. The system functionality is also covered in this chapter.
Chapter four describes the software development for the Bluetooth system. This
chapter is divided into three parts: Bluetooth setting, sensor circuit setting and
microcontroller Assembly language. Bluetooth setting discusses the procedure to set up a
wireless serial port connection by using Bluesoleil program.
In chapter six, the different function of the project including both hardware and
software are reviewed. This chapter also uses scenario to reflect the project flow in a
systematic way. A conclusion is drawn in the chapter six. Chapter six also discussed any
possible new project that could be extended from current project and any improvement
that could be made.
5
CHAPTER 2
LITERATURE REVIEW
2.1.1 Introduction
When the heart beats, a pressure wave moves out along the arteries at a few
metres per second (appreciably faster than the blood actually flows). This pressure wave
can be felt at the wrist, but it also causes an increase in the blood volume in the tissues,
which can be detected by a plethysmograph [9].
In a typical application, the PPG sensor might be placed on a finger. With each
heart beat, a surge of blood is forced through the vascular system, expanding the
capillaries in the finger, and changing the amount of light returning to the photodetector.
The electrical resistivity of the photodetector changes as a function of the amount of light
falling on it. This change in resistance results in a change in the electrical current flowing
through the detector circuit. In this way, the dynamic activity of the vasculature is
translated into a signal that can be monitored electronically [5].
The surge of blood through the vasculature with each cardiac cycle is known as
the pulse pressure wave or blood volume pulse. The ability to monitor the blood volume
pulse on a beat to beat basis provides a graphic display of the dynamic activity of the
cardiovascular system that can not be obtained with an indirect measure like skin
temperature.
In addition to monitoring the raw PPG wave form, NeuroDyne software routines
are designed to detect the peaks and troughs of each pulse pressure wave. Having
identified an individual wave, the software calculates relative pulse height, pulse wave
rise time, and fall time. The interval between pulse wave peaks corresponds to the inter-
beat-interval of the heart (IBI).
decreases correspond to decreased blood flow (vasoconstriction). The actual form (shape)
of the wave is indicative of the overall tone of the vasculature.
Instructions for attaching the PPG sensor, reducing the likelihood of artifact, and
limitations on PPG recording can be referred from the internet. Using the PPG Sensor,
Pulse height and heart rate information are frequently used in stress assessment
monitoring and as clinical biofeedback modalities in work with hypertension, migraine
headache, Raynaud's Disease, and in generalized relaxation training. Pulse height
feedback is generally directed at increasing the height of the pulse pressure wave which,
as described above, normally corresponds to increased vasodilatation. It is recommended
that heart rate and skin temperature be monitored as numeric displays whenever you are
carrying out pulse height training; access to these additional measures will provide the
broadest information on cardiovascular activity [11].
2.2 Bluetooth
Living in a wireless world is not so far away. Bluetooth may be the technology
that brings us closer to that end. It is estimated that before 2002, Bluetooth will be a
built-in feature in more than 100 million mobile phones and in several million other
9
communication devices, ranging from headsets and portable PC’s to desktop computers
and notebooks. Bluetooth is designed to operate at 2.400-2.4835 (GHz) with up to 1
Mbps. Bluetooth is designed to work in conjunction with other Third Generation (3G)
technologies. The Bluetooth technology is the foundation of the new IEEE 802-15
WPAN Standard (Wireless Private Area Network). Bluetooth and IEEE standards groups
are currently working on potential interference issues between 802-11 that covers
wireless LANS and 802-15. IEEE has formed the 802-15 Coexistence Task Group 2 in
an effort to resolve these interference issues. Bluetooth can also be a complimentary
technology of other wireless standards such as DECT (Digital Enhanced Cordless
Telecommunications) and IrDA (Infrared Data Association). It is believed Bluetooth
technology has the potential to change the way we think about being “connected”. Using
Bluetooth and Third Generation (3G) telephony we could truly be wirelessly connected to
everything around us that is Bluetooth enabled [14].
USA, Europe
and most other 2.400 - 2.4835 79
countries
A sophisticated radio interface is more complicated (and more flexible) than the
IR interface and therefore more expensive. The price target of $10 per unit however
seems to be realistic especially if all our homes will eventually have half a dozen or so
Bluetooth equipped items operating in them, driving quantities to very high numbers.
In addition to cost, size matters. With ever-decreasing form factors and weight,
any new addition to a piece of electronic apparatus must be small, light and consume
minimum power from the host system or separate battery. The Bluetooth implementation
is feasible in a very small footprint comprising a single chip and associated RF
components, and should be relatively easy to install in anticipated applications. Its low
output power and sophisticated power conservation design, ensures minimum power
consumption.
Bluetooth has the potential for impacting many areas, including applications that
would have been inconceivable a few years ago e.g. a fridge-freezer telling a microwave
11
oven what ingredients are available, allowing the microwave to suggest menu options!
However, one particular area where Bluetooth will have a significant impact is in the
support of other wireless delivery mechanisms such as cellular telephony. While national
networks are suited to delivering communication on the move or wireless to any location,
purely local interconnection is better handled by a local communication system.
To deliver telephony based services from one undefined location to another, and
to distribute the services and functions at those locations requires a hybrid solution, at the
core of which is a cellular handset with a built-in Bluetooth transceiver.
2.3 Microcontroller
2.3.1 PIC16F877A
Figure 2.1 shows the PIC16F877A pin diagrams and Figure 2.2 shows the Block
diagram of PIC 16F877A.
15
Transmitter (USART) module is one of the two serial I/O modules. (USART is
also known as a Serial Communications Interface or SCI) [17,21]. The USART can be
configured as a full duplex asynchronous system that can communicate with peripheral
devices such as CRT terminals and personal computers, or it can be configured as a half
duplex synchronous system that can communicate with peripheral devices such as A/D or
D/A integrated circuits, serial EEPROMs etc. The USART can be configured in the
following modes:
Bit SPEN (RCSTA<7>) and bits TRISC<7:6> have to be set in order to configure
pins RC6/TX/CK and RC7/RX/DT as the Universal Synchronous Asynchronous
Receiver Transmitter. The USART module also has a multi-processor communication
capability using 9-bit address detection.
The BRG supports both the Asynchronous and Synchronous modes of the
USART. It is a dedicated 8-bit baud rate generator. The SPBRG register controls the
period of a free running 8-bit timer. In Asynchronous mode, bit BRGH (TXSTA<2>)
also controls the baud rate. In Synchronous mode, bit BRGH is ignored.
Table 2.1 shows the formula for the computation of the baud rate for different
USART modes which only apply in Master mode (internal clock). Given the desired baud
18
rate and FOSC, the nearest integer value for the SPBRG register can be calculated using
the formula in Table 2.1. From this, the error in baud rate can be determined. It may be
advantageous to use the high baud rate (BRGH = 1), even for slower baud clocks. This is
because the FOSC/(16(X + 1)) equation can reduce the baud rate error in some cases.
Writing a new value to the SPBRG register causes the BRG timer to be reset (or
cleared). This ensures the BRG does not wait for a timer overflow before outputting the
new baud rate.
In this mode, the USART uses standard non-return-tozero (NRZ) format (one
START bit, eight or nine data bits, and one STOP bit). The most common data format is
8-bits. An on-chip, dedicated, 8-bit baud rate generator can be used to derive standard
baud rate frequencies from the oscillator. The USART transmits and receives the LSb
first. The transmitter and receiver are functionally independent, but use the same data
format and baud rate. The baud rate generator produces a clock, either x16 or x64 of the
bit shift rate, depending on bit BRGH (TXSTA<2>). Parity is not supported by the
hardware, but can be implemented in software (and stored as the ninth data bit).
Asynchronous mode is stopped during SLEEP. Asynchronous mode is selected by
clearing bit SYNC (TXSTA<4>). The USART Asynchronous module consists of the
following important elements:
19
The USART transmitter block diagram is shown in Figure 2.3. The heart of the
transmitter is the transmit (serial) shift register (TSR). The shift register obtains its data
from the read/write transmit buffer, TXREG. The TXREG register is loaded with data in
software. The TSR register is not loaded until the STOP bit has been transmitted from the
previous load. As soon as the STOP bit is transmitted, the TSR is loaded with new data
from the TXREG register (if available). Once the TXREG register transfers the data to
the TSR register (occurs in one TCY), the TXREG register is empty and flag bit TXIF
(PIR1<4>) is set. This interrupt can be enabled/disabled by setting/clearing enable bit
TXIE ( PIE1<4>). Flag bit TXIF will be set, regardless of the state of enable bit TXIE
and cannot be cleared in software. It will reset only when new data is loaded into the
TXREG register. While flag bit TXIF indicates the status of the TXREG register, another
bit TRMT (TXSTA<1>) shows the status of the TSR register. Status bit TRMT is a read
only bit, which is set when the TSR register is empty. No interrupt logic is tied to this bit,
so the user has to poll this bit in order to determine if the TSR register is empty.
Transmission is enabled by setting enable bit TXEN (TXSTA<5>). The actual
transmission will not occur until the TXREG register has been loaded with data and the
baud rate generator (BRG) has produced a shift clock (Figure 2.4). The transmission can
also be started by first loading the TXREG register and then setting enable bit TXEN.
Normally, when transmission is first started, the TSR register is empty. At that point,
transfer to the TXREG register will result in an immediate transfer to TSR, resulting in an
empty TXREG. A back-to-back transfer is thus possible. Clearing enable bit TXEN
during a transmission will cause the transmission to be aborted and will reset the
transmitter. As a result, the RC6/TX/CK pin will revert to hi-impedance. In order to
20
select 9-bit transmission, transmit bit TX9 (TXSTA<6>) should be set and the ninth bit
should be written to TX9D (TXSTA<0>). The ninth bit must be written before writing
the 8-bit data to the TXREG register. This is because a data write to the TXREG register
can result in an immediate transfer of the data to the TSR register (if the TSR is empty).
In such a case, an incorrect ninth data bit may be loaded in the TSR register [21].
CHAPTER 3
This chapter discusses similar projects and also the aspects or factors that
must be taken into consideration in developing the project. This chapter also discusses
the design stage including the electronic design, hardware design and material selection.
This chapter also describes the tools used, assumptions, methodology and approach of
the project as well as the software development flow, hardware development flow of the
proposed system.
• Hardware
o Infrared LED and phototransistor LED is used to detect the pulse rate at
finger.
o CYTRON L4128D PIC programmer is used to load .HEX file into
Microcontroller.
o KC Wirefree Bluetooth Module Starter Kit SKKCA-21 is used as wireless
22
module.
o Bluetooth USB Dongle is used as wireless adapter at computer.
• Software
o mikroC software is used to write programming source code for the
microchip microcontroller.
o IC Prog is used to load the .HEX file from the assembly language to the
microchip microcontroller.
o Bioexplorer program is used to detect the devices and view the heart rate
signal.
3.2 Assumptions
The project is started with the software development. Software provides this
project with strong, reliable and stable framework. Hardware is developed in later stage
to refurnish the system with some necessary functions. Below are the procedures set for
the project implementation:
5. Software Development
• Learn software language.
6. Hardware Development
• Integrated the complete software part with Bluetooth.
• Test and verify software in the new environment.
• Test and debug overall system complete with software and hardware part.
• Enhance the system reliability and stability.
24
Computer
Figure 3.0 shows the proposed system for the project. The pulse rate will be
detected by using PPG method. The sensor unit (clothes peg) is clamped on the patient’s
finger. The data from this module will be sent to the Analog Digital Converter and
UART. Data from this module will then be sent to the Bluetooth Module.
From the Bluetooth module, the data will be sent to the USB dongle which is
interfaced to the computer. Communication link between Bluetooth module and USB
dongle will be establisbed by using Bluesoliel program. Finally, Bioexplorer program
will view the signal from the devices connection. Figure 3.1 shows the proposed setup
and operation for the wireless module.
25
CHAPTER 4
SOFTWARE DEVELOPMENT
The Bluetooth module (KC-21) is capable of sending data to the computer. This
chapter explains the software design as well as the implementation of the Bluetooth
setting based on the methodology and scope mentioned earlier. It gives a more detailed
explanation of what is done with software development. The programming tools used are
microC, IC Prog and Bioexplorer.
4.1 MicroC
PIC and C fit together well: PIC is the most popular 8-bit chip in the world, used
in a wide variety of applications, and C, prized for its efficiency, is the natural choice for
developing embedded systems. MikroC provides a successful match featuring highly
advanced IDE, ANSI compliant compiler, broad set of hardware libraries, comprehensive
27
documentation, and plenty of ready-to-run examples. Figure 4.1 shows the microC
Integrated Drive Electronics (IDE).
The first step is to install the software, featuring on how to setup microC and boot
loader for the purpose of programming and burning the program into the microcontroller.
C language is used as the programming language for the microcontroller.
Figure 4.2 shows the PIC bootloader device. This is Universal Serial Bus
(USB) type which can directly be attached to the computer. The other type is
serial communication type. Figure 4.3 shows the process of burning program
onto the PIC microcontroller using GUI.
The default baud rate for SKKCA-21 is 115200. The following code illustrates
how to configure the baud rate of SKKCA-21.
30
Before the USB dongle can be used, a communication link has to be established
between the Bluetooth Module and Bluetooth Dongle using IVT BlueSoleil. Following
are the steps of installing and establishing a link between the two;
• Install the software IVT BlueSoleil using CD included with the USB dongle
• Once the software has been successfully installed, plug in the USB dongle
and run the software
• Switch on the power for the circuit with the SKKCA-21
• On the screen, you should be able to see a window as in figure 4.5. Click the
orange ball in the center of the window or press F5
• Once the Bluetooth module is detected, it will appear in the window. Figure
4.6 shows the program searching for devices and Figure 4.7 shows the
discovery finished.
• Next, double click on the symbol of the Bluetooth module. The software
will automatically select the method to connect with the Bluetooth device.
32
• Right click on the symbol to select Connect->Bluetooth serial port service. Figure
4.8 shows the setup for Bluetooth port.
33
• A window will appear with the designated serial port. Click yes to proceed.
Figure 4.9 shows the Bluetooth connection that has been established.
Of course, there must be some configurations for microcontroller too. The most
important configuration is UART. UART depends on timing or the baud rate, therefore
the most important task is to configure the baud rate of microcontroller.
34
There are 2 modes in Bluetooth configuration. First mode is Command mode, this
mode indicate that all data send from host is a command for Bluetooth transceiver, and
data send from Bluetooth transceiver to host is event reporting status of Bluetooth
transceiver. Second mode is Bypass mode, this mode can only appear when connection
between 2 Bluetooth transceivers is established. In Bypass mode, every single byte of
data from host will be sent over Bluetooth wireless link to the other Bluetooth node.
36
CHAPTER 5
HARDWARE DEVELOPMENT
Plethysmograph comes from the Greek "plethysmos" for increase and is a term
for a "fullness" (ie change in volume) measuring device. Over the years, all sorts of
Heath-Robinson devices have been used but described here is a photoelectric pulse
plethysmograph, which is robust and easy to make and which will allow the beating of
the heart to be recorded without the need to make direct electrical connections to the
body [7].
37
5.2.1 Sensor
The sensor consists of a light source and photodetector; light is shone through the
tissues and variation in blood volume alters the amount of light falling on the detector.
The source and detector can be mounted side by side to look at changes in reflected light
or on either side of a finger or earlobe to detect changes in transmitted light. The
particular arrangement here uses a wooden clothes peg to hold an infra red light emitting
diode and a matched phototransistor. The infra red filter of the phototransistor reduces
interference from fluorescent lights, which have a large AC component in their output.
The peg is drilled with 3mm holes to take the led, the phototransistor, the pair of
wires linking the two and the 2-core screened output cable, as shown in figure 5.0. The
holes for the led and phototransistor are drilled in one go so that they line up. The ends of
each side of the peg are filled on the inside to enlarge the gap and pieces of black closed-
cell foam (cannibalized from a mouse mat and punched with 3mm holes) are stuck in
place (Super Glue / Crazy Glue) to improve grip and make a (more or less) light-tight
seal against the skin. At this point, the spring should be adjusted so that the peg will grip
an ear lobe while at the same time not being so tight that it excludes blood from a finger.
Pieces of strip-board glued to the peg are used to make connections to the wires; two
copper strips wide for the led (anode and cathode connections) and three for the
38
phototransistor side (collector, emitter and led cathode, and led anode - led wires coming
through the peg from the other side). The light-emitting diode (Siemens SFH487) and the
phototransistor (Siemens SFH309FA) are wedged in their holes and soldered to their
respective pieces of strip board. Neither component is critical nor will many other types
work. The wires are then soldered in place; the screen of the connecting lead is soldered
to the emitter and cathode copper pad. Once everything has been checked and proved to
work, the connections and the backs of the components should be covered with a bead of
an opaque silicone rubber caulk which will insulate and keep out extraneous light. All
bare wires should be covered, figure 5.1 shows the schematic on constructing the sensor.
5.2.2 Amplier
The amplifier (see figure 5.2) uses an LM358 dual op amp to provide two
identical broadly-tuned band pass stages with gains of 100. Again, the type of op amp is
not particularly critical, as long as it will work at 6V and drive the output rail to rail. The
signal frequencies are boxed in by movement artefacts at the low end (generated by the
peg moving and distorting the underlying tissues; light pegs are better) and at the top end
39
by mains-hum interference. The circuit runs from a single 6 Volt battery and the output
zero is offset by about 1 Volt by referring everything to an internal common line at a
voltage set by a pair of forward-biased silicon diodes. This is convenient for interfaces
with a 0-5Volt input. The potentiometer allows the overall gain to be adjusted so as to
prevent clipping on large signals. Components are not critical but the two 2.2 µF
capacitors must be able to stand some reverse bias so they should be non-polarized or
tantalum. The circuit can easily be made up on a small piece of strip board.
Any microcontroller with these capabilities is able to become host for Bluetooth
transceiver. There are many types of microcontroller come with these capabilities; one of
them is PIC16F and PIC18F series of microcontroller. Motorola, Atmel, Philip and many
other brand of microcontroller also come with these capabilities. No restriction of
microcontroller types and brands. However, PIC seems to be the cheapest and easiest to
develop type of microcontroller in the market. The main concept to interface Bluetooth
module with microcontroller is UART connection. The Rx pin of microcontroller must be
connected to Tx pin of Bluetooth module, while the Tx pin of microcontroller to Rx pin
of Bluetooth module. Voltage will be another important element in this interface. Most
microcontrollers operate at 5V while Bluetooth module operates at 3.3V. The board
should have voltage regulator for both device. Furthermore, voltage from microcontroller
must not overload Bluetooth module. To ensure this, a voltage divider is required for
UART connection. Tx of microcontroller will supply 5V logic to Rx of Bluetooth
module. Direct connection might spoil Bluetooth module slowly. It is good to have
voltage divider for this connection. Figure 5.3 shows the connection if microcontroller is
used as host for Bluetooth module.
5.4 Bluetooth
CHAPTER 6
This chapter discusses the result obtain from the system. The result will be
discussed in three parts which are hardware, software and hardware and software
interface. Hardware consists of sensor module and microcontroller. The software part
consists of Bluetooth connection. An overall discussion for this project will be made at
the end of this chapter.
6.1 Hardware
The wireless module used in this project is Bluetooth. The Bluetooth tool used in
this project is Bluetooth adapter. The problem will be more on how to communicate the
USB Bluetooth device with the microcontroller through Universal Serial Port (USB). For
this project the USB-Bluetooth dongle that communicates with the board under
Windows-XP is used.
The amplifier uses an LM358 dual op amp to provide two identical broadly-tuned
band pass stages with gains of 100. The circuit runs from a single 6 Volt battery and the
output zero is offset by about 1 Volt by referring everything to an internal common line at
44
a voltage set by a pair of forward-biased silicon diodes. The potentiometer allows the
overall gain to be adjusted so as to prevent clipping on large signals.
The main purpose of this module is to detect the pulse rate. Figure 6.0 shows the
sensor module in this project.
This module consists of 5 volt power supply, Analog Digital Converter and
UART. Figure 6.2 shows the microcontroller module and figure 6.1 shows the 5 volt
power supply used for microcontroller.
45
This module consists of KC-21 wirefree bluetooh device. This module functions
as data transmitter to the computer. Figure 6.3 shows the Bluetooth module and figure 6.4
shows the overall hardware.
46
Sensor Circuit
Microcontroller
Circuit
5 Volt Power
Supply Bluetooth
Module KC-21
9 Volt Power
Supply
In order to check if the circuit is working the overall circuit is divided into two
parts and checked them individually, and followed by a complete test of the circuit.
47
Test has been done with respect to circuit of figure 5.2 and 6.5 at designated pins
using Signal Generator and oscilloscope.
Similar test for gain is done to the input (pins 5 and 6) and output (pin 7) with
following result:
6.3 Discussion
There are many problems encountered while developing this system. This project
requires some setup involving the Windows XP operating system. These are the few
issues arose from initial stage and some early forecast of issues that also arise during the
second stage of the project. The problem are:
CHAPTER 7
This chapter discusses the suggestion of future work for the project and
conclusion will be made according to the project development. This thesis has discussed
the development of the sensor module and interfacing with Bluetooth transmitter and
receiver.
7.1 Conclusion
As a conclusion, all the objectives which have been stated in the previous chapter
have partly been met. In this project, basic component are used to build the system’s
prototype. The component and their function are:
The Bluetooth concept offers several benefits compared with other techniques.
The main advantages of Bluetooth are minimal hardware dimensions, the low price on
Bluetooth components and the low power consumption for Bluetooth connections.
Lastly, taking into account issues related to the completion of the project, it is
hereby suggested that the project be continued and futher developed in the area of
software and hardware enhancement.
7.2 Suggestions
In order to improve the project function and implementation in the future, several
suggestions are proposed:
• Use of mobile phone to replace personal computer. There are many types of
mobile phone with Bluetooth features. Research should be done to find new
method in order make this system functions using mobile phone. If the mobile
phone replaces the computer, the system will be more convenient and
practical.
• Use of different types of techniques to detect the heart rate. There are number
of methods and technique to detect the heart rate, for example ECG and
optical sensor. This kind of method is more accurate than PPG method. But
51
the main problem is that, this method is more difficult to design and
implement.
• Using different types of wireless module. For this project the maximum
distance between computer and hardware is 20 meter. Therefore, other types
of wireless media can be used in order to extend the practical range.
52
REFERENCES
11. Lee, B.Y., Trainor, F.S., Thoden, W.R., Kavner, D. (1981). Handbook of
Noninvasive Diagnostic Techniques in Vascular Surgery, New York:
Appleton-Century-Crofts.
12. X. F. Teng and Y. T. Zhang, "Continuous and Noninvasive Estimation of
Arterial Blood Pressure Using a Photoplethysmographic Approach," presented
at A New Beginning for Human Health: Proceedings of the 25th Annual
International Conference of the IEEE Engineering in Medicine and Biology
Society, Sep 17-21 2003, Cancun, Mexico, 2003.
13. Srdjan Krco, “Bluetooth Based Wireless Sensor Network:Implemenfation
Issues and Solutions”, Invited paper, Proc. Of the Telfor 02 conference,
Belgrade November 2002.
14. Foerster, J., et al., Ultra-Wideband technology for short- or medium-range
wireless communications. Intel Technology Journal. 2001; (2):, 2001.
15. Hirt, W. and D. Porcino. Pervasive Ultra-wideband Low Spectral Energy
Radio Systems (PULSERS). In WWRF7. 2002. Eindhoven,
16. Shelley, K. H., R. G. Stout, et al. (1999). "The use of joint time frequency
analysis of the pulse oximeter waveform to measure the respiratory rate of
ventilated patients." Anesthesiology 91(3A): A583.
17. Peter Spasov (2005). Microcontroller Technology. Fifth edition. Sir Sandford
Fleming College: Prentice Hall.
18. Sensor Module literature at http://www.electronics.dit.ie.com
19. Bluetooth Technology literature at http://www.bluetooth.com
20. Signal Processing literature at http://www.picotech.com
21. Microcontroller data sheet at http://www.microchip.com
54
APPENDIX
55
APPENDIX A
KC-21 Wirefree Bluetooth Module
56
57
58
59
60
APPENDIX B
void main() {
USART_Init(115200); // Initalize USART (115200 baud rate, 1 stop bit, ...
do {
// Read ADC results and send the upper byte via USART
61