a medical wearable device with wireless bluetooth-based data.doc

76
MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003 A Medical Wearable Device with Wireless Bluetooth-based Data Transmission 1A. Tura, 2M. Badanai, 2D. Longo, 2L. Quareni 1Institute of Biomedical Engineering, National Research Council, Padova, Italy, 2QUBIsoft S.r.l., Padova, Italy Email: [email protected] INTRODUCTION The project deals with the design and development of hardware and software for temperature and heartbeat measurement of a patient over LCD The data which are recorded continuously in this project are Heartbeat of the patient. The digital value read is sent to the microcontroller. The microcontroller temporarily stores this value. The heartbeat pulses can be seen by the doctor at regular intervals in LCD to know the patient condition. 1.1. OBJECTIVE The project intends to interface the microcontroller with the LCD and Heart beat monitoring system and send the information like heartbeat pulses of the patient to the doctor’s work station on LCD. The project uses the LCD, Heartbeat

Upload: aakash-sheelvant

Post on 29-Nov-2015

19 views

Category:

Documents


3 download

DESCRIPTION

kjkl

TRANSCRIPT

Page 1: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

A Medical Wearable Device with Wireless Bluetooth-based DataTransmission

1A. Tura, 2M. Badanai, 2D. Longo, 2L. Quareni1Institute of Biomedical Engineering, National Research Council, Padova, Italy,

2QUBIsoft S.r.l., Padova, ItalyEmail: [email protected]

INTRODUCTION

The project deals with the design and development of hardware and software for

temperature and heartbeat measurement of a patient over LCD The data which are recorded

continuously in this project are Heartbeat of the patient. The digital value read is sent to the

microcontroller. The microcontroller temporarily stores this value. The heartbeat pulses can be

seen by the doctor at regular intervals in LCD to know the patient condition.

1.1. OBJECTIVE

The project intends to interface the microcontroller with the LCD and Heart beat

monitoring system and send the information like heartbeat pulses of the patient to the doctor’s

work station on LCD. The project uses the LCD, Heartbeat sensor and Embedded Systems to

design this application. The main objective of this project is to design a system that continuously

monitors the heartbeat of the patient and if they are likely to exceed the normal values, the

system immediately sends a message to the doctor’s LCD.

This project is a device that collects data from the sensors, codes the data into a format that

can be understood by the controlling section. This system also collects information from the

master device and implements commands that are directed by the master.

Page 2: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

1.2 BACK GROUND OF THE PROJECT

The software application and the hardware implementation help the

microcontroller read the output of the sensors and send these values to the doctor’s mobile

whenever he sends a request to the controlling unit. The measure of efficiency is based on how

fast the microcontroller can read the sensor output values and send a message to the doctor’s

mobile whenever these parameters exceed the normal values. The system is totally designed

using LCD and embedded systems technology.

The Controlling unit has an application program to allow the

microcontroller read the sensor output values and send them to the user mobile whenever he

sends a request to the controlling unit. The performance of the design is maintained by

controlling unit.

Page 3: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

PROJECT DESCRIPTION

2.1 BLOCK DIAGRAM

The block diagram of the design is as shown in Fig 3.1. It consists of power supply unit,

microcontroller, GSM modem, Serial communication unit, sensor module. The brief description

of each unit is explained as follows.

Fig: Block diagram for Heartbeat Monitoring System

Page 4: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

Page 5: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

2.2 CIRCUIT DIAGRAM

Page 6: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

2.3 WORKING PROCEDURE

The working of the project goes like this: The temperature and heartbeat of the patient

will be monitored continuously and the status of the patient will be monitored and sent to the

doctor wherever he may be.

Thus, the two values, the temperature and the heartbeat pulse will be sent to the doctor

who knows the entire health conditions of the patient. Thus, to send this data, we are using the

wireless technology, Bluetooth. When the monitoring system sends a message to the doctor’s,

even this system should have a device which can send or receive the messages from/to the

doctor. The device we are using is the Bluetooth modem. The Bluetooth modem will be

interfaced with the microcontroller through serial interface.

The data which are monitored continuously in this project are Temperature and Heartbeat

of the patient. The analog quantities are taken and converted into corresponding digital values

using a single channel ADC. This converted digital value is sent to the microcontroller. The

microcontroller temporarily stores this value.

The doctor can read the temperature and heartbeat value whenever he wishes to. The

doctor can take care of the patient’s condition wherever he may be. The doctor has to send

predefined messages to the modem to retrieve the data. The modem receives the predefined

messages and intimates the same to the microcontroller. Now, it is the job of the microcontroller

to read the value, process it and send the requested value to the doctor’s mobile. The user can

read the updated data whenever he reads the predefined messages to the modem. These values

can also be displayed on the LCD.

Page 7: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

MICROCONTROLLER

3.1. A brief history of the 8051 family:

In 1981, Intel Corporation introduced an 8-bit microcontroller called the 8051. This

microcontroller had 128 bytes of RAM,4K bytes of on- chip ROM, two timers, one serial port,

and four ports(each 8-bit wide) all on a single chip. At the time it is also referred to as a “system

on chip.” This is an 8-bit processor, meaning that the CPU can work on only 8 bits of data at a

time. Data larger than 8 bits has to be broken into 8 bit pieces to be processed by the CPU. The

8051 has a total of four I/O ports, each 8-bit wide.

The 8051 became widely popular after Intel allowed other manufactures to make and

market any flavors of the 8051 they please with the condition that they remain code-compatible

with the 8051. This led to many versions of the 8051 with different speeds and amounts of on-

chip ROM marketed by more than half a dozen manufacturers. It is important to note that

although there are different flavors of the 8051 in terms of speed and amount of on-chip ROM,

they are all compatible with the original 8051 as far as the instructions are concerned. This

means that if you write your program for one, it will run on any of them regardless of the

manufacturer.

“The 8051 is the original member of the 8051 family. Intel refers to it as MCS-51.”

The Microcontroller AT89c51 is from Atmel Corporation. It has a wide collection of 8051

chips, as shown below. The AT89C51 is a popular and inexpensive chip used in many small

projects. It has 4K bytes of flash ROM. Notice that AT89C51-12PC, where “C” before the 51

stands for CMOS, which has low power consumption, “12” indicates 12MHz, “P” is for plastic

DIP package, and another “C” is for commercial.

Page 8: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

3.2 FEATURES

Compatible with MCS-51 Products

8K Bytes of In-System Reprogrammable Flash Memory

Fully Static Operation: 0 Hz to 33 MHz

Three-level Program Memory Lock

256 x 8-bit Internal RAM

32 Programmable I/O Lines

Three 16-bit Timer/Counters

Eight Interrupt Sources

