Professional Documents
Culture Documents
CHAPTER 1
1.2 ZIGBEE:
ZigBee is the name of a specification for a suite of high level communication
protocols using small, low-power digital radios based on the IEEE 802.15.4 standard
for wireless personal area networks (WPANs), such as wireless headphones
connecting with cell phones via short-range radio. The technology is intended to be
simpler and cheaper than other WPANs, such as Bluetooth. ZigBee is targeted at
radio-frequency (RF) applications which require a low data rate, long battery life, and
secure networking
1.3 OVERVIEW:
ZigBee builds upon the physical layer and medium access control defined in
IEEE standard 802.15.4 (2003 version) for low-rate WPAN's. The specification goes
on to complete the standard by adding four main components: network layer,
application layer, ZigBee device objects (ZDO's) and manufacturer-defined
application objects which allow for customization and favor total integration.
Besides adding two high-level network layers to the underlying structure, the
most significant improvement is the introduction of ZDO's. These are responsible for a
number of tasks, which include keeping of device roles, management of requests to
join a network, device discovery and security.
2
(Fig 1:zigbee specifications)
At its core, ZigBee is a mesh network architecture. Its network layer natively supports
three types of topologies: both star and tree typical networks and generic mesh
networks. Every network must have one coordinator device, tasked with its creation,
the control of its parameters and basic maintenance. Within star networks, the
coordinator must be the central node. Both trees and meshes allow the use of ZigBee
routers to extend communication at the network level (they are not ZigBee
coordinators, but may act as 802.15.4 coordinators within their personal operating
space), but they differ in a few important details: communication within trees is
hierarchical and optionally utilizes frame beacons, whereas meshes allow generic
communication structures but no router beaconing.
3
ZigBee operates in the industrial, scientific and medical (ISM) radio bands; 868
MHz in Europe, 915 MHz in countries such as USA and Australia, and 2.4 GHz in
most jurisdictions worldwide. The technology is intended to be simpler and cheaper
than other WPANs such as Bluetooth. The most capable ZigBee node type is said to
require only about 10% of the software of a typical Bluetooth or Wireless Internet
node, while the simplest nodes are about 2% However, actual code sizes are much
higher, closer to 50% of Bluetooth code size ZigBee chip vendors have announced
128-kilobyte devices.
First stack release is now called "Zigbee 2004". The 2nd stack release is called
2006, and mainly replaces the MSG/KVP structure used in 2004 with a "cluster
library". The 2004 stack is now more or less obsolete. The ZigBee Alliance has
started work on ZigBee 2007, looking to extend the ZigBee 2006 specification
capabilities; the main enhancements are optimizing certain network level functionality
(such as data aggregation). There are also some new application profiles like
Automatic Meter Reading, Commercial building automation and home automation
based on the "cluster library principle".
Zigbee 2007, now the current stack release, is sometimes called "Pro", but pro
is a stack profile, which defines certain stack settings and mandatory features.
ZigBee 2007 at the network level is not backwards-compatible with ZigBee
2004/2006, although a ZigBee 2004/2006 RFD node can join a 2007 network, and
vice-versa. It's not possible to mix 2004/2006 routers with 2007 routers/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 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.
5
1.5.2 Communication models:
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.
6
ii)the message service is designed to offer a general approach to information
treatment, avoiding the necessity to adapt application protocols and potential
overhead incurred on by KPV. It allows arbitrary payloads to be transmitted over APS
frames.
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.
7
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.
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
8
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.
9
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:
1.7 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 non-beacon-enabled networks (those whose beacon order is 15), an
unslotted CSMA/CA channel access mechanism is used. In this type of network,
ZigBee Routers typically have their receivers continuously active, requiring a more
robust power supply. However, this allows for heterogeneous networks in which some
10
devices receive continuously, while others only transmit when an external stimulus is
detected. The typical example of a heterogeneous network is a wireless light switch:
the ZigBee node at the lamp may receive constantly, since it is connected to the
mains supply, while a battery-powered light switch would remain asleep until the
switch is thrown. The switch then wakes up, sends a command to the lamp, receives
an acknowledgment, and returns to sleep. In such a network the lamp node will be at
least a ZigBee Router, if not the ZigBee Coordinator; the switch node is typically a
ZigBee End Device.
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.
11
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.
This page describes the types of node that are used in a ZigBee network.
Reference will be made to the toplogies introduced on the previous page (Star, Tree,
Mesh), but these topologies will be described in more detail later in this module.
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:
• Co-ordinator
• 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 Co-ordinator.
All ZigBee networks must have one (and only one) Co-ordinator, irrespective of the
network topology.
In the Star topology, the Co-ordinator is the central node in the network.
• In the Tree and Mesh topologies, the Co-ordinator is the top (root) node in the
network.
• This is illustrated below, where the Co-ordinator is colour-coded in dark black.
At the network level, the Co-ordinator is mainly needed at system initialisation. The
tasks of the Co-ordinator 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
• Allows other devices to connect to it (that is, to join the network)
The Co-ordinator can also provide message routing (for example, in a Star network),
security management and other services.
13
In some circumstances, the network will be able to operate normally if the Co-
ordinator 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 Co-ordinator provides services at the
Application layer and if these services are being used (for example, Co-ordinator
binding), the Co-ordinator must be able to provide them at all times.
1.8.2 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 Co-ordinator and, therefore, a
Star network does not need Routers.
• 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 anywhere 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).
The possible positions of Routers in the different network topologies are illustrated
below, where the Routers are color-coded in red:
14
1.8.3 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.
This is illustrated below, where the End Devices are color-coded in light blue.
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.
15
1.9 SOFTWARE AND HARDWARE:
Even though the radios themselves are cheap, the ZigBee Qualification Process
involves a full validation of the requirements of the physical layer. This amount of
concern about the Physical Layer has multiple benefits, since all radios derived from
that semiconductor mask set would enjoy the same RF characteristics. On the other
hand, an uncertified physical layer that malfunctions could cripple the battery lifespan
of other devices on a ZigBee network. Where other protocols can mask poor
sensitivity or other esoteric problems in a fade compensation response, ZigBee radios
have very tight engineering constraints: they are both power and bandwidth
constrained. Thus, radios are tested to the ISO 17025 standard with guidance given
by Clause 6 of the 802.15.4-2003 Standard. Most vendors plan to integrate the radio
and microcontroller onto a single chip.
1.10 USES:
ZigBee protocols are intended for use in embedded applications requiring low
data rates and low power consumption. ZigBee's current focus is to define a general-
purpose, inexpensive, self-organizing mesh network that can be used for industrial
control, embedded sensing, medical data collection, smoke and intruder warning,
building automation, home automation, etc. The resulting network will use very small
amounts of power so individual devices might run for a year or two using the originally
installed battery.
Typical application areas include:
• Home Entertainment and Control - Smart Lighting, Advanced Temperature Control,
Safety & Security and Movies & Music
• Home Awareness - Water Sensors, Power Sensors, Smart Appliances and Access
sensors
16
• Mobile Services – m-payment, m-monitoring and control, m-security and access
control, m- healthcare and tele-assist
• Commercial Building– Energy Monitoring, HVAC, Lighting, Access Control
• Industrial Plant– Process Control, Asset Management, Environmental management,
Energy Management
17
CHAPTER 2
CIRCUIT DESIGN
2.1 INTRODUCTION:
This chapter mainly deals with the circuit and the requirements of the project.
Chipcon cc2420 is a basic device needed for transmit and receive the data from the
remote device with the help of computer the display of the report is done. The
transmission and receive of signal is done in the standard form of IEE
802.15.4,2.4Ghz.The program for this device is done my using msp430,this
transmitting device is interfaced with the microcontroller as it is connect to analog to
digital converters which has the digital converted signals. Now when the data to be
fed to computer is available an input port is needed, through which interfacing is
done. In this system, for interfacing com port is used as it is an inexpensive platform
for implementing low-frequency data acquisition projects. By using the visual basic
the embedding is done.
HUMIDITY TEMP
SENSOR SENSOR
A/D MICRO-
S23
MAX 232
CONVERTER CONTROLLER R
2
RAIN
SENSOR
18
CIRCUIT DIAGRAM:
19
2.2.1 Power Supply:
This circuit IC voltage regulator as the power source. IC voltage regulators are
versatile and inexpensive and are available with features such as a programmable
output, current-voltage boosting, internal short-circuit current limiting, thermal
shutdown and floating operation for high voltage application
2.2.3 Sensors:
The sensors used for the weather parameters are Lm35 for the temperature
sensing,HIH3160 series is used and a short circuit is used for the rain fall sensing is
used. The data form this is transmitted through the ADC conversion circuit where the
analog data from the parameter transducers are changed to digital form by the circuit
used.
2.2.4 Transmission circuit:
The transmission of data is done in the zigbee module on the basis of IEEE
802.15.4/2.4 GHz standard. this is integrated in the chipcon CC22420.The
transmission of data data is done in encapsulation methods like it gathers the data
and send to the receivers end at a time like a single data packet so that it can send as
many possible data packets in a minute and also the data is not lost in the
transmission .
20
2.2.5 Conversion Circuit:
The output of sample and hold is fed ADC for conversion into digital format. In
this case ADC0804 is employed for conversion of the sampled input signal into 8-bit
digital output. The ADC0804 is compatible with microprocessors. It is a 20-pin IC that
works with 5V supply. It converts the analog input voltage to 8-bit digital output. The
data bus is tri-state buffered. With eight bit, the resolution is 5V/255=19.6mv.
The in built clock generator circuit produces a frequency of about 640 KHz with
R1=10 kilo ohms and c4=150 pf, which are the externally connected timing
components. The conversion time obtained is approximately 100 us.
21
CHAPTER 3
DESCRIPTION OF CIRCUIT COMPONENTS
The CC2420 provides extensive hardware support for packet handling, data buffering,
burst transmissions, data encryption, data authentication, clear channel assessment,
link quality indication and packet timing information. These features reduce the load
on the host controller and allow CC2420 to interface low-cost microcontrollers. The
configuration interface and transmit / receive FIFOs of CC2420 are accessed via an
SPI interface. In a typical application CC2420 will be used together with a
microcontroller and a few external passive components. CC2420 is based on
Chipcon’s SmartRF®-03 technology in 0.18 µm CMOS.
3.1.2 Features:
• 2400 – 2483.5 MHz RF Transceiver
1• Direct Sequence Spread Spectrum (DSSS) transceiver
2• 250 kbps data rate, 2 MChip/s chip rate
3• O-QPSK with half sine pulse shaping modulation
4• Very low current consumption (RX: 19.7 mA, TX: 17.4 mA)
5• High sensitivity (-94 dBm)
6• High adjacent channel rejection (39 dB)
22
7• High alternate channel rejection (55 dB)
8• On-chip VCO, LNA and PA
9• Low supply voltage (2.1 – 3.6 V) with on-chip voltage regulator
10• Programmable output power
11• I/Q low-IF soft decision receiver
12• I/Q direct up-conversion transmitter
2• Separate transmit and receive FIFOs
1• 128 byte transmit data FIFO
2• 128 byte receive data FIFO
3• Very few external components
1• Only reference crystal and a minimised number of passives
2• No external filters needed
4• Easy configuration interface
1• 4-wire SPI interface
2• Serial clock up to 10 MHz
5• 802.15.4 MAC hardware support:
1• Automatic preamble generator
2• Synchronisation word insertion/detection
3• CRC-16 computation and checking over the MAC payload
4• Clear Channel Assessment
5• Energy detection / digital RSSI
6• Link Quality Indication
7• Full automatic MAC security (CTR, CBC-MAC, CCM)
6• 802.15.4 MAC hardware security:
1• Automated security operations within the receive and transmit FIFOs.
2• CTR mode encryption / decryption
3• CBC-MAC authentication
4• CCM encryption / decryption and authentication
5• Stand-alone AES encryption
7• Development tools available
1• Fully equipped development kit
2• Demonstration board reference design with microcontroller code
23
3• Easy-to-use software for generating the CC2420 configu-ration data
8• Small size QLP-48 package, 7 x 7 mm
Supply voltage (VDDIO) for digital I/Os, DVDD3.3, 1.6 3.6 V The digital I/O voltage (DVDD3.3 pin)
pin 25 . must match the external interfacing
circuit (e.g. microcontroller).
Supply voltage (VDD) on AVDD_VCO, DVDD1.8, 1.6 1.8 2.0 V The typical application uses regulated
etc (pin no 1, 2, 3, 4, 10, 14, 15, 17, 18, 20, 26, 35, 1.8 V supply generated by the on-chip
37, 44 and 48) voltage regulator.
24
Pin Pin Name Pin type Pin Description
- AGND Ground Exposed die attach pad. Must be connected to
(analog) solid ground plane
1 VCO_GUARD Power Connection of guard ring for VCO (to AVDD)
(analog) shielding
2 AVDD_VCO Power 1.8 V Power supply for VCO
(analog)
3 AVDD_PRE Power 1.8 V Power supply for Prescaler
(analog)
4 AVDD_RF1 Power 1.8 V Power supply for RF front-end
(analog)
5 GND Ground Grounded pin for RF shielding
(analog)
6 RF_P RF I/O Positive RF input/output signal to LNA/from PA
in receive/transmit mode
7 TXRX_SWITCH Power Common supply connection for integrated RF
(analog) front-end. Must be connected to RF_P and
RF_N externally through a DC path
8 RF_N RF I/O Negative RF input/output signal to LNA/from PA
in receive/transmit mode
9 GND Ground Grounded pin for RF shielding
(analog)
10 AVDD_SW Power 1.8 V Power supply for LNA / PA switch
(analog)
11 NC - Not Connect
12 NC - Not Connect
13 NC - Not Connect
14 AVDD_RF2 Power 1.8 V Power supply for receive and transmit
(analog) mixers
15 AVDD_IF2 Power 1.8 V Power supply for transmit / receive IF
(analog) chain
16 NC - Not Connect
17 AVDD_ADC Power 1.8 V Power supply for analog parts of ADCs
(analog) and DACs
18 DVDD_ADC Power 1.8 V Power supply for digital parts of receive
(digital) ADCs
19 DGND_GUARD Ground Ground connection for digital noise isolation
(digital)
20 DGUARD Power 1.8 V Power supply connection for digital noise
25
(digital) isolation
21 RESETn Digital Input Asynchronous, active low digital reset
22 DGND Ground Ground connection for digital core and pads
(digital)
23 DSUB_PADS Ground Substrate connection for digital pads
(digital)
24 DSUB_CORE Ground Substrate connection for digital modules
(digital)
25 DVDD3.3 Power 3.3 V Power supply for digital I/Os
(digital)
26 DVDD1.8 Power 1.8 V Power supply for digital core
(digital)
27 SFD Digital SFD (Start of Frame Delimiter) / digital mux
output output
28 CCA Digital CCA (Clear Channel Assessment) / digital mux
output output
29 FIFOP Digital High when number of bytes in FIFO exceeds
output threshold / serial RF clock output in test mode
30 FIFO Digital I/O High when data in FIFO / serial RF data input /
output in test mode
31 CSn Digital input SPI Chip select, active low
32 SCLK Digital input SPI Clock input, up to 10 MHz
33 SI Digital input SPI Slave Input. Sampled on the positive edge
of SCLK
34 SO Digital SPI Slave Output. Updated on the negative
output edge of SCLK. Tristate when CSn high.
(tristate)
35 DVDD_RAM Power 1.8 V Power supply for digital RAM
(digital)
36 NC - Not Connect
37 AVDD_XOSC16 Power 1.8 V crystal oscillator power supply
(analog)
38 XOSC16_Q2 Analog I/O 16 MHz Crystal oscillator pin 2
39 XOSC16_Q1 Analog I/O 16 MHz Crystal oscillator pin 1 or external
clock input
40 NC - Not Connect
41 VREG_EN Digital input Voltage regulator enable, active high, held at
VREG_IN voltage level when active
42 VREG_OUT Power Voltage regulator 1.8 V power supply output
output
26
43 VREG_IN Power Voltage regulator 2.1 to 3.6 V power supply
(analog) input
44 AVDD_IF1 Power 1.8 V Power supply for transmit / receive IF
(analog) chain
45 R_BIAS Analog External precision resistor, 43 kΩ, ± 1 %
output
46 ATEST2 Analog I/O Analog test I/O for prototype and production
testing
47 ATEST1 Analog I/O Analog test I/O for prototype and production
testing
48 AVDD_CHP Power 1.8 V Power supply for phase detector and
(analog) charge pump
CC2420 features a low-IF receiver. The received RF signal is amplified by the low-
noise amplifier (LNA) and down-converted in quadrature (I and Q) to the intermediate
frequency (IF). At IF (2 MHz), the complex I/Q signal is filtered and amplified, and
27
then digitized by the ADCs. Automatic gain control, final channel filtering, de-
spreading, symbol correlation and byte synchronisation are performed digitally.
When the SFD pin goes high, this indicates that a start of frame delimiter has been
detected. CC2420 buffers the received data in a 128 byte receive FIFO. The user
may read the FIFO through an SPI interface. CRC is verified in hardware. RSSI and
correlation values are appended to the frame. CCA is available on a pin in receive
mode. Serial (unbuffered) data modes are also available for test purposes.
An analog lowpass filter passes the signal to the quadrature (I and Q) upconversion
mixers. The RF signal is amplified in the power amplifier (PA) and fed to the antenna.
The internal T/R switch circuitry makes the antenna interface and matching easy. The
RF connection is differential. A balun may be used for single-ended antennas. The
biasing of the PA and LNA is done by connecting TXRX_SWITCH to RF_P and RF_N
through an external DC path.
28
(Fig 6: cc2420 pin connections)
The digital baseband includes support for frame handling, address recognition, data
buffering and MAC security.
The 4-wire SPI serial interface is used for configuration and data buffering.
An on-chip voltage regulator delivers the regulated 1.8 V supply voltage. The voltage
regulator may be enabled / disabled through a separate pin.
29
A battery monitor may optionally be used to monitor the unregulated power supply
voltage. The battery monitor is configurable through the SPI interface.
The modulation format is Offset – Quadrature Phase Shift Keying (O-QPSK) with half-
sine chip shaping. This is equivalent to MSK modulation. Each chip is shaped as a
half-sine, transmitted alternately in the I and Q channels with one half chip period
offset. This is illustrated for the zero-symbol in Figure.
2• Interface to the receive and transmit FIFOs using the FIFO and FIFOP status pins.
4• Interface to the SFD pin for timing information (particularly for beaconing networks).
31
SO should be connected to an input at the microcontroller. SI, SCLK and CSn must be
microcontroller outputs. Preferably the microcontroller should have a hardware SPI
interface.
The microcontroller pins connected to SI, SO and SCLK can be shared with other SPI-
interface devices. SO is a high impedance output as long as CSn is not activated (active
low).
CSn should have an external pull-up resistor or be set to a high level when the voltage
regulator is turned off in order to prevent the input from floating. SI and SCLK should be
set to a defined level to prevent the inputs from floating.
32
(Fig: 9 : Microcontroller interface example)
In receive mode, the SFD pin goes high after the start of frame delimiter
(SFD) field has been completely received. If address recognition is disabled or is
successful, the SFD pin goes low again only after the last byte of the MPDU has
been received. If the received frame fails address recognition, the SFD pin goes low
immediately. This is illustrated in Figure 12.
The FIFO pin is high when there is one or more data bytes in the RXFIFO. The first
byte to be stored in the RXFIFO is the length field of the received frame, i.e. the
FIFO pin is set high when the length field is written to the RXFIFO. The FIFO pin then
remains high until the RXFIFO is empty.
If a previously received frame is completely or partially inside the RXFIFO, the FIFO
• Ultralow-Power Consumption:
Autoscan Feature
3.2.2 Description:
CPU
The MSP430 CPU has a 16-bit RISC architecture that is highly transparent
to the application. All operations, other than program-flow instructions,are
performed as register operations in conjunction with seven addressing modes for
source operand and four addressing modes for destination operand. The CPU is
integrated with 16 registers that provide reduced instruction execution time. The
register-to-register operation execution time is one cycle of the CPU clock. Four of
the registers, R0 to R3, are dedicated as program counter, stack pointer, status
register, and constant generator respectively. The remaining registers are general-
purpose registers. Peripherals are connected to the CPU using data, address, and
control buses, and can be handled with all instructions.
Instruction Set:
The instruction set consists of 51 instructions with three formats and seven
address modes. Each instruction can operate on word and byte data. Table 1
shows examples of the three types of instruction formats; the address modes are
listed in Table .
(Table 2 :Instruction Set)
Operating Modes:
The MSP430 has one active mode and five software selectable low-power modes
of operation. An interrupt event can wake up the device from any of the five low-
power modes, service the request and restore back to the low-power mode on
return from the interrupt program.
The following six operating modes can be configured by software:
Digital I/O:
There are six 8-bit I/O ports implemented—ports P1 through P6:
• All individual I/O bits are independently programmable.
• Any combination of input, output, and interrupt conditions is possible.
• dge-selectable interrupt input capability for all the eight bits of ports P1 and
P2.
• Read/write access to port-control registers is supported by all instructions.
Oscillator and System Clock:
The clock system in the MSP430x13x and MSP43x14x(1) family of devices is
supported by the basic clock module that includes support for a 32768-Hz watch
crystal oscillator, an internal digitally-controlled oscillator (DCO) and a high
frequency crystal oscillator. The basic clock module is designed to meet the
requirements of both low system cost and low-power consumption. The internal
DCO provides a fast turn-on clock source and stabilizes in less than 6 us. The
basic clock module provides the following clock signals:
• Auxiliary clock (ACLK), sourced from a 32768-Hz watch crystal or a high
frequency crystal.
• Main clock (MCLK), the system clock used by the CPU.
• Sub-Main clock (SMCLK), the sub-system clock used by the peripheral
modules.
Watchdog Timer:
The primary function of the watchdog timer (WDT) module is to perform a
controlled system restart after a software problem occurs. If the selected time
interval expires, a system reset is generated. If the watchdog function is not
needed in an application, the module can be configured as an interval timer and
can generate interrupts at selected time intervals.
3.3 SENSORS:
To monitor parameters we sensors this type of sensors are discussed as
further in the review of each sensor
The type of sensors are as follows
3.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)
3.3.1.1General 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.
3.3.1.2Features:
• 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
3.3.1.3 Typical Applications:
Choose R1 = −VS/50 µA
V OUT=+1,500 mV at +150°C
= +250 mV at +25°C
= −550 mV at −55°C
Thermal Resistance:
Junction to Air
Accuracy vs Temperature:
3.3.1.4 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 expecially 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 Vb 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.
3.3.3 FEATURES
• Molded thermoset plastic housing with cover
• Linear voltage output vs %RH
• Laser trimmed interchangeability
• Low power design
• High accuracy
• Fast response time
• Stable, low drift performance
• Chemically resistant
Parameter Condition
Humidity Range
Operating 0 to 100% RH, non-condensing(1
Storage 0 to 90% RH, non-condensing
Temperature Range
Operating -40 °C to 85 °C (-40 °F to 185 °F)
Storage -51 °C to 125 °C (-60 °F to 257 °F)
Handling Static sensitive diode protected to 15 kV
maximum
RS-232 Driver/Receiver:
Newer devices like MAX-232 (Maxim), ICL232 (Harris) and AD232
(Analog Devices) include a Charge Pump, which generates +10V and -10V from a
single 5 volts supply. This I.C. also includes two receivers and two transmitters in
the same package. This is handy in many cases when there is need to use both
transmit and receive data Lines. There are also many variations of these devices.
The large value of capacitors is not only bulky, but also expensive. Therefore other
devices are available which use smaller capacitors and even some with inbuilt
capacitors.Recently Analog devices have introduces a device which requires only
one cap and supports one transmit and one receive line.
CHAPTER 4
PROGRAMMING
4.1 INTRODUCTION:
In this chapter the code program written in visual basic and 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 VB screen.
Option Explicit
'int a
Dim tmpVal, humVal, pressVal As String
Call LP_Clear_Data
Label6.Caption = DateTime.Date$
MSComm1.RThreshold = 2
MSComm1.Settings = "9600,N,8,1"
MSComm1.DTREnable = False
MSComm1.CommPort = 1
MSComm1.PortOpen = True
End Sub
Label8.Caption = humVal
Label9.Caption = tmpVal
'Label10.Caption = pressVal
End If
End Sub
#include<stdio.h>
#include<reg52.h>
sbit GAS_SENS=P3^6;
sbit RAIN_SENS=P3^7;
void main()
{
P2=0XFF;
P1=0XFF;
P3=0XFF;
SER_SET();
GAS_SENS=0;
RAIN_SENS=1;
while(1)
{
l=P2;
TEMPE();
DELAY(50);
l=P1+30;
HUMIDITY();
DELAY(50);
//GAS_DEDUCT();
//DELAY(50);
RAIN_FALL();
DELAY(50);
TI=0;
SBUF=0X0D;
while(TI==0);
TI=0;
DELAY(500);
}
}
/*--------->DELAY FUNCTION<-----------------*/
void DELAY(unsigned int count)
{ // mSec Delay 11.0592 Mhz
unsigned int j; // Keil v7.5a
while(count)
{
j = 115;
while(j>0) j--;
count--;
}
}
CHAPTER 5
5.1 CONCLUSION
The fundamental aim of this project is to design a wireless weather system
which enables to monitor the weather parameter in an industry by using zigbee
technology and display the parameter on the PC’s screen using visual basic. 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. The test
has been performed by placing the sensor board both in an indoor and outdoor
and the parameters are noted and checked with the analog transducers for errors
and the errors are very minimum. ZigBee targets applications not addressable by
Bluetooth or any other wireless standard.
REFERENCES
1. www.zigbeealliance.com
2. www.wikipedia.org
3. Wireless Communication System by Roody Coolen
4. Communication Electronics by Freznel