Interim Report -Final josephcheroor

Embed Size (px)

Citation preview

  • 8/9/2019 Interim Report -Final josephcheroor

    1/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    1

    1.INTRODUCTION

    A wireless sensor network usually consists of several wireless sensor nodes

    i.e. zone sensor units, equipped with one or more sensors to monitor the environment, a

    microcontroller to gather and process the information, and a transceiver to communicate

    these readings to base station unit. In our project we use two zone sensor units and a base

    station. The system employs a group of sensors located at different zones of a building.

    All the sensor signals are monitored by a master unit which is responsible for detecting

    the fire, short-circuit and intruder attempts. Using this system we can monitor the various

    zones in a building.

    By analyzing various sensor outputs, i.e. temperature, smoke, intruder

    sensor, power etc., the master unit can identify the situation. The entire area to be

    monitored is divided into zones. The data from each zone is tagged with zone ID. After

    identifying the zone, an alarm file is immediately prepared by the master unit.

    The main advantage of the system is the capability to convey all vital details

    about the zone including the possible cause alarm. So the emergency team will have

    adequate data before starting the operation. The data from each zone is transmitted using

    a Zigbee which leads to fail safe operation in any environment.

  • 8/9/2019 Interim Report -Final josephcheroor

    2/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    2

    2.LITERETURE SURVEY

    Wireless sensor networking is a very dynamic field and likely will remain so

    over the next few years. After around a decade of active research on wireless sensor

    networks, recent standards released are stimulating the development of commercial

    products. One of these standards is ZigBee.

    Wireless sensor networks have been an active research topic for around a

    decade. The recent release of standards in the field, such as IEEE 802.15.4 and ZigBee,

    brought the technology out of research labs and stimulated the development of numerous

    commercial products. Moving from early research in military applications, sensor

    networks now are widely deployed in diverse applications including home automation,

    building automation, and utility metering. Although many early sensor networks used

    proprietary routing algorithms and RF technology, most recent products use standards-

    based networking and RF solutions.

    A key enabling standard for much of the commercial activity in the wireless

    sensor network area is the IEEE 802.15.4 standard. This PHY and MAC (media access

    control) layer standard defined a 250kb/s direct sequence spread spectrum (DSSS) radio

    operating in the 2.4GHz unlicensed band with lower bit-rate alternatives in the 868 MHz

    and 900 MHz bands. This standard now enjoys extensive silicon support, primarily in the

    2.4GHz band.

    Realizing WSN using Zigbee for security purpose especially in industries is

    the aim of this project. Security systems are common in buildings home etc. But security

    systems with zigbee are highly secure and efficient. Specifically in some industries

    several conditions has to be maintained throughout and also secure. For example, one of

    the disasters occurring in buildings is fire which causes large scale destruction. The main

    reason for this is inefficient wiring, lack of proper insulation which leads to short circuit

    and fire. So before spreading fire it is far better to check the short circuit condition. This

    is by checking heavy flow of current and excess voltage in the terminal .Another thing is

  • 8/9/2019 Interim Report -Final josephcheroor

    3/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    3

    that fire can occur without smoke and also in some cases smoke occurs first. So by

    smoke sensors we can prevent fire spread as early as possible. In the case of fire without

    smoke it is better to use temperature sensor.A

    s common in all security systems, here acheck for any intruder attempt is also made.

    For a realization ofWSN it is essential to have more than one sensor unit. In

    this project we realize WSN using two sensor units which monitor two different zones in

    a building. A base station is placed outside the building. If any conditions go wrong, the

    system should inform the proprietor and inform fire exchange in case of fire. Also an

    alarm should be installed to inform localities. So to make the system more secure we use

    a GSM module which will send message to predefined numbers. Thus our proposedsystem will monitor and finds solution itself in case of any threat.

    All sensors used here have simple design and construction. Interfacing and

    programming zigbee with microcontroller is the main matter. For simplicity we make use

    ofAT89C51 which is familiar to us and programming using ASM language which is

    again simple and familiar. All the components except some sensors are available in the

    market. Others can be made by us. The main matter is the cost of zigbee, which is

    relatively high. But the problem can be solved by using zigbee by rent.

  • 8/9/2019 Interim Report -Final josephcheroor

    4/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    4

    3. WSN -Wireless Sensor Network

    The last few years have resulted in tremendous advances in micro-

    electromechanical (MEMS) technology leading to the development of low power, and

    low cost tiny sensors. These novel sensors coupled with low power transceivers and

    microcontrollers have realized the concept of the Wireless Sensor Node. Wireless Sensor

    Networks (WSNs) are large scaled networks of these wireless sensor nodes aimed at

    performing a specific application. In general, most WSNs comprise several low cost, tiny

    motes, equipped with one or more sensors to monitor the environment, a microcontroller

    to gather and process the information, and a transceiver to communicate these readings to

    other nodes in the network. Transceivers in wireless sensor nodes are usually only

    capable of receiving or transmitting at a time.

    The mechanism of gaining access to the medium to transmit information is

    decided by the Medium Access Control (MAC) Protocol used, and messages are passed

    from sources to destinations (sinks) along paths determined by the Routing Protocol.

    Finally, the messages after data fusion and aggregation at nodes are forwarded to a

    remote base station by the sinks, where the monitoring results can be viewed. WSNs are

    already projected to be the solution in several military, environmental, medical and home

    monitoring applications. Most of these networks are envisioned to be used in areas where

    power lines cannot be provided. Irrespective of the application, the algorithms developed

    to govern the functioning of these networks must take into account the inherent

    limitations of energy, bandwidth, size, and cost present inWSNs.

  • 8/9/2019 Interim Report -Final josephcheroor

    5/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    5

    4. PROJECT DESCRIPTION

    4.1 OVERVIEW

    Fig 4.1 Overview

    Figure 4.1 shows overview of our project. The wireless sensor network

    consists of two zone sensor units and a base station. Communication takes place between

    zone sensor units and base station with the help of wireless transceiver, known as

    Zigbee. Zone sensor unit senses various informations from two zones and these

    informations are sent to the base station through wireless transceiver, zigbee. On

    receiving the information from the zone sensor unit, if the base station knows that fire

    has occurred then an emergency call or sms is made to nearby police station or fire

    station through GSM module.

    Zone

    Sensor

    Unit 1

    Zone

    Sensor

    Unit 2

    Base

    StationUnit

    GSM

    Wireless connections

  • 8/9/2019 Interim Report -Final josephcheroor

    6/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    6

    4.2 ZONE SENSOR UNIT

    4.2.1 BLOCK DIAGRAM

    Fig 4.2 Block diagram of zone sensor unit

    4.2.2 BLOCK DIAGRAM DESCRIPTION

    The figure 4.2 shows the block diagram of Zone sensor unit. The various

    sensors are connected to ADC0838 (8 channel, serial interface). The microcontroller will

    read data from ADC. The data is locally analyzed before sending to master unit to reduce

    the load on master module. When any of the input crosses a threshold, the zone module

    immediately informs this to master module through wireless link.

    ADC

    0838

    FIRE

    HEAT

    POWER

    IR TRAP

    MICROCONTROLLER

    (AT89C51)

    LCD

    ZIGBEE

    POWER

    SUPPLY

  • 8/9/2019 Interim Report -Final josephcheroor

    7/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    7

    The system can be connected with various sensors. Heat is sensed by using

    temperature sensor. The temperature sensorConverts ambient (room) temperature into a

    voltage varying signal. Fire is detected by using both temperature sensor and smokesensor. The smoke sensor is an optical type detector whose output voltage depends on

    the purity of air. The output voltage changes if room is filled with smoke. Intruder

    attempts are detected with help of IR sensor unit. Here we are using reflection

    mechanism for preventing intruder attempt. Sensors placed in entrance at particular

    suitable angle detect the IR ray, which is reflected from the intruder body. Short circuit is

    prevented by measuring power in the line. For that we measure voltage and current in the

    line and then power. Whenever the power crosses the threshold power then zone sensor

    module immediately informs this to master module through wireless link.LCD displaysthe parameters which are measured by the various sensors continuously.

    4.3 BASE STATION UNIT

    4.3.1 BLOCK DIAGRAM

    Fig 4.3 Block diagram of Base station unit

    MICRO

    CONTROLLER

    (AT89C51)

    ZIGBEE

    RTC

    LCD

    ALARM

    GSM

    POWER

    SUPPLY

  • 8/9/2019 Interim Report -Final josephcheroor

    8/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    8

    4.3.2 BLOCK DIAGRAM DESCRIPTION

    The master unit (figure 4.3) checks information from the zone sensormodule. After identifying the zone, the alarm file is automatically generated. The Zigbee

    RF stage receives the data from zone sensor module. The Real Time Clock (RTC)

    provides the time information. The local data base includes the zone details, which is

    kept in the ROM of microcontroller. The LCD and alarm stage inform the situation

    locally. If the base station knows that fire has occurred then an emergency call or sms is

    made to nearby police station or fire station through GSM module.

  • 8/9/2019 Interim Report -Final josephcheroor

    9/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    9

    5. HARDWARE DESCRIPTION

    5.1 SENSORS

    5.1.1 TEMPERATURE SENSOR

    Temperature (heat) sensor used in zone sensor unit is LM35. 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 at room temperature. The LM35 is rated to operate over a -55

    to +150C temperature range. It operate from 4 to 30V.It is especially suitable for remote

    applications.

  • 8/9/2019 Interim Report -Final josephcheroor

    10/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    10

    Fig 5.1 Temperature sensor (LM35)

    Features

    Calibrated directly in Celsius (Centigrade)

    Linear + 10.0 mV/C scale factor

    0.5C accuracy guaranteeable (at +25C)

    Rated for full -55 to +150C 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.08C in still air

    Nonlinearity only C typical

    Low impedance output, 0.1 Ohm for 1 mA load

  • 8/9/2019 Interim Report -Final josephcheroor

    11/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    11

    5.1.2 SMOKE SENSOR

    The smoke sensor is an optical type detector whose output voltage dependson the purity of air. The output voltage changes if room is filled with smoke. It consists

    of a light source and a photo detecteor. Photoelectric smoke detectors therefore use light

    in a different way. Inside the smoke detector there is a light and a sensor, but they are

    positioned at 90-degree angles to one another, like this:

    (b)

    Fig 5.2 Smoke sensor

  • 8/9/2019 Interim Report -Final josephcheroor

    12/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    12

    In the normal case, the light from the light source on the left shoots straight

    across and misses the sensor. When smoke enters the chamber, however, the smoke

    particles scatter the light and some amount of light hits the sensor.

    5.1.3 POWER SENSOR

    This is used for short circuit protection. Here two terminals are always

    connected to supply line for measuring voltage and current continuously. From this we

    can calculate power. We set a threshold power. Whenever the power calculated from the

    current and voltage exceeds the threshold power then zone sensor module immediately

    informs this to master module through wireless link thereby preventing short circuit. The

    construction of this type of sensor is very simple.

    5.1.4 IR TRAP

    Intruder attempts are detected with help of IR sensor unit. Here we are using

    reflection mechanism for preventing intruder attempt. Sensors placed in entrance at

    particular suitable angle detect the IR ray, which is reflected from the intruder body.When this happens zone sensor module immediately informs this to master module

    through wireless link and an alarm is generated in the base station.

    5.2 ADC 0838

    The outputs of sensors are in analog form.The ADC IC0838 converts the

    analog output into digital and gives it into the microcontroller.Here the ADC produces 8

    bit value. It is serially interface with microcontroller.

  • 8/9/2019 Interim Report -Final josephcheroor

    13/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    13

    5.3 MICROCONTROLLER AT89C51

    Microcontroller is a true computer on a chip. The design incorporates all of

    the features found in a microprocessorCPU that is ALU, PC, SP and registers. It also has

    added the other features need to make a complete computer: ROM, RAM, parallel I/O,

    serial I/O, counters and a clock circuit.The prime use of a microcontroller is to control

    the operation of a machine using a fixed program that is stored in the ROM and that does

    not change over the lifetime of the system.

    The microcontroller design uses a much more limited set of single and

    double byte instructions that are used to move code and data from internal memory toALU. Many instructions are coupled with pins on the integrated circuit package; the pins

    are programmable-that is, capable of having several different functions depending on the

    wishes of the programmer.

    The microcontroller we are using is AT89C51. The AT89C51 is a low-

    power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash

    programmable and erasable read only memory (PEROM). The device is manufactured

    using Atmels high-density nonvolatile memory technology and is compatible with the

    industry-standard MCS-51 instruction set and pinout. The on-chip Flash allows the

    program memory to be reprogrammed in-system or by a conventional nonvolatile

    memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic

    chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly-flexible

    and cost-effective solution to many embedded controlled application.

    The 89C51 architecture consists of these specific features:

    Eight-bit CPU with registers A and B

    6-bit program counter and data pointer

    8-bit stack pointer

    Internal ROM of 4k

    Internal RAM of 128 bytes

  • 8/9/2019 Interim Report -Final josephcheroor

    14/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    14

    Four register banks each containing eight registers

    16 bytes addressable at the bit level

    32 input/output pins arranged as four 8 bit ports

    Two 16-bit timer/counter

    Full duplex serial data receiver/transmitter

    Control registers: TCON, TMOD, SCON, PCON, IP and IE

    Six interrupt sources

    Oscillator and clock circuits

    Figure 5.3 Pin diagram of 89C51

  • 8/9/2019 Interim Report -Final josephcheroor

    15/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    15

    INTERNAL LAYOUT

    Fig.5.4 Internal layout of AT89C51

  • 8/9/2019 Interim Report -Final josephcheroor

    16/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    16

    Program Counter and Data Pointer

    The 89C51 contains two 16 bit registers, the program counter and the data

    counter. Each is used to hold the address of byte in memory. Program instruction byte is

    fetched from location in memory that is addressed by the PC. The PC is automatically

    incremented after every instruction bytes fetched and may also be altered by certain

    instructions. The DPTR register is made up of two 8-bit registers named DPH and DPL,

    which are used to furnish memory addresses for internal and external code access and

    external access. The DPTR is under the control of program instructions.

    A & B CPU registers

    The A and B register holds results of many operations, particularly math and

    logical operations. The A register is also used for all data transfers between the 89C51

    and any external memory.

    Flags & Program Status Word

    Flags are 1 bit registers provided to store the result of certain program

    instructions. The flags are groups inside the program status word and the power control

    (PCON) registers. The 89C51 have four math flags that respond automatically to the

    result of math operation and three general-purpose user flags that can be set to 1 or

    cleared to 0 by the programmer as desired. The math flag include carry (C), Auxiliary

    Carry (AC), Overflow (OV) and Parity (P). User flags are named F0, GF0 and GF1; they

    are general purpose flags that may be used by the programmer to record some event in

    the program. The program status word contains the math flag, user program flag F0, and

    the register select bits identify which of the four general purpose register banks is

    currently in use by the program.

  • 8/9/2019 Interim Report -Final josephcheroor

    17/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    17

    Internal RAM

    It had 128 internal RA

    M, which is organized, into distinct areas. 32 bytesfrom address 00H to 1FH that make up thirty two working registers organized as four

    banks of eight registers each. A general purpose RAM area above the bit area from 30H

    to 7FH addressable as bytes.

    Stack and Stack Pointer

    The stack refers to an area of internal ram that is used in conjunction with

    certain op codes to store and retrieve data quickly. The eight-bit stack pointer register isused to hold an internal ram address called the top of the stack. The address held in the

    SP register is the location in the internal ram where the last byte of data was stored by a

    stack operation.

    When data is to be placed on the stack the SP increments before storing data

    on the stack up grows, as data is stored. As data is retrieved from the stack, the byte is

    read from the stack, and then the SP decrements to point to the next available byte of

    stored data. The SP is set to 07H when the 89C51 is reset and can be changed to any

    internal ram addressed by the programmer.

    Special Function Registers

    The 89C51 operations that do not use the internal ram address from 00H to

    7FH are done by a group of specific internal registers each called special function

    registers, which may be addressed much like internal ram, using addresses from 8011 to

    FFH. Some SFRs are also bit addressable. This feature allows the programmer to

    change only what needs to be altered, leaving the remaining bits in that SFR unchanged.

  • 8/9/2019 Interim Report -Final josephcheroor

    18/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    18

    Counters and Timers

    Many microcontroller applications require the counting of external eventssuch as frequency of pulse train, or the generation of precise internal time delays

    between computer actions. Three sixteen bit counters named T0,T1 are provided for

    general use of the programmer. The counters are divided into eight bit registers called the

    timer low (TL0, TL1) and high (TH0, TH1) bytes. All counter actions is controlled by bit

    status in the timer mode control registers TMOD, the timer/counter control register

    TCON, and certain program instructions.

    TMOD is dedicated entirely to the timer and can be considered to be twoduplicate 4 bit registers, each of which controls the action of one of the timer. TCON has

    the control bits and flags for the timer in the upper nibble, control bits and flags for

    external interrupts in the lower nibble.

    Timer Modes of Operation

    The timers may be operated in one of the four modes that are determined by

    the mode bits. M1 and M0 in the TMOD register.

    Timer mode

    Setting timer X mode bits to 00B in the TMOD register results in using the

    THX register as an eight bit counter and TLX as a five bit counter; pulse input is divided

    by 32d in TL so that the TH counts the original oscillator reduced by a total 384d.

    Timer mode 1: Mode 1 is similar to mode 0 except TLX is configures as a

    full 8 bit counter, When the mode bits are set to 01B in the TMOD. The timer flag would

    be set in 1311 seconds using a 6MHz crystal.

  • 8/9/2019 Interim Report -Final josephcheroor

    19/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    19

    Timer mode 2: Setting the mode bits to 10b in the TMOD configures the

    timer to use only the TLX counter as an eight bit counter. THX is used to hold a value

    that is loaded into TLX every time TLX overflows from FFh to 00h. The timer flag isalso set when TLX overflows. This mode exhibits and auto reloaded feature: TLX will

    count up from the number in THX, overflow, and be initialized again with the contents

    of THX.

    Timer mode 3: Timer 0 and 1 may be programmed to be in mode 0.1,2

    independently of a similar mode for the other timer. This is not true for mode3; the timer

    does not operate independently if mode 3 is chosen for timer0. Placing timer 1 in mode3

    causes it to stop counting; the control bit TRI and the timer flag TF1 are then used bytimer 0. Timer 0 in mode 3 becomes two completely separate eight bit counters.

    TL0 is controlled by the gate arrangement and sets the timer flag TF0

    whenever it overflows from FFh to 00h. TH0 receives the timer clock (the oscillator

    divided by 12) under the control of TRI only and set the TF1 flag when it overflows.

    Timer 1 may be still used in modes 0,1 or 2 while timer 0 is on mode 3 with

    one important exception: the timer 1 will generate no interrupts while timer 0 is using the

    TF1 overflow flags. Switching timer 1 to mode 3 will stop it and hold whatever count is

    in timer1.

    Counting

    The only difference between counting and timing in the source of the clock

    pulses when used as a timer, the clock pulses are sourced from the oscillator through the

    divide by 12d circuit: when use as counter pint T0 supplies pulses to counter 0 and pin

    T1 to counter1. Each high and low states of the input pulse must be held constant for at

    least one machine cycle to ensure reliable counting.

  • 8/9/2019 Interim Report -Final josephcheroor

    20/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    20

    5.4 ZIGBEE-XBEE

    The communication between the Zone Sensor Module and Master unit is

    through a two way RF link. The RF link can be networked to include all the other units

    in a geographical area. The Zone Sensor units will automatically transfer data to the

    master unit.The RF nodes are using Zigbee protocol to communicate with each other.

    Since every RF modules can be identified by their unique network address, data is

    transported with out clashes. The RF range is 30 meters. On the receiving side The

    zigbee module is connected to the microcontroller. The information from the zone sensor

    module is receive using the zigbee module and gives it into the microcontroller.ZigBee

    is a a software layer based on the IEEE 802.15.4 standard. In our project we are using

    zigbee module XBee.The characteristics of Xbee are given below.

    Characteristics

    Data rates of 250 kbps (@2.4 GHz), 40 kbps (@ 915 MHz), and

    20 kbps (@868 MHz)

    Range: 50m typical (5-500m based on environment)

    Low duty-cycle applications (

  • 8/9/2019 Interim Report -Final josephcheroor

    21/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    21

    5.5 LCD

    LC

    D serves as a useful interface for the user. The most common type ofLCD controller is the Hitachi 44780 which provides a relatively simple interface

    between microcontroller and LCD. The LCD has 16 character x 2 line display facility.

    The message to be displayed is send to the LCD through data-bus. A set of control lines

    are needed to proper displaying of the characters in LCD. After processing the data from

    ADC, microcontroller sends the data to LCD for displaying the zonal temperatures.

    LCDs can add a lot to our applications in terms of providing a useful

    interface for the user, debugging an application or just giving a professional look. Themost common type of LCD controller is the Hitachi 44780 which provides a relatively

    simple interface between microcontroller and LCD. The LCD has 16 character x 2 line

    display facility. The message to be displayed is send to the LCD through data bus. A set

    of control lines are needed to proper displaying of the characters in LCD.

    In recent years the LCD is finding widespread use replacing LEDs. A simple

    16 character display of 2 rows is connected to the circuit to show address and data at any

    memory location. This LCD is also used to provide different messages to the user. The

    pin details of LCD is as follows: Vcc and Vss provide +5V and ground, respectively,

    while VEE is used for controlling LCD contrast. The VEE is connected to ground.

    There are two important registers inside the LCD. The RS pin is used for

    their selection. If RS = 0, the instruction command code register selected, allowing the

    user to send commands such as clear display, cursor at home, etc. If RS = 1 the data

    register is selected, allowing user to send data to be displayed on the LCD. The register

    select line connected to A14 of 89C51. Programmer can make this line either 1 or 0

    according to the register to be selected.

    The R/W input allows the user to write information to the LCD or read

    information from it. R/W = 1 when reading and; R/W = 0 when writing. In our system

  • 8/9/2019 Interim Report -Final josephcheroor

    22/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    22

    only writing is performed and this pin is connected to ground. The enable pin is used to

    latch information presented to its data pins. When data is supplied to data pins, a High to

    - Low pulse must be applied to this pin in order for the LC

    D to latch in the data presentat the data pins. This pulse must be a minimum 450ns. The EN pin is connected to A15

    of 89C51 and the programmer can toggle this line during the LCD operation. The 8 bit -

    data pins, D0 - D7, are used to send information to the LCD or read contents of the

    LCDs internal registers. To display letters and numbers, we send ASCII codes for the

    letters A - Z, a - z, and numbers 0 - 9 to these pins while making RS = 1. This data pins

    are connected to Port 0 of 89C51. The pin 15 and 16 of LCD module is used as supply

    pins of backlight. This backlight provides a good readability. A +5V is connected to pin

    15 and the pin 16 is grounded. There are also instruction command codes that can be sentto the LCD to clear the display or shifting the display etc. These command codes are sent

    to the LCD by making the RS = 0.

    5.6 ALARM

    When the microcontroller receives the information from the zone sensor

    module. The microcontroller processes that information and the alarm will ring.

    5.7 RTC

    RTC is used take the time of accident. The real time clock keeps the correct

    time. The DS12887 RTC IC is used. The timings are taken using RTC IC. The date and

    time will take from the RTC IC and display. The RTC chip provides time components of

    hour, minute and second, in addition to the date /calendar components of year, month

    and day. The 8 RTC chip uses an internal battery, which keeps the time and date even

    when the power is off. One of the most widely used RTC chips is the DS12887 from

    Dallas Semiconductor/ Maxim Corp.

  • 8/9/2019 Interim Report -Final josephcheroor

    23/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    23

    5.8 GSM

    GSM (Global System for Mobile Communications) is the most popular

    standard for mobile telephone systems in the world. In our project we are using GSM

    module SIM300EVB.

    Description

    y KIT, EVALUATION BOARD COMPACT

    y Development Tool Type: Compact Evaluation Board

    y Supported Families:SIM300

    y Supported Devices:SIM300, SIM300C, SIM300D, SIM300S

    y Tool / Board Application: GSM GPRS Module Development

    y Features: Power, Audio, Antenna Interface, Operating Status LED, Test

    y Serial Interface

    y Tool / Board Applications:Wireless Module

    y Type: Evaluation Board

    5.9 POWER SUPPLY

    The power supply is used in the system to produce regulated +5V dc. The

    input 220V ac is step downed using a Transformer of 12-0-12v/1A. This voltage is

    rectified using a bridge rectifier and filtered using 1000uF capacitor. Then using a

    regulator IC LM317 and its accessory components +5 V dc supply is provided.

  • 8/9/2019 Interim Report -Final josephcheroor

    24/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    24

    6. WORKING

    The wireless sensor network consists of two zone sensor units and a base

    station. Communication takes place between zone sensor units and base station with the

    help of wireless transceiver, known as Zigbee.Zone sensor unit senses various

    information from two zones and these information are sent to the base station through

    wireless transceiver, zigbee.The various sensors are connected to ADC0838 (8 channel,

    serial interface). The microcontroller will read data from ADC. The data is locally

    analyzed before sending to master unit to reduce the load on master module. When any

    of the input crosses a threshold, the zone module immediately informs this to master

    module through wireless link.

    The system can be connected with various sensors. Heat is sensed by using

    temperature sensor. The temperature sensorConverts ambient (room) temperature into a

    voltage varying signal. When this voltage crosses threshold, the zone sensor unit informs

    this to base station and alarm is generated. Fire is detected by using both temperature

    sensor and smoke sensor. The smoke sensor is an optical type detector whose output

    voltage depends on the purity of air. The output voltage changes if room is filled with

    smoke. Intruder attempts are detected with help of IR sensor unit. Here we are using

    reflection mechanism for preventing intruder attempt. Sensors placed in entrance at

    particular suitable angle detect the IR ray, which is reflected from the intruder body.

    When this happens, zone sensor module immediately informs this to master module

    through wireless link and an alarm is generated. Short circuit is prevented by measuring

    power in the line. For that we measure voltage and current in the line and then power.

    Whenever the power crosses the threshold power then zone sensor module immediately

    informs this to master module through wireless link thereby preventing short

    circuit..LCD displays the parameters which are measured by the various sensors

    continuously.the informations from the zone sensor unit is sent to base station using

    wireless tranciever, zigbee.

  • 8/9/2019 Interim Report -Final josephcheroor

    25/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    25

    Receiver is also equipped with zigbee module for receiving informations

    from zone sensor unit. The base station unit checks information from the zone sensormodule. After identifying the zone, the alarm file is automatically generated. . The Real

    Time Clock (RTC) provides the time information. The local data base includes the zone

    details, which is kept in the ROM of microcontroller. The LCD and alarm stage inform

    the situation locally. If the base station knows that fire has occurred then an emergency

    call or sms is made to nearby police station or fire station through GSM module.

  • 8/9/2019 Interim Report -Final josephcheroor

    26/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    26

    7. ADVANTAGES

    y Interface is user friendly

    y Highly secure

    y The modules require minimal power

    y Zigbee provides reliable delivery of data between devices

    y The modules operate within the ISM 2.4 GHz ,unlicensed frequency band

    y Easy to use

  • 8/9/2019 Interim Report -Final josephcheroor

    27/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE.

    27

    5.7 APPLICATIONS

    Wireless sensor network using zigbee has following commercial

    applications:

    y Home automation

    y Building automation

    y Utility meter communication

    y Lighting control

    y sophisticated heating control

    y security systems

    y energy management systems e.g. WiSuite automation system

    y The Equos lighting system

  • 8/9/2019 Interim Report -Final josephcheroor

    28/28

    Wireless Sensor Network Using Zigbee Project Report 09

    Jyothi Engineering College Dept. of ECE28

    5.8 BIBLIOGRAPHY

    [1] AndrewWheeler, EmberCorporation Commercial Applications ofWireless Sensor

    Networks Using ZigBee, IEEE Communications Magazine, April 2007

    [2] www.maxstream.net/wireless/zigbee.php

    [3] www.atmel.com

    [4] www.national.com

    [5] www.datasheet4u.com

    [6] www.microchip.ua/simcom/GSM-GPRS.../SIM300_EVB

    [7] www.home.howstuffworks.com