Project_work.doc (1)
Project_work.doc (1)
Project_work.doc (1)
CHAPTER 1
INTRODUCTION
The past several years have witnessed a rapid growth of wireless networking. Wireless
technologies are used to rapidly exchange images, data, audio, and other information
between remote locations. However, up to now wireless networking has been mainly
focused on high-speed communications, and relatively long range applications such as the
IEEE 802.11 Wireless Local Area Network (WLAN) standards. The first well known
standard focusing on Low-Rate Wireless Personal Area Networks (LR-WPAN) was
Bluetooth. However it has limited capacity for networking of many nodes. There are
many wireless monitoring and control applications in industrial and home environments
which require longer battery life, lower data rates and less complexity than those from
existing standards. For such wireless applications, a new standard called IEEE 802.15.4
has been developed by IEEE. The new standard is also called ZigBee, when additional
stack layers defined by the ZigBee Alliance are used. When deploying sensor networks,
the choice of communication protocol depends on the context in which the network is
used. The ZigBee protocol is designed for sensor networks used to control home lighting,
security systems, building automation, etc. These technologies are currently being applied
to improve healthcare around the world. For implementing a health monitoring system,
first of all, devices that measure patient's physiological signal should be needed. The
mobile system such as PDA receives physiological data from wearable sensor devices.
One user's health monitoring system has a few ZigBee devices to measure one user's
physiological data. Even if there are a lot of ZigBee devices nearby, the communication
should be accepted between only one user's ZigBee devices. So, the access control should
be implemented because there can be a lot of ZigBee devices nearby. In the device access
control mechanism, the physiological data must not be lost but a wireless communication
can lose a data. So,the reliable data transmission not to lose a physiological data in zigbee
based health monitoring system is proposed. with rapid improvements in medical
research, more and more health sensors have been developed to assist medical doctors in
monitoring their patients conditions. These sensors getting smaller, making it possible for
the sensors to be worn or to be implanted into the human body. Hence there may come a
day when governments require every citizen to wear a sensor to track their condition for
1.1 Goal
The goal of this project is to develop a health monitoring system using ZigBee wireless
technology. This includes implementation of the ZigBee communication. To evaluate the
new standard, a literature study must be performed. A test application will also be
developed, in order to test the functionality of the ZigBee modules.
1.2 Motivation
Heart attack has become one of the number one killers in the world. However, if help is
given within 10minutes of an attack occurring, there is a chance that heart attack will not
cause death. We envisage a system that is integrated with a heart beat monitor. We study
the use of ZigBee WPANs for real time heart beat monitoring.
In this thesis we will study the ZigBee protocol and implement reliable data transmission
of patients physiological data measured by bio-sensors using ZigBee modules.
CHAPTER 2
LITERATURE SURVEY
The brief explanation of the Literature survey has mentioned in this section.
Key Contributions
David Cypher, Nicolas Chevrollier, Nicolas Montavont, and Nada Golmie, National
Institute of Standards and Technology proposed “Prevailing over Wires in Healthcare
Environments: Benefits and Challenges”
The objective of this article is to survey the benefits and challenges posed by the
deployment and operation of wireless communications in support of healthcare networks.
While the main advantage of wireless communications remains to provide ubiquitous
connectivity, thus allowing greater physical mobility and interoperability, a number of
engineering issues need to be addressed before this vision is realized. Their intent in this
article is to explore some of these issues, including deployment, interference, and
mobility, and provide insights for potential solutions. The reliance on network
technologies in healthcare and clinical environments for monitoring, diagnosis, surgery,
and treatment stresses the need for universal and wireless network interfaces that provide
reliable connectivity and untethered access to information. Since designing wireless
technologies from scratch in order to satisfy the needs of the healthcare industry may not
be a viable or economical option, the group is focusing instead on evaluating the
suitability of currently available and emerging technologies developed by the IEEE 802
Local Area Network/Metro Area Network standards organization. Part of this evaluation
work consists of matching medical device application requirements with the appropriate
wireless technology. While reliable connectivity constitutes a requirement for all
healthcare applications, additional constraints imposed on the timeliness and the
criticality of information delivery, such as bandwidth, delay, and loss, depend on the
specifics of the application considered.
Recent technological advances in sensors, low power integrated circuits, and wireless
communications have enabled the design of low-cost, miniature, lightweight, intelligent
physiological sensor platforms that can be seamlessly integrated into a body area network
for health monitoring. Wireless body area networks (WBANs) promise unobtrusive
ambulatory health monitoring for extended periods of time and near real-time updates of
patients’ medical records through the Internet. A number of innovative systems for health
monitoring have recently been proposed. However, they typically rely on custom
communication protocols and hardware designs, lacking generality and flexibility. The
lack of standard platforms, system software support, and standards makes these systems
expensive. Bulky sensors, high price, and frequent battery changes are all likely to limit
user compliance. To address some of these challenges, they prototyped a WBAN utilizing
a common off-the-shelf wireless sensor platform with a ZigBee-compliant radio interface
and an ultra low-power microcontroller. The standard platform interfaces to custom
sensor boards that are equipped with accelerometers for motion monitoring and a bio-
amplifier for electrocardiogram or lectromyogram monitoring. Software modules for on-
board processing, communication, and network synchronization have been developed
using the TinyOS operating system. Although the initial WBAN prototype targets
ambulatory monitoring of user activity, the developed sensors can easily be adapted to
monitor other physiological parameters. In this paper, they discuss initial results,
implementation challenges, and the need for standardization in this dynamic and
promising research field. Wireless body area networks (WBANs) signify emerging
technology with the potential to revolutionize health care by allowing unobtrusive health
monitoring for extended periods of time.
In this paper, they present initial system development and integration experiences. They
also discuss major implementation issues and possible applications.
Emil Jovanov proposed “Wireless Technology and System Integration in Body Area
Networks for m-Health Applications”
limitations of sensor weight and size necessary to improve user’s compliance, sensor
resource constraints, intermittent availability of uplink connectivity, and reliability of
transmission, security, and interoperability of different platforms. They present current
and emerging wireless technologies and developments in pervasive and mobile
technologies that are vital for implementation of WBAN-based monitors and m-Health
system integration. They emphasize the problem of reliable system operation with
extremely low power consumption and discontinuous connectivity, which are typical for
ambulatory monitoring. The emerging m-Health concept represents the evolution of e-
health systems loosely defined as the use of the Internet for healthcare to mobile
applications without guaranteed Internet connectivity.
CHAPTER 3
ZIGBEE
The concept of Zigbee is associated with controlling all electronic deceives and
communicating with them self in the surrounding by using simple our mobile or PC by
using this latest wireless technology. It is a specification for a suite of high level
communication protocols using small, low-power digital radios based on the IEEE
802.15.4-2003standard for wireless personal area networks (WPANs), such as wireless
headphones connecting with cell phones via short-range radio. The technology defined by
the ZigBee specification is intended to be simpler and less expensive than other WPANs,
such as Bluetooth. ZigBee is targeted at radio-frequency (RF) applications that require a
low data rate, long battery life, and secure networking. The ZigBee Alliance is a group of
companies that maintain and publish the ZigBee standard.
The Full Function Device (FFD) supports all IEEE 802.15.4 functions and features
specified by the standard. It can function as a network coordinator. Additional
memory and computing power make it ideal for network router functions or it could
be used in network-edge devices (where the network touches the real world).
The Reduced Function Device (RFD) carries limited (as specified by the standard)
functionality to lower cost and complexity. It is generally found in network-edge
devices. The RFD can be used where extremely low power consumption is a
necessity.
IEEE 802.15.4 can manage two types of networks, i.e., star topology or the peer-to peer
topology. Both the topologies are illustrated in Figure 2.1. In ZigBee, these two
topologies can be combined to build so-called mesh networks.
The first FFD that is activated may establish its own network and become a Personal Area
Network (PAN) coordinator. Then both FFD and RFD devices can connect to the PAN
coordinator. All networks within the radio sphere of influence must have a unique PAN
identity. All nodes in a PAN must talk to the PAN Coordinator.
In the peer-to-peer topology there is also a PAN coordinator, but it differs from the star
topology in that any device can communicate with any other device as long as they are in
the range of one another. The peer-to-peer topology allows more complex network
formations to be implemented, such as the mesh topology.
While Bluetooth focuses on connectivity between large packet user devices, such as
laptops, phones, and major peripherals, ZigBee is designed to provide highly efficient
connectivity between small packet devices. As a result of its simplified operations, which
are one to two full orders of magnitude less complex than a comparable Bluetooth device,
pricing for ZigBee devices is extremely competitive, with full nodes available for a
fraction of the cost of a Bluetooth node.
ZigBee has been developed to meet the growing demand for capable wireless networking
between numerous low-power devices. In industry ZigBee is being used for next
generation automated manufacturing, with small transmitters in every device on the floor,
allowing for communication between devices to a central computer. This new level of
communication permits finely-tuned remote monitoring and manipulation. In the
consumer market ZigBee is being explored for everything from linking low-power
household devices such as smoke alarms to a central housing control unit, to centralized
light controls.
The specified maximum range of operation for ZigBee devices is 250 feet (76m),
substantially further than that used by Bluetooth capable devices, although security
concerns raised over "sniping" Bluetooth devices remotely, may prove to hold true for
ZigBee devices as well.
Due to its low power output, ZigBee devices can sustain themselves on a small battery for
many months, or even years, making them ideal for install-and-forget purposes, such as
most small household systems. Predictions of ZigBee installation for the future, most
based on the explosive use of ZigBee in automated household tasks in China, look to a
near future when upwards of sixty ZigBee devices may be found in an average American
home, all communicating with one another freely and regulating common tasks
seamlessly. ZigBee is the only standards-based technology that addresses the needs of
most remote monitoring and control and sensory network application.
The physical layer was designed to accommodate the need for a low cost yet allowing
for high levels of integration. The use of direct sequence allows the analog circuitry
to be very simple and very tolerant towards inexpensive implementations.
The media access control (MAC) layer was designed to allow multiple topologies
without complexity. The power management operation doesn't require multiple
modes of operation. The MAC allows a reduced functionality device (RFD) that
needn't have flash nor large amounts of ROM or RAM. The MAC was designed to
handle large numbers of devices without requiring them to be "parked".
The network layer has been designed to allow the network to spatially grow without
requiring high power transmitters. The network layer also can handle large amounts
of nodes with relatively low latencies.
ZigBee is poised to become the global control/sensor network standard. It has been
designed to provide the following features:
Users expect batteries to last many months to years! Consider that a typical single
family house has about 6 smoke/CO detectors. If the batteries for each one only
lasted six months, the home owner would be replacing batteries every month!
In contrast to Bluetooth, which has many different modes and states depending upon
your latency and power requirements, ZigBee/IEEE 802.15.4 has two major states:
active (transmit/receive) or sleep. The application software needs to focus on the
application, not on which power mode is optimum for each aspect of operation.
Even mains powered equipment needs to be conscious of energy. ZigBee devices will
be more ecological than their predecessors saving megawatts at it full deployment.
Consider a future home that has 100 wireless control/sensor devices,
Case 1: 802.11 Rx power is 667 mW (always on)@ 100 devices/home & 50,000
homes/city = 3.33 megawatts
Case 3: 802.15.4 power cycled at .1% (typical duty cycle) = 150 watts
Low cost to the users means low device cost, low installation cost and low
maintenance.
ZigBee devices allow batteries to last up to years using primary cells (low cost)
without any chargers (low cost and easy installation). ZigBee's simplicity allows
for inherent configuration and redundancy of network devices provides low
maintenance.
ZigBee's use of the IEEE 802.15.4 PHY and MAC allows networks to handle any
number of devices. This attribute is critical for massive sensor arrays and control
networks.
3.5 History
ZigBee-style networks began to be conceived about 1998, when many installers realized
that both WiFi and Bluetooth were going to be unsuitable for many applications. In
particular, many engineers saw a need for self-organizing ad-hoc digital radio networks.
The ZigBee Alliance announced in October 2004 that the membership had more
than doubled in the preceding year and had grown to more than 100 member
companies, in 22 countries. By April 2005 membership had grown to more than
150 companies, and by December 2005 membership had passed 200 companies.
During the last quarter of 2007, ZigBee PRO, the enhanced ZigBee specification
was finalized.
Private profile
Interoperability NOT important. No ZigBee stamp on the product, but one can
claim "based on a ZigBee platform"
Published profile
A private profile is shared with others. No ZigBee stamp on the product, but one
can claim "based on a ZigBee platform"
Public profile
The official ZigBee profile.
This represents three license-free bands: 2.4-2.4835 GHz, 868-870 MHz and 902-928
MHz. The number of channels allotted to each frequency band is fixed at sixteen
(numbered 11-26), one(numbered 0) and ten (numbered 1-10) respectively. The higher
frequency band is applicable worldwide, and the lower band in the areas of North
America, Europe, Australia and New Zealand.
Low power consumption, with battery life ranging from months to years. Considering
the number of devices with remotes in use at present, it is easy to see that more
numbers of batteries need to be provisioned every so often, entailing regular (as well
as timely), recurring expenditure. In the ZigBee standard, longer battery life is
achievable by either of two means: continuous network connection and slow but sure
battery drain, or intermittent connection and even slower battery drain.
Maximum data rates allowed for each of these frequency bands are fixed as 250 kbps
@2.4 GHz,40 kbps @ 915 MHz, and 20 kbps @868 MHz.
High throughput and low latency for low dutycycle applications (<0.1%)
Channel access using Carrier Sense Multiple Access with Collision Avoidance
(CSMA - CA)
The IEEE 802.15.4 specification defines three different frequency bands, in order to
conform with regulations in Europe, Japan, Canada and the United States. Table
2.1describes the frequency bands and data rates. Totally 27 channels are available across
the different frequency bands, as described in Table 2.2.
Modulation / Spreading
The conversion of the binary data to a modulated signal in the 2450 MHz frequency band
can be described as the functional block diagram in Figure 2.3. The numbers show how
the binary data "0000b" is converted to a baseband chip sequence with pulse shaping.
Bit to Symbol
The first step is to encode all the data in the PHY Protocol Data Unit (PPDU) from binary
data to symbols. Each byte is divided into two symbols and the least significant symbol is
transmitted first. For multi-byte fields, the least significant byte is transmitted first, except
for security related fields where the most significant byte is transmitted first. Symbol to
chip. Each data symbol is mapped into a Pseudo-random (PN) 32-chip sequence. The
chip sequence is then transmitted at 2 MChip/s with the least significant chip (c 0)
transmitted first for each symbol. Table 2.3 shows the data symbol with corresponding
chip values.
14 1001011000000111011110111000110
0
15 1100100101100000011101111011100
0
O-QPSK Modulation
The modulation format is Offset - Quadrature Phase Shift Keying (O-QPSK) with half-
sine pulse shaping, equivalent to Minimum Shift Keying (MSK). QPSK is an efficient
way to use the often limited bandwidth. Each signal element represents two bits, the
equation below shows how the O-QPSK can be expressed. By using Offset, phase
changes in the combined signal never exceeds 900. In the case using QPSK the maximum
phase change is 1800. O-QPSK provides a greater performance than QPSK when the
transmission channel has components with significant nonlinearity.
(3.1)
where fc is the center frequency and Tc is the time that Q is delayed to get the 90 0 phase
change. Equation 2.1 describes the O-QPSK modulated signal, is the in-phase carrier
and Q the quadrature-phase carrier.
The use of half-sine pulse shaping eliminates any amplitude variation and turns the O-
QPSK into a constant envelope modulation. Equation 2.2 describes the half sine pulse
shaping.
(3.2)
Error-Vector Magnitude
The modulation accuracy of an IEEE 802.15.4 transmitter is determined with an Error
Vector Magnitude (EVM) measurement, see Figure 3.5. EVM is the scalar distance
between the two phasor end points representing the ideal and the actual measured chip
positions. Expressed in another way, it is the residual noise version of the signal and
distortion remaining after an ideal version of the signal has been stripped away.
(3.3)
(3.4)
where S is the
magnitude of the vector to the ideal constellation point, (j ,Qj) is the
error vector. The transmitter shall have EVM values of less than 35% when measured
with 1000 chips.
Transmit Power
The transmitter should be capable of transmitting at least -3 dBm. The device should
transmit as low power as possible to reduce interference to other devices and systems.
The definition of dBm is shown in Equation 3.5.
(3.5)
Receiver Sensitivity
The receiver sensitivity is defined by two terms. One is Packet Error Rate (PER) which is
the average fraction of transmitted packets that are not detected correctly. The other term
is the threshold input signal power that yields a specified PER. In IEEE 802.15.4 a
compliant device shall have a sensitivity of -85 dBm or better.
Receiver ED
The receiver Energy Detection (ED) is intended to be used by the network layer as part of
a channel selection algorithm. It is an estimate of the received signal power within the
bandwidth of an IEEE 802.15.4 channel. No attempt is made to identify or decode signals
on the channel. The ED time shall be equal to 8 symbol periods.
LQI
The Link Quality Indication (LQI) is a characterization of the strength and/or quality of a
received packet. The measurement may be implemented using receiver ED, a Signal to
Noise Ratio (SNR) estimation, or a combination of these methods. The use of the LQI
result by the network or application layer is not part of the IEEE 802.15.4 standard.
CCA
Clear Channel Assessment (CCA) is used to decide whether the channel is busy or idle
and one of the following methods must be supported.
CCA Mode 1: Energy above threshold. CCA shall report a busy medium upon
detecting any energy above the ED threshold.
CCA Mode 2: Carrier sense only. CCA shall report a busy medium only upon the
detection of a signal with the modulation and spreading characteristics of IEEE
802.15.4. This signal may be above or below the ED threshold.
CCA Mode 3: Carrier sense with energy above threshold. CCA shall report a busy
medium only upon the detection of a signal with the modulation and spreading
characteristics of IEEE 802.15.4 with energy above the ED threshold.
A busy channel shall be indicated by the Physical Layer Management Entity Confirm
(PLME-CCA.confirm) primitive with a status of BUSY. A clear channel shall be
indicated by the PLME-CCA.confirm primitive with a status of IDLE.
The Medium Access Control (MAC) layer handles the network association and
disassociation and has an optional super frame structure with beacons for time
synchronization and a Guaranteed Time Slot (GTS) mechanism for high priority
communications
3.10 Hardware
There are currently an increasing number of manufactures of IEEE 802.15.4 2.4 GHz
transceiver chips.
Output
Sensitivity Voltage
Manufacturer Chip IRX (mA) ITX (mA) Power
Rx (dBm) (Volts)
(dBm)
Chipcon CC2420 19.7 17.4 -94 0 2.1-3.6
Ember EM2420 19.7 17.4 -94 0 2.1-3.6
Freescale MC13191 37 30 -91 3.6 2-2.4
Freescale MC13192 37 30 -92 3.6 2.-3.4
Freescale MC13193 37 30 -92 3.6 2.-3.4
CompXs CX1540 57 56 -90 3 2.7-3.3
Ubec uz2400 x x -93 0 x
The table does not show if the chip has extra features, such as an built-in ZigBee stack,
ADC or DAC.
3.11 Security
There are three types of security modes defined: unsecured mode, access control list and
secured mode.
The 2.4 GHz PHY of the IEEE 802.15.4 standard attracts a lot of focus from the wireless
industry because the globally available 2.4 GHz ISM band with the largest bandwidth
promotes world-wide market and flexibility of application designs. The technical
considerations in the following are specifically related to the 2.4 GHz PHY
implementation, but most of them are also valid for the 868/915 MHz PHY devices. The
modulation accuracy of an IEEE 802.15.4 transmitter is determined with an error vector
magnitude (EVM) measurement, which is graphically detailed in Figure 3.8.
EVM is the scalar distance between the two phasor end points representing the ideal and
the actual measured chip positions. Expressed another way, it is the residual noise and
distortion remaining after an ideal version of the signal has been stripped away. The
offset-QPSK with half-sine pulse shaping modulation selected for the 2.4 GHz. PHY is
equivalent to minimum shift keying (MSK), which is a constant envelope modulation
scheme. This allows the use of simple,low-cost and relatively non-linear power amplifier
designs.
The media access control (MAC) layer was designed to allow multiple topologies without
complexity. The power management operation doesn't require multiple modes of
operation. The MAC allows a reduced functionality device (RFD) that needn't have flash
nor large amounts of ROM or RAM. The MAC was designed to handle large numbers of
devices without requiring them to be "parked".
Features
Beacon Management
Channel Access
Guaranteed Time Slot (GTS ) management
Frame Validation
Acknowledged Frame Delivery
Association / Dis-association with PAN coordinator
On the one hand, the data entity creates and manages network layer data units from the
payload of the application layer and performs routing according to the current topology.
On the other hand, there is the layer control, which is used to handle configuration of new
devices and establish new networks: it can determine whether a neighboring device
belongs to the network and discovers new neighbors and routers. The control can also
detect the presence of a receiver, which allows direct communication and MAC
synchronization.
The routing protocol used by the Network layer is AODV(Ad hoc On-Demand Distance
Vector Routing ). In order to find the destination device, it broadcasts out a route request
to all of its neighbors. The neighbors then broadcast the request to their neighbors, etc
until the destination is reached. Once the destination is reached, it sends its route reply via
unicast transmission following the lowest cost path back to the source. Once the source
receives the reply, it will update its routing table for the destination address with the next
hop in the path and the path cost.
ZigBee's self-forming and self-healing mesh-network architecture lets data and control
messages pass from one node to another by multiple paths. This feature extends the
network range and improves data reliability. It may also be used to build large,
geographically dispersed networks with smaller networks linked to form a 'cluster-tree'
network. The NWK layer supports multiple network topologies including star, cluster
tree, and mesh, all of which are shown in Figure 3.9
In a star topology, one of the FFD-type devices assumes the role of network coordinator
and is responsible for initiating and maintaining the devices on the network. All other
devices, known as end devices, directly communicate with the coordinator. In a mesh
topology, the ZigBee coordinator is responsible for starting the network and for choosing
key network parameters, but the network may be extended through the use of ZigBee
routers. The routing algorithm uses a request-response protocol to eliminate suboptimal
routing. Ultimate network size can reach 264 nodes (more than we'll probably need).
Using local addressing, you can configure simple networks of more than 65,000 (216)
nodes, thereby reducing address overhead .
The ZigBee standard has the capacity to address up to 65535 nodes in a single network.
However, there are only three general types of node:
Coordinator
End Device
Router
These roles described below exist at the network level – a ZigBee node may also be
performing tasks at the application level independent of the role it plays in the network.
For instance, a network of ZigBee devices measuring temperature may have a
temperature sensor application in each node, irrespective of whether they are End
Devices, Routers or the Coordinator.
ZigBee coordinator(ZC) . The most capable device, the coordinator forms the root of
the network tree and might bridge to other networks. There is exactly one ZigBee
coordinator in each network since it is the device that started the network originally. It is
able to store information about the network, including acting as the Trust Centre &
repository for security keys.
All ZigBee networks must have one (and only one) Coordinator, irrespective of the
network topology.
In the Star topology, the Coordinator is the central node in the network.
In the Tree and Mesh topologies, the Coordinator is the top (root) node in the
network.
At the network level, the Coordinator is mainly needed at system initialization. The tasks
of the Coordinator at the network layer are:
Selects the frequency channel to be used by the network (usually the one with the
least detected activity)
Starts the network
The Coordinator can also provide message routing (for example, in a Star network),
security management and other services.
In some circumstances, the network will be able to operate normally if the Coordinator
fails or is switched off. This will not be the case if the Co-coordinator provides a routing
path through the network (for instance, in a Star topology, where it is needed to relay
messages). Similarly the Coordinator provides services at the Application layer and if
these services are being used (for example, Coordinator binding), the Coordinator must be
able to provide them at all times.
ZigBee Router (ZR): As well as running an application function a router can act as an
intermediate router, passing data from other devices.
Networks with Tree or Mesh topologies need at least one Router. The main tasks of a
Router are:
In a Star topology, these functions are handled by the Coordinator and, therefore, a Star
network does not need Routers. In Tree and Mesh topologies, Routers are located as
follows:
In a Tree topology, Routers are normally located in network positions that allow
messages to be passed up and down the tree.
In a Mesh topology, a Router can be located any where that a message passing
node is required.
However, in all topologies (Star, Tree and Mesh), Router devices can be located at the
extremities of the network, if they run applications that are needed in these locations - in
this case, the Router will not perform its message relay function, unless in a Mesh
network (see above).
ZigBee End Device (ZED): Contains just enough functionality to talk to the parent node
(either the coordinator or a router); it cannot relay data from other devices. This
relationship allows the node to be asleep a significant amount of the time thereby giving
long battery life. A ZED requires the least amount of memory, and therefore can be less
expensive to manufacture than a ZR or ZC.
The main tasks of an End Device at the network level are sending and receiving
messages. Note that End Devices cannot relay messages and cannot allow other nodes to
connect to the network through them.
An End Device can often be battery-powered and, when not transmitting or receiving, can
sleep in order to conserve power.
Routes messages between paired nodes Can sleep for extended periods
Typically operates in the receive state Request data from network coordinator
procedures, together with application objects defined by the manufacturer, are considered
part of this layer.
The application support sublayer (APS) is the other main standard component of the
layer, and as such it offers a well-defined interface and control services. It works as a
bridge between the network layer and the other components of the application layer: it
keeps up-to-date binding tables in the form of a database, which can be used to find
appropriate devices depending on the services that are needed and those the different
devices offer. As the union between both specified layers, it also routes messages across
the layers of the protocol stack.
An application may consist of communicating objects which cooperate to carry out the
desired tasks. The focus of ZigBee is to distribute work among many different devices
which reside within individual ZigBee nodes which in turn form a network (said work
will typically be largely local to each device, for instance the control of each individual
household appliance).
The collections of objects that form the network communicate using the facilities
provided by APS, supervised by ZDO interfaces. The application layer data service
follows a typical request-confirm/indication-response structure. Within a single device,
up to 240 application objects can exist, numbered in the range 1-240. 0 is reserved for the
ZDO data interface and 255 for broadcast; the 241-254 range is not
currently in use but may be in the future.
There are two services available for application objects to use (in ZigBee 1.0):
i) the key-value pair service (KPV) is meant for configuration purposes. It enables
description, request and modification of object attributes through a simple
interface based on get/set and event primitives, some allowing a request for
response. Configuration uses compressed XML (full XML can be used) to provide
an adaptable and elegant solution.
Depending on the available information, device discovery may follow different methods.
When the network address is known, the IEEE address can be requested using unicast
communication. When it is not, petitions are broadcast (the IEEE address being part of
the response payload). End devices will simply respond with the requested address, while
a network coordinator or a router will also send the addresses of all the devices associated
with it.
This extended discovery protocol permits external devices to find out about devices in a
network and the services that they offer, which endpoints can report when queried by the
discovering device (which has previously obtained their addresses). Matching services
can also be used.
The use of cluster identifiers enforces the binding of complementary entities by means of
the binding tables, which are maintained by ZigBee coordinators, as the table must be
always available within a network and coordinators are most likely to have a permanent
power supply; backups may be needed by some applications, whose higher-level layers
must manage. Binding requires an established communication link; after it exists, whether
to add a new node to the network is decided, according to the application and security
policies. Communication can happen right after the association. Direct addressing uses
both radio address and endpoint identifier, whereas indirect addressing requires every
relevant field (address, endpoint, cluster and attribute) and sends it to the network
coordinator, which maintains these associations and translates requests for
communication. Indirect addressing is particularly useful to keep some devices very
simple and minimize their need for storage. Besides these two methods, broadcast to all
endpoints in a device is available, and group addressing is used to communicate with
groups of endpoints belonging to a set of devices.
The basic mechanism to ensure confidentiality is the adequate protection of all keying
material. Trust must be assumed in the initial installation of the keys, as well as in the
processing of security information. In order for an implementation to globally work, its
general correctness (e.g., conformance to specified behaviors) is assumed.
Keys are the cornerstone of the security architecture; as such their protection is of
paramount importance, and keys are never supposed to be transported through an insecure
channel. There is a momentary exception to this rule, which occurs during the initial
phase of the addition to the network of a previously unconfigured device. The ZigBee
network model must take particular care of security considerations, as ad hoc networks
may be physically accessible to external devices and the particular working environment
cannot be foretold; likewise, different applications running concurrently and using the
same transceiver to communicate are supposed to be mutually trustworthy: for cost
reasons the model does not assume a firewall exists between application-level entities.
Within the protocol stack, different network layers are not cryptographically separated, so
access policies are needed and correct design assumed. The open trust model within a
device allows for key sharing, which notably decreases potential cost. Nevertheless, the
layer which creates a frame is responsible for its security. If malicious devices may exist,
every network layer payload must be cyphered, so unauthorized traffic can be
immediately cut off. The exception, again, is the transmission of the network key, which
confers a unified security layer to the network, to a new connecting device. Point-to-point
encryption is also supported.
Key distribution is one of the most important security functions of the network. A secure
network will designate one special device which other devices trust for the distribution of
security keys: the trust center. Ideally, devices will have the trust center address and
initial master key preloaded; if a momentary vulnerability is allowed, it will be sent as
described above. Typical applications without special security needs will use a network
key provided by the trust center (through the initially insecure channel) to communicate.
Thus, the trust center maintains both the network key and provides point-to-point
security. Devices will only accept communications originating from a key provided by
the trust center, except for the initial master key. The security architecture is distributed
among the network layers as follows:
data integrity are key benefits of the ZigBee technology. ZigBee leverages the
security model of the IEEE 802.15.4 MAC sublayer which specifies four security
services:
Access control—the device maintains a list of trusted devices within the network
Data encryption, which uses symmetric key 128-bit advanced encryption standard
Frame integrity to protect data from being modified by parties without cryptographic
keys
Sequential freshness to reject data frames that have been replayed—the network
controller compares the freshness value with the last known value from the device and
rejects it if the freshness value has not been updated to a new value. The actual
security implementation is specified by the implementer using a standardized toolbox
of ZigBee security software.
Figure 3.13 The four basic frame types defined in 802.15.4: Data, ACK,
MAC command, and beacon.
The data frame provides a payload of up to 104 bytes. The frame is numbered to ensure
that all packets are tracked. This frame structure improves reliability in difficult
conditions. A frame-check sequence ensures that packets are received without error. After
receiving a data packet, the receiver performs a 16-bit cyclic redundancy check (CRC) to
verify that the packet was not corrupted in transmission. With a good Cyclic Redundancy
Check, the receiver can automatically transmit an acknowledgement packet (depending
on application and network needs), allowing the transmitting station to know that the data
were received in an acceptable form. If the CRC indicates the packet was corrupt, the
packet is dropped and no acknowledgement is transmitted. When a developer configures
the network to expect acknowledgement, the transmitting station will retransmit the
original packet a specified number of times to ensure successful packet delivery. If the
path between the transmitter and receiver has become less reliable or a network failure
has occurred, ZigBee provides the network with self-healing capabilities when alternate
paths (if physically available) can be established autonomously.
Fig 3.14 Schematic view of the data frame and the PHY packet
The Physical Protocol Data Unit is the total information sent over the air. As shown in the
illustration above the Physical layer adds the following overhead:
Another important structure for 802.15.4 is the acknowledgment (ACK) frame. It provides
feedback from the receiver to the sender confirming that the packet was received without
error. The device takes advantage of specified "quiet time" between frames to send a short
packet immediately after the data packet transmission.
Fig 3.15 Schematic view of the acknowledgement frame and the PHY
packet
MAC command frame provides the mechanism for remote control and configuration of
client nodes. A centralized network manager uses MAC to configure individual clients'
command frames no matter how large the network.
Fig 3.16 Schematic view of the MAC command frame and the PHY
packet
Finally, the beacon frame wakes up client devices, which listen for their address and go
back to sleep if they don't receive it. Beacons are important for mesh and cluster-tree
networks to keep all the nodes synchronized without requiring those nodes to consume
precious battery energy by listening for long periods of time. Security and data integrity
are key benefits of the ZigBee technology.
Fig 3.17 Schematic view of the beacon frame and the PHY packet
For low latency applications or applications requiring specific data bandwidth, the PAN
coordinator may dedicate portions of the active super frame to that application. These
portions are called guaranteed time slots (GTSs). The guaranteed time slots comprise the
contention free period (CFP), which always appears at the end of the active super frame
starting at a slot boundary immediately following the CAP. The PAN coordinator may
allocate up to seven of these GTSs and a GTS may occupy more than one slot period.
However, a sufficient portion of the CAP shall remain for contention based access of
other networked devices or new devices wishing to join the network. All contention based
transactions shall be complete before the CFP begins. Also each device transmitting in a
GTS shall ensure that its transaction is complete before the time of the next GTS or the
end of the CFP.
i. Data is periodic. The application dictates the rate, and the sensor activates, checks for
data and deactivates.
ii. Data is intermittent. The application, or other stimulus, determines the rate, as in the
case of say smoke detectors. The device needs to connect to the network only when
communication is necessitated. This type enables optimum saving on energy.
iii. Data is repetitive, and the rate is fixed a priori. Depending on allotted time slots,
called GTS (guaranteed time slot), devices operate for fixed durations.
ZigBee employs either of two modes, beacon or non-beacon to enable the to-and-fro data
traffic. Beacon mode is used when the coordinator runs on batteries and thus offers
maximum power savings, whereas the non-beacon mode finds favour when the
coordinator is mains-powered. In the beacon mode, a device watches out for the
coordinator's beacon that gets transmitted at periodically, locks on and looks for messages
addressed to it. If message transmission is complete, the coordinator dictates a schedule
for the next beacon so that the device ‘goes to sleep'; in fact, the coordinator itself
switches to sleep mode. While using the beacon mode, all the devices in a mesh network
know when to communicate with each other. In this mode, necessarily, the timing circuits
have to be quite accurate, or wake up sooner to be sure not to miss the beacon. This in
turn means an increase in power consumption by the coordinator's receiver, entailing an
optimal increase in costs.
The non-beacon mode will be included in a system where devices are ‘asleep' nearly
always, as in smoke detectors and burglar alarms. The devices wake up and confirm their
continued presence in the network at random intervals. On detection of activity, the
sensors ‘spring to attention', as it were, and transmit to the ever waiting coordinator's
receiver (since it is mains powered).However, there is the remotest of chances that a
sensor finds the channel busy, in which case the receiver unfortunately would ‘miss a
call'.
3.18 Protocols
The protocols build on recent algorithmic research (Ad-hoc On-demand Distance Vector,
neuRFon) to automatically construct a low-speed ad-hoc network of nodes. In most large
network instances, the network will be a cluster of clusters. It can also form a mesh or a
single cluster. The current profiles derived from the ZigBee protocols support beacon and
non-beacon enabled networks.
In beacon-enabled networks, the special network nodes called ZigBee Routers transmit
periodic beacons to confirm their presence to other network nodes. Nodes may sleep
between beacons, thus lowering their duty cycle and extending their battery life. Beacon
intervals may range from 15.36 milliseconds to 15.36 ms * 214 = 251.65824 seconds at
250 kbit/s, from 24 milliseconds to 24 ms * 214 = 393.216 seconds at 40 kbit/s and from
48 milliseconds to 48 ms * 214 = 786.432 seconds at 20 kbit/s. However, low duty cycle
operation with long beacon intervals requires precise timing which can conflict with the
need for low product cost.
In general, the ZigBee protocols minimize the time the radio is on so as to reduce power
use. In beaconing networks, nodes only need to be active while a beacon is being
transmitted. In non-beacon-enabled networks, power consumption is decidedly
asymmetrical: some devices are always active, while others spend most of their time
sleeping.
ZigBee devices are required to conform to the IEEE 802.15.4-2003 Low-Rate Wireless
Personal Area Network (WPAN) standard. The standard specifies the lower protocol
layers—the physical layer (PHY), and the medium access control (MAC) portion of the
data link layer (DLL). This standard specifies operation in the unlicensed 2.4 GHz,
915 MHz and 868 MHz ISM bands. In the 2.4 GHz band there are 16 ZigBee channels,
with each channel requiring 5 MHz of bandwidth. The center frequency for each channel
can be calculated as, FC = (2405 + 5*(k-11)) MHz, where k = 11, 12, ..., 26.
The radios use direct-sequence spread spectrum coding, which is managed by the digital
stream into the modulator. BPSK is used in the 868 and 915 MHz bands, and orthogonal
QPSK that transmits two bits per symbol is used in the 2.4 GHz band. The raw, over-the-
air data rate is 250 kbit/s per channel in the 2.4 GHz band, 40 kbit/s per channel in the
915 MHz band, and 20 kbit/s in the 868 MHz band. Transmission range is between 10
and 75 meters (33 and 246 feet), although it is heavily dependent on the particular
environment. The maximum output power of the radios is generally 0 dBm (1 mW).
The basic channel access mode specified by IEEE 802.15.4-2003 is "carrier sense,
multiple access/collision avoidance" (CSMA/CA). That is, the nodes talk in the same way
that people converse; they briefly check to see that no one is talking before they start.
There are three notable exceptions to the use of CSMA. Beacons are sent on a fixed
timing schedule, and do not use CSMA. Message acknowledgements also do not use
CSMA. Finally, devices in Beacon Oriented networks that have low latency real-time
requirements may also use Guaranteed Time Slots (GTS) which by definition does not
use CSMA.
Low cost : The typical ZigBee radio is cost-effective. Chipset prices can be as low as
$12 each in quantities as few as 100 pieces. While the 802.15.4 and ZigBee stacks are
typically included in this cost, crystals and other discrete components are not; design-
in modules fall in the neighbourhood of $25 in similar quantities. This pricing
provides an economic justification for extending wireless networking to even the
simplest of devices.
Range and obstruction issues avoidance : ZigBee routers double as input devices
and repeaters to create a form of mesh network. If two network points are unable to
communicate as intended, transmission is dynamically routed from the blocked node
to a router with a clear path to the data’s destination. This happens automatically, so
that communications continue even when a link fails unexpectedly. The use of low-
cost routers can also extend the network’s effective reach. When the distance between
the base station and a remote node exceeds the devices’ range, an intermediate node
or nodes can relay transmission, eliminating the need for separate repeaters (Figure 2).
Multisource products : As an open standard, ZigBee provides customers with the
ability to choose vendors as needed. ZigBee Alliance working groups define
interoperability profiles to which ZigBee-certified devices must adhere. A ZigBee-
certified radio will interoperate with any other ZigBee-certified radio adhering to the
same profile. This promotes compatibility and competition, which allows the end
users to choose the best device for each particular network node, regardless of
manufacturer.
Low power consumption : Basic ZigBee radios operate at 1 mW RF power and can
sleep when not involved in transmission (higher RF-power ZigBee radios for
applications needing greater range also provide the sleep function). Because this
makes battery-powered radios more practical than ever, wireless devices are free to be
placed without power cable runs in addition to eliminating data cable runs.
3.20 Applications
Commercial systems: Vending machines, fleet management.
Enterprise systems: Health care and patient monitoring, environmental monitoring
and hazards detection.
Industrial systems: Remote controlled machines such as in tracking wind turbines.
Military and government systems: Asset tracking, personnel monitoring and
surveillance.
Transportation systems: Audio control and automation, security and access control.
Consumer products: Cellular handsets, computer peripherals, remote controls and
other portable devices.
Climate control: customize the temperatures of ac machines or thermostats as
differently needed.
Home automation: turn on or off ovens, air conditioners, geysers, lights without any
hassles only when needed. Also sprinkle water to plants in garden monitoring
moisture content in soil.
Private Security: this also acts like a private security to monitor kids or aged even
from office and alert in case of medical emergencies.
CHAPTER 4
CIRCUIT DESIGN
This chapter mainly deals with the circuit and the requirements of the project. The XBee
and XBee-PRO OEM RF Modules were engineered to meet IEEE 802.15.4 standards and
support the unique needs of low-cost, low-power wireless sensor networks. The modules
require minimal power and provide reliable delivery of data between devices. This
module transmit and receive the data from sensor networks and with help of the computer
display of the report is done.
Patient Section
Control Room:
In Patient section , Amplified signals from the sensors are fed to MCU
The heart beat sensor and temperature sensor values are continually monitored
The signal conditioning unit converts sensor values which are analog in nature into
digital. But this unit is inbuilt in PIC16F877A microcontroller unit.
Heart beat and temperature sensor values are transmitted to control section using
ZigBee module.
In health care(Control) section get the information from patient section and
transferred to PC using RS232 protocol.
PIC16F877A
Regulator IC units contain the circuitry for reference source, comparator amplifier,
control devices and overload protection all in a single unit. In this circuit, three-terminal
IC voltage regulator 7805 is employed. 7805 is a fixed positive voltage regulator whose
nominal voltage output is +5v. This IC are designed with adequate heat sinking, can
deliver output currents in excess of 1A.
4.3.3 Sensors
The sensors used for the temperature sensing LM 35,and heart beat sensor is used. The
data form this is transmitted through the ADC conversion circuit where the analog data
from the sensors are converted to digital form by the circuit used.
MAX-232 is primary used for people building electronics with an RS-232 interface.
MAX 232 IC used as level logic converter.
CHAPTER 5
This chapter describes various circuit components which are used in this project.
Fig
5.1 PIC16F874A/877A Pin out Diagram
Digital I/O.
Analog input 4.
SPI slave select
input.
Comparator 2
output.
Legend : I = input O = output I/O= input / ouput
P=Power __ = Not used TTL= TTL input
ST = Schmitt Trigger input
Note: 1: This buffer is a Schmitt Trigger input when configured as the external interrupt.
2: This buffer is a Schmitt Trigger input when used in Serial Programming mode.
3: This buffer is a Schmitt Trigger input when configured in RC Oscillator mode
and a CMOS input otherwise.
Digital I/O.
In-circuit debugger
and ICSP
programming data.
Note: 1: This buffer is a Schmitt Trigger input when configured as the external interrupt.
2: This buffer is a Schmitt Trigger input when used in Serial Programming mode.
3: This buffer is a Schmitt Trigger input when configured in RC Oscillator mode
and a CMOS input otherwise.
Digital I/O.
SPI data out.
Digital I/O.
USART
ashynchoronou
s transmit.
USART1
synchronous
clock.
Note: 1: This buffer is a Schmitt Trigger input when configured as the external interrupt.
2: This buffer is a Schmitt Trigger input when used in Serial Programming mode.
3: This buffer is a Schmitt Trigger input when configured in RC Oscillator mode
and a CMOS input otherwise.
Digital I/O.
Parallel Slave
Port data.
PORTE is a
RE0/RD/ 8 9 25 25 ST/ bidirectional I/O
ANS I/O TTL(3) port.
RE0 I
RD I Digital I/O.
ANS 9 10 26 26 Read control for
RE1/WE/ I/O ST/ Parallel Slave
AN6 I TTL(3) Port.
RE1 I Analog input 5.
WR 10 11 27 27
AN6 I/O Digital I/O.
RE2/CS/AN7 I ST/ Write control for
RE2 TTL(3) Parallel Slave
CS I Port.
Analog input 6
AN7
Digital I/O.
Chip select
control for
Parallel Slave
Port.
Analog input 7.
Note: 1: This buffer is a Schmitt Trigger input when configured as the external interrupt.
2: This buffer is a Schmitt Trigger input when used in Serial Programming mode.
3: This buffer is a Schmitt Trigger input when configured in RC Oscillator mode
and a CMOS input otherwise.
5.1.3 Features
XBee XBee
XBee-PRO XBee-PRO
Pin 1 Pin 20
Pin 1 Pin 20
Pin 10 Pin 11
Pin 11
Pin 10
Table 5.2 Pin Assignments for the XBee and XBee PRO Modules
Design Notes
Minimum connections: VCC, GND, DOUT & DIN
Minimum connections for updating firmware: VCC, GND, DIN, DOUT, RTS & DTR
Signal Direction is specified with respect to the module
Module includes a 50k pull-up resistor attached to RESET
Several of the input pull-ups can be configured using the PR command
Unused pins should be left disconnected
5.3 Sensors
The sensors which are used in this health monitoring system are described below.
5.3.1 LM 35
LM 35 is a precision centigrade Temperature sensor. The LM35 is an integrated circuit
sensor that can be used to measure temperature with an electrical output proportional to
the temperature (in °C)
General Description
The LM35 series are precision integrated-circuit temperature sensors, whose output
voltage is linearly proportional to the Celsius (Centigrade) temperature. The LM35 thus
has an advantage over linear temperature sensors calibrated in Kelvin, as the user is not
required to subtract a large constant voltage from its output to obtain convenient
Centigrade scaling. The LM35 does not require any external calibration or trimming to
provide typical accuracies of ±1⁄4°C at room temperature and ±3⁄4°C over a full −55 to
+150°C temperature range. Low cost is assured by trimming and calibration at the wafer
level. The LM35’s low output impedance, linear output, and precise inherent calibration
make interfacing to readout or control circuitry especially easy. It can be used with single
power supplies, or with plus and minus supplies. As it draws only 60 µA from its supply,
it has very low self-heating, less than 0.1°C in still air. The LM35 is rated to operate over
a −55° to +150°C temperature range, while the LM35C is rated for a −40° to +110°C
range (−10°with improved accuracy). The LM35 series is available packaged in hermetic
TO-46 transistor packages, while the LM35C, LM35CA, and LM35D are also available
in the plastic TO-92 transistor package. The LM35D is also available in an 8-lead surface
mount small outline package and a plastic TO-220 package.
Features
Calibrated directly in ° Celsius (Centigrade)
Linear + 10.0 mV/°C scale factor
0.5°C accuracy guaranteeable (at +25°C)
Rated for full −55° to +150°C range
Suitable for remote applications
Low cost due to wafer-level trimming
Operates from 4 to 30 volts
Less than 60 µA current drain
Low self-heating, 0.08°C in still air
Nonlinearity only ±1⁄4°C typical
Low impedance output, 0.1 W for 1 mA load
Typical Applications
Choose R1 = −VS/50 µA
VOUT = +1,500 mV at +150°C
= +250 mV at +25°C
= −550 mV at −55°C
Maximum Ratings
Supply Voltage : +35V to −0.2V
Output Voltage : +6V to −1.0V
Output Current : 10 mA
Storage Temp :
TO-46 Package, −60°C to +180°C
TO-92 Package, −60°C to +150°C
SO-8 Package, −65°C to +150°C
Thermal Resistance
Junction to Air
Accuracy Vs Temperature
Application
The LM35 can be applied easily in the same way as other integrated-circuit temperature
sensors. It can be glued or cemented to a surface and its temperature will be within about
0.01§C of the surface temperature. This presumes that the ambient air temperature is
almost the same as the surface temperature; if the air temperature were much higher or
lower than the surface temperature, the actual temperature of the LM35 die would be at
an intermediate temperature between the surface temperature and the air temperature.
This is especially true for the TO-92 plastic package, where the copper leads are the
principal thermal path to carry heat into the device, so its temperature might be closer to
the air temperature than to the surface temperature. To minimize this problem, be sure
that the wiring to the LM35, as it leaves the device, is held at the same temperature as the
surface of interest. The easiest way to do this is to cover up these wires with a bead of
epoxy which will insure that the leads and wires are all at the same temperature as the
surface, and that the LM35 die's temperature will not be affected by the air temperature.
The TO-46 metal package can also be soldered to a metal surface or pipe without damage.
Of course, in that case the V b terminal of the circuit will be grounded to that metal.
Alternatively, the LM35 can be mounted inside a sealed-end metal tube, and can then be
dipped into a bath or screwed into a threaded hole in a tank. As with any IC, the LM35
and accompanying wiring and circuits must be kept insulated and dry, to avoid leakage
and corrosion. This is especially true if the circuit may operate at cold temperatures where
condensation can occur. Printed-circuit coatings and varnishes such as Humiseal and
epoxy paints or dips are often used to insure that moisture cannot corrode the LM35 or its
connections. These devices are sometimes soldered to a small lightweight heat fin, to
decrease the thermal time constant and speed up the response in slowly-moving air. On
the other hand, a small thermal mass may be added to the sensor, to give the steadiest
reading despite small deviations in the air temperature.
The setup described here uses a red LED for transmitted light illumination and a pin
Photodiode as detector. With only slight changes in the preamplifier circuit the same
hard- and software could be used with other illumination and detection concepts.
The detectors photo current (AC Part) is converted to voltage and amplified by an
inexpensive operational amplifier (LM358). A PIC16F877 microcontroller converts the
analog signal with 10 bits resolution to a digital signal. An average is calculated from 250
readings taken over a 20 milliseconds period (This equals one period of the european
power line frequency of 50 Hz).
The sensor consists of a light source and photo detector; 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 serial port has many pins. We will discuss the transmit and receive pin first.
Electrically speaking, whenever the serial port sends a logical one (1) a negative voltage
is effected on the transmit pin. Whenever the serial port sends a logical zero (0) a positive
voltage is effected. When no data is being sent, the serial port's transmit pin's voltage is
negative (1) and is said to be in a MARK state. Note that the serial port can also be forced
to keep the transmit pin at a positive voltage (0) and is said to be the SPACE or BREAK
state. (The terms MARK and SPACE are also used to simply denote a negative voltage
(1) or a positive voltage(0) at the transmit pin respectively).
When transmitting a byte, the UART (serial port) first sends a START BIT which is a
positive voltage (0), followed by the data (general 8 bits, but could be 5, 6, 7, or 8 bits)
followed by one or two STOP BITs which is a negative(1) voltage. The sequence is
repeated for each byte sent.Figure 4.14 shows a diagram of a what a byte transmission
would look like.
At this point you may want to know what is the duration of a bit. In other words, how
long does the signal stay in a particular state to define a bit. The answer is simple. It is
dependent on the baud rate. The baud rate is the number of times the signal can switch
states in one second. Therefore, if the line is operating at 9600 baud, the line can switch
states 9,600 times per second. This means each bit has the duration of 1/9600 of a second
or about 100 µsec.
When transmitting a character there are other characteristics other than the baud rate that
must be known or that must be setup. These characteristics define the entire interpretation
of the data stream.
The first characteristic is the length of the byte that will be transmitted. This length in
general can be anywhere from 5 to 8 bits.
The second characteristic is parity. The parity characteristic can be even, odd, mark,
space, or none. If even parity, then the last data bit transmitted will be a logical 1 if the
data transmitted had an even amount of 0 bits. If odd parity, then the last data bit
transmitted will be a logical 1 if the data transmitted had an odd amount of 0 bits. If
MARK parity, then the last transmitted data bit will always be a logical 1. If SPACE
parity, then the last transmitted data bit will always be a logical 0. If no parity then there
is no parity bit transmitted.
The third characteristic is the amount of stop bits. This value in general is 1 or 2. Assume
we want to send the letter 'A' over the serial port. The binary representation of the letter
'A' is 01000001. Remembering that bits are transmitted from least significant bit (LSB) to
most significant bit (MSB), the bit stream transmitted would be as follows for the line
characteristics 8 bits, no parity, 1 stop bit, 9600 baud.
LSB (0 1 0 0 0 0 0 1 0 1) MSB
To calculate the actual byte transfer rate simply divide the baud rate by the number of bits
that must be transferred for each byte of data. In the case of the above example, each
character requires 10 bits to be transmitted for each character. As such, at 9600 baud, up
to 960 bytes can be transferred in one second.
In history, practical solutions were developed to let two computers talk with each other
using a null modem serial communication line. In most situations, the original modem
signal lines are reused to perform some sort of handshaking. Handshaking can increase
the maximum allowed communication speed because it gives the computers the ability to
control the flow of information. High amounts of incoming data is allowed if the
computer is capable to handle it, but not if it is busy performing other tasks. If no flow
control is implemented in the null modem connection, communication is only possible at
speeds at which it is sure the receiving side can handle the amount information even
under worst case conditions.
How to use the handshaking lines in a null modem configuration? The simplest way is to
don't use them at all. In that situation, only the data lines and signal ground are cross
connected in the null modem communication cable. All other pins have no connection.
An example of such a null modem cable without handshaking can be seen in the figure
below.
2 3 Rx Tx
3 2 Tx Rx
5 5 Signal ground
Figure 5.13 Pins used on the female RS-232 (DB 9) Serial Connector
25 Pin
9 Pin Connector & Connector &
Cable assembly Cable assembly
MAX-232 is primary used for people building electronics with an RS-232 interface.
Serial RS-232 communication works with voltages (-15V ... -3V for high) and +3V ...
+15V for low) which are not compatible with normal computer logic voltages. To receive
serial data from an RS-232 interface the voltage has to be reduced, and the low and high
voltage level inverted. In the other direction (sending data from some logic over RS-232)
the low logic voltage has to be "bumped up", and a negative voltage has to be generated,
too.
Electrical signal characteristics such as voltage levels, signaling rate, timing and
slew-rate of signals, voltage withstand level, short-circuit behavior, maximum stray
capacitance and cable length
Interface mechanical characteristics, pluggable connectors and pin identification
Functions of each circuit in the interface connector
Standard subsets of interface circuits for selected telecom applications
The standard does not define such elements as character encoding (for example, ASCII,
Baudot or EBCDIC), or the framing of characters in the data stream (bits per character,
start/stop bits, parity). The standard does not define protocols for error detection or
algorithms for data compression.
The standard does not define bit rates for transmission, although the standard says it is
intended for bit rates lower than 20,000 bits per second. Many modern devices can exceed
this speed (38,400 and 57,600 bit/s being common, and 115,200 and 230,400 bit/s making
occasional appearances) while still using RS-232 compatible signal levels.
Details of character format and transmission bit rate are controlled by the serial port
hardware, often a single integrated circuit called a UART that converts data from parallel
to serial form. A typical serial port includes specialized driver and receiver integrated
circuits to convert between internal logic levels and RS-232 compatible signal levels.
In this circuit the MAX-232 IC used as level logic converter. The MAX-232 is a dual
driver/receiver that includes a capacive voltage generator to supply EIA 232 voltage
levels from a single 5V supply. Each receiver converts EIA-232 to 5V TTL/CMOS
levels. Each driver converts TLL/CMOS input levels into EIA-232 levels.
In this circuit the microcontroller transmitter pin is connected in the MAX-232 T2IN pin
which converts input 5V TTL/CMOS level to RS-232 level. Then T 2 OUT pin is
connected to reviver pin of 9 pin D type serial connector which is directly connected to
PC.
Devices that have a UART interface can connect directly to the pins of the RF module as
shown in the figure below.
Data enters the module UART through the DI pin(pin 3) as an asynchronous serial signal.
The signal should idle high when no data is being transmitted. Each data byte consists of
a start bit (low), 8 data bits (least significant bit first) and a stop bit (high). The following
figure illustrates the serial bit pattern of data passing through the module.
The module UART performs tasks, such a timing and parity checking, that are needed for
data communications. Serial communications depend on the two UARTs to be configured
with compatible settings(baud rate, parity, start bits, stop bits, data bits).
Data is buffered in the DI buffer until one of the following causes the data to be
packetized and transmitted:
i. No serial characters are received for the amount of time determined by the RO
(Packetization Timeout) parameter. If RO=0, packetization begins when a character
is received.
ii. The maximum number of characters that will fit in an RF packet (100) is received.
iii. The Command Mode Sequence (GT + CC + GT) is received. Any character buffered
in the DI buffer before the sequence is transmitted.
If the module can not immediately transmit (for instance, if it is already receiving RF
data), the serial data is stored in the DI Buffer. The data is packetized and sent at any RO
timeout or when 100 bytes(maximum packet size) are received. If the DI buffer becomes
full, hardware or software flow control must be implemented in order to prevent over
flow (loss of data between the host and module).
Transmit Data Frames (received through the DI pin (pin 3)) include :
Receive Data Frames (sent out the DO pin (pin 2)) include :
The API provides alternative means of configuring modules and routing data at the host
application layer. A host application can send data frames to the module that contain
address and payload information instead of using command mode to modify addresses.
The module will send data frames to the application containing status packets; as well as
source, RSSI and payload information from received data packets.
The API operation option facilities many operations such as the examples cited below :
Transmitting data to multiple destinations without entering Command Mode.
Receive success/failure status of each transmitted RF packet.
Identify the source address of each received packet
Fig 5.21
Internal Data Flow Diagram
When serial data enters the RF module through the DI pin (pin 3), the data is stored in the
DI buffer until it can be processed.
i. Send messages that are smaller than the DI buffer size (202 bytes).
ii. Interface at a lower baud rate than the throughput data rate.
Case in which the DI Buffer may become Full and Possibly Overflow
If the module is receiving a continuous stream of RF data, any serial data that arrives on
the DI pin is placed in the DI buffer. The data in the DI buffer will be transmitted over-
the-air when the module is no longer receiving RF data in the network.
Two cases in which the DO buffer may become full and possibly
overflow :
i. If the RF data rate is set higher than the interface data rate of the module, the
module will receive data from the transmitting module faster than it can send the data
to the host.
ii. If the host does not allow the module to transmit data out from the DO buffer because
of being held off by hardware or software flow control.
CHAPTER 6
PROGRAMMING
In this chapter the code program written in embedded c is described below. This code is
used to accept the digital bit available at the 9 pin RS 232 port. so that the input signal is
converted and displayed in the PC’s screen.
void GetLM35(void)
{
ADCON0=0x41;
DelayMs_LCD_USART(1);
ADGO=1;
while(ADGO==1);
temp=ADRESH;
ADRESL=ADRESL>>6;
temp=temp<<2;
temp=temp+ADRESL;
LM35=temp*100/204.9;
}
void GetADC1(void)
{
ADCON0=0x49;
DelayMs_LCD_USART(1);
ADGO=1;
while(ADGO==1);
temp=ADRESH;
ADRESL=ADRESL>>6;
temp=temp<<2;
POT1=(temp+ADRESL)/204.8;
}
void GetADC2(void)
{
ADCON0=0x51;
DelayMs_LCD_USART(1);
ADGO=1;
while(ADGO==1);
temp=ADRESH;
ADRESL=ADRESL>>6;
temp=temp<<2;
POT2=(temp+ADRESL)/204.8;
}
ADCON0=0x51;
DelayMs(1);
ADGO=1;
while(ADGO==1);
a2dBp=ADRESH;
//a2dBp=200-a2dBp;
return a2dBp;
}
void ADC_init(void)
{
TRISA = 0xff;
ADCON1 = 0x04;
}
CHAPTER 7
RESULTS
The fundamental aim of this project is to design a prototype wireless health monitoring
system which enables to monitor the temperature and heartbeat of the patient by using
ZigBee technology and display the parameter on the PC’s screen using java. LM 35 is
used as temperature sensor and the heart beat sensor which was locally manufactured has
been purchased(The photograph of the heart beat sensor has displayed in chapter 5). The
components used in the circuit are readily available. The individual sub-circuits have
been designed on PCB and tested for functioning in the laboratory. ZigBee targets
applications not addressable by Bluetooth or any other wireless standard. The screen shot
of the patients physiological details i.e. patients name, heartbeat and temperature which
are displaying in the control room PC are shown below.
CHAPTER 8
DISCUSSIONS
The market for wireless sensor networks is expected to grow rapidly in the near future.
ZigBee technology may contribute to this development, since they can easily be
connected to various type of sensors and to build up wireless networks. Our modules are
small, but the size can be reduced even more. The availability of the interoperability
between different brands of ZigBee devices, the ZigBee standard may be the dominating
standard for wireless sensor networks in the future. One important advantage of ZigBee
over other wireless standards is the low price. One should also notice that the IEEE
802.15.4 transceiver can be used to build custom networks, without using the ZigBee
network structure.
CHAPTER 9
CONCLUSIONS
9.1 Conclusion
This thesis work has shown that ZigBee can be seen as a complement to other
standards,i.e., Bluetooth and IEEE 802.11 WLAN. ZigBee is not competing in the same
market segment as either Bluetooth or WLAN. One very important factor for the success
of ZigBee is the interoperability. A remote controller from, i.e., Philips must be able to
operate a Samsung TV. The three major advantages of ZigBee are low price, long
covering range and low energy consumption.
The ZigBee based wireless health monitoring system is essentially a design and
implementation project of wireless technology. To approach a project like this a parallel
path has to be taken in regards to the theory and the practical circuitry. For a successful
conclusion in any project the paths must meet and this only happens when they are fully
understood. This is what made the overall project challenging and rewarding. The
prototype health monitoring system which has been developed with temperature and heart
beat sensors is essentially quite a simple one, and it is this simplicity which partly brings
it down when it comes to the real time applications.
they need to address often quite conflicting requirements for size, operating time,
precision, and reliability.
One of the most promising approaches in building wearable health monitoring systems
utilizes emerging wireless body area networks (WBANs). A WBAN consists of multiple
sensor nodes,each capable of sampling, processing, and communicating one or more vital
signs (heart rate, blood pressure, oxygen saturation, activity) or environmental parameters
(location, temperature, humidity,light). Typically, these sensors are placed strategically
on the human body as tiny patches or hidden in users’ clothes allowing ubiquitous health
monitoring in their native environment for extended periods of time.
CHAPTER 10
BIBLIOGRAPHY
CHAPTER 11
APPENDICES
Power
Supply
Serial Port
Connector
B. Bill of Material
UWB
802.11 (Ultra Wireles IR
ZigBee Bluetooth
(Wi-Fi) Wide s USB Wireless
Band)
20-40
Kbits/s
115
20, 40, and 11 & 54 100-500 62.5
Data Rate 1 Mbits/s Kbits/s
250 Kbits/s Mbits/sec Mbits/s Kbits/s
4 & 16
Mbits/s
<10
10-100 50-100 <10 10 meters
Range 10 meters
meters meters meters meters (line of
sight
Ad-hoc,
Ad-hoc,
peer to
Networking Point to very Point to Point to Point to
peer, star,
Topology hub small point point point
or mesh
networks
868 MHz
(Europe)
900-928
Operating MHz (NA), 2.4 and 5 3.1-10.6 800-900
2.4 GHz 2.4 GHz
Frequency 2.4 GHz GHz GHz nm
(worldwide
)
Complexity
(Device and
Low High High Medium Low Low
application
impact)
UWB
802.11 (Ultra Wireles IR
ZigBee Bluetooth
(Wi-Fi) Wide s USB Wireless
Band)
Power
Very low
Consumptio
(low power
n (Battery High Medium Low Low Low
is a design
option and
goal)
life)
128 AES
plus 64 and
Security application 128 bit
layer encyption
security
Other Devices Device Device
UWB
802.11 (Ultra Wireles IR
ZigBee Bluetooth
(Wi-Fi) Wide s USB Wireless
Band)
can join an
connectio connectio
existing
n requires n requires
Information network in
3-5 up to 10
under 30ms
seconds seconds
Industrial
Wireless
control and
connectivi Streami
monitoring, Wireless
ty ng Remote
sensor LAN PC
between video, controls,
networks, connectiv peripher
Typical devices home PC, PDA,
building ity, al
Applications such as entertai phone,
automation, broadban connecti
phones, nment laptop
home d Internet ons
PDA, applicati links
control and access
laptops, ons
automation,
headsets
toys, games
Timing Considerations:
ZigBee
Bluetooth
New slave enumeration = >3s, typically 20s
Sleeping slave changing to active = 3s typically
Active slave channel access time = 2ms typically
Hence, ZigBee devices can quickly attach, exchange information, detach, and then go to
deep sleep to achieve a very long battery life. Bluetooth devices require about ~100X the
energy for this operation.
Power Considerations :
ZigBee
ZigBee has an inherent advantage due to its short attach time and/or its ability to remain
in the sleep mode for long periods.
In terms of protocol stack size, ZigBee‟s 32 KB is about one-third of the stack size
necessary in other wireless technologies (for limited capability end devices, the stack size
is as low as 4 KB).
Comparison Summary
In a gist, ZigBee and Bluetooth are two solutions for two different application areas.
The differences are from their approach to their desired application. Bluetooth has
addressed a voice application by embodying a fast frequency hopping system with a
master slave protocol. ZigBee has addressed sensors, controls, and other short
message applications by embodying a direct sequence system with a star or peer to
peer protocols.
Minor changes to Bluetooth or ZigBee won‟t change their inherent behavior or
characteristics. The different behaviors come from architectural differences.
2. Other devices operate in the ISM bands, will they cause any problems for
medical devices using ZigBee?
ZigBee is very robust and has demonstrated superb tolerance to extreme interference.
The Las Vegas Convention Center is one of worst places for wireless devices,
especially during the annual Consumer Electronics Show. Interference at that show
often impedes many cell phones and Bluetooth headsets from operating correctly.
ZigBee has always performed flawlessly in these extreme environments. For more
details, please see the results of extensive coexistence research in the white
papers section of the ZigBee website.
Radios in a mesh network can talk to many other radios (devices) in the network, not
just one. The result is that each data packet communicated across a wireless mesh
network can have multiple possible paths to its destination. This flexibility makes the
mesh network very flexible for accommodating interference in the radio spectrum or
something blocking the radio path. Wireless mesh networks also enable networks to
grow in size and cover greater physical distances. Point-to-point and point-to-
multipoint topologies mean the data packet only has a single path to follow and is
therefore more vulnerable to interference or blockage. Their ability to cover greater
physical distances is limited and the access point in star networks can only talk to a
small number of radios on the network.
Very easy. ZigBee's pairing process allows for fast and easy association between
devices. Additionally, ZigBee offers a variety of routing algorithms for data packets
to find the correct destination, including hierarchical tree, neighbor, and table-based
routing. These approaches result in a high degree of flexibility and stability ensuring
that devices in the network stay connected and that network performance remains
constant even as it is dynamically changing.
6. How does ZigBee address security for confidential medical data given that
information is literally flying through the air?
ZigBee was developed with many layers of security. At the strongest level, ZigBee
uses AES 128 encryption (government, commercial and military grade encryption
used across the Internet). In addition, ZigBee defines a security toolbox for key
generation and distribution that can support multiple modes for residential,
commercial, and even industrial applications. The ZigBee Health Care public
application profile has specific security features for rapid key generation and
distribution suitable in the medical environments insuring privacy and integrity. No
other solution offers a comparable security system.
Yes. ZigBee has developed a rigorous certification procedure for each of the available
public application profiles. The certification procedure is performed by independent
third parties on an anonymous basis. This testing ensures full interoperability between
ZigBee devices using the same public application profile.
G. Expert View
ZigBee well suited for Rural India
Andy Wheeler: ZigBee is an embedded wireless network standard that solves the unique
needs of remote monitoring and control, and sensor network applications. It is the set of
specs built around the IEEE 802.15.4 wireless protocol. The name "ZigBee" is derived
from the erratic zigging patterns that bees make between flowers when collecting pollen.
This is evocative of the invisible Webs of connections existing in a fully wireless
environment. A group known as the ZigBee Alliance, with over 150 members worldwide,
regulates the standard itself.
The technology is designed to provide highly efficient connectivity between small packet
devices. As a result of its simplified operations, which are one to two full orders of
magnitude less complex than a comparable Bluetooth device, pricing for ZigBee devices
is extremely competitive, with full nodes available for a fraction of the cost of a Bluetooth
node.
AW: ZigBee enables very low-power networking devices, which can typically operate for
five years powered by a single household battery, eliminating the need for end devices to
be plugged into electrical power. While battery life is ultimately a function of battery
type, capacity and end-use application, the ZigBee protocol was designed from the
ground up to support very long life battery applications. ZigBee is highly reliable and
scalable due to its ability to automatically form self-organising, self-healing networks.
Also, ZigBee networks are simple and inexpensive to deploy.
Dept. of PG Studies, VTU, Belgaum 105
Reliable Data Transmission in ZigBee Based Health Monitoring System
AW: ZigBee is suited to a wide range of building automation, industrial, medical and
residential control and monitoring applications. Essentially, applications that require
interoperability and/or the RF performance characteristics of the IEEE 802.15.4 standard
would benefit from a ZigBee solution. Some of its applications include, lighting controls,
automatic meter reading, wireless smoke and CO detectors, HVAC control, heating
control, home security, environmental controls, blind, drapery and shade controls,
medical sensing and monitoring, universal remote control to a set-top box, etc.
CP: What would be the target market for ZigBee devices in India and globally?
AW: ZigBee would be ideal for any low-power, low-data-rate sensor or control network
in India and elsewhere where the cost and complexity of installing wired networks is cost-
prohibitive. For example, ZigBee is proving to be a great solution for automatically
monitoring electric, gas and water meters in Chinese households and apartments to
accommodate the country’s enormous housing boom. India is experiencing a similar
building boom due largely to the growth of its economy and of the middle class. ZigBee
is well-suited in rural areas of India for monitoring the condition of bridges, roads, dams,
environmental controls, etc.
Its goal is to provide the consumer with ultimate flexibility, mobility, and ease-of-use by
building wireless intelligence and capabilities into everyday devices. ZigBee will be
embedded in a wide range of products and applications across consumer, commercial,
industrial and government markets worldwide. For the first time, companies will have a
standards-based wireless platform optimised for the unique needs of remote monitoring
and control applications, including simplicity, reliability, low-cost and low-power.
It focuses on defining the network, security and application software layers; providing
interoperability and conformance testing specifications; promoting the ZigBee brand
globally to build market awareness and managing the evolution of technology.
CP: ZigBee is still in a nascent stage. How do you see this technology taking off in
India and globally?
AW: We believe 2006 will be a breakout year for ZigBee. Ember already has many OEM
customers shipping products today, and we’re not alone. More than 200 companies have
joined the ZigBee Alliance. The first market to take off will probably be in building and
home automation and control. There are a number of global companies like Siemens and
Hitachi developing such products for worldwide distribution. We are also seeing more of
the big semiconductor companies getting into the ZigBee market, including Motorola,
Texas Instruments and STMicroelectronics.
AW: ZigBee was created to address the market need for a cost-effective, standards-based
wireless networking solution that supports low data-rates, low-power consumption,
security, and reliability. ZigBee is the only standards-based technology that addresses the
unique needs of most remote monitoring and control and sensory network applications.
CP: India being a cost-sensitive market, how is ZigBee suited for this marketplace?
AW: Not really compete. ZigBee is a complement to Bluetooth where both are used for
different applications. ZigBee is designed for low-power, low-data-rate sensing and
control applications that can span long distances and many devices. Bluetooth is designed
as a cable-replacement technology for peripherals. Bluetooth networks support higher
bandwidths between just a few devices over shorter distances.
CP: What initiatives are being taken to push applications based on ZigBee?
AW: OEMs have already started shipping products in a variety of applications, including
home control, home automation, building automation, and automatic meter reading.
ZigBee has established a process for compliance testing and certification, and ZigBee
member companies are assisting its customers in designing a variety of innovative
applications.