Programmable Serial Channel

Low-power Idle and Power-down Modes

4.0V to 5.5V Operating Range

Full Duplex UART Serial Channel

Interrupt Recovery from Power-down Mode

Watchdog Timer

Dual Data Pointer

Power-off Flag

Fast Programming Time

Flexible ISP Programming (Byte and Page Mode

Page 9: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

3.3 PIN DIAGRAM:

FIG PIN DIAGRAM OF 89S52 IC

3.4 PIN DESCRIPTION

VCCSupply voltage.

GNDGround.

Port 0 Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can

sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high

impedance inputs. Port 0 can also be configured to be the multiplexed low order address/data bus

during accesses to external program and data memory. In this mode, P0 has internal pull-ups.

Port 0 also receives the code bytes during Flash programming and outputs the code bytes during

program verification. External pull-ups are required during program verification.

Page 10: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

Port 1 Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1 output

buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high

by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being

pulled low will source current (IIL) because of the internal pull-ups. In addition, P1.0 and P1.1

can be configured to be the timer/counter 2 external count input (P1.0/T2) and the timer/counter

2 trigger input (P1.1/T2EX), respectively, as shown in the following table. Port 1 also receives

the low-order address bytes during Flash programming and verification.

Port 2

Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2 output

buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high

by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being

pulled low will source current (IIL) because of the internal pull-ups. Port 2 emits the high-order

address byte during fetches from external program memory and during accesses to external data

memory that uses 16-bit addresses (MOVX @ DPTR). In this application, Port 2 uses strong

internal pull-ups when emitting 1s. During accesses to external data memory that uses 8-bit

addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register. Port 2

also receives the high-order address bits and some control signals during Flash programming and

verification.

Page 11: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

Port 3

Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 output

buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled high

by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being

pulled low will source current (IIL) because of the pull-ups. Port 3 also serves the functions of

various special features of the AT89S52, as shown in the following table. Port 3 also receives

some control signals for Flash programming and verification.

RST Reset input. A high on this pin for two machine cycles while the oscillator is

running resets the device. This pin drives High for 96 oscillator periods after the Watchdog times

out. The DISRTO bit in SFR AUXR (address 8EH) can be used to disable this feature. In the

default state of bit DISRTO, the RESET HIGH out feature is enabled. ALE/PROG Address

Latch Enable (ALE) is an output pulse for latching the low byte of the address during accesses to

external memory. This pin is also the program pulse input (PROG) during Flash programming.

In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency and may be

used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped

during each access to external data memory. If desired, ALE operation can be disabled by setting

bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC

instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if

the microcontroller is in external execution mode.

Page 12: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

PSEN

Program Store Enable (PSEN) is the read strobe to external program memory.

When the AT89S52 is executing code from external program memory, PSEN is activated twice

each machine cycle, except that two PSEN activations are skipped during each access to external

data memory.

EA/VPP

External Access Enable. EA must be strapped to GND in order to enable the device

to fetch code from external program memory locations starting at 0000H up to FFFFH. Note,

however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be

strapped to VCC for internal program executions. This pin also receives the 12-volt

programming enable voltage

(VPP) during Flash programming.

XTAL1

Input to the inverting oscillator amplifier and input to theInternal clock operating circuit.

XTAL2

Output from the inverting oscillator amplifier.

Page 13: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

POWER SUPPLY

All digital circuits require regulated power supply. In this article we are going to learn how to get

a regulated positive supply from the mains supply.

 

Figure shows the basic block diagram of a fixed regulated power supply. Let us go through each

block.

4.1 TRANSFORMER

A transformer consists of two coils also called as “WINDINGS” namely PRIMARY &

SECONDARY. They are linked together through inductively coupled electrical conductors also

called as CORE. A changing current in the primary causes a change in the Magnetic Field in the

core & this in turn induces an alternating voltage in the secondary coil. If load is applied to the

secondary then an alternating current will flow through the load. If we consider an ideal

condition then all the energy from the primary circuit will be transferred to the secondary circuit

through the magnetic field.

Page 14: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

So  

 The secondary voltage of the transformer depends on the number of turns in the Primary as well as in the

secondary.

4.2 RECTIFIER

A rectifier is a device that converts an AC signal into DC signal. For rectification purpose we use

a diode, a diode is a device that allows current to pass only in one direction i.e. when the anode

of the diode is positive with respect to the cathode also called as forward biased condition &

blocks current in the reversed biased condition.

Rectifier can be classified as follows:

1)      Half Wave rectifier.

This is the simplest type of rectifier as you can see in the diagram a half wave rectifier consists

of only one diode. When an AC signal is applied to it during the positive half cycle the diode is

forward biased & current flows through it. But during the negative half cycle diode is reverse

biased & no current flows through it. Since only one half of the input reaches the output, it is

very inefficient to be used in power supplies.

Page 15: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

  2)      Full wave rectifier.

Half wave rectifier is quite simple but it is very inefficient, for greater efficiency we would like

to use both the half cycles of the AC signal. This can be achieved by using a center tapped

transformer i.e. we would have to double the size of secondary winding & provide connection to

the center. So during the positive half cycle diode D1 conducts & D2 is in reverse biased

condition. During the negative half cycle diode D2 conducts & D1 is reverse biased. Thus we get

both the half cycles across the load.

One of the disadvantages of Full Wave Rectifier design is the necessity of using a center tapped

transformer, thus increasing the size & cost of the circuit. This can be avoided by using the Full

Wave Bridge Rectifier.

3)      Bridge Rectifier.

Page 16: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

As the name suggests it converts the full wave i.e. both the positive & the negative half cycle

into DC thus it is much more efficient than Half Wave Rectifier & that too without using a center

tapped transformer thus much more cost effective than Full Wave Rectifier. Full Bridge Wave

Rectifier consists of four diodes namely D1, D2, D3 and D4. During the positive half cycle

diodes D1 & D4 conduct whereas in the negative half cycle diodes D2 & D3 conduct thus the

diodes keep switching the transformer connections so we get positive half cycles in the output.

If we use a center tapped transformer for a bridge rectifier we can get both positive & negative

half cycles which can thus be used for generating fixed positive & fixed negative voltages.

4.3 VOLTAGE REGULATOR 

A Voltage regulator is a device which converts varying input voltage into a constant regulated

output voltage. Voltage regulator can be of two types

1)      Linear Voltage Regulator

      Also called as Resistive Voltage regulator because they dissipate the excessive voltage

resistively as heat.

2)      Switching Regulators.

      They regulate the output voltage by switching the Current ON/OFF very rapidly. Since their

output is either ON or OFF it dissipates very low power thus achieving higher efficiency as

