zigbee for amie

Upload: sandhya-devi

Post on 03-Apr-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 ZIGBEE for Amie

    1/15

    ZIGBEE

    6.1 Introduction

    The name "ZigBee" is derived from the erratic zigging patterns many bees make

    between flowers when collecting pollen. This is evocative of the invisible webs of

    connections existing in a fully wireless environment. The standard itself is regulated by a

    group known as the ZigBeeAlliance, with over 150 members worldwide.

    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 devices are actively limited to a through-rate of 250Kbps, operating on

    the 2.4 GHzISM band, which is available throughout most of the world.

    ZigBee has been developed to meet the growing demand for capable wireless

    networking between numerous low-power devices. In industry ZigBee is being used fornext 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.

    http://www.wisegeek.com/what-is-ghz.htmhttp://www.wisegeek.com/what-is-ghz.htmhttp://www.wisegeek.com/what-is-a-computer.htmhttp://www.wisegeek.com/what-is-a-computer.htmhttp://www.wisegeek.com/what-is-ghz.htm
  • 7/28/2019 ZIGBEE for Amie

    2/15

    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

    An LR-WPAN is a simple, low-cost communication network that allows wireless

    connectivity in applications with limited power and relaxed throughput requirements. The

    main objectives of an LR-WPAN are ease of installation, reliable data transfer, short-

    range operation, extremely low cost, and a reasonable battery life, while maintaining a

    simple and flexible protocol.

    Some of the characteristics of an LR-WPAN are as follows:

    Over-the-air data rates of 250 kb/s, 100kb/s, 40 kb/s, and 20 kb/s

    Star or peer-to-peer operation

    Allocated 16-bit short or 64-bit extended addresses

    Optional allocation of guaranteed time slots (GTSs)

    Carrier sense multiple access with collision avoidance (CSMA-CA) channel

    access

    Fully acknowledged protocol for transfer reliability

    Low power consumption

    Energy detection (ED)

    Link quality indication (LQI)

    16 channels in the 2450 MHz band, 30 channels in the 915 MHz band, and 3

    channels in the 868 MHz band.

    Two different device types can participate in an IEEE 802.15.4 network; a full-

    function device (FFD) and a reduced-function device (RFD). The FFD can operate in

    three modes serving as a personal area network (PAN) coordinator, a coordinator, or a

    device. An FFD can talk to RFDs or other FFDs, while an RFD can talk only to an FFD.

  • 7/28/2019 ZIGBEE for Amie

    3/15

    An RFD is intended for applications that are extremely simple, such as a light switch or a

    passive infrared sensor; they do not have the need to send large amounts of data and may

    only associate with a single FFD at a time. Consequently, the RFD can be implemented

    using minimal resources and memory capacity.

    6.2 Network topologies

    Depending on the application requirements, an IEEE 802.15.4 LR-WPAN may

    operate in either of two topologies: the star topology or the peer-to-peer topology. Both

    are shown in Figure x. In the star topology the communication is established between

    devices and a single central controller, called the PAN coordinator. A device typically

    has some associated application and is either the initiation point or the termination point

    for network communications.

    A PAN coordinator may also have a specific application, but it can be used to

    initiate, terminate, or route communication around the network. The PAN coordinator is

    the primary controller of the PAN. All devices operating on a network of either topology

    shall have unique 64- bit addresses. This address may be used for direct communication

    within the PAN, or a short address may be allocated by the PAN coordinator when the

    device associates and used instead.

    The PAN coordinator might often be mains powered, while the devices will most

    likely be battery powered. Applications that benefit from a star topology include home

    automation, personal computer (PC) peripherals, toys and games, and personal health

    care.

  • 7/28/2019 ZIGBEE for Amie

    4/15

    Figure 6.1: star and peer to peer Topologies

    The peer-to-peer topology also has a PAN coordinator; however, it differs from

    the star topology in that any device may communicate with any other device as long as

    they are in range of one another. Peer-to-peer topology allows more complex network

    formations to be implemented, such as mesh networking topology. Applications such as

    industrial control and monitoring, wireless sensor networks, asset and inventory tracking,

    intelligent agriculture, and security would benefit from such a network topology. A peer-

    to-peer network can be ad hoc, self-organizing, and self-healing. It may also allow

    multiple hops to route messages from any device to any other device on the network.

    Such functions can be added at the higher layer, but are not part of this standard.

    Each independent PAN selects a unique identifier. This PAN identifier allows

    communication between devices within a network using short addresses and enables

    transmissions between devices across independent networks.

    6.3 Architecture

    The IEEE 802.15.4 architecture is defined in terms of a number of blocks in order

    to simplify the standard. These blocks are called layers. Each layer is responsible for one

    part of the standard and offers services to the higher layers. The layout of the blocks is

    based on the open systems interconnection (OSI) seven-layer model. The interfaces

    between the layers serve to define the logical links that are described in this standard. An

    LR-WPAN device comprises a PHY, which contains the radio frequency (RF) transceiver

    along with its low-level control mechanism, and a MAC sub-layer that provides access to

  • 7/28/2019 ZIGBEE for Amie

    5/15

    the physical channel for all types of transfer. Figure 6.2 shows these blocks in a graphical

    representation

    Figure 6.2: ZigBee stack architecture

    The upper layers, shown in Figure y, consist of a network layer, which provides

    network configuration, manipulation, and message routing, and an application layer,

    which provides the intended function of the device.

    6.3.1 Physical layer (PHY):

    The PHY provides two services: the PHY data service and the PHY management

    service interfacing to the physical layer management entity (PLME) service access point

    (SAP) (known as the PLME-SAP). The PHY data service enables the transmission and

    reception of PHY protocol data units (PPDUs) across the physical radio channel. The

    features of the PHY are activation and deactivation of the radio transceiver, ED, LQI,

    channel selection, clear channel assessment (CCA), and transmitting as well as receiving

    packets across the physical medium.

  • 7/28/2019 ZIGBEE for Amie

    6/15

    The radio operates at one or more of the following unlicensed bands:

    868868.6 MHz (e.g., Europe)

    902928 MHz (e.g., North America)

    24002483.5 MHz (worldwide)

    6.3.2 MAC sub layer:

    The MAC sub layer provides two services: the MAC data service and the MAC

    management service interfacing to the MAC sub layer management entity (MLME)

    service access point (SAP) (known as MLME-SAP). The MAC data service enables the

    transmission and reception of MAC protocol data units (MPDUs) across the PHY data

    service. The features of the MAC sub layer are beacon management, channel access, GTSmanagement, frame validation, acknowledged frame delivery, association, and

    disassociation. In addition, the MAC sub layer provides hooks for implementing

    application-appropriate security mechanisms.

    Figure 6.3: MAC Sublayer

    6.3.2.1 Data Frame:

  • 7/28/2019 ZIGBEE for Amie

    7/15

    The data frame provides a payload of up to 104 bytes. The frame is numbered to

    ensure that all packets are tracked. A frame-check sequence ensures that packets are

    received without error. This frame structure improves reliability in difficult conditions.

    6.3.2.2 Acknowledgment (ACK) frame:

    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.

    6.3.2.3 MAC command frame:

    A 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.

    6.3.2.4 Beacon frame:

    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.

    6.4 Data Transfer Model

    Three types of data transfer transactions exist. The first one is the data transfer to

    a coordinator in which a device transmits the data. The second transaction is the data

    transfer from a coordinator in which the device receives the data. The third transaction is

    the data transfer between two peer devices. In star topology, only two of thesetransactions are used because data may be exchanged only between the coordinator and a

    device. In a peer-to-peer topology, data may be exchanged between any two devices on

    the network; consequently all three transactions may be used in this topology.

    The mechanisms for each transfer type depend on whether the network supports

    the transmission of beacons. A beacon-enabled PAN is used in networks that either

  • 7/28/2019 ZIGBEE for Amie

    8/15

    require synchronization or support for low latency devices, such as PC peripherals. If the

    network does not need synchronization or support for low-latency devices, it can elect not

    to use the beacon for normal transfers. However, the beacon is still required for network

    discovery.

    6.5 Device Types

    Zigbee networks use three device types:

    The network coordinator maintains overall network knowledge. It's the most

    sophisticated of the three types and requires the most memory and computing

    power.

    The full function device (FFD) supports all 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's generally found in network-edge

    devices.

    6.6 Security

    Security and data integrity are key benefits of the ZigBee technology. ZigBee

    leverages the security model of the IEEE 802.15.4 MAC sub layer which specifies four

    security services:

    Access controlthe 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.

  • 7/28/2019 ZIGBEE for Amie

    9/15

    Sequential freshness to reject data frames that have been replayedthe 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.

    6.7 Conclusion

    Zigbee with its long battery life, low-cost , wireless range up to 70m indoors and

    400m outdoors with full control of transmitted output power have networking

    flexibility to cover entire campuses and supports multiple network topologies

    encountered in home and professional settings.

    PIR SENSOR (Live Body Sensor)

    Passive Infrared Sensors (PIR):

    Passive InfraRed sensors (PIR sensors) are electronic devices which

    measure infrared light radiating from objects in the field of view. PIRs are often

    used in the construction of PIR-based motion detectors, see below. Apparentmotion is detected when an infrared emitting source with one temperature, such

    as a human body, passes in front of a source with another temperature, such as

    a wall.

    All objects emit infrared radiation; see black body radiation. This radiation

    (energy) is invisible to the human eye but can be detected by electronic devices

    designed for such a purpose. The term 'passive' in this instance means the PIR

  • 7/28/2019 ZIGBEE for Amie

    10/15

    does not emit any energy of any type but merely sits 'passive' accepting infrared

    energy through the front of the sensor, known as the sensor face. At the core of a

    PIR is a solid state sensoror set of sensors, with approximately 1/4 inch square

    area. The sensor areas are made from a pyroelectric material.

    The actual sensor on the chip is made from natural or artificial pyroelectric

    materials, usually in the form of a thin film, out of gallium nitride (GaN), caesium

    nitrate (CsNO3), polyvinyl fluorides, derivatives of phenylpyrazine, and cobalt

    phthalocyanine. (See pyroelectric crystals.) Lithium tantalate (LiTaO3) is a crystal

    exhibiting both piezoelectric and pyroelectric properties.

    The sensor is often manufactured as part of an integrated circuit and may

    be comprised of one (1), two (2) or four (4) 'pixels' comprised of equal areas of

    the pyroelectric material. Pairs of the sensor pixels may be wired as opposite

    inputs to a differential amplifier. In such a configuration, the PIR measurements

    cancel each other so that the average temperature of the field of view is removed

    from the electrical signal; an increase of IR energy across the entire sensor is

    self-cancelling and will not trigger the device. This allows the device to resistfalse indications of change in the event of being exposed to flashes of light or

    field-wide illumination. (Continuous bright light could still saturate the sensor

    materials and render the sensor unable to register further information.) At the

    same time, this differential arrangement minimizes common-mode interference;

    this allows the device to resist triggering due to nearby electric fields. However, a

    differential pair of sensors cannot measure temperature in that configuration and

    therefore this configuration is specizliaed formotion detectors,.

  • 7/28/2019 ZIGBEE for Amie

    11/15

    PIR-based motion detector:

    In a PIR-based motion detector, the PIR sensor is typically mounted on a

    printed circuit board which also contains the necessary electronics required to

    interpret the signals from the chip. The complete circuit is contained in a housing

    which is then mounted in a location where the sensor can view the area to be

    monitored. Infrared energy is able to reach the sensor through the window

    because the plastic used is transparent to infrared radiation (but only translucent

    to visible light). This plastic sheet prevents the introduction of dust and insects

    which could obscure the sensor's field of view.

    A few mechanisms have been used to focus the distant infrared energy

    onto the sensor surface. The window may have Fresnel lenses molded into it.

    Alternatively, sometimes PIR sensors are used with plastic segmented parabolic

    mirrors to focus the infrared energy; when mirrors are used, the plastic window

    cover has no Fresnel lenses molded into it. A filtering window (or lens) may beused to limit the wavelengths to 8-14 micrometers which is most sensitive to

    human infrared radiation (9.4 micrometers being the strongest).

    The PIR device can be thought of as a kind of infrared 'camera' which

    remembers the amount of infrared energy focused on its surface. Once power is

    http://upload.wikimedia.org/wikipedia/en/0/0c/FacetLensOfMotionDetector_animation2.gif
  • 7/28/2019 ZIGBEE for Amie

    12/15

    applied to the PIR the electronics in the PIR shortly settle into a quiescent state

    and energize a small relay. This relay controls a set of electrical contacts which

    are usually connected to the detection input of an alarm control panel. If the

    amount of infrared energy focused on the sensor changes within a configured

    time period, the device will switch the state of the alarm output relay. The alarm

    output relay is typically a "normally closed (NC)" relay, also know as a "Form B"

    relay.

  • 7/28/2019 ZIGBEE for Amie

    13/15

    A person entering the monitored area is detected when the infrared

    energy emitted from the intruder's body is focused by a Fresnel lens or a mirror

    segment and overlaps a section on the chip which had previously been looking at

    some much cooler part of the protected area. That portion of the chip is now

    much warmer than when the intruder wasn't there. As the intruder moves, so

    does the hot spot on the surface of the chip. This moving hot spot causes the

    electronics connected to the chip to de-energize the relay, operating its contacts,

    thereby activating the detection input on the alarm control panel. Conversely, if

    an intruder were to try to defeat a PIR perhaps by holding some sort of thermal

    shield between himself and the PIR, a corresponding 'cold' spot moving across

    the face of the chip will also cause the relay to de-energize unless the thermalshield has the same temperature as the objects behind it.

    Manufacturers recommend careful placement of their products to prevent

    false alarms. They suggest mounting the PIRs in such a way that the PIR cannot

    'see' out of a window. Although the wavelength of infrared radiation to which the

    chips are sensitive does not penetrate glass very well, a strong infrared source (a

    vehicle headlight, sunlight reflecting from a vehicle window) can overload the

    chip with enough infrared energy to fool the electronics and cause a false (non-

    intruder caused) alarm. A person moving on the other side of the glass however

    would not be 'seen' by the PIR.

    They also recommended that the PIR not be placed in such a position that

    an HVAC vent would blow hot or cold air onto the surface of the plastic which

    covers the housing's window. Although air has very low emissive (emits very

    small amounts of infrared energy), the air blowing on the plastic window cover

    could change the plastic's temperature enough to, once again, fool the

    electronics.

  • 7/28/2019 ZIGBEE for Amie

    14/15

    PIRs come in many configurations for a wide variety of applications. The

    most common used in home security systems has numerous Fresnel lenses or

    mirror segments and has an effective range of about thirty feet. Some larger

    PIRs are made with single segment mirrors and can sense changes in infrared

    energy over one hundred feet away from the PIR. There are also PIRs designed

    with reversible orientation mirrors which allow either broad coverage (110 wide)

    or very narrow 'curtain' coverage

  • 7/28/2019 ZIGBEE for Amie

    15/15

    4.2 MICROCONTORLLER

    INTRODUCTION

    Microcontrollers are destined to play an increasingly important role in

    revolutionizing various industries and influencing our day to day life more strongly

    than one can imagine. Since its emergence in the early 1980's the

    microcontroller has been recognized as a general purpose building block for

    intelligent digital systems. It is finding using diverse area, starting from simple

    children's toys to highly complex spacecraft. Because of its versatility and many

    advantages, the application domain has spread in all conceivable directions,

    making it ubiquitous. As a consequence, it has generate a great deal of interest

    and enthusiasm among students, teachers and practicing engineers, creating an

    acute education need for imparting the knowledge of microcontroller based

    system design and development. It identifies the vital features responsible for

    their tremendous impact, the acute educational need created by them and

    provides a glimpse of the major application area.