Project Reportprathi Block Diagram

download Project Reportprathi Block Diagram

of 46

Transcript of Project Reportprathi Block Diagram

  • 7/31/2019 Project Reportprathi Block Diagram

    1/46

    DATA ACQUISITION 1

    ABSTRACT

    Data Acquisition using RF communication has two mainfunctional aspects: measurement & communication. This projectfocuses on developing an embedded system to extract temperature datafrom an temperature sensor, display the instantaneous value on LCD andthe same data is transmitted over a distant place using RF(Zigbee)communication.

    This project consists of two parts. One is transmitter sectionwhich is built around microcontroller based 16F877A architecture, ADC,Sensors to measure temperature & smoke and a Zigbee transceiver totransmit data. On the other hand receiver consists of Zigbee transceiver to

    receive the data and display the data on the LCD display. Instantaneousdata of temperature is displayed on LCD and Buzzer indication is provided iftemperature is more than 400 or smoke is detected.

  • 7/31/2019 Project Reportprathi Block Diagram

    2/46

    DATA ACQUISITION 2

    ACKNOWLEDGEMENT

    It gives us immense pleasure to express our deep sense of

    gratitude to the people who have helped and supported us throughout

    the course and the process of completion of this project.

    We would like to take this opportunity to thank Dr

    B.G.Sangameshwara, Principal, SJCE for providing a healthy

    environment in college and for extending the facilities to carry out the

    project work.

    We owe a special thanks to our Internal guide Asst. Prof

    S.Gopalakrishna. His guidance and encouragement has helped up

    leaps and bounds in completing this project. He has constantly

    reviewed our project and gave us various suggestions for

    implementing and enhancing our project. He has also guided us in

    preparing our report by providing us with various other details needed

    in completing our report.

    We would like to thank our family members and friends for

    morally encouraging us in everything we do.

    Project associates

    Prathima Baliga J.P.

    Savitha.R

    Raghavendra Shenoy

  • 7/31/2019 Project Reportprathi Block Diagram

    3/46

    DATA ACQUISITION 3

    CONTENTS

    CHAPTER 1:

    INTRODUCTION

    1.1 WHAT IS DATA

    AQUASITION ?........................................................................6

    1.2 NEED OF WIRELESS DATA

    AQUASITION.6

    1.3 MAJOR COMPONENTS WHEN BUILDING A DATA ACQUISITION

    SYSTEM6

    CHAPTER 2:

    BASIC PRINCIPLES

    2.1 BASIC PRINCIPLES OF DATA ACQUISITION USING

    RF7

    2.2 BLOCK

    DIAGRAM

    ..9

    CHAPTER 3:

    PERIPHERALS

    3.1 POWER

    SUPPLY

    .12

    3.2 RS

    23212

  • 7/31/2019 Project Reportprathi Block Diagram

    4/46

    DATA ACQUISITION 4

    3.3 TEMPERATURE

    SENSOR................14

    3.4 SMOKE

    DETECTOR

    ..16

    3.5 BUZZER

    .17

    3.6 DOT MATRIX

    LCD

    .18

    3.7 MICROCANTROLLER

    .18

    CHAPTER 4:

    RF COMMUNICATION

    4.1 ZIGBEE

    4.1.1 Characteristics of

    Zigbee20

    4.1.2 Network topologies supported by

    Zigbee21

    4.1.3

    ARCITECTURE...22

    4.1.4 Types of

    traffic..23

    4.1.5 Block diagram of Zigbee

    Transceiver24

    4.2 Type of

    modulation

    25

  • 7/31/2019 Project Reportprathi Block Diagram

    5/46

    DATA ACQUISITION 5

    CHAPTER 5:

    HARDWARE IMPLEMENTATION

    5.1 Sensor & TX schematic....29

    5.2 RF

    receiver

    ..32

    CHAPTER 6:

    FIRMWARE LOGIC

    6.1Flow chart of Data acquisition using RF

    ...33

    CHAPTER 7:

    SOFTWARE

    7.1MPLAB IDE V8.60.35

    7.2STEPS IN DEVELOPING A

    PROGRAM.36

    CHAPTER 8:

    ADVANTAGES , APPLICATIONS & LIMITATIONS

    8.1

    ADVANTAGES

    37

  • 7/31/2019 Project Reportprathi Block Diagram

    6/46

    DATA ACQUISITION 6

    8.2

    APPLICATIONS

    ..37

    8.3

    RESULTS.37

    CHAPTER 9:

    DEVELOPMENT & RESULTS

    9.1 DEVELOPMENT

    STEPS 38

    9.2

    RESULTS

    .. .38

    APPENDIX:

    10. CONCLUSION

    .40

    11. FUTURE

    SCOPE..

    40

    12.

    REFERENCE

    ..40

  • 7/31/2019 Project Reportprathi Block Diagram

    7/46

    DATA ACQUISITION 7

    CHAPTER 1 - INTRODUCTION

    1.1 WHAT IS DATA ACQUISITION?

    Data acquisition involves gathering signals from

    measurements sources and digitalizing the signal for storage analysis

    and presentation on PC or LCD. Data acquisition systems come inmany PC technology forms to offer flexibility. Here we used RF

    communication to acquire data and explained in detail in next

    chapters.

    1.2 NEED OF WIRELESS DATA AQUASITION

    In an industry during certain hazards it will be very

    difficult to monitor the parameter through wires and analog devicessuch as transducers. To overcome this we use wireless devices tomonitor the parameter and so that we can take certain steps in worstcase.

    Few years back the use of wireless devices was very lessbut due to rapid development in technology nowadays maximum ofour data transfer is through wireless.

    1.3 MAJOR COMPONETS WHEN BUILDING A BASIC

    DATA

    ACQUISITION SYSTEM

    We need to consider the following five components when

    building a basic data acquisition system.

    Transducers and sensors

    Signals

  • 7/31/2019 Project Reportprathi Block Diagram

    8/46

    DATA ACQUISITION 8

    Signal conditioning

    DAQ hardware

    Driver and display

    FIG-1.1. Basic diagram of data acquisition and display.

    CHAPTER 2 - BASIC PRINCIPLES

    2.1 BASIC PRINCIPLE OF DATA ACQUISITIONUSING RF

    DATA AQUASITION USING RF consists of following

    blocks.

    Temperature sensor

    Smoke sensor

    Microcontroller

    LCD displays

    Power supply

    Buzzer indication

    RF (Zigbee) communication module.

    This system senses the temperature and smoke and

    continuously and send data to Microcontroller. Controller PIC16F877

    consists of ADC where it converts analog signal to digital and send toLCD input and UART.

  • 7/31/2019 Project Reportprathi Block Diagram

    9/46

    DATA ACQUISITION 9

    Zigbee is RF transceiver module of 2.4GHZ is connected to

    UART of controller where the data is sent to distance place

    In the receiver side the data is picked by the Zigbee transceiver

    and send to UART receiver of Microcontroller. Microcontroller will

    compares the data with reference temperature value. It displays thedata on LCD and no buzzer indication in Normal condition.

    Normal conditions:

    When temperature < 40C & smoke is absent.

    Temperature data will be displayed in transmitter as well as receiver

    Abnormal conditions:

    Three abnormal conditions can appear

    When temperature 40C & smoke is absent,

    temperature data will be displayed in receiver side and

    buzzer alarm is provided to indicate the rise in

    temperature .

    When temperature < 40C but smoke is present,

    temperature data will be displayed in receiver side and

    display will be given as SMOKE IS PRESENT along with

    the buzzer alarm.

    When temperature 40C & smoke is present,

    temperature data will be displayed in receiver side and

    display will be given as SMOKE IS PRESENT along with

    the buzzer alarm.

  • 7/31/2019 Project Reportprathi Block Diagram

    10/46

    DATA ACQUISITION 10

    2.2 BLOCKDIAGRAM

    TRANSMITTER

    FIG-2.1 BLOCK DIAGRAM OF TRANSMITTER SECTION

    RECEIVER

    MICRO

    CONTROLLE

    R

    RS23

    2

    RF

    TRANSRE

    CIVER

    LCDSmoke

    Sensor

    Temperatu

    re

    Sensor

    Power

    Supply

  • 7/31/2019 Project Reportprathi Block Diagram

    11/46

    DATA ACQUISITION 11

    FIG-2.1 BLOCK DIAGRAM OF TRANSMITTER SECTION

    FIG 2.1 shows the transmitter section of data

    acquisition system and FIG2.2 shows the receiver section of data

    acquisition system. Following are the components of these transmitter

    and receiver section

    2.2.1 POWER SUPPLY

    Digital input of 5V is provided for microcontroller and

    all other sensor circuitry and 12V is provided for Zigbee module. The

    same is followed in both transmitter and receiver section.

    2.2.2 TEMPERATURE SENSOR

    Temperature sensor converts the temperature into an

    equivalent voltage output. IC LM35 is such a sensor. Here we describea simple temperature measurement and display system based on

    LM35 sensor and PIC16F877A microcontroller. The temperature in

    degrees Celsius is displayed on a 162 LCD.

    Continuous monitoring of temperature with 1-second updateinterval (which can be varied in the program)

    Temperature measurement using LM35 precision integrated-circuit sensor.

    RF

    TRANSRECI

    VER

    RS232

    LCD

    Power

    Supply

    BUZZER

    MICRO

    CONTROLLE

    R

  • 7/31/2019 Project Reportprathi Block Diagram

    12/46

    DATA ACQUISITION 12

    Precise analogue-to-digital conversion using in-built 10-bitanalogue- to-digital converter (ADC) of PIC16F877Amicrocontroller

    2.2.3 SMOKE SENSOR

    Here Smoke Sensors that can detect the presence ofcombustible gas and smoke at concentrations from 300 to 10,000ppm. Owing to its simple analog voltage interface, the sensorrequires one analog input pin from the microcontroller. The productcan detect the presence of the smoke and send the output in form ofanalog signals. Our range can function at temperature ranging from-20 to 50C and consume less than 150 mA at 5V.

    Two basic types of smoke detectors are used today:ionization and photoelectric. The sensing chambers of these

    detectors use different principles of operation to sense the visible orinvisible particles of combustion given off in developing fires.Ionization smoke detector is used here.

    2.2.4 MICROCONTROLLER

    PIC16F877 is used for computation of sensor data. Thiscontroller consists of 10 bit ADC where it converts analog data in todigital form. This data is compared with a reference temperature andsmoke details. The result will be displayed on LCD and sent to UARTfor RF communication.

    In receiver side same PIC16F877 controller is used whereit takes the RS232 signal and decodes. These details will be displayedin LCD.

    2.2.5 LCD

    Dot matrix LCD of 16 dots per character and two lines is used here. Ithas parallel input of 8 bit. Temperature value is displayed in first line smoke datais displayed n second line. This display is provided both in transmitter andreceiver side.

    2.2.6 Buzzer

    Rise in temperature data more than 40degree or the presence of smoke

    will be indicated by BUZZER.

    2.2.7 ZIGBEE module

  • 7/31/2019 Project Reportprathi Block Diagram

    13/46

    DATA ACQUISITION 13

    This is the basic part where the data is sent to remote place with thehelp of this module. This is a type of RF communication of frequency more than2.4GHz. Offset QPSK type of modulation is implemented here.

    CHAPTER 3 - PERIPHERIALS

    3.1 Power supply: The microcontroller and other devices get supply from AC to

    DC adaptor through 7805, 5 volt regulator. The adaptor output voltage

    level is 12V DC non-regulated. The 7805/7812 voltage regulators are

    used to convert 12V to 5V DC. This voltage regulator gives the

    regulated output to all peripherals.

  • 7/31/2019 Project Reportprathi Block Diagram

    14/46

    DATA ACQUISITION 14

    FIG-3.2. Regulator Schematic

    FIG-3.1. 7805 Pin Configuration

    3.2 RS232

    Standard Details:

    In RS-232, user data is sent as a time-series of bits. Both synchronous

    and asynchronous transmissions are supported by the standard. In addition to the data

    circuits, the standard defines a number of control circuits used to manage the connection

    between the DTE and DCE. Each data or control circuit only operates in one direction,

    that is, signaling from a DTE to the attached DCE or the reverse. Since transmit data and

    receive data are separate circuits, the interface can operate in a full duplex manner,

    supporting concurrent data flow in both directions. The standard does not define

    character framing within the data stream, or character encoding.

    MAX- 232:

  • 7/31/2019 Project Reportprathi Block Diagram

    15/46

    DATA ACQUISITION 15

    FIG-3.3 Functional diagram and Logic Diagram of MAX232

    Fig-3.3 shows the functional diagram and logical diagram of

    MAX232. When a MAX232 IC receives a TTL level to convert, it

    changes a TTL Logic 0 to between +3 and +15 V, and changes TTL

    Logic 1 to between -3 to -15 V, and vice versa for converting fromRS232 to TTL. This can be confusing when you realize that the RS232

    Data Transmission voltages at a certain logic state are opposite from

    the RS232 Control Line voltages at the same logic state

    Table 3.1 Voltage levels

  • 7/31/2019 Project Reportprathi Block Diagram

    16/46

    DATA ACQUISITION 16

    The later MAX232A is backwards compatible with the

    original MAX232 but may operate at higher baud rates and can use

    smaller external capacitors 0.1 F in place of the 1.0 F capacitors

    used with the original device.

    The newer MAX3232 is also backwards compatible, butoperates at a broader voltage range, from 3 to 5.5 V.

    Pin to pin compatible: ICL232, ST232, ADM232, HIN232

    3.3 TEMPERATURE SENSOR LM35

    The LM35 is an integrated circuit sensor that can be used to

    measure temperature with an electrical output proportional to thetemperature (in C)

    In this project, LM35s are used for temperature sensing. Vs

    of the LM35s are given 5V and the Vout pins are connected to AN0 of

    PIC16F877A (ADC channel).Since the sensor gain (average slope) of

    the LM35 is 10mV /C and ADC has 10 bit (210 1000), so pin 5 (Vref)

    from PIC16F876A must be given for 1V by using the voltage divider

    concept. For preventing the offset, voltage for pin 5 (Vref) should be

    adjustable.

    3.3.1 Temperature recorder: LM35 pin-out

    Temperature recorder: pin-out for the LM35DZ (from the top).

    FIG-3.4 Pin out of temperature sensor

    http://en.wikipedia.org/wiki/Baudhttp://en.wikipedia.org/wiki/Faradhttp://en.wikipedia.org/wiki/Faradhttp://en.wikipedia.org/wiki/Baudhttp://en.wikipedia.org/wiki/Farad
  • 7/31/2019 Project Reportprathi Block Diagram

    17/46

    DATA ACQUISITION 17

    3.3.2 Temperature recorder Circuit

    The LM35 is connected to analogue input AN0 which is

    also the data input line for programming the 12F675 using ICSP so you

    need a way of connecting the sensor and the programming input at

    the same time with the programming input overriding the sensor

    output (and not damaging the sensor).

    This is done here by using 1k resistor that reduces the

    current flowing back into the sensor and at the same time is not too

    large (so that the ADC can easily convert the sensor output value - the

    impedance must be equal to or smaller than 10k Ohm from the

    sensor).

    The voltage reference for the circuit is taken from pin 6 using

    a resistor divider giving a 2.5V reference. This is simply done to

    increase the resolution of the ADC as for the LM35 only 0-1V is

    generated so you loose ADC range when using a 5V reference. You

    could use a lower reference value but this value gives reasonable

    results.

    Alternatively you could use an amplifier to scale the LM35

    output up which would make the ADC less sensitive to noise but for

    this project it is simpler not to do so.

    Note: The large decoupling capacitor on the supply input of

    the 12F675. This reduces noise overall and gives a more consistent

    reading. However using a plug block and ADC is not a very good idea

    as there is no ground plane and no control over current paths which

    you would be able control in a PCB.

    In a commercial system the internal ADC is often not used

    at all as it is essential to separate the noise introduced to the ADC

    using separate grounds and shielding - some designs encase the ADC

    in a custom metal shield and along with a ground plane connecting to

    the shield gives the best possible result. To overcome noise problems

    on the ADC the software averages the input readings so you get a

    better result.

    http://www.best-microcontroller-projects.com/pic-programming.htmlhttp://www.best-microcontroller-projects.com/pic-programming.html
  • 7/31/2019 Project Reportprathi Block Diagram

    18/46

    DATA ACQUISITION 18

    3.4 SMOKE DETECTOR

    A smoke detector is a device that detects smoke, typicallyas an indicator of fire. Commercial, industrial, and mass residential

    devices issue a signal to a fire alarm system, while household

    detectors, known as smoke alarms, generally issue a local audible

    and/or visual alarm from the detector itself.

    Most smoke detectors work either by optical detection

    (photoelectric) or by physical process (ionization), while others use

    both detection methods to increase sensitivity to smoke. Sensitive

    alarms can be used to detect, and thus deter, smoking in areas where

    it is banned such as toilets and schools.

    FIG-3.5 Smoke sensor

    Ionization method

    An ionization type smoke detector is generally cheaper to

    manufacture than an optical smoke detector; however, it is sometimes

    rejected because it is more prone to false (nuisance) alarms than

    photoelectric smoke detectors.

    It can detect particles of smoke that are too small to be

    visible. It includes about 37 kBq or 1 Ci of radioactive element americium-

    241, corresponding to about 0.3 g of the isotope. The radiation passes

    through an ionization chamber, an air-filled space between two electrodes,

    and permits a small, constant current between the electrodes. Any smoke

  • 7/31/2019 Project Reportprathi Block Diagram

    19/46

    DATA ACQUISITION 19

    that enters the chamber absorbs the alpha particles, which reduces the

    ionization and interrupts this current, setting off the alarm.

    Alpha radiation, as opposed to beta and gamma, is used fortwo additional reasons: Alpha particles have high ionization, sosufficient air particles will be ionized for the current to exist, and theyhave low penetrative power, meaning they will be stopped by theplastic of the smoke detector and/or the air.

    Working Principle

    Ionization detectors have an ionization chamber and a

    source of ionizing radiation. The source of ionizing radiation is a

    minute quantity of americium-241 (perhaps 1/5000th of a gram),

    which is a source of alpha particles (helium nuclei).The ionization

    chamber consists of two plates separated by about a centimeter. The

    battery applies a voltage to the plates, charging one plate positive and

    the other plate negative.

    Alpha particles constantly released by the americium

    knock electrons off of the atoms in the air, ionizing the oxygen and

    nitrogen atoms in the chamber. The positively-charged oxygen and

    nitrogen atoms are attracted to the negative plate and the electrons

    are attracted to the positive plate, generating a small, continuous

    electric current.

    When smoke enters the ionization chamber, the smoke

    particles attach to the ions and neutralize them, so they do not reach

    the plate. The drop in current between the plates triggers the alarm.

    3.5 BUZZER:

    FIG-3.5 Buzzer

    Features

    Resonant Frequency: 4,500Hz

    Rated Voltage: 3Vdc (DC input)

  • 7/31/2019 Project Reportprathi Block Diagram

    20/46

    DATA ACQUISITION 20

    Operating Voltage: 3 - 18Vdc

    Rated Current: 5mA @ 5Vdc

    Sound Pressure Level: 70dB @ 3Vdc

    Weight: 1 gram

    Dimensions: 12mm Diameter, 8.5mm High, Pin Spacing - 7.5mm

    3.6 DOT MATRIX LCD:

    FIG-3.5 Dot matrix LCD

    16 characters x 2 lines

    bit parallel lines

    RS232 compatible serial interface (2400 & 9600 baud selectable)

    Externally selectable serial polarities (Inverted & Non-Inverted)

    Serially controllable contrast and backlight levels

    user programmable custom characters

    16 Byte serial receive buffer

    3.7 MICROCONTROLLER:

    PIC16F877 is

    used for

    computation of

    the analog

    signals from

    sensor to

    digital form.

  • 7/31/2019 Project Reportprathi Block Diagram

    21/46

    DATA ACQUISITION 21

    FIG-3.5 Pin diagram of PIC16F877A

    Low-power, high-speed Flash/EEPROM technology

    Fully static design

    Wide operating voltage range (2.0V to 5.5V)

    Commercial and Industrial temperature ranges

    Low-power consumption

    10-bit, up to 8-channel Analog-to-Digital Converter (A/D)

    Analog Comparator module with:

    Two analog comparators.

    Programmable on-chip voltage reference (VREF) module.

    Programmable input multiplexing from device inputs and

    internal voltage reference.

    Comparator outputs are externally accessible.

  • 7/31/2019 Project Reportprathi Block Diagram

    22/46

    DATA ACQUISITION 22

    CHAPTER 4 - RF COMMUNICATION

    4.1 .1 CHARECTERISTICS OF ZIGBEE

    The focus of network applications under the IEEE 802.15.4 /ZigBee standard include the features of low power consumption,

    needed for only two major modes (Tx/Rx or Sleep), high density ofnodes per network, low costs and simple implementation. Thesefeatures are enabled by the following characteristics

    2.4GHz and 868/915 MHz dual PHY modes.

    This represents three license-free bands: 2.4-2.4835 GHz, 868-

    870 MHz and 902-928 MHz. The number of channels allotted to

    each frequency band is fixed at 16 channels

    In the 2.45 GHz band, 10 channels in the 915 MHz band, and 1

    channel in the 868 MHz band

    Maximum data rates allowed for each of these frequency bands

    are fixed as 250kbps @2.4 GHz, 40 kbps @ 915 MHz, and 20

    kbps @868 MHz.

    Allocated 16 bit short or 64 bit extended addresses.

    Allocation of guaranteed time slots (GTSs)

  • 7/31/2019 Project Reportprathi Block Diagram

    23/46

    DATA ACQUISITION 23

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

    channel access Yields high throughput and low latency for low

    duty cycle devices like sensors and controls.

    Fully hand-shake acknowledged protocol for transfer reliability.

    Low power consumption with battery life ranging from months to

    years.

    Energy detection (ED).

    Link quality indication (LQI).

    Multiple topologies : star, peer-to-peer, mesh topologies

    4.1.2 NETWORK TOPOLOGIES SUPPROTED BY

    ZIGBEE

    3 types of topologies that ZigBee supports: startopology, peer-to-peer

    topology and cluster tree.

    Star Topology

    In the star topology, the communication is established

    between devices and a single central controller, called the PAN

    coordinator. The PAN coordinator may be mains powered while the

    devices will most likely be battery powered.

    Peer-to-peer Topology

    In peer-to-peer topology, there is also one PAN

    coordinator. In contrast to star topology, any device can communicate

    with any other device as long as they are in range of one another. A

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

    also allows multiple hops to route messages from any device to any

    other device in the network. It can provide reliability by multipath

    routing.

  • 7/31/2019 Project Reportprathi Block Diagram

    24/46

    DATA ACQUISITION 24

    Cluster-tree Topology

    Cluster-tree network is a special case of a peer-to-peernetwork in which most devices are FFDs and an RFD may connect to a

    cluster-tree network as a leave node at the end of a branch. Any of theFFD can act as a coordinator and provide synchronization services toother devices and coordinators. Only one of these coordinatorshowever is the PAN coordinator.

    The PAN coordinator forms the first cluster by establishingitself as the cluster head (CLH) with a cluster identifier (CID) of zero,choosing an unused PAN identifier, and broadcasting beacon frames toneighboring devices. A candidate device receiving a beacon framemay request to join the network at the CLH. If the PAN coordinatorpermits the device to join, it will add this new device as a child device

    in its neighbor list. The newly joined device will add the CLH as itsparent in its neighbor list and begin transmitting periodic beacons suchthat other candidate devices may then join the network at that device.

    Once application or network requirements are met, thePAN coordinator may instruct a device to become the CLH of a newcluster adjacent to the first one. The advantage of this clusteredstructure is the increased coverage area at the cost of increasedmessage latency.

    4.1.3 ARCHITECTURE

    The LR-WPAN architecture is defined in terms of a numberof blocks in order tosimplify the standard. These blocks are called layers. Each layer isresponsible for onepart of the standard and offers services to the higher layers. Thelayout of the blocks isbased on the open systems interconnection (OSI) seven-layer model.

    The interfacesbetween the layers serve to define the logical links between layers.

    The LR-WPANarchitecture can be implemented either as embedded devices or asdevices requiring thesupport of an external device such as a PC.

    An LR-WPAN device comprises a PHY, which contains theradio frequency (RF) transceiver along with its low-level control

    mechanism, and a MAC sub layer that provides access to the physicalchannel for all types of transfer.

  • 7/31/2019 Project Reportprathi Block Diagram

    25/46

    DATA ACQUISITION 25

    ARCITECTURE OF ZIGBEE

    FIG-4.1 Zigbee architecture

    Network and Application Support layer

    The network layer permits growth of network sans high

    power transmitters. This layer can handle huge numbers of nodes.This level in the ZigBee architecture includes The ZigBee Device Object (ZDO) User-Defined Application Profile(s) The Application Support (APS) Sub-layer.

    The APS sub-layer's responsibilities include maintenance oftables that enable matching between two devices and communicationamong them, and also discovery, the aspect that identifies otherdevices that operate in the operating space of any device.

    The responsibility of determining the nature of the device (Coordinator

    / FFD or RFD) in

  • 7/31/2019 Project Reportprathi Block Diagram

    26/46

    DATA ACQUISITION 26

    the network, commencing and replying to binding requests andensuring a secure relationship between devices rests with the ZDO(Zigbee Define Object). The user-definedapplication refers to the end device that conforms to the ZigBeeStandard.

    4.1.4 Traffic Types

    ZigBee/IEEE 802.15.4 addresses three typical traffic types.IEEE 802.15.4 MAC can accommodate all the types.

    Data is periodic. The application dictates the rate, and thesensor activates checks for data and deactivates.

    Data is intermittent. The application, or other stimulus,determines the rate, as in the case of say smoke detectors. Thedevice needs to connect to the network only when

    communication is necessitated. This type enables optimumsaving on energy.

    Data is repetitive, and the rate is fixed a priori. Depending onallotted time slots, called GTS (guaranteed time slot), devicesoperate for fixed durations

    ZigBee employs either of two modes, beacon or non-beacon to enable the to-and-fro data traffic. Beacon mode is usedwhen the coordinator runs on batteries and thus offers maximumpower savings, whereas the non-beacon mode finds favour when thecoordinator is mains-powered.

    4.1.5 Block diagram of RF (ZIGBEE) TRANSCEIVER

    IEEE 802.15.4 Modulation Format:This section is meant as an introduction to the 2.4 GHz

    direct sequence spread

    spe6ctrum (DSSS) RF modulation format defined in IEEE 802.15.4.

    The modulation and spreading functions are illustrated at

    block level in Figure below. Each byte is divided into two symbols, 4bits each. The least significant symbol is transmitted first. For multi-

  • 7/31/2019 Project Reportprathi Block Diagram

    27/46

    DATA ACQUISITION 27

    byte fields, the least significant byte is transmitted first, except for

    security related fields where the most significant byte it transmitted

    first. Each symbol is mapped to one out of 16 pseudo-random

    sequences, 32 chips each. The symbol to chip mapping is shown in

    Table 3. The chip sequence is then transmitted at 2 MChips/s, with the

    least significant chip (C0) transmitted first for each symbol.

    FIG-4.2 Zigbee Transmitter

    Channel filtering and frequency offset compensation is

    performed digitally. The signal level in the channel is estimated to

    generate the RSSI level. Data filtering is also included for enhanced

    performance. With the 40 ppm frequency accuracy requirement from

    [1], a compliant receiver must be able to compensate for up to 80 ppm

    or 200 kHz. The CC2420demodulator tolerates up to 300 kHz offset

    without significant degradation of the receiver performance.

    Soft decision is used at the chip level, i.e. the demodulator

    does not make a decision for each chip, only for each received symbol.

    De-spreading is performed using

    over sampled symbol co-relaters. Symbol synchronization is achieved

    by a continuous start of frame delimiter (SFD) search. When a SFD is

    detected, data is written to the RXFIFO and may be read out by the

    microcontroller at a lower bit rate than the 250 kbps generated by the

    receiver. The demodulator also handles symbol rate errors in excess of

    120 ppm without performance degradation.

    4.2. TYPE OF MODULATION

    4.2.1 QPSK

    QPSK uses four points on the constellation diagram,

    equispaced around a circle. With four phases, QPSK can encode two

    bits per symbol

  • 7/31/2019 Project Reportprathi Block Diagram

    28/46

    DATA ACQUISITION 28

    FIG-5.1 Constellation diagram of QPSK

    The mathematical analysis shows that QPSK can be usedeither to double the data rate compared with a BPSK system whilemaintaining the samebandwidth of the signal, or to maintain the data-rate of BPSKbut halving the bandwidth needed. In this latter case, theBER of QPSK is exactly the same as the BER of BPSK - and decidingdifferently is a common confusion when considering or describingQPSK.

    The advantage of QPSK over BPSK becomes evident: QPSK

    transmits twice the data rate in a given bandwidth compared to BPSK -

    at the same BER. The engineering penalty that is paid is that QPSK

    transmitters and receivers are more complicated than the ones for

    BPSK. However, with modern electronics technology, the penalty in

    cost is very moderate.

    QPSK signal in the time domain

    The modulated signal is shown below for a short segment of a

    random binary data-stream. The two carrier waves are a cosine wave

    and a sine wave, as indicated by the signal-space analysis above.Here, the odd-numbered bits have been assigned to the in-phase

    component and the even-numbered bits to the quadrature component

    (taking the first bit as number 1). The total signal the sum of the

    two components is shown at the bottom. Jumps in phase can be

    seen as the PSK changes the phase on each component at the start of

    each bit-period. The topmost waveform alone matches the description

    given for BPSK above.

    http://en.wikipedia.org/wiki/Bandwidth_(signal_processing)http://en.wikipedia.org/wiki/Electronicshttp://en.wikipedia.org/wiki/Bandwidth_(signal_processing)http://en.wikipedia.org/wiki/Electronics
  • 7/31/2019 Project Reportprathi Block Diagram

    29/46

    DATA ACQUISITION 29

    d

    FIG-5.2 QPSK waveform

    4.2.2 OQPSK - Offset quadrature

    phase-shift keying

    Offset quadrature phase-shift keying (OQPSK) is a variant ofphase-shift keying modulation using 4different values of the phase totransmit. It is sometimes called

    staggered quadrature phase-shiftkeying (SQPSK).

  • 7/31/2019 Project Reportprathi Block Diagram

    30/46

    DATA ACQUISITION 30

    FIG-5.3 Constellation diagram of OQPSK

    Taking four values of the phase (two bits) at a time toconstruct a QPSK symbol can allow the phase of the signal to jump byas much as 180 at a time. When the signal is low-pass filtered (as istypical in a transmitter), these phase-shifts result in large Amplitudefluctuations, an undesirable quality in communication systems. Byoffsetting the timing of the odd and even bits by one bit-period, or halfa symbol-period, the in-phase and quadrature components will never

    change at the same time. In the constellation diagram shown on theright, it can be seen that this will limit the phase-shift to no more than90 at a time. This yields much lower amplitude fluctuations than non-offset QPSK and is sometimes preferred in practice.

    The picture on the right shows the difference in the behaviorof the phase between ordinary QPSK and OQPSK. It can be seen that inthe first plot the phase can change by 180 at once, while in OQPSKthe changes are never greater than 90.

    The modulated signal is shown below for a short segment of a

    random binary data-stream. Note the half symbol-period offsetbetween the two component waves. The sudden phase-shifts occurabout twice as often as for QPSK (since the signals no longer changetogether), but they are less severe. In other words, the magnitude of

    jumps is smaller in OQPSK when compared to QPSK.

    http://en.wikipedia.org/wiki/Bithttp://en.wikipedia.org/wiki/Bit
  • 7/31/2019 Project Reportprathi Block Diagram

    31/46

    DATA ACQUISITION 31

    FIG-5.4 OQPSK waveform

    4.2.3 QPSK SIGNAL VERSUS OQPSK

  • 7/31/2019 Project Reportprathi Block Diagram

    32/46

    DATA ACQUISITION 32

    FIG-5.5 QPSK waveform vs OQPSK waveform

  • 7/31/2019 Project Reportprathi Block Diagram

    33/46

    DATA ACQUISITION 33

    .

    CHAPTER 5 HARDWARE IMPLEMENTATION

    5.1 SENSOR AND TRANSMITTER SECTION

  • 7/31/2019 Project Reportprathi Block Diagram

    34/46

    DATA ACQUISITION 34

    FIG-5.1 RF transmitter

    Fig-6.1 shows the basic schematic of project data

    acquisition using RF(zigbee) Transmitter. These two inputs are taken

    where the temperature data and smoke details are sensing.

    Microcontroller PIC16F877 is used to take the following input andconvert in to RS232 form and send the data in to Zigbee module. This

    data is sent wia wireless communication to remote places. The same

    data is displayed on LCD also. Individual module Schematic is as

    shown in below Fig.

    5.1.1 SMOKE SENSOR SCHEMATIC

  • 7/31/2019 Project Reportprathi Block Diagram

    35/46

    DATA ACQUISITION 35

    FIG-5.2 Smoke sensor and driver circuit .

    5.1.2 Temperature sensor

    FIG-5.3 Temperature sensor and driver circuit .

  • 7/31/2019 Project Reportprathi Block Diagram

    36/46

    DATA ACQUISITION 36

    5.2 RF RECEIVER

  • 7/31/2019 Project Reportprathi Block Diagram

    37/46

    DATA ACQUISITION 37

    FIG-5.4 Temperature sensor and driver circuit .

    Fig5.4 shows the basic schematic of project Data

    acquisition using RF(zigbee) Receiver. On the receiver side same

    Zigbee transceiver module collects the RF data. This data is convertedin to RS232 form by MAX232 converter. The data from MAX232 is giver

    to PIC16F877 receiver. This data is collected or monitored in remote

    places where it is displayed in LCD and buzzer indication is provided if

    temperature is more than 40o. Buzzer indication is also provided if

    there is a presence of smoke.

    CHAPTER 6 - FIRMWARE LOGIC

    6.1 FLOWCHART AND FIRMWARE LOGIC

    START

    Configure all ports

    and Registers as per

    the requirement

    Display Weathermonitoring

    using ZIGBEE

    If output of

    Smoke sensor

    is high OR

    Temperature

    value is more

    than 40degree

    STOP

    Read the

    Temperature value

    & smoke sensor

    status from I/O pin

    Display

    Temperature value

    and Smoke status

    as normal

    Display Temperature value

    and Smoke status as normal

    Turn ON the Buzzer

    NO

    YES

  • 7/31/2019 Project Reportprathi Block Diagram

    38/46

    DATA ACQUISITION 38

    Above flow chart shows the software flow of DATAACQUISITION USING RF COMMUNICATION All the ports should be

    initialized as output port because it should not pick any other noise.

    The required port which is used for input should be made as input.

    Microcontroller PIC16F877 consists of 10bit ADC where it

    receives analog signal and converts in to digital form as shown in block

    diagram Fig-6.1

    FIG-6.1 ADC from PIC controller and displayed on LCD.

    The temperature data and smoke details are taken as input

    from I/O pin. Now the reference is fixed as it compares with 40degree

    of temperature value and 200 relative humidity of smoke value. If

    these value varies beyond the limit then Buzzer indication is provided

    at receiver section. Indication provided on LCD both at transmitter and

    receiver section.

    IC PIC16F877A is an 8-bit microcontrollerwith 8k14-bit flash

    program memory, 368 bytes of RAM and many other extra peripherals

    like ADC, universal synchronous asynchronous receiver transmitter,

    master synchronous serial port, timers, compare capture and pulse-

    width modulation modules, and analogue comparators. It is based on

    the reduced instruction set computer (RISC) architecture.

  • 7/31/2019 Project Reportprathi Block Diagram

    39/46

    DATA ACQUISITION 39

    The microcontroller processes the sensor output to compute

    the temperature in degree Celsius. The internal ADC of the

    microcontroller is used to convert the analogue output of the sensor

    into its equivalent digital value. The internal ADC of the microcontroller

    has eight channels of analogue input and gives 10-bit digital output. In

    this project, the r e f e r e n c e voltage to the ADC is the same as thesupply voltage to the microcontroller,i.e, 5V.

    The resolution of the ADC can be calculated as follows: (as it is a 10-bit

    ADC)

    = 5/1023

    = 4.887 mV

    It means that for 4.887mV change in the analogue input, the ADC

    output changes by binary 1 with a reference voltage of 5V. Analogue

    output of the sensor at its pin 2 is connected to Port A at RA0 forconversion into digital equivalent. The control lines EN, R/W and RS of

    the LCD module are connected to microcontroller pins 18.19 & 20,

    respectively. The commands and the data to be displayed are sent to

    the LCD module in the nibble mode from microcontroller.

    CHAPTER 7 - SOFTWARE

    7.1 MPLAB IDE v8.60

    MPLAB IDE is a Windows Operating System (OS) software

    program that runs on a PC to develop applications for Microchip

    microcontrollers and digital signal controllers. It is called an Integrated

    Development Environment, or IDE, because it provides a single

    integrated "environment" to develop code for embedded

    microcontrollers.

    Embedded systems

    An embedded system is typically a design making use ofthe power of a small microcontroller, like the Microchip PIC MCU or

    dsPIC Digital Signal Controller (DSCs). These microcontrollers combinea microprocessor unit (like the CPU in a desktop PC) with someadditional circuits called "peripherals", plus some additional circuits onthe same chip to make a small control module requiring few otherexternal devices. This single device can then be embedded into otherelectronic and mechanical devices for low-cost digital control.

    MPLAB Editor

    The MPLAB Editor is an integrated part of the MPLAB IDE

    Integrated Development Environment. The editor is always availablewhen MPLAB IDE is running.

  • 7/31/2019 Project Reportprathi Block Diagram

    40/46

    DATA ACQUISITION 40

    The MPLAB IDE and MPLAB Editor are designed to providedevelopers with an easy and quick method to develop and debugfirmware for Microchip Technology's PIC microcontroller (MCU) andDSPIC digital signal controller (DSC) product families.

    MPLINK Linker

    MPLINK object linker (the linker) combines object modulesgenerated by the MPASM assembler or the MPLAB C18 C compiler intoa single executable (hex) file. The linker also accepts libraries of objectfiles as input, as geneated by the MPLIB object librarian. The linkingprocess is controlled by a linker script file, which is also input intoMPLINK linker.

    MPLAB ICD 2 debugger

    The MPLAB ICD 2 is a low-cost in-circuit debugger (ICD) andin-circuit serial programmer (ICSP). MPLAB ICD 2 is intended to beused as an evaluation, debugging and programming aid in a laboratoryenvironment.

    The MPLAB ICD 2 offers these features:

    Real-time and single-step code execution

    Breakpoints, Register and Variable Watch/Modify

    In-circuit debugging

    Target Vdd monitor

    Diagnostic LEDs

    MPLAB IDE user interface

    RS-232 serial or USB interface to a host PC

    7.2 STEPS IN DEVELOPING A PROGRAM

    Setting Up the Environment

  • 7/31/2019 Project Reportprathi Block Diagram

    41/46

    DATA ACQUISITION 41

    Running the Project Wizard

    Viewing the Project

    Creating a HEX File

    Setting Debug Options

    Setting Up the Demo Board

    Loading Program Code For Debugging Running TUT452

    Debugging TUT452

    Programming the ApplicationTUT452

    Main Routine and Source Code

    CHAPTER 8 - ADVANTAGES & APPLICATIONSAND LIMITATIONS

    8.1 ADVANTAGES

    1. Better accuracy.

    2. Avoiding human error.

    3. Increases speed and saves time.

    4. Cost effective.

    8.2 APPLICATIONS:

    The major applications of data acquisition using RF communication

    (ZIGBEE) is

    Manufacturing industries where the continuous data needed to

    be monitored data communication is required for different

    modules in industrial campus.

  • 7/31/2019 Project Reportprathi Block Diagram

    42/46

    DATA ACQUISITION 42

    In hospitals it has advantage to gather the information.

    Remote temperature alarm for poultry sheds:

    Wireless Temperature Monitoring and alarm can be used to

    remotely monitor incubator temperature, egg storage room

    temperature, broiler sheds, water level and humidity. Optional

    outputs can also be used to control ventilation fans and heating

    devices

    Industrial and commercial remote wireless temperature

    monitoring system.

    Home and industrial automation systems

    8.3 LIMITATIONS:

    Range of communication reduced when there is obstacles

    between transmitter and receiver.

    Since no security data may be received by unintended receiver.

    CHAPTER 9 - DEVELOPMENT AND RESULTS

    9.1 DEVELOPMENT STEPS

    The development of project is done in various stages.

    a. Stage 1: Study of all the components carried in this stage.

    RF communication

    Various modulation techniques

    Sensors

    Embedded codingDetailed study is done on the above factors

  • 7/31/2019 Project Reportprathi Block Diagram

    43/46

    DATA ACQUISITION 43

    b. Stage 2: Circuit diagram is prepared and verified in Multisim

    software.

    c. Stage 3: Circuit connection is done first on breadboard.

    d. Stage 4: Since it is wireless communication the range of

    communication is checked

    and noted.e. Stage 5: Coding is done in MPLAB software.

    f. Stage 6: Report preparation is done.

    The prototype of Data acquisition using RF was designed as discussed

    in previous chapters.

    9.2. RESULT

    The input dc 12V is given to the power supply circuit. The power ON

    LED indication is provided to each of the modules. This power on

    indication is mainly implemented for debug purpose. In transmitter

    side as soon as circuit powers ON it senses the temperature & Smoke

    data and displays on LCD. Refer Tablexx for detailed transmitter and

    receiver LCD display output.

    On the receiver side, the input dc 12V is given to the power supply

    circuit. The power ON LED indication is provided to each of the

    modules. This power on indication is mainly implemented for debug

    purpose. If any data is collected by receiver from transmitter then itshows the corresponding value on LCD. If no data is received by

    receiver it waits for the data by displaying weather monitoring using

    ZIGBEE.

    Table.9.1 Display pattern for different conditions of input

    Condition TRANSMITTER RECEIVER

    Temperature is within

    40 degree Celsius and

    absent of smoke

  • 7/31/2019 Project Reportprathi Block Diagram

    44/46

    DATA ACQUISITION 44

    Temperature value is

    more than 40 degree

    Celsius and smoke is

    present

    When receiver is not receiving data from transmitter then the display

    will be shown as below FIG 8.1

    FIG-9.1 Display pattern when no transmitter input .

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

  • 7/31/2019 Project Reportprathi Block Diagram

    45/46

    DATA ACQUISITION 45

    parameter on the PCs 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 will bevery less. ZigBee targets applications not addressable by Bluetooth

    or any other wireless standard.

    The Zigbee based wireless weather station is essentially

    a design and implementation project of wireless technology. To

    approach a project like this a parallel path has to be taken in regards

    to the theory and the practical circuitry, for a successful conclusion in

    any project the paths must meet, and this only happens when they

    are fully understood. This is why a good grounding in the basics ofDigital, Computer interfacing ports & programming in micro controller

    ,visual basic6.0 language must be achieved before ever approaching

    a project like this. To start off looking at basic of wireless device was

    must. This is what made the overall project challenging and

    rewarding.

    The design use for this project is essentially quite a

    simple one, and it is this simplicity which partly brings it down when

    it comes to the overall reliable performance.

    11. FUTURE SCOPE OF ZIGBEE:

    The zigbee technology can be wide used for home and

    industrial automation. It lead to the cheap wireless technology, so

    that it can be widely used for low rate data transfer. It can also be

    used for the remote control unit like toys, etc. We got a proposed

    zigbee universal remote controller. It requires only 200us of latency

    and high efficient use of power. Zigbee is the best for where the

    battery is replaced very rarely.

    12. REFERENCES

    www.zigbeealliance.com

    www.wikipedia.org

    Wireless Communication System by Roody Coolen

    Communication Electronics by Freznel

  • 7/31/2019 Project Reportprathi Block Diagram

    46/46

    DATA ACQUISITION 46

    DATASHEE

    T