compared to linear voltage regulators. But they are more complex & generate high noise due to

Page 17: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

their switching action. For low level of output power switching regulators tend to be costly but

for higher output wattage they are much cheaper than linear regulators.

The most commonly available Linear Positive Voltage Regulators are the 78XX series where the

XX indicates the output voltage. And 79XX series is for Negative Voltage Regulators.

 After filtering the rectifier output the signal is given to a voltage regulator. The maximum input

voltage that can be applied at the input is 35V.Normally there is a 2-3 Volts drop across the

regulator so the input voltage should be at least 2-3 Volts higher than the output voltage. If the

input voltage gets below the Vmin of the regulator due to the ripple voltage or due to any other

reason the voltage regulator will not be able to produce the correct regulated voltage.

3 Circuit diagram:

Fig 2.3. Circuit Diagram of power supply

Page 18: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

IC 7805:

7805 is an integrated three-terminal positive fixed linear voltage regulator. It supports an input

voltage of 10 volts to 35 volts and output voltage of 5 volts. It has a current rating of 1 amp

although lower current models are available. Its output voltage is fixed at 5.0V. The 7805 also

has a built-in current limiter as a safety feature. 7805 is manufactured by many companies,

including National Semiconductors and Fairchild Semiconductors.

The 7805 will automatically reduce output current if it gets too hot.The last two digits represent

the voltage; for instance, the 7812 is a 12-volt regulator. The 78xx series of regulators is

designed to work in complement with the 79xx series of negative voltage regulators in systems

that provide both positive and negative regulated voltages, since the 78xx series can't regulate

negative voltages in such a system.

The 7805 & 78 is one of the most common and well-known of the 78xx series regulators, as it's

small component count and medium-power regulated 5V make it useful for powering TTL

devices.

Table. Specifications of IC7805

SPECIFICATIONS IC 7805

Vout 5V

Vein - Vout Difference 5V - 20V

Operation Ambient Temp 0 - 125°C

Output Imax 1A

Page 19: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

SENSORS

The sensors used in this project are Heartbeat and Temperature sensor. The

output of temperature sensor is given to the ADC so as to convert the analog value into digital

data and then give it to the microcontroller. The Heartbeat sensor used is basically a LED and

LDR arrangement.

5.1 HERT BEAT SENSOR

LED and LDR arrangement

The Heartbeat sensor used in this project is basically a LED and LDR arrangement.

The LED used in this arrangement is a high intensity LED.

Heart beat is sensed by using a high intensity type LED and LDR. The finger is

placed between the LED and LDR. As sensor, a photo diode or a photo transistor can be used.

The skin may be illuminated with visible (red) using transmitted or reflected light for detection.

The very small changes in reflectivity or in transmittance caused by the varying blood content of

human tissue are almost invisible. Various noise sources may produce disturbance signals with

Page 20: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

amplitudes equal or even higher than the amplitude of the pulse signal. Valid pulse measurement

therefore requires extensive preprocessing of the raw signal.

The setup described here uses a red LED for transmitted light illumination and

a LDR as detector. With only slight changes in the preamplifier circuit the same hardware and

software could be used with other illumination and detection concepts. These values are sent to

the ADC for conversion of analog to digital and then sent to the microcontroller.

Page 21: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

Pulse Oximeter:

What is pulse oximeter?

An oximeter provides accurate blood oxygen saturation and pulse rate reading. This

information helps our condition during exercise, activities of daily living, or air travel.

How does a pulse oximeter work?

Oxygen in the air is breathed into the lungs. The oxygen then passes into the blood where the

majority of the oxygen attaches to hemoglobin (a protein located inside the red blood cell) for transport in

the bloodstream. The oxygenated blood circulates to the tissues.

 

Pulse oximeter technology utilizes the light absorptive characteristics of hemoglobin and the pulsating

nature of blood flow in the arteries to aid in determining the oxygenation status in the body. First, there is

a color difference between arterial hemoglobin saturated with oxygen, which is bright red, and venous

hemoglobin without oxygen, which is darker.

 

Second, with each pulse or heartbeat there is a slight increase in the volume of blood flowing through the

arteries. Because of the increase of blood volume, albeit small, there is an associated increase in oxygen-

rich hemoglobin. This represents the maximum amount of oxygen-rich hemoglobin pulsating through the

blood vessels.

 

A clip-like device called a probe is placed on a body part, such as a finger or ear lobe, to measure the

blood that is still carrying or is saturated with oxygen. The probe houses a light source, a light detector,

and a microprocessor, which compares and calculates the differences in the oxygen-rich versus oxygen-

poor hemoglobin. One side of the probe has a light source with two different types of light, infrared and

red, which are transmitted through the finger to the light detector side of the probe. SPO Medical pulse

oximeter use reflectance technology to measure oxygen saturation.  The oxygen-rich hemoglobin absorbs

more of the infrared light and the hemoglobin without oxygen absorbs more of the red light. The

microprocessor calculates the differences and converts the information to a digital readout. This

information helps the physician assess the amount of oxygen being carried in the blood and evaluate the

need for supplemental oxygen.

Page 22: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

Respiratory Sensor:

Respiratory activity can be detected by measuring changes in the impedance across the thorax.

Several types of transducers have been developed for the measurement of respiration rate. A Strain

Gauge type Chest Transducer is a suitable transducer to measure the respiratory activity. The respiratory

movement results in the changes of the strain gauge element of the transducer hence the respiration

rate can be measured.

A respiration belt that is basically a piezo electric sensor embedded into an elasticized belt that you put

around your chest. As we breathe, the belt stretches and this produces a small voltage from the piezo

electric (of the order of a few tens of mill volts). A circuit that will amplify the signal to somewhere in

the region of 0 - 5V that can be connected microcontroller to read the signal programmatically.

Fig-1

Page 23: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

Accelerometer

The MMA7260QT low cost capacitive accelerometer features signal conditioning, a 1-

pole low pass filter, temperature compensation and g-Select which allows for the selection

among 4 sensitivities. Zero-g offset full scale span and filter cut-off are factory set and require no

external devices. Includes a Sleep Mode that makes it ideal for handheld battery powered

electronics.

Features

• Selectable Sensitivity (1.5g/2g/4g/6g)

• Low Current Consumption: 500 μA

• Sleep Mode: 3 μA

• Low Voltage Operation: 2.2 V – 3.6 V

• 6mm x 6mm x 1.45mm QFN

• High Sensitivity (800 mV/g @ 1.5g)

• Fast Turn On Time

• Integral Signal Conditioning with Low Pass Filter

• Robust Design, High Shocks Survivability

• Pb-Free Terminations

• Environmentally Preferred Package

• Low Cost

Page 24: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

Typical Applications

• HDD MP3 Player: Freefall Detection

• Laptop PC: Freefall Detection, Anti-Theft

• Cell Phone: Image Stability, Text Scroll, Motion Dialing, E-Compass

• Pedometer: Motion Sensing

• PDA: Text Scroll

• Navigation and Dead Reckoning: E-Compass Tilt Compensation

• Gaming: Tilt and Motion Sensing, Event Recorder

• Robotics: Motion Sensing

BLOCK DIAGRAM:

Page 25: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

The Free scale accelerometer is a surface-micro machined integrated-circuit

accelerometer. The device consists of two surface micro machined capacitive sensing cells (g-

cell) and a signal conditioning ASIC contained in a single integrated circuit package. The

sensing elements are sealed hermetically at the wafer level using a bulk micro machined cap

wafer. The g-cell is a mechanical structure formed from semiconductor materials (poly silicon)

using semiconductor processes (masking and etching). It can be modeled as a set of beams

attached to a movable central mass that move between fixed beams. The movable beams can be

deflected from their rest position by subjecting the system to acceleration.

As the beams attached to the central mass move, the distance from them to the fixed

beams on one side will increase by the same amount that the distance to the fixed beams on the

other side decreases. The change in distance is a measure of acceleration. The g-cell beams form

two back-to-back capacitors. As the center beam moves with acceleration, the distance between

the beams changes and each capacitor's value will change, (C = Aε/D). Where A is the area of

the beam, ε is the dielectric constant, and D is the distance between the beams.

The ASIC uses switched capacitor techniques to measure the g-cell capacitors and extract

the acceleration data from the difference between the two capacitors. The ASIC also signal

conditions and filters (switched capacitor) the signal, providing a high level output voltage that is

Ratio-metric and proportional to acceleration.

Page 26: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

g-Select

The g-Select feature allows for the selection among 4 sensitivities present in the device.

Depending on the logic input placed on pins 1 and 2, the device internal gain will be changed

allowing it to function with a 1.5g, 2g, 4g, or 6g sensitivity. This feature is ideal when a product

has applications requiring different sensitivities for optimum performance. The sensitivity can be

changed at anytime during the operation of the product. The g-Select1 and g-Select2 pins can be

left unconnected for applications requiring only a 1.5g sensitivity as the device has an internal

pull-down to keep it at that sensitivity (800mV/g).

Sleep Mode

The 3 axis accelerometer provides a Sleep Mode that is ideal for battery operated

products. When Sleep Mode is active, the device outputs are turned off, providing significant

reduction of operating current. A low input signal on pin 12 (Sleep Mode) will place the device

in this mode and reduce the current to 3 μA typ. For lower power consumption, it is

recommended to set g-Select1 and g-Select2 to 1.5g mode. By placing a high input signal on pin

12, the device will resume to normal mode of operation.

Filtering

The 3 axis accelerometer contains onboard single-pole switched capacitor filters. Because

the filter is realized using switched capacitor techniques, there is no requirement for external

passive components (resistors and capacitors) to set the cut-off frequency.

Page 27: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

ANALOG TO DIGITAL CONVERTER

Analog-to-digital converters are among the most widely used devices for data

acquisition. Digital systems use binary values, but in the physical world everything is continuous

i.e., analog values. Temperature, pressure (wind or liquid), humidity and velocity are the

physical analog quantities. These physical quantities are to be converted into digital values for

further processing. One such device to convert these physical quantities into electrical signals is

sensor. Sensors for temperature, pressure, humidity, light and many other natural quantities

produce an output that is voltage or current.

Thus, an analog-to-digital converter is needed to convert these electrical

signals into digital values so that the microcontroller can read and process them. An ADC has an

n-bit resolution where n can be 8,10,12,16 or even 24 bits. The higher resolution ADC provides a

smaller step size, where step size is the smallest change that can be detected by an ADC. In

addition to resolution, conversion time is another major factor in judging an ADC. Conversion

time is defined as the time it takes the ADC to convert the analog input to a digital number.

6.1 PIN DIAGRAM

ADC0804:

The ADC chip that is used in this project is ADC0804. The ADC0804 IC is an

8-bit parallel ADC in the family of the ADC0800 series from National Semiconductor. It works

with +5 volts and has a resolution of 8 bits. In the ADC0804, the conversion time varies

depending on the clocking signals applied to the CLK IN pin, but it cannot be faster than 110µs.

Page 28: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

6.2 PIN DESCRIPTION

CS (Chip select)

Chip select is an active low input used to activate the ADC0804 chip. To access the ADC0804,

this pin must be low.

RD (read)

This is an input signal and is active low. ADC converts the analog input to its binary equivalent

and holds it in an internal register. RD is used to get the data out of ADC0804 chip. When CS=0,

if a high-to-low pulse is applied to the RD pin, the 8-bit digital output shows up at the D0-D7

data pins.

WR (write)

This is an active low input used to inform the ADC0804 to start the conversion process.

If CS=0 when WR makes a low-to-high transition, the ADC0804 starts converting the analog

input value Vin to an 8-bit digital value. The amount of time it takes to convert varies depending

on the CLK IN and CLK R values.

CLK IN and CLK R

CLK IN is an input pin connected to an external clock source when an external clock is

used for timing. However, the 804 has an internal clock generator. To use the internal clock

generator of the ADC0804, the CLK IN and CLK R are connected to a capacitor and a resistor.

In that case, the clock frequency is determined by the equation:

f = 1/ (1.1RC)

Typical values are R=10K ohms and C= 150 pf. Substituting in the above equation, the

frequency is calculated as 606 kHz. Thus, the conversion time is 110µs.

Page 29: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

INTR

This is an output pin and is active low. It is a normally high pin and when the conversion is

finished, it goes low to signal the CPU that the converted data is ready to be picked up. After

INTR goes low, the CS pin is made low i.e., CS=0 and send a high-to-low pulse to the RD pin to

get the data out of the ADC0804 chip.

Vin(+) and Vin(-)

These are the differential analog inputs where Vin=Vin(+) – Vin(-). The Vin(-) pin is connected

to ground and the Vin(+) pin is used as the analog input to be converted to digital.

Vcc

This is the +5 volt power supply. It is also used as a reference voltage when the Vref/2 input (pin

9) is open.

Vref/2

Pin 9 is an input voltage used for the reference voltage. If this pin is open, the analog input

voltage for the ADC0804 is in the range of 0 to 5 volts.Vref/2 is used to implement analog input

voltages other than 0.5V. i.e., if the analog input range needs to be 0 to 4 volts, Vref/2 is

connected to 2 volts.

D0-D7

D0-D7 (D7 is the MSB) are the digital data output pins since ADC0804 is a

parallel ADC chip. To calculate the output voltage, the below equation is used:

Dout = Vin/ (step size)

where Dout = digital data output pins (in decimal) and Vin = analog input value

Page 30: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

Analog ground and Digital ground

These are the input pins providing the ground for both the analog signal and the

digital signal. Analog ground is connected to the ground of the analog Vin while digital ground

is connected to the ground of the Vcc pin.

Clock source for ADC0804:

The speed at which an analog input is converted to the digital output depends on the

speed of the CLK input. According to the ADC0804 datasheets, the typical operating frequency

is approximately 640 kHz at 5 volts.

ADC interface with Microcontroller:

Page 31: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

LIQUID CRYSTAL DISPLAY

LCD stands for Liquid Crystal Display. LCD is finding wide spread use replacing LEDs (seven

segment LEDs or other multi segment LEDs) because of the following reasons:

1. The declining prices of LCDs.

2. The ability to display numbers, characters and graphics. This is in contrast to LEDs,

which are limited to numbers and a few characters.

3. Incorporation of a refreshing controller into the LCD, thereby relieving the CPU of the

task of refreshing the LCD. In contrast, the LED must be refreshed by the CPU to keep

displaying the data.

4. Ease of programming for characters and graphics.

7.1 LCD SCREEN

LCD screen consists of two lines with 16 characters each. Each character consists of 5x7 dot

matrix. Contrast on display depends on the power supply voltage and whether messages are

displayed in one or two lines. For that reason, variable voltage 0-Vdd is applied on pin marked as

Vee. Trimmer potentiometer is usually used for that purpose. Some versions of displays have

built in backlight (blue or green diodes). When used during operating, a resistor for current

limitation should be used (like with any LE diode).

Page 32: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

LCD Connection

Depending on how many lines are used for connection to the microcontroller, there are 8-bit and

4-bit LCD modes. The appropriate mode is determined at the beginning of the process in a phase

called “initialization”. In the first case, the data are transferred through outputs D0-D7 as it has

been already explained. In case of 4-bit LED mode, for the sake of saving valuable I/O pins of

the microcontroller, there are only 4 higher bits (D4-D7) used for communication, while other

may be left unconnected.

Consequently, each data is sent to LCD in two steps: four higher bits are sent first (that normally

would be sent through lines D4-D7), four lower bits are sent afterwards. With the help of

initialization, LCD will correctly connect and interpret each data received.

Besides, with regards to the fact that data are rarely read from LCD (data mainly are transferred

from microcontroller to LCD) one more I/O pin may be saved by simple connecting R/W pin to

the Ground. Such saving has its price.

Even though message displaying will be normally performed, it will not be possible to read from

busy flag since it is not possible to read from display.

Page 33: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

7.2 LCD INTERFACING WITH 8051

Page 34: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

RS-232 AND MAX-232

8.1 RS 232:

RS-232 is simple, universal, well understood and supported but it has some serious

shortcomings as a data interface. The standards to 256kbps or less and line lengths of 15M (50 ft)

or less but today we see high speed ports on our home PC running very high speeds and with

high quality cable maxim distance has increased greatly. The rule of thumb for the length a data

cable depends on speed of the data, quality of the cable.

.

Sub-D15 Male Sub-D15 Female

This is a standard 9 to 25 pin cable layout for async data on a PC AT serial cable

 

Description Signal 9-pin DTE 25-pin DCE Source DTE or DCE

Carrier Detect CD 1 8 from Modem

Receive Data RD 2 3 from Modem

Transmit Data TD 3 2 from Terminal/Computer

Data Terminal Ready DTR 4 20 from Terminal/Computer

Signal Ground SG 5 7 from Modem

Data Set Ready DSR 6 6 from Modem

Request to Send RTS 7 4 from Terminal/Computer

Clear to Send CTS 8 5 from Modem

Ring Indicator RI 9 22 from Modem

Page 35: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

 

Page 36: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

8.2 MAX 232:

DESCRIPTION:

The MAX232 device is a dual driver/receiver that includes a capacitive voltage

generator to supply EIA-232 voltage levels from a single 5-V supply. Each receiver converts EIA-232

inputs to 5-V TTL/CMOS levels. These receivers have a typical threshold of 1.3 V and a typical

hysteresis of 0.5 V, and can accept 30-V inputs. Each driver converts TTL/CMOS input levels into

EIA-232 levels. The driver, receiver, and voltage-generator functions are available as cells in the Texas.

8.2.1 FEATURES:

Operates With Single 5-V Power Supply

Lin Bi CMOS Technology

Two Drivers and Two Receivers

30-V Input Levels

Low Supply Current . . . 8 mA Typical

Meets or Exceeds TIA/EIA-232-F and ITU

Recommendation V.28

8.2.2 APPLICATIONS:

TIA/EIA-232-F

Battery-Powered Systems

Terminals

Modems

Computers

ESD Protection Exceeds 2000 V Per

MIL-STD-883, Method 3015

Package Options Include Plastic

Small-Outline (D, DW) Packages and

Standard Plastic (N) DIPs

Page 37: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

Absolute maximum ratings

Input supply voltage range, VCC : – 0.3 V to 6 V

Positive output supply voltage range: VS+ VCC – 0.3 V to 15 V

Negative output supply voltage range: VS––0.3 V to –15 V

Input voltage range, VI: Driver:–0.3 V to VCC + 0.3 V

Receiver: 30 V

Output voltage range, VO: T1OUT, T2OUT VS –0.3 V to VS+ + 0.3 V

R1OUT, R2OUT : –0.3 V to VCC + 0.3 V

Short-circuit duration: T1OUT, T2OUT: Unlimited

Package thermal impedance, D package :113C/W

DW package : 105C/W

N package : 78C/W

Storage temperature range, Tstg : –65C to 150C

Lead temperature 1,6 mm (1/16 inch) from case for 10 seconds: 260C

Stresses beyond those listed under “absolute maximum ratings” may cause permanent

damage to the device. These are stress ratings only, and functional operation of the device at

these or any other conditions beyond those indicated under “recommended operating conditions”

Page 38: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

is not implied. Exposure to absolute-maximum-rated conditions for extended periods may affect

device reliability. NOTE 1: All voltage values are with respect

to network ground terminal.2. The package thermal impedance is calculated in accordance with

JESD 51, except for through-hole packages, which use a trace length of zero description

8.2.3. MAX 232 Interfacing with RS232 and 89C51 microcontroller:

The MAX232 device is a dual driver/receiver that includes a capacitive voltage

generator to supply EIA-232 voltage levels from a single 5-V supply. Each receiver converts

EIA-232 inputs to 5-V TTL/CMOS levels. These receivers have a typical threshold of 1.3 V and

a typical hysterics of 0.5 V, and can accept 30-V inputs. Each driver converts TTL/CMOS

input levels into EIA-232 levels. The driver, receiver, and voltage-generator functions are

available as cells in the Texas.

Page 39: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

Bluetooth ModemTECHNOLOGY USED – BLUETOOTH

Bluetooth is a specification for a small form-factor, low-cost radio solution providing

links between mobile computers, mobile phones and other portable handheld devices, and

connectivity to the Internet. It will enable users to connect a wide range of computing and

telecommunications devices easily and simply, without the need to buy, carry, or connect cables.

It is a wireless technology that operates on an unlicensed radio spectrum. There is no

charge for communicating between two Bluetooth devices. Bluetooth is intended to get around

the problems that come with both infrared and cable synchronizing systems. The hardware

vendors, which include Siemens, Intel, Toshiba, Motorala and Ericsson, have developed a

specification for a very small radio module to be built into computer, telephone and

entertainment equipment. From the user’s point of view, there are three important features to

Bluetooth:

1. Its wireless. When you travel, you don’t have to worry about keeping track of a

briefcase full of cables to attach all of your components, and you can design your office

without wondering where all the wires will go.

2. It’s inexpensive.

3. You don’t have to think about it. Bluetooth doesn’t require you to do anything special to

make it work. The devices find one another and strike up a conversation without any

user input at all.

It is a wireless protocol that is used to communicate from one device to another in a small

area usually less than 30 feet. Bluetooth communicates on a frequency of 2.45 gigahertz, which

has been set aside by international agreement for the use of industrial, scientific and medical

devices (ISM). Bluetooth’s founding members include Ericsson, IBM, Intel, Nokia and Toshiba.

Page 40: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

Bluetooth was designed to allow low bandwidth wireless connections to become so

simple to use that they seamlessly integrate into your daily life. A simple example of a

Bluetooth application is updating the phone directory of your mobile phone. Today, you would

have to either manually enter the names and phone numbers of all your contacts or use a cable or

IR link between your phone and your PC and start an application to synchronize the contact

information. With Bluetooth, this could all happen automatically and without any user

involvement as soon as the phone comes within range of the PC! Of course, you can easily see

this expanding to include your calendar, to do list, memos, email, etc. This is just one of many

exciting applications for this new technology! Can you imagine walking into a store and having

all the sale items automatically available on your cell phone or PDA? It is a definite possibility

with Bluetooth.

System Architecture

Bluetooth communication occurs in the unlicensed ISM band at 2.4 GHz. This is an

unlicensed band and, in most countries, includes the frequency range from 2400 to 2483.5 MHz.

of course, as always when dealing with international standards, there are a few exceptions. The

primary geographies with exceptions are France (2446.5 to 2483.5 MHz) and Spain (2445 to

2475 MHz). The transceiver utilizes frequency hopping to reduce interference and fading. A

typical Bluetooth device has a range of about 10 meters. The communication channel can

support both data (asynchronous) and voice (synchronous) communications with a total

bandwidth of 1 Mb/sec.

Page 41: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

The supported channel configurations are as follows:

ConfigurationMax. Data Rate

UpstreamMax. Data Rate

Downstream

3 Simultaneous Voice Channels

64 kb/sec X3 channels 64 kb/sec X3 channels

Symmetric Data 433.9 kb/sec 433,9 kb/sec

Asymmetric Data 723.2 kb/sec or 57.6 kb/sec 57.6 kb/sec or 723.2 kb/sec

The synchronous voice channels are provided using circuit switching with a slot

reservation at fixed intervals. A synchronous link is referred to as an SCO (synchronous

connection-oriented) link. The asynchronous data channels are provided using packet switching

utilizing a polling access scheme. An asynchronous link is referred to as an ACL (asynchronous

connection-less) link. A combined data-voice SCO packet is also defined. This can provide 64

kb/sec voice and 64 kb/sec data in each direction.

Bluetooth devices can interact with one or more other Bluetooth devices in several

different ways. The simplest scheme is when only two devices are involved. This is referred to

as point-to-point. One of the devices acts as the master and the other as a slave. This ad-hoc

network is referred to as a piconet.

Bluetooth Modem - BlueSMiRF Gold

sku: WRL-00582

Description: The BlueSMiRF is the latest Bluetooth® wireless serial cable replacement from

SparkFun Electronics! These modems work as a serial (RX/TX) pipe. Any serial stream from

9600 to 115200bps can be passed seamlessly from your computer to your target. We've tested

these units successfully over open air at 350ft (106m)!

Page 42: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

The remote unit can be powered from 3.3V up to 6V for easy battery attachment. All

signal pins on the remote unit are 3V-6V tolerant. No level shifting is required. Do not attach

this device directly to a serial port. You will need an RS232 to TTL converter circuit if you need

to attach this to a computer.

Specifications:

FCC Approved Class 1 Bluetooth® Radio Modem

Extremely small radio - 0.15x0.6x1.9"

Very robust link both in integrity and transmission distance (100m) - no more buffer

overruns!

Low power consumption : 25mA avg

Hardy frequency hopping scheme - operates in harsh RF environments like WiFi,

802.11g, and Zigbee

Encrypted connection

Frequency: 2.4~2.524 GHz

Operating Voltage: 3.3V-6V

Serial communications: 2400-115200bps

Operating Temperature: -40 ~ +70C

Page 43: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

Serial Bluetooth Module:

This module enables you to wireless transmit & receive serial data. It is a drop in replacement for wired serial connections allowing transparent two way data communication. You can simply use it for serial port replacement to establish connection between MCU or embedded project and PC for data transfer.

Features

3.3V power operationUART interface10 meters rangeEasy to useMinimum External Components Status LEDs

Applications

Wireless TelemetryRemote Data LoggingRoboticsSensor MonitoringRemote Programming

Page 44: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

GSM modem (900/1800 MHz):

SEMENS GSM/GPRS SMART MODEM IS A MULTI-FUNCTIONAL, READY TO USE, RUGGED

UNIT THAT CAN BE EMBEDDED OR PLUGGED INTO ANY APPLICATION. THE SMART MODEM CAN

BE CONTROLLED AND CUSTOMIZED TO VARIOUS LEVELS BY USING THE STANDARD AT

COMMANDS. THE MODEM IS FULLY TYPE-APPROVED, IT CAN SPEED UP THE OPERATIONAL TIME

WITH FULL RANGE OF VOICE, DATA, FAX AND SHORT MESSAGES (POINT TO POINT AND CELL

BROADCAST), THE MODEM ALSO SUPPORTS GPRS (CLASS 2*) FOR SPONTANEOUS DATA

TRANSFER.

LED Status Indicator

The LED will indicate different status of the modem:

OFF Modem Switched off

ON Modem is connecting to the network

Flashing Slowly Modem is in idle mode

Flashing rapidly Modem is in transmission/communication

(GSM only)

2.1.1 History of GSM

DURING THE EARLY 1980S, ANALOG CELLULAR TELEPHONE SYSTEMS WERE

EXPERIENCING RAPID GROWTH IN EUROPE, PARTICULARLY IN SCANDINAVIA AND THE UNITED

KINGDOM, BUT ALSO IN FRANCE AND GERMANY. EACH COUNTRY DEVELOPED ITS OWN SYSTEM,

WHICH WAS INCOMPATIBLE WITH EVERYONE ELSE'S IN EQUIPMENT AND OPERATION. THIS WAS

AN UNDESIRABLE SITUATION, BECAUSE NOT ONLY WAS THE MOBILE EQUIPMENT LIMITED TO

OPERATION WITHIN NATIONAL BOUNDARIES, WHICH IN A UNIFIED EUROPE WERE INCREASINGLY

Page 45: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

UNIMPORTANT, BUT THERE WAS ALSO A VERY LIMITED MARKET FOR EACH TYPE OF EQUIPMENT,

SO ECONOMIES OF SCALE AND THE SUBSEQUENT SAVINGS COULD NOT BE REALIZED.

The Europeans realized this early on, and in 1982 the Conference of European Posts and

Telegraphs (CEPT) formed a study group called the Group Special Mobile (GSM) to study and

develop a pan-European public land mobile system. The proposed system had to meet certain

criteria:

Good subjective speech quality

Low terminal and service cost

Support for international roaming

Ability to support handheld terminals

Support for range of new services and facilities

Spectral efficiency

ISDN compatibility

In 1989, GSM responsibility was transferred to the European Telecommunication

Standards Institute (ETSI), and phase I of the GSM specifications were published in 1990.

Commercial service was started in mid-1991, and by 1993 there were 36 GSM networks in 22

countries. Although standardized in Europe, GSM is not only a European standard. Over 200

GSM networks (including DCS1800 and PCS1900) are operational in 110 countries around the

world. In the beginning of 1994, there were 1.3 million subscribers worldwide, which had grown

to more than 55 million by October 1997. With North America making a delayed entry into the

GSM field with a derivative of GSM called PCS1900, GSM systems exist on every continent,

and the acronym GSM now aptly stands for Global System for Mobile communications.

The developers of GSM chose an unproven (at the time) digital system, as opposed to the

then-standard analog cellular systems like AMPS in the United States and TACS in the United

Kingdom. They had faith that advancements in compression algorithms and digital signal

processors would allow the fulfillment of the original criteria and the continual improvement of

the system in terms of quality and cost. The over 8000 pages of GSM recommendations try to

Page 46: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

allow flexibility and competitive innovation among suppliers, but provide enough

standardization to guarantee proper inter-working between the components of the system. This is

done by providing functional and interface descriptions for each of the functional entities

defined in the system.

2.1.2 Services provided by GSM

From the beginning, the planners of GSM wanted ISDN compatibility in terms of the

services offered and the control signalling used. However, radio transmission limitations, in

terms of bandwidth and cost, do not allow the standard ISDN B-channel bit rate of 64 kbps to be

practically achieved.

Using the ITU-T definitions, telecommunication services can be divided into bearer

services, teleservices, and supplementary services. The most basic teleservice supported by GSM

is telephony. As with all other communications, speech is digitally encoded and transmitted

through the GSM network as a digital stream. There is also an emergency service, where the

nearest emergency-service provider is notified by dialing three digits (similar to 911).

A variety of data services is offered. GSM users can send and receive data, at rates up to

9600 bps, to users on POTS (Plain Old Telephone Service), ISDN, Packet Switched Public Data

Networks, and Circuit Switched Public Data Networks using a variety of access methods and

protocols, such as X.25 or X.32. Since GSM is a digital network, a modem is not required

between the user and GSM network, although an audio modem is required inside the GSM

network to interwork with POTS.

Other data services include Group 3 facsimile, as described in ITU-T recommendation

T.30, which is supported by use of an appropriate fax adaptor. A unique feature of GSM, not

found in older analog systems, is the Short Message Service (SMS). Short Message Service

(SMS)

Short Message Service (SMS) is popular among mobile phone users as a cheap

and convenient method of communicating. Therefore, SMS technology is a common

Page 47: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

feature with all mobile network service providers. They provide many information and

services via SMS such as latest news updates, stock information, and various

entertaining applications stuffs. Some common examples are

1. Send and receive confidential information of bank accounts,

2. Enhance security in households and vehicles,

3. Monitoring physical quantities remotely,

4. Transfer data between remote locations,

5. Alerting method, and

6. Information distributing system and many more...

In order to use SMS for various applications it is necessary to understand their

data communication methods and protocols since several unnecessary information

needed to be filtered out. Filtering and manipulating hardware assistance is very

important and this could be performed using a microcontroller.

Since the use of SMS technology is a cheap, convenient and flexible way of

conveying data, researchers are trying to apply this technology in many different areas

that were not provided by service providers at present. One of such areas that the SMS

technology could be used as a cost effective and more flexible way will be remote

monitoring and controlling.

SMS is a bidirectional service for short alphanumeric (up to 160 bytes) messages.

Messages are transported in a store-and-forward fashion. For point-to-point SMS, a message can

be sent to another subscriber to the service, and an acknowledgement of receipt is provided to the

sender. SMS can also be used in a cell-broadcast mode, for sending messages such as traffic

updates or news updates. Messages can also be stored in the SIM card for later retrieval.

Supplementary services are provided on top of tele-services or bearer services. In the

current (Phase I) specifications, they include several forms of call forward (such as call

Page 48: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

forwarding when the mobile subscriber is unreachable by the network), and call barring of

outgoing or incoming calls, for example when roaming in another country. Many additional

supplementary services will be provided in the Phase 2 specifications, such as caller

identification, call waiting, multi-party conversations.

2.1.3 AT Commands Used:

SIM Insertion, SIM Removal

SIM card Insertion and Removal procedures are supported. There are software functions

relying on positive reading of the hardware SIM detect pin. This pin state (open/closed) is

permanently monitored. When the SIM detect pin indicates that a card is present in the SIM

connector, the product tries to set up a logical SIM session. The logical SIM session will be set

up or not depending on whether the detected card is a SIM Card or not. The AT+CPIN?

Command delivers the following responses:

If the SIM detect pin indicates “absent”, the response to AT+CPIN? is “+CME ERROR

10” (SIM not inserted).

If the SIM detect pin indicates “present”, and the inserted Card is a SIM Card, the

response to AT+CPIN? is “+CPIN: xxx” depending on SIM PIN state.

If the SIM detect pin indicates “present”, and the inserted Card is not a SIM Card, the

response to AT+CPIN? is CME ERROR 10.

These last two states are not given immediately due to background initialization.

Between the hardware SIM detect pin indicating “present” and the previous results the

AT+CPIN? sends “+CME ERROR: 515” (Please wait, init in progress).

When the SIM detect pin indicates card absence, and if a SIM Card was previously

inserted, an IMSI detach procedure is performed, all user data is removed from the product

(Phonebooks, SMS etc.). The product then switches to emergency mode.

Page 49: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

Keil Compiler:

Keil compiler is software used where the machine language code is written and compiled.

After compilation, the machine source code is converted into hex code which is to be dumped

into the microcontroller for further processing. Keil compiler also supports C language code.

Fig Compilation of source Code

Page 50: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

Fig Run the compiled program

Proload:

Proload is software which accepts only hex files. Once the machine code is converted

into hex code, that hex code has to be dumped into the microcontroller and this is done by the

Proload. Proload is a programmer which itself contains a microcontroller in it other than the one

which is to be programmed. This microcontroller has a program in it written in such a way that it

accepts the hex file from the Keil compiler and dumps this hex file into the microcontroller

Page 51: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

which is to be programmed. As the Proload programmer kit requires power supply to be

operated, this power supply is given from the power supply circuit designed above. It should be

noted that this programmer kit contains a power supply section in the board itself but in order to

switch on that power supply, a source is required. Thus this is accomplished from the power

supply board with an output of 12volts.

Fig Atmel AT89C2051 Device programmer

Features

Supports major Atmel 89 series devices

Auto Identify connected hardware and devices

Error checking and verification in-built

Lock of programs in chip supported to prevent program copying

20 and 40 pin ZIF socket on-board

Auto Erase before writing and Auto Verify after writing

Informative status bar and access to latest programmed file

Simple and Easy to use

Works on 57600 speed

Description

It is simple to use and low cost, yet powerful flash microcontroller programmer for the

Atmel 89 series. It will Program, Read and Verify Code Data, Write Lock Bits, Erase and Blank

Check. All fuse and lock bits are programmable. This programmer has intelligent onboard

Page 52: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

firmware and connects to the serial port. It can be used with any type of computer and requires

no special hardware. All that is needed is a serial communication ports which all computers

have.

All devices have signature bytes that the programmer reads to automatically identify the

chip. No need to select the device type, just plug it in and go! All devices also have a number of

lock bits to provide various levels of software and programming protection. These lock bits are

fully programmable using this programmer. Lock bits are useful to protect the program to be

read back from microcontroller only allowing erase to reprogram the microcontroller.

The programmer connects to a host computer using a standard RS232 serial port. All the

programming 'intelligence' is built into the programmer so you do not need any special hardware

to run it. Programmer comes with window based software for easy programming of the devices.

Page 53: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

Programming Software

Computer side software called 'Proload V4.1' is executed that accepts the Intel HEX format file

generated from compiler to be sent to target microcontroller. It auto detects the hardware

connected to the serial port. It also auto detects the chip inserted and bytes used. Software is

developed in Delphi 7 and requires no overhead of any external DLL.

Page 54: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

Fig Writing the programs bytes onto the microcontroller

RESULTS AND CONCLUSION

Results

Assemble the circuit on the PCB as shown in Fig 5.1. After assembling the circuit on the

PCB, check it for proper connections before switching on the power supply.

Page 55: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

Conclusion

The implementation of Heartbeat Monitoring System using GSM is done successfully. The

communication is properly done without any interference between different modules in the design.

Design is done to meet all the specifications and requirements. Software tools like Keil Uvision

Simulator, Proload to dump the source code into the microcontroller, Orcad Lite for the schematic

diagram have been used to develop the software code before realizing the hardware.

The performance of the system is more efficient. Continuously reading the output from

the sensors and pass the data to the doctor’s mobile whenever the read values exceed the normal

values or whenever the doctor sends a request to the controlling unit is the main job carried out

by the microcontroller. The mechanism is controlled by the microcontroller.

Circuit is implemented in Orcad and implemented on the microcontroller board. The performance

has been verified both in software simulator and hardware design. The total circuit is completely verified

functionally and is following the application software.

It can be concluded that the design implemented in the present work provide portability, flexibility and

the data transmission is also done with low power consumption.

FUTURE ENHANCEMENT

In spite of the improvement of communication link and despite all progress in advanced communication technologies

, There is still very few functioning commercial Wireless Monitoring Systems, which are most off-line, and there are still a number of issues to deal with.Therefore, there is a strong need for investigating the possibility of design and implementation of

Page 56: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

an interactive real-time wireless communication system. In our project, a generic real-time wireless communication system was designed and developed for short and long term remote patient-monitoring applying wireless protocol.

Advantages:

1. This system gives very accurate heart beat rate than the existing equipment.

2. Efficient and low cost design.

3. Low power consumption.

4. Easy to install the system.

5. Fast response.

6. All the parameters can be viewed on the mobile phone.

7. Most reliable.

8. Cost effective.

9. Supports innumerable sensors to the system.

Disadvantages:

1. Distance is limited.

2. Interfacing heart beat sensor to the Micro Controller is sensitive.

Applications:

1. Old age people Heart Rate remote monitoring continuously.

2. Central diagnostic system implementation in hospitals.

3. Consistent health monitoring for personal health care without any cable contact interface.

Page 57: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

4. More useful telemedicine.

REFRENCES AND BIBLOGRAPHY

Muhammad Ali Mazidi , Janice Gillispie Mazidi, Rolin D. Mckinlay.

Second edition, “THE 8051 MICROCONTROLLER AND EMBEDDED SYSTEM”

Page 58: A Medical Wearable Device with Wireless Bluetooth-based Data.doc

MEASUREMENT SCIENCE REVIEW, Volume 3, Section 2, 2003

K. J. Ayala. Third edition, “The 8051 MICROCONTROLLER”

General information about electronic voting machine

www.eci.gov.in

www.eci.gov.in/faq/evm.asp

www.eci.gov.in/Audio_VideoClips/presentation/EVM.ppt

www.rajasthan.net/election/guide/evm.htm

www.indian-elections.com/electoralsystem/electricvotingmachine.html

Tutorial on microcontroller:

www.8051projects.net/microcontroller_tutorials/

Tutorial on LCD:

www.8051projects.net/lcd-interfacing/