Campus Automation

PROJECT REPORT µ11

CHAPTER.1

INTRODUCTION

Dept. of ECE

1

VAST

Campus Automation

PROJECT REPORT µ11

1.1 INTRODUCTION
Now a day¶s wired communication is outdated .Everywhere we are trying to use wireless communication. But there are limitation in range of wireless communication. Our aim is to develop a wireless transmitter receiver which is capable of transmitting as well as receiving messages form similar devices. Main objective of this project is make an efficient wireless transceiver is with very low cost . Main application of this module is in big industries, and war fields , and it can also be use for the communication between the guards in a train.

Dept. of ECE

2

VAST

Campus Automation

PROJECT REPORT µ11

CHAPTER.2

BLOCK DIAGRAM

Dept. of ECE

3

VAST

Campus Automation

PROJECT REPORT µ11

Campus automation system has mainly two sections, transmitter section and receiver section.

2.1. TRANSMITTER SECTION

BUZZER PIR

PC

COMPUTER INTERFACE

PIC 16F877A

DRIVER CIRCUIT

FAN

DRIVER CIRCUIT

LIGHT

Fig.2.1

Dept. of ECE

4

VAST

2. of ECE 5 VAST . RECEIVER SECTION ZIGBEE MODULE PIC 16F877A LCD DISPLAY RECEIVER SECTION: Fig.Campus Automation PROJECT REPORT µ11 2.2 Dept.2.

of ECE 6 VAST .Campus Automation PROJECT REPORT µ11 CHAPTER.3 BLOCK DIAGRAM DESCRIPTION Dept.

PC is used to enter the data to the PIC with the help of serial port. PIR sensors can detect many things that humans cannot. which controls the data transfer. It consists of a LCD display to show the clock . In fact. PIR sensors can detect objects that are in front of them. PIR sensors differ from other infrared sensors because they can only receive infrared waves. motion detection.TRANSMITTER SECTION: Transmitter section mainly consists of three sub sections: *Message transmitting section *Automatic bell *Automatic fan and light controller This section contains peripheral interface controller (PIC) 16F877A. 3. PIR sensors are used in many applications. PIR sensor .1.bell & ZIGBEE module.PIC controls the ZIGBEE module to transfer the data serially. and laser range finding.Campus Automation PROJECT REPORT µ11 This chapter discuss about the blocks of transmitter and receiver section. Because all objects emit infrared waves (electromagnetic waves that travel with heat).The Program sets in such a way that the bell rings at the end of each hour between 9am and 4pm. Dept. The automatic bell works based on the program that we have stored on the PIC. The 16F877A micro controller is the heart of transmitter section. A PIR (Passive Infrared) sensor detects infrared light that is emitted from objects within its field of view. such as night vision. of ECE 7 VAST . Here we use wireless transmission system for data transfer.

The buzzer is used to indicate the arrival of new message. Dept.2.Campus Automation PROJECT REPORT µ11 3.if the message bit is greater than 16 bit. Zigbee module and a buzzer . The program is set such that LCD will clear . of ECE 8 VAST .PIC receives the data serially through ZIGBEE module and displays that data on LCD display.RECEIVER SECTION : The receiver section mainly consists of a PIC microcontroller. LCD display.

Campus Automation PROJECT REPORT µ11 CHAPTER. of ECE 9 VAST .4 CIRCUIT DIAGRAM Dept.

1 Dept C 0 .C t ti R C R R The ci cuit di gi en below: of power supply.1.POWE SUPPLY Fig.4. transmitter section and recei er section are 4.

2 TRANSMITTER SECTION Dept. of ECE 11 VAST .Campus Automation PROJECT REPORT µ11 4.

of ECE 12 VAST .3 RECEIVER Dept.Campus Automation PROJECT REPORT µ11 4.

of ECE 13 VAST .Campus Automation PROJECT REPORT µ11 CHAPTER.5 CIRCUIT DESCRIPTION Dept.

Dept. A voltage regulator may be part of some larger electronic circuit. The closed loop amplifier configure act to maintain the traction of the output voltage feed back to the amplifier inverting input terminal equal to the reference voltage that is supplied to the noninverting input terminal.3 Volts. An amplifier to compare the reference voltage with the fraction of the output voltage that is fed back from the voltage regulator output to the inverting input terminal of the amplifier. GPS and camera are uses +5 volt supplies and MMC card uses +3. The combination of the amplifier (often called an error amplifier) and the series pass transistors. unusually in the form of an integrated circuit. The output voltage of the voltage regulator is regulated by the internal circuitry of the regulator to the relatively independent of the current drawn by the load. A voltage regulator is an electronic device that supplies a constant voltage to a circuit or load. but is often a separate unit a module. It is compressed of three basic parts. A voltage reference circuit that produces a reference voltage that is independent of temperature and supply voltage. together with the resistive voltage divider to tap off a portion of the output voltage.Campus Automation PROJECT REPORT µ11 5.1. of ECE 14 VAST . A series pass transistor or combination of transistor to provide an adequate level of output current to the load being driven.. LM 78 5(U5). LCD. the supply or line voltage and the ambient temperature.POWER SUPPL In this circuit Microcontroller. The adjustable regulator LM 317 is used for 3. constitutes a feed back amplifier.3 V.e. we can use fixed regulator ICs i. In the case of +5 Volt.

input (Vin).Campus Automation PROJECT REPORT µ11 Three terminal voltage regulators are voltage regulators in which the output voltage is set at some pre-determined value. From the power supply filter capacitor such that the lead inductance between the supply and the regulator may cause stability problems and high frequency oscillations. do not require any external feed back connections. The principle advantage of three terminal regulators is the simplicity of connection to the external circuit. Acceptable values on generally . The 15 volt DC pass to the 7812 IC. A 47Mf (C13) and . of ECE 15 VAST . They therefore. output (Vo) and a ground terminal. As a result.1 MF (C8) capacitors are used for surge voltage protection.21 geF ceramic disks. improve the regulator response to transient changes in the local conditions.A 47 MFD/25v filter capacitor (C12) is used for smoothing purpose. only three terminals are required for this type of generator.1 MF (C9) capacitors are used for surge voltage protection.25V between the output and Dept. Since these regulators operate at a present out put voltage. If we connect reveres polarity of the battery then a reveres current produces and damage the regulator IC. the current limit resistor Rd is also internal to the generator. and will also reduce the noise present at the regulator output. The LM317 provides an internal reference voltage of 1. or 25 mF or greater aluminium electrolyte . . with a minimum of external components required. The output of the IC gives us +12v. The diode D5 (1N4 1) protects circuits from reveres current. however. in many applications no external components are required. The use of a suitable capacitor will. Indeed.A capacitor is generally not needed across the output terminals. 2mF or greater tantalum. The simplicity and case of application is evident. A very low Effective Series Resistance (ESR) should characterize the capacitor. A 47Mf (C14) and . The output of the LM 7812 gives to the LM78 5 IC for producing +5V dc. The capacitor across the input terminals is required only when the voltage regulator is located more than about 5cm. The device connected to 15 v DC supply (the input of the regulator IC always greater than Vout+2).

giving an output voltage VO of: V = VREF ( 1 + R 2 /R 21 ) + IADJ R2 The device was designed to minimize the term IADJ ( 1 m A max) and to maintain it very constant with line and load changes. Inorder to avoid this we use a capacitive filter.25(1+R2/R21) Here we want 3.-12 or 6. 5 V CURRENT REQUIREMENTS: Upto 2 mA SELECTION OF TRANSISTOR: Use 12.Campus Automation PROJECT REPORT µ11 adjustments terminals. the error term IADJ V R2 can be neglected. SELECTION OF DIODES: Use 1N4 7 diodes as it can withstand a maximum of 1 A. OUTPUT VOLTAGE REQUIREMENTS: 3. SELECTION OF CAPACITOR C 1 : The converted dc contains ac ripple components.3V DC voltage. R2+P1=36 ohm In summary. This is used to set a constant current flow across an external resistor divider show below. SELECTION OF VOLTAGE REGULATORS: Use LM78 5 to obtain the 5V DC voltage and LM317 to obtain the 3. if R21 is 22 ohm we can get value of R2. Usually. C=5I/(Vp x f) Dept. Here a P1 (variable resistor ) is connected for adjusting output voltage.25v V = 1. of ECE 16 VAST .-6 transformer to obtain 12V AC supply from 23 V AC mains supply. VREF is 1.3V.3v. C1 is used for filtering the rectifier output.

C4: C3 is used for filtering purpose. Vp=12+1.2V. SELECTION OF R 1 . Hence C=477. PROJECT REPORT µ11 SELECTION OF CAPACITOR C 2 : The capacitor C2 is used for filtering purpose. 63A. V = Vref [1 + (R2 / R1 )] Vref = 1.Campus Automation I= . Dept. C4 is used for reducing noise at the output. of ECE 17 VAST .3 V Then R2 = 33     std. R2. We require C2 << C1 .1 F std.72 F. std. C3. Use C4 = . f=5 Hz. Use 47 F standard.25 V fixed value Take R1 = 22 V = 3.2=13. Take C2 = C1 / 1 Use 47 F std. Use C3 = C2 = 47 F std.

2Peripheral Interface Controller (PIC) Peripheral Interface Controllers (PIC is one of the advanced microcontrollers developed by microchip technologies. ROM. As li e normal microcontroller. wide availability.Campus Automation PR CT R PORT µ11 5. A PIC controller integrates all type of advanced interfacing ports and memory modules.1 General Features y It is a high performance RISC CPU. EEPROM. The figure of a PIC16F877 chip is shown below Fig. I/O ports. PICs are popular with both industrial developers and ho bbyists ali e due to their low cost.2. extensive collection of application notes. These microcontrollers are widely used in modern electronics applications.5. etc. availability of low cost or free development tools. These controllers are more advanced than normal microcontroller li e INTEL 80 1. The PIC has number of advanced features. of ECE 18 VAST . large user base.1 All PIC microcontroller family uses Harvard architecture. timers/counters. etc). Dept. the PIC chip also combines a microprocessor unit called CPU and is integrated with various types of memory modules (RAM. PIC 16F877 is one of the most advanced microcontroller from Microchip. The first PIC chip was announced in 1975 (PIC1650 . Separating program and data memory further allows instru ctions to be si ed differently than the 8-bit wide data word. the important features of PIC16F877 series is given below. This architecture has the program and data accessed from separate memories so the device has a program memory bus and a data memory bus (more than 8 lines in a normal bus). This improves the bandwidth (data throughput) over traditional von Neumann architecture where program and data are fetched from the same memory (accesses over the same bus). and serial programming (and re-programming with flash memory) capability. 5. communication ports.

1 bit multi-channel A/D converter Synchronous Serial Port (SSP) with SPI (master code) and I2C (master/slave). PIC 16C76. Operating speed: clock input (2 MHz). WR and CS controls (4 /46pin). Low power consumption (< .2. PIC 16C77. Timer 2: 8 bit timer/counter with 8 bit period registers with pre-scalar and post-scalar. Power on Reset (POR). Commercial. Eight level deep hardware stack. instruction cycle (2 nS). and 8k×14 of flash memory. Different types of addressing modes (direct.6mA typical @3v-4MHz. Wide operating voltage range (2.5nS). Interrupt capability (up to 14 sources). Brown Out circuitry for Brown-Out Reset (BOR).2. Power-Up Timer (PWRT) and oscillator start-up timer. Parallel Slave Port (PSP) 8 bit wide with external RD. of ECE 19 VAST . 2 A typical @3v32MHz and <1 A typical standby). Low power. High sink/source current (25mA). Pin out compatible to PIC 16C74B. eral Features 5.3 Key Features Dept. Indirect.2 Peri y y y y y y y y y Timer : 8 bit timer/counter with pre-scalar. Two Capture (16bit/12.56)volts. Timer 1:16 bit timer/counter with pre-scalar. Up to 368×8bit of RAM (data memory).high speed CMOS flash/EEPROM. industrial and extended temperature ranges. 256×8 of EEPROM (data memory). ± 5. Universal Synchronous Asynchronous Receiver Transmitter (USART) with 9 bit addresses detection. All single cycle instructions except for program branches which are two cycles. Pulse Width Modules (1 bit). Fully static design. relative addressing modes). 5. Compare (16 bit/2 nS).Campus Automation y y y y y y y y y y y y y y y y PROJECT REPORT µ11 Only 35 simple word instructions.

Selectable oscillator options. 8KB. Power saving sleep modes. programmable input multiplexing from device inputs and internal voltage reference & comparator outputs are externally accessible. USART). 2 CCP modules. programmable onchip voltage reference (VREF) module. 2 serial communication ports (MSSP. Flash program memory (14 bit words). ALU.2. accumulator. In-circuit serial programming and in-circuit debugging capability. PSP parallel communication port 1 bit A/D module (8 channels) 5.Campus Automation y y y y y y y y y y PROJECT REPORT µ11 Maximum operating frequency is 2 MHz. Programmable code protection.5 Special Features y y y y y y y y y times erase/write cycle enhanced memory.DC supply for circuit serial programming WDT with its own RC oscillator for reliable operation. 1 times erase/write cycle data EEPROM memory. Now we discuss the important parts of Peripheral Interface Controller 5. Single 5V.6 Central Processing Unit (CPU) The function of CPU in PIC is same as a normal microcontroller CPU. 3 timers. etc.4 Anal g Features y y y 1 -bit. 1 Self programmable under software control. EEPROM data memory (bytes) is 256. The CPU in PIC normally supports Reduced Instruction Set Computer (RISC) architecture (Reduced Instruction Set Computer (RISC). 5 input/output ports. of ECE 2 VAST . 5. control unit.2. A PIC CPU consists of several sub units such as instruction decoder.2. Data memory (bytes) is 368. a type of microprocessor that focuses on rapid and efficient processing of a relatively small set Dept. up to 8-channel Analog-to-Digital Converter (A/D) Brown-out Reset (BOR) Analog Comparator module with two analog comparators.

As a result. this is a special block of RAM memory used only for this purpose. y y y The RISC structure only has 35 simple instructions as compared to others. RISC design is based on the premise that most of the instructions a computer decodes and executes are simple.7. of ECE 21 VAST . RISC architecture limits the number of instructions that are built into the microcontroller but optimizes each so it can be carried out very rapidly (usually within a single clock cycle).2 Data Memory The data memory of PIC16F877 is separated into multiple banks which contain the general purpose registers (GPR) and special function registers (SPR). In the PIC microcontrollers.1 Program memory Program memory contains the programs that are written by the user. Usually PIC16F877 devices have a 13 bit wide program counter that is capable of addressing 8K×14 bit program memory space.7. The execution time required is very less (5 million instructions/second approximately).7 Memory Organization of PIC16F877 The memory of a PIC 16F877 chip is divided into 3 sections. The program memory map and stack is shown in appendix Program counters (PC) is used to keep the track of the program execution by holding the address of the current instruction. 5. Each time we write a new program to the controller. These devices also have 8K*14 bits of flash memory that can be electrically erasable /reprogrammed. 5. The stack space is not a part of either program or data space and the stack pointers are not readable or writable. The program counter (PC) executes these stored commands one by one. we must delete the old one at that time.2. The PIC16F87XA family has an 8-level deep x 13-bit wide hardware stack. This memory is primarily used for storing the programs that are written (burned) to be used by the PIC. The counter is automatically incremented to the next instruction during the current instruction execution. Dept.2. They are y Program memory y Data memory and y Data EEPROM 5.2. The execution time is same for most of the instructions (except very few numbers). These RISC structure gives the following advantages.Campus Automation PROJECT REPORT µ11 of instructions.

The Flash program memory allows single-word reads and four-word block writes. these banks may vary. it is indirectly addressed through the Special Function Registers. The selection of the banks are determined by control bits RP1. RP1:RP0 00 01 10 11 BANK 0 1 2 3 Table 5. and BANK4). The banked arrangement is necessary because there are only 7 bits are available in the instruction word for the addressing of a register. The write time is controlled by an on- Dept. BANK 1. The PIC16F877 chip only has four banks (BANK . A byte write in data EEPROM memory automatically erases the location and writes the new data (erase-before-write).2. The first 32 locations of Banks 1 and 2. BANK 2. RP and the specified 7 bits effectively form a 9 bit address. and the first 16 locations of Banks2 and 3 are reserved for the mapping of the Special Function Registers (SFR¶s). 5. Each bank holds 128 bytes of addressable memory.Campus Automation PROJECT REPORT µ11 According to the type of the microcontroller. Program memory write operations automatically perform an erase-before write on blocks of four words. of ECE 22 VAST . The data memory bank organization is shown in appendix.3 Data EEPROM and FLASH The data EEPROM and Flash program memory is readable and writable during normal operation (over the full VDD range). There are six SFRs used to read and write this memory: EECON1 EECON2 EEDATA EEDATH EEADR EEADRH The EEPROM data memory allows single-byte read and writes. This memory is not directly mapped in the register file space. RP in the STATUS registers Together the RP1.1 A bit of RP1 & RP0 of the STATUS register selects the bank access.7. which gives only 128 addresses. Instead.

2.) 5. Therefore. PORT B (RB). ´PORT B´ . whereas writing to it will write to the port latch. PORT-A PORT-B PORT-C PORT-D PORT-E RA0 to RA5 RB-0 to RB-7 RC-0 to RC-7 RD-0 to RD-7 RE-0 to RE-2 Table 5.´PORT D´ are only 8 bits wide (RB-0 to RB-7. a write to a port implies that the port pins are read.).. the value is modified and then written to the port data latch. TRIS B used to set the direction for PORT-B. PORT D (RD). All write operations are read-modify-write operations. ³PORT A´ is only 6 bits wide (RA-0 to RA-7). Clearing a TRIS(X) bit µ0¶ will set the corresponding PORT(X) bit as output. etc.. just set the PORT B bits to logical µ0¶.Campus Automation PROJECT REPORT µ11 chip timer. put the corresponding output driver in a High. In this controller. put the contents of the output latch on the selected pin). Setting a TRIS(X) bit µ1¶ will set the corresponding PORT(X) bit as input.RD-0 to RD-7).2 6 bit wide 8 bit wide 8 bit wide 8 bit wide 3 bit wide All these ports are bi-directional. The RA4/T0CKI pin is a Schmitt Trigger input and an open-drain Dept.Impedance mode). Clearing a TRISA bit (= 0) will make the corresponding PORTA pin an output (i. The corresponding data direction register is TRISA. ³PORT C´. and PORT E (RE). The write/erase voltages are generated by an on-chip charge pump.1 Port A & TRIS A Register PORTA is a 6-bit wide. bidirectional port. just set TRIS(A) bit to logical µ1¶ and want to set PORT B as an output.2.8 Input/output Ports PIC16F877 has 5 basic input/output ports. Reading the PORTA register reads the status of the pins.e. PORT C (RC). of ECE 23 VAST . They are usually denoted by PORT A (R A).e. The direction of the port is controlled by using TRIS(X) registers (TRIS A used to set the direction of PORT-A.RC-0 to RC-7. rated to operate over the voltage range of the device for byte or word operations.8. Setting a TRISA bit (= 1) will make the corresponding PORTA pin an input (i. ´PORT E´ has only 3 bit wide (RE-0 to RE-7). These ports are used for input/ output interfacing. 5. Pin RA4 is multiplexed with the Timer0 module clock input to become the RA4/T0CKI pin. (If we want to set PORT A as an input.

bidirectional port.e. A mismatch condition will continue to set flag bit RBIF.e.3 Port C & TRIS C Register PORTC is an 8-bit wide.8. Four of the PORTB pins. RB7:RB4. put the contents of the output latch on the selected pin).2. This interrupt-on-mismatch feature. This will end the y y Mismatch condition. Setting a TRISC bit (= 1) will make the corresponding PORTC pin Dept. All other PORTA pins have TTL input levels and full CMOS output drivers. can clear the interrupt in the following manner: Any read or write of PORTB. The input pins (of RB7:RB4) are compared with the old value latched on the last read of PORTB. This is performed by clearing bit RBPU (OPTION_REG<7>). Three pins of PORTB are multiplexed with the In-Circuit Debugger and Low-Voltage Programming function: RB3/PGM. Polling of PORTB is not recommended while using the interrupt-on-change feature. The operation of each pin is selected by clearing/setting the appropriate control bits in the ADCON1 and/or CMCON registers. The weak pull-up is automatically turned off when the port pin is configured as an output. of ECE 24 VAST . any RB7:RB4 pin configured as an output is excluded from the interrupton. Clear flag bit RBIF. Other PORTA pins are multiplexed with analog inputs and the analog VREF input for both the A/D converters and the comparators.e. Each of the PORTB pins has a weak internal pull-up. in the Interrupt Service Routine.Campus Automation PROJECT REPORT µ11 output.. The pull-ups are disabled on a Power-on Reset. have an interrupton. The user. This interrupt can wake the device from Sleep. Reading PORTB will end the mismatch condition and allow flag bit RBIF to be cleared. The ³mismatch´ outputs of RB7:RB4 are OR¶ed together to generate the RB port change interrupt with flag bit RBIF (INTCON<0>). 5. The user must ensure the bits in the TRISA register are maintained set when using them as analog inputs. 5.2 Port B & TRIS Register PORTB is an 8-bit wide. RB6/PGC and RB7/PGD. put the corresponding output driver in a High-Impedance mode).8. bidirectional port. together with software configurable pull-ups on these four pins. Setting a TRISB bit (= 1) will make the corresponding PORTB pin an input (i.. Only pins configured as inputs can cause this interrupt to occur (i. A single control bit can turn on all the pull-ups. allow easy interface to a keypad and make it possible for wake-up on key depression. The TRISA register controls the direction of the port pins even when they are being used as analog inputs.change feature.change comparison). The corresponding data direction register is TRISC. Clearing a TRISB bit (= 0) will make the corresponding PORTB pin an output (i. The corresponding data direction register is TRISB..2. The interrupt-onchange feature is recommended for wake-up on key depression operation and operations where PORTB is only used for the interrupt-on-change feature.

. PORTC pins have Schmitt Trigger input buffers. ensure that ADCON1 is configured for digital I/O. PORTE pins are multiplexed with analog inputs.2. of ECE 25 VAST .2. These ports are used for the transmission (TX) and reception (RX) of data. Some peripherals override the TRIS bit to make a pin an output. Clearing a TRISC bit (= 0) will make the corresponding PORTC pin an output (i. Each pin is individually configurable as an input or output. the user must make certain that the TRISE<2:0> bits are set and that the pins are configured as digital inputs. the PORTC<4:3> pins can be configured with normal I2C levels. the input buffers are TTL. or with SMBus levels. should be avoided.8.e. These transmissions possible with help of various digital data transceiver modules like RF. Also. The user should refer to the corresponding peripheral section for the correct TRIS bit settings. the input buffers are TTL. put the contents of the output latch on the selected pin). IR.4 Port D & TRIS D Register PORTD is an 8-bit port with Schmitt Trigger input buffers. In this mode. This is the one of the simplest way to communicate the PIC chip with other devices. Since the TRIS bit override is in effect while the peripheral is enabled. When the I2C module is enabled. 5. (USART is also known as a Serial Communications Interface or SCI). In this mode. The USART can be configured as a full-duplex asynchronous system that can communicate with Dept. These pins have Schmitt Trigger input buffers. XORWF) with TRISC as the destination. BCF. The user must make sure to keep the pins configured as inputs when using them as analog inputs.2. PORTC is multiplexed with several peripheral functions. 5. In this mode.9 USART The Universal Synchronous Asynchronous Receiver Transmitter (USART) module is one of the two serial I/O modules. 5. PORTD can be configured as an 8-bit wide microprocessor port (Parallel Slave Port) by setting control bit. Bluetooth. while other peripherals override the TRIS bit to make a pin an input. TRISE controls the direction of the RE pins. When selected for analog input. PSPMODE (TRISE<4>). by using the CKE bit (SSPSTAT<6>). put the corresponding output driver in a High-Impedance mode). read-modify write instructions (BSF. these pins will read as µ0¶s.5 Port E & TRIS E Register PORTE has three pins (RE0/RD/AN5.8. care should be taken in defining TRIS bits for each PORTC pin.e. RE1/WR/AN6 and RE2/CS/AN7) which are individually configurable as inputs or outputs. Register 4-1 shows the TRISE register which also controls the Parallel Slave Port operation. even when they are being used as analog inputs. ZIGBEE etc. The PORTE pins become the I/O control inputs for the microprocessor port when bit PSPMODE (TRISE<4>) is set..Campus Automation PROJECT REPORT µ11 an input (i. When enabling peripheral functions.

2. of ECE 26 VAST . 5. The USART module also has a multi-processor communication capability using 9-bit address detection. such as A/D or D/A integrated circuits.10 Pin Diagram of PIC 16F877A The 40 pin PDIP pin. one stop bit & no parity bit. serial EEPROMs. The parameters for serial communication are y y y y y Data rate (Baud rate in bps) Data size (packet size) Start bit (if any) Stop bit (if any) Parity bit (if any) PIC 16F877A have no start bit.out of PIC 16F877A is shown below: Dept. etc.Campus Automation PROJECT REPORT µ11 peripheral devices. where 8-bit is data & one bit is stop bit. such as CRT terminals and personal computers. or it can be configured as a half-duplex synchronous system that can communicate with peripheral devices. Therefore the transmitted or received information is 9-bit in size. The USART can be configured in the following modes: y y y Asynchronous (full-duplex) Synchronous ± Master (half-duplex) Synchronous ± Slave (half-duplex) Bit SPEN (RCSTA<7>) and bits TRISC<7:6> have to be set in order to configure pins RC6/TX/CK and RC7/RX/DT as the Universal Synchronous Asynchronous Receiver Transmitter.

Campus Automation PROJECT REPORT µ11 Fig. as shown in Fig.2. During normal operation this pin should be high.5. of ECE 27 VAST .11 Master Clear PIC16F87XA devices have a noise filter in the MCLR Reset path.2 Some pins for these I/O ports are multiplexed with an alternate function for the peripheral features on the device. The use of an RCR network. These are given in appendix.6. 5. the following conditions will occur y Queue will clear y All registers will clear y IP points to the first location of memory y RAM will clear Dept. during reset. The filter will detect and ignore small pulses. Voltages applied to the pin that exceed its specification can result in both Resets and current consumption outside of device specification during the Reset event.5 is suggested. When reset it is low. Microchip recommends that the MCLR pin no longer be tied directly to VDD. For this reason.

2. The PIC requires external clock generator. Small instruction set. We use crystal oscillator for clock generation. Program memory is not accessible. Register banking switch required to access RAM of other devices.13 Advantages of PIC Controlled System Reliability: The PIC controlled system often resides machines that are expected to run continuously for many years without any error and in some cases recover by themselves if an error occurs(with help of supporting firmware). of ECE 28 VAST . ‡ Dept.3 5.12 Limitations of PIC Architecture y y y y y Peripheral Interface Controller has only one accumulator. The details of crystal oscillator are given in appendix-3. Operations and registers are not orthogonal. 5.2.5.Campus Automation PROJECT REPORT µ11 Fig.

‡ Power consumption: A PIC controlled system operates with minimal power consumption without sacrificing performance. ZigBee is targeted at radio- Dept. when additional stack layers defined by the ZigBee Alliance are used. However it has limited capacity for networking of many nodes. and relatively long range applications such as the IEEE 802.15. consumer electronics equipment via short-range radio needing low rates of data transfer.Campus Automation PROJECT REPORT µ11 ‡ Performance: Many of the PIC based embedded system use a simple pipelined RISC processor for computation and most of them provide on-chip SRAM for data storage to improve the performance. of ECE 29 VAST . The past several years have witnessed a rapid growth of wireless networking.4 In this project the data will be transmitted from the attendance entering system to the main server using wireless technology. ‡ Memory: Most of the PIC based systems are memory expandable and will help in easily adding more and more memory according to the usage and type of application. ZigBee is a specification for a suite of high level communication protocols using small. lowpower digital radios based on the IEEE 802. There are many wireless monitoring and control applications in industrial and home environments which require longer battery life. The technology defined by the ZigBee specification is intended to be simpler and less expensive than other WPANs. up to now wireless networking has been mainly focused on high-speed communications. electrical meters with in-home-displays. a new standard called IEEE 802. In small applications the inbuilt memory can be used.11 Wireless Local Area Network (WLAN) standards. For such wireless applications. However.5. 5. such as wireless light switches with lamps. Power consumption can be reduced by independently and dynamically controlling multiple power platforms. lower data rates and less complexity than those from existing standards.3 ZIGBEE Module Fig.4 has been developed by IEEE. such as Bluetooth.42003 standard for Low-Rate Wireless Personal Area Networks (LR-WPANs).15. The new standard is also called ZigBee. The first well known standard focusing on Low-Rate Wireless Personal Area Networks (LR-WPAN) was Bluetooth.

A key concept in WPAN technology is known as "plugging in". The technology for WPANs is in its infancy and is undergoing rapid development. lives in a hive that contains a queen. In the ideal scenario. and direction of a newly discovered food source to her fellow colony members. The domestic honeybee. a wireless personal area network uses some technology that permits communication within about 10 meters (33 ft) such as Bluetooth. The objective is to facilitate seamless operation among home or business devices and systems. The survival. A WPAN could serve to interconnect all the ordinary computing and communicating devices that many people have on their desk or carry with them today . The technique that honey bees use to communicate new-found food sources to other members of the colony is referred to as the ZigBee Principle. Using this silent. This communication dance (the "ZigBee Principle") is what engineers are trying to emulate with this protocol _ a bunch of separate and simple organisms that join together to tackle complex tasks. Proposed operating frequencies are around 2.15. and secure networking. of ECE 30 VAST . Typically. bees around Dept. whereby the bee dances in a zig-zag pattern. WPANs worldwide will be interconnected. success.or it could serve a more specialized purpose such as allowing the surgeon and other team members to communicate during an operation. but powerful communication system.1 Wireless Personal Area Network (WPAN) A WPAN (wireless personal area network) is a personal area network . she is able to share information such as the location. long battery life. 5. a few male drones.Campus Automation PROJECT REPORT µ11 frequency (RF) applications that require a low data rate. Instinctively implementing the ZigBee Principle. Every device in a WPAN will be able to plug in to any other device in the same WPAN. distance.in which the connections are wireless. IEEE 802. Another important feature is the ability of each device to lock out other devices selectively. preventing needless interference or unauthorized access to information. and future of the colony is dependent upon continuous communication of vital information between every member of the colony.a network for interconnecting devices centered on an individual person's workspace . they can communicate as if connected by a cable. provided they are within physical range of one another.4 GHz in digital modes.3. a colonial insect.2 The Name ZIGBEE The name ZigBee is said to come from the domestic honeybee which uses a zigzag type of dance to communicate important information to other hive members. 5. and thousands of worker bees. In addition. which was used as the basis for a new standard. when any two WPAN-equipped devices come into close proximity (within several meters of each other) or within a few kilometers of a central server.3.

The current list of application profiles either published. The term ZigBee is a registered trademark of this group. or in the works are: y y y y y ZigBee Home Automation ZigBee Smart Energy 1. We will define the frequencies used.15. and the IEEE 802. and networking features unique to this protocol. not a single technical standard.15.4 Dept.4 protocol on which it was built.11 standard defines communication for wireless LAN and 802. the IEEE 802.15.15. 5. and also publishes application profiles that allow multiple OEM vendors to create interoperable products.4 Creating wireless networks can be done using a variety of RF protocols.15.3 Trademark and Alliance The ZigBee Alliance is an association of companies working together to enable reliable.15. IEEE has published the standards that define communication in areas such as the Internet. As per its main role. As a few examples. What ZigBee is designed to do is add mesh networking to the underlying 802.3. ultra-low power consumption and low data rate wireless connectivity among inexpensive devices. While both of those wireless standards are concerned with higher bandwidth Internet access applications. and low-power wirelessly networked monitoring and control products based on an open global standard. Some protocols are proprietary to individual vendors. others are industry standards. 802.4 standard as a baseline and adds additional routing and networking functionality.4 standard was to provide a standard for ultra-low complexity. industrial communication and wireless technology.16 define communication for broadband wireless Metropolitan Area Networks.Campus Automation PROJECT REPORT µ11 the world industriously sustain productive hives and foster future generations of colony members.15.3. cost-effective. of ECE 31 VAST .0 ZigBee Telecommunication Services ZigBee Health Care ZigBee Remote Control 5. the bandwidth it occupies. PC peripherals. 802.4 radio. The ZigBee Alliance is a group of companies that maintain and publish the ZigBee standard. it standardizes the body that defines ZigBee. This Application Note will explore the ZigBee protocol industry standard for data transmission.4 is a standard for wireless communication put out by the IEEE (Institute for Electrical and Electronics Engineers). The goal IEEE had when they specified the IEEE 802. ultra-low cost. ZigBee is a protocol that uses the 802.4 IEEE 802.

such as IEEE 802.4 specifies the use of Direct Sequence Spread Spectrum and uses an Offset Quadrature Phase Shift Keying (O-QPSK) with half-sine pulse shaping to modulate the RF carrier. The first ZigBee Application Profile.15.0 specification will remove the dependency on IEEE 802.4(x) and IEEE P1901. and requires the most memory and computing power. As amended by NIST.4835 GHz Industrial Scientific and Medical (ISM) bands. simple connectivity and battery application in mind.Campus Automation PROJECT REPORT µ11 was developed with lower data rate.4 GHz. was announced 2 November 2007. 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).4 standard specifies that communication can occur in the 868868. the 902-928 MHz or the 2. the ZigBee 2007 specification was posted on 30 October 2007. The relationship between IEEE 802.4 and ZigBee is similar to that between IEEE 802. It can function as a network coordinator. In the 2. a maximum over-the-air data rate of 250 kbps is specified.4 IEEE 802.0 specification was ratified on 14 December 2004 and is available to members of the ZigBee Alliance. but due to the overhead of the protocol the actual theoretical maximum data rate is approximately half of that. It is the most sophisticated one of the three types.15.15. whereas the 902-928 MHz band can only be used in the United States.4 standard specifies that communication should occur in 5 MHz channels ranging from 2.400-2. of ECE 32 VAST .15. only approximately 2 MHz of the channel is consumed with the occupied bandwidth. The 802. While any of these bands can technically be used by 802.4 GHz band.480 GHz. under an IP layer based on 6LoWPAN. the 2.15.4. While the standard specifies 5 MHz channels.4 networks use three types of devices: y y The network Coordinator maintains overall network knowledge.3.15.15. Canada and a few other countries and territories that accept the FCC regulations. Device manufacturers will be able to implement any MAC/PHY.405 to 2. 5. The ZigBee 1. At 2. The Full Function Device (FFD) supports all IEEE 802. Dept. the Smart Energy Profile 2.15.11 and the Wi-Fi Alliance.4 devices.15.5 Components of the IEEE 802. The 868 MHz band is specified primarily for European use.4 GHz band is more popular as it is open in most of the countries worldwide.15.8MHz. 802.4 functions and features speci_ed by the standard. Most recently. Home Automation. The 802.

2. The powerful emissions of these devices can create electromagnetic interference and disrupt radio communication using the same frequency. IEEE 802. which are typically around three seconds. Examples of applications in these bands include radio-frequency process heating. while Part 15 contains the rules for unlicensed communication devices. and medical diathermy machines. and 5. However. these bands are typically given over to uses intended for unlicensed operation. scientific and medical purposes other than communications. Individual countries' use of the bands designated in these sections may differ due to variations in national radio regulations. scientific and medical (ISM) radio bands were originally reserved internationally for the use of radio frequency (RF) energy for industrial. general. Because ZigBee can activate (go from sleep to active mode) in 30 msec or less. The RFD can be used where extremely low power consumption is a necessity. The ISM bands are defined by the ITU-R in 5.800 GHz bands. in recent years these bands have also been shared with license-free error-tolerant communications applications such as Wireless Sensor Networks in the 868 MHz. Because communication devices using the ISM bands must tolerate any interference from ISM equipment. even those that use the ISM frequencies. In the United States of America.280 of the Radio Regulations.450 GHz. the latency can be very low and devices can be very responsive ² particularly compared to Bluetooth wake-up delays. Dept. the most commonly encountered ISM device is the home microwave oven operating at 2. Third.4. Second. It is generally found in network-edge devices. uses of the ISM bands are governed by Part 18 of the FCC rules.3. the mesh networking provides high reliability and more extensive range.6 ISM Band The industrial.3. the low cost allows the technology to be widely depl oyed in wireless control and monitoring applications.138.15. low-power. of ECE 33 VAST . 915 MHz and 2. 5. so these devices were limited to certain bands of frequencies In . microwave ovens. For many people. communications equipment operating in these bands must accept any interference generated by ISM equipment. wireless mesh networking standard.450 GHz bands.7 General characteristics of ZIGBEE ZigBee is a low-cost.45 GHz. 5. ZigBee and other personal area networks may use the 915 MHz and 2450 MHz ISM bands. the low power -usage allows longer life with smaller batteries.150. First. 5. since unlicensed operation typically needs to be tolerant of interference from other devices anyway. and 5.Campus Automation y PROJECT REPORT µ11 The Reduced Function Device (RFD) carries limited (as speci_ed by the standard) functionality to lower cost and complexity. as well as wireless LANs and cordless phones in the 915 MHz.

manyto-one routing and high security with Symmetric-Key Key Exchange (SKKE). and stack profile 2 (called ZigBee Pro). ZigBee 2007. and mainly replaces the MSG/KVP structure used in 2004 with a "cluster library". it cannot relay data from other devices. The general characteristics of the zigbee are: y y y y y y y y Data rates of 20 kbps and up to 250 kbps Star or Peer-to-Peer network topologies Support for Low Latency Devices CSMA-CA Channel Access Handshaking Low Power Usage consumption 3 Frequencies bands with 27 channels Extremely low duty-cycle (<0. y ZigBee Router (ZR): As well as running an application function.1%) 5. now the current stack release.3. y 5. stack profile 1 (simply called ZigBee). ZigBee Pro offers more features. of ECE 34 VAST . contains two stack profiles. such as multi-casting. The 2004 stack is now more or less obsolete. and therefore can be less expensive to manufacture than a ZR or ZC. while Dept.3. for home and light commercial use. The second stack release is called ZigBee 2006. It is able to store information about the network. average power consumption can be very low.9 Different Stacks of ZIGBEE The first stack release is now called ZigBee 2004. including acting as the Trust Center & repository for security keys. A ZED requires the least amount of memory.8 Device Types There are three different types of ZigBee devices: y ZigBee coordinator (ZC): The most capable device. There is exactly one ZigBee coordinator in each network since it is the device that started the network originally.Campus Automation PROJECT REPORT µ11 Because ZigBees can sleep most of the time. This relationship allows the node to be asleep a significant amount of the time thereby giving long battery life. resulting in long battery life. the coordinator forms the root of the network tree and might bridge to other networks. passing on data from other devices. a router can act as an intermediate router. ZigBee End Device (ZED): Contains just enough functionality to talk to the parent node (either the coordinator or a router).

while a battery-powered light switch would remain asleep until the switch is thrown.432 seconds at 20 kbit/s. In such a network the lamp node will be at least a ZigBee Router. The switch then wakes up. In this type of network. Due to differences in routing options. In beaconing networks. while others spend most of their time sleeping. In non-beacon-enabled networks (those whose beacon order is 15). ZigBee 2007 is fully backward compatible with ZigBee 2006 devices: A ZigBee 2007 device may join and operate on a ZigBee 2006 network and vice versa. the ZigBee protocols minimize the time the radio is on so as to reduce power use.36 milliseconds to 15. Dept. In general. regardless of the stack profile beneath them. In most large network instances.Campus Automation PROJECT REPORT µ11 ZigBee (stack profile 1) offers a smaller footprint in RAM and flash. ZigBee Routers typically have their receivers continuously active. power consumption is decidedly asymmetrical: some devices are always active.10 ZIGBEE Protocols The protocols build on recent algorithmic research (Ad-hoc On-demand Distance Vector. the same as for ZigBee 2006 devices on a ZigBee 2007 network must become ZEDs on a ZigBee Pro network. It can also form a mesh or a single cluster. nodes only need to be active while a beacon is being transmitted. neuRFon) to automatically construct a low-speed ad-hoc network of nodes. The applications running on those devices work the same.3. However. this allows for heterogeneous networks in which some devices receive continuously. sends a command to the lamp.36 ms * 214 = 251. In non-beacon-enabled networks. which can conflict with the need for low product cost. Both offer full mesh networking and work with all ZigBee application profiles. The typical example of a heterogeneous network is a wireless light switch: The ZigBee node at the lamp may receive constantly. from 24 milliseconds to 24 ms * 214 = 393. the special network nodes called ZigBee Routers transmit periodic beacons to confirm their presence to other network nodes. if not the ZigBee Coordinator. since it is connected to the mains supply. The current profiles derived from the ZigBee protocols support beacon and non-beacon enabled networks. 5. Nodes may sleep between beacons. of ECE 35 VAST . an unslotted CSMA/CA channel access mechanism is used. the network will be a cluster of clusters. Beacon intervals may range from 15. receives an acknowledgment. requiring a more robust power supply.65824 seconds at 250 kbit/s. thus lowering their duty cycle and extending their battery life. However. while others only transmit when an external stimulus is detected.216 seconds at 40 kbit/s and from 48 milliseconds to 48 ms * 214 = 786. In beaconenabled networks. the switch node is typically a ZigBee End Device. and returns to sleep. ZigBee Pro devices must become non-routing ZigBee End-Devices (ZEDs) on a ZigBee 2006 network. low duty cycle operation with long beacon intervals requires precise timing.

they briefly check to see that no one is talking before they start. It is sometimes called Staggered quadrature phase-shift keying (SQPSK). The picture on the right shows the difference in the behavior of the phase between ordinary QPSK and OQPSK.11 Offset QPSK (OQPSK) Offset quadrature phase-shift keying (OQPSK) is a variant of phase-shift keying modulation using 4 different values of the phase to transmit. and do not use CSMA. although it is heavily dependent on the particular environment. Taking four values of the phase (two bits) at a time to construct a QPSK symbol can allow the phase of the signal to jump by as much as 180° at a time..Campus Automation PROJECT REPORT µ11 Except for the Smart Energy Profile 2. Dept. these phase-shifts result in large amplitude fluctuations an undesirable quality in communication systems. This standard specifies operation in the unlicensed 2. The standard specifies the lower protocol layers²the physical layer (PHY).4 GHz (worldwide).4 GHz band. ZigBee devices are required to conform to the IEEE 802.0. By offsetting the timing of the odd and even bits by one bit-period. The radios use direct-sequence spread spectrum coding. Beacons are sent on a fixed timing schedule. the nodes talk in the same way that people converse. and OQPSK that transmits four bits per symbol is used in the 2. while in OQPSK the changes are never greater than 90°.11)) MHz. or half a symbolperiod. In the constellation diagram shown on the right. Finally. There are three notable exceptions to the use of CSMA. It can be seen that in the first plot the phase can change by 180° at once.15. over-the-air data rate is 250 kbit/s per channel in the 2. BPSK is used in the 868 and 915 MHz bands. 12. and the media access control (MAC) portion of the data link layer (DLL). with each channel requiring 5 MHz of bandwidth. which by definition do not use CSMA.. The center frequency for each channel can be calculated as. The basic channel access mode is "carrier sense. This yields much lower amplitude fluctuations than non-offset QPSK and is sometimes preferred in practice.4 GHz band. of ECE 36 VAST . Transmission range is between 10 and 75 meters (33 and 246 feet) and up to 1500 meters for zigbee pro. The raw. it can be seen that this will limit the phase-shift to no more than 90° at a time. devices in Beacon Oriented networks that have low latency real-time requirements may also use Guaranteed Time Slots (GTS). That is. 5. The output power of the radios is generally 0 dBm (1 mW). 915 MHz (Americas) and 868 MHz (Europe) ISM bands. multiple access/collision avoidance" (CSMA/CA). the in-phase and quadrature components will never change at the same time.4-2003 Low-Rate Wireless Personal Area Network (WPAN) standard. When the signal is low-pass filtered (as is typical in a transmitter).4 GHz band there are 16 ZigBee channels.3. where ch = 11.. In the 2. FC = (2405 + 5 * (ch . and 20 kbit/s in the 868 MHz band.26. which will be MAC/PHY agnostic. which is managed by the digital stream into the modulator.. Message acknowledgments also do not use CSMA.. 40 kbit/s per channel in the 915 MHz band.

15. 5. but they are less severe. in the figure above suppose we wanted to transmit data from point A to point B.Campus Automation PROJECT REPORT µ11 The modulated signal is shown below for a short segment of a random binary data stream. Some of the key protocol differentiators are:  ZigBee: Dept.6 As an example. but the distance was too great between the points.5 5.3.5. In other words.12 Mesh Networkin ZigBee is designed to do the mesh networking to the underlying 80 . of ECE 37 VAST . Fig. Mesh networking is used in applications where the range between two points may be beyond the range of the two radios located at those points. Note the half symbol-period offset between the two component waves.13 ZIGBEE v/s Bluetooth ZigBee Protocol was developed to serve very different applications than Bluetooth and leads to tremendous optimi ations in power consumption.3. but intermediate radios are in place that could forward on any messages to and from the desired radios. the magnitude of jumps is smaller in OQPSK when compared to QPSK. The sudden phase-shifts occur about twice as often as for QPSK (since the signals no longer change together). Fig 5. The message could be transmitted through point C and a few other radios to reach the destination.4 radio.

with low latency available. guaranteed latency.000 nodes.  Bluetooth: y Moderate duty cycle. Static and dynamic star and mesh networks. y Ability to remain quiescent for long periods without communications. Can be used indoors and outdoors. The ZigBee uses a wireless 2. y Direct Sequence Spread Spectrum allows devices to sleep without the requirement for close synchronization.Campus Automation y y PROJECT REPORT µ11 Very low duty cycle.3. ZigBee was among the first transceivers that hit the market and came in a convenient to use casing. Range is from 100ft-300 for standard XBee modules and 300ft-1 Mile for XBee Pro Modules (depending on where it¶s used and the line of sight from one XBee to the next XBee). ZigBee modules are capable of communicating with more than one ZigBee module. you can change the configuration of how fast you want to transmit but for this tutorial we will just leave the baud rate at default. ZigBee transceiver is developed by Digi. Thus. Furthermore.14 ZIGBEE Module The ZigBee Module provides an alternative way to transfer data without the use of wires.4GHz transceiver to communicate with another ZigBee module. XBee makes sure you won¶t be changing the batteries very often! It consumes about 35mA during transmission (38mA while receiving) while it keeps it below 1uA while Dept. of course. No configuration is required out of the box. The standard XBee has a 1mW transmit power and the XBee Pro has a 60mW transmit power. Data rate of 250KBps (Kilobits per second). y Quasi-static star network up to seven clients with ability to participate in more than one network. y Very high QoS and very low. >65. y y y One of the great features of ZigBee networks is the low power operation. Default baud rate is 9600bps. Some features of ZigBee are: y y y y 802.15. very long primary battery life. y Frequency Hopping Spread Spectrum is extremely difficult to create extended networks without large synchronization cost. Although. secondary battery lasts same as master. 5.4 Protocol created by the IEEE foundation. of ECE 38 VAST . it means you can create a network of ZigBee modules all over the place as long as they are in range.

Quite simply. pin 3 (receive) and pin 10 (ground) are required.Campus Automation PROJECT REPORT µ11 sleeping.5. For the data transmission & reception only pin 1 (supply). That means you don't have to care about exchanging complicated information with the module in order to send a packet. So all you need to do is to serially send the information to the transmitter and the receiver module will output them the same way to your target machine. 5. This can be very handy.3.8 Dept. The invisible mode sets up a link of streaming data over the ZigBee network. Overall the XBee modules are easy to use and provide great features. of ECE 39 VAST .5. 5. pin 2 (transmit). . These are quite attractive specs. XBee also allows invisible operation. it replaces the serial communication cable.15 Pin Diagram of ZIGBEE The pin out of the Zigbee module is shown below: Fig.4 PIR Sensor Fig.7 The details of each pin are given in appendix-4.

of ECE 40 VAST . 5. night vision. to detect infrared light coming from a television remote. install. PIR sensors are also used as motion detectors at most public doorways in grocery stores. Dept. hospitals. PIR sensors can detect many things that humans cannot. 5. PIR sensors differ from other infrared sensors because they can only receive infrared waves. Each receiver converts EIA-232 inputs to 5-V TTL/CMOS levels. They are used on television sets and television accessory devices. Because of these properties. which is usually a thin sheet. and can accept 30-V inputs. 5.5 V.5 MAX232: The MAX232 is a dual driver/receiver that includes a capacitive voltage generator to supply EIA-232 voltage levels from a single 5-V supply.4. PIR sensors are used in many applications. PIR sensors are able to determine how far away someone is and whether he/she is approaching the sensor. it creates an electrical current that can be measured to determine the intensity of the infrared light (depth perception) and the direction that it came from. As infrared light comes in contact with the pyroelectric material. They can be expensive to purchase. such as VCRs and DVD players. PIR sensors can only receive infrared light and cannot emit it like other types of infrared sensors. and heatseeking missiles.4. They detect infrared light from several feet/yards away. such as night vision. motion detection.3 V and a typical hysteresis of 0. they do not need an external power source because they generate electricity as they absorb infrared light.4. Because all objects emit infrared waves (electromagnetic waves that travel with heat). In fact. and laser range finding. PIR sensors can also be used for military purposes such as laser range-finding.2 Applications PIR sensors are used in many applications. These receivers have a typical threshold of 1.Campus Automation PROJECT REPORT µ11 A PIR sensor detects infrared light that is emitted from objects within its field of view. 5. 5. PIR sensors are generally compact and can be fitted into virtually any electronic device. depending on how the device is calibrated. they also have several disadvantages. and calibrate as well. Also.1 Working of PIR PIR sensors are made of pyroelectric (or thermoelectric) materials and usually contain lenses or mirrors in order to focus the infrared light for maximum reception.4.4 Disadvantages Although PIR sensors can be advantageous. and libraries.3 Advantages PIR sensors have several important advantages. PIR sensors can detect objects that are in front of them.

and voltage-generator functions are available as cells in the Texas Instruments Lin ASIC library. Modems.5. and Computers 5.Campus Automation PROJECT REPORT µ11 Each driver converts TTL/CMOS input levels into EIA-232 levels.1-_F Charge-Pump Capacitors is Available With the MAX202  Applications í TIA/EIA-232-F. . receiver. of ECE 41 VAST .0-_F Charge-Pump Capacitors  Operates Up To 120 kbit/s  Two Drivers and Two Receivers  ±30-V Input Levels  Low Supply Current .28  Operates From a Single 5-V Power Supply With 1. Terminals. 8 mA Typical  ESD Protection Exceeds JESD 22 í 2000-V Human-Body Model (A114-A)  Upgrade With Improved ESD (15-kV HBM) and 0.  Meets or Exceeds TIA/EIA-232-F and ITU Recommendation V. The driver. Battery-Powered Systems.1 PIN DIAGRAM Dept. .

5. or electroluminescent. The direction of the liquid crystal alignment is then defined by the direction of rubbing. Electrodes are made of a transparent conductor called Indium Tin Oxide (ITO). which may be LED. These screens come in a variety of configurations including 8x1. for example. This treatment typically consists of a thin polymer layer that is unidirectional rubbed using. a cloth. This controller is standard across many displays (HD 44780) which means many microcontrollers (including the Arduino) have libraries that make displaying messages as easy as a single line of code. Character LCDs can come with or without backlights.6 LCD Display Liquid crystal display (LCD) is an electronically-modulated optical device shaped into a thin. of ECE 42 VAST . the axes of transmission of which are (in most of the cases) perpendicular to each other. The most commonly manufactured configuration is 40x4 characters. An LCD is a small low cost display. fax machines.1 Font Dept. flat panel made up of any number of color or monochrome pixels filled with liquid crystals and arrayed in front of a light source (backlight) or reflector. These LCD screens are limited to text only and are often used in copiers. fluorescent. which requires two individually addressable HD44780 controllers with expansion chips as the HD44780 can only address up to 80 characters. An HD44780 Character LCD is a de facto industry standard liquid crystal display (LCD) display device designed for interfacing with embedded systems. and two polarizing filters.9 PROJECT REPORT µ11 5. networking equipment such as routers and storage devices. Each pixel of an LCD typically consists of a layer of molecules aligned between two transparent electrodes.Campus Automation Fig 5. In this project we use 16x2 LCD display. industrial test equipment. With no actual liquid crystal between the polarizing filters. The surfaces of the electrodes that ar APPENDIX APPEe in contact with the liquid crystal material are treated so as to align the liquid crystal molecules in a particular direction. It is easy to interface with a micro-controller because of an embedded controller (the black blob on the back of the board). which is one row of eight characters. light passing through the first filter would be blocked by the second (crossed) polarizer. 16x2. laser printers. It is often utilized in battery-powered electronic devices because it uses very small amounts of electric power. and 20x4. Character LCDs use a standard 14-pin interface and those with backlights have 16 pins.6.

2 Features The features of the LCD display are given below: y y y y y y y 16 Characters x 2 Lines 5x7 Dot Matrix Character + Cursor HD44780 Equivalent LCD Controller/driver Built-In 4-bit or 8-bit MPU Interface Standard Type Works with almost any Microcontroller Great Value Pricing 5. as they are stored in volatile memory. and a European version which includes Cyrillic and Western European characters. and 32 characters in a 5x10 dot matrix.6. The 7-bit ASCII subset for the Japanese version is non-standard: it supplies a Yen symbol where the backslash character is normally found. A limited number of custom characters can be programmed into the device in the form of a bitmap using special commands. of ECE 43 VAST .3 Pin Diagram The pin diagram & description of pins of 16x2 LCD display is given below: Dept. There is a Japanese version of the ROM which includes kana characters. and left and right arrow symbols in place of tilde and the rub-out character.6. These characters have to be written to the device each time it is switched on. 5.Campus Automation PROJECT REPORT µ11 The character generator ROM contains 208 characters in a 5x8 dot matrix.

CTS. The three links provides µtransmit¶. DSR. µreceive¶ and common ground. R/W=0: Write. VCC (+3. RI. of ECE 44 VAST . RS=0: Command. DTR. The µ1¶ and µ0¶ are the data which defines a voltage level of 3V to 25V and -3V to -25V respectively. As the name indicates.000bps.10 1.3 to +5V) 3. Read/Write (R/W). R/W=1: Read 5. The two pins are TXD & RXD. and RTS. the data is transmitted serially. RS=1: Data 5. It is commonly used in computer serial ports.7 RS 232 Serial Port In telecommunications. Ground 2. The µtransmit¶ and µreceive¶ line on this connecter send and receive data between the computers. The electrical characteristics of the serial port as per the EIA (Electronics Industry Association) RS232C Standard specify a maximum baud rate of 20.Campus Automation PROJECT REPORT µ11 Fig. Contrast adjustment (VO) 4. Dept. this is the most effective method in which the data transmission requires less wires that yields to the less cost. RS232 is the most known serial port used in transmitting the data in communication and interface. The RS232 is the communication line which enables the data transmission by only using three wire links. There are other lines on this port as RTS. 5. Register Select (RS). Even though serial port is harder to program than the parallel port. RS-232 (Recommended Standard 232) is the traditional name for a series of standards for serial binary single-ended data and control signals connecting between a DTE (Data Terminal Equipment) and a DCE (Data Circuitterminating Equipment).

8 Working Our project mainly consists of two sections:  TRANSMITTER SECTION which is placed in office room  RECEIVER SECTION which is placed in class room Dept. supporting concurrent data flow in both directions. Since transmit data and receive data are separate circuits. Both synchronous and asynchronous transmissions are supported by the standard. Each data or control circuit only operates in one direction that is.5. The standard does not define character framing within the data stream. user data is sent as a time-series of bits. signaling from a DTE to the attached DCE or the reverse. 5. or character encoding. the interface can operate in a full duplex manner. of ECE 45 VAST .7. the standard defines a number of control circuits used to manage the connection between the DTE and DCE.11 5.Campus Automation PROJECT REPORT µ11 In RS-232.1 Pin out Diagram Fig. In addition to the data circuits.

In the receiver side it acts as both router and end device.1 Notice Display System The Message Transmitting section transmits messages wirelessly through ZigBee module & PIC. The USART is universal synchronous asynchronous receiver transmitter.A buzzer is connected in the circuit to indicate the arrival of new message. a PIC and an LCD display are used. The received data is displayed on LCD by interfacing it with PIC. Generally ZigBee devices are of three types  Coordinator  Router  End device In the transmitter side the ZigBee module acts as a co-ordinator. USART uses two I/O pins to transmit and receive data.8. of ECE 46 VAST .Campus Automation PROJECT REPORT µ11 The transmitter section mainly consists of:  Message transmitting section  Automatic bell  Automatic Fan & light Controller 5. PIR sensor is pyroelectric Dept.8. The data is send as RS232 protocols. The USART communication is used for transmitting data. Its main function is to transmit or receive serial data. PIR sensors differ from other infrared sensors because they can only receive infrared waves. The I/O pins of USART is connected to Tx and Rx pin of ZigBee module. 5. It can transfer a frame of data with 8 or 9 data bits per transmission. The data has to be transmitted is entered from PC to PIC through serial port connector or RS232 connector. Transmitter data is received by the ZigBee module and PIC in the receiver side.In the receiver side a ZigBee module.2 Automatic Fan & Light Controller A PIR (Passive Infrared) sensor detects infrared light that is emitted from objects within its field of view.

As infrared light comes in contact with the pyroelectric material. of ECE 47 VAST .8.Campus Automation PROJECT REPORT µ11 materials and usually contains lenses in order to focus the infrared light for maximum reception. which is Usually a thin sheet.The Program sets in such a way that the bell rings at the end of each hour between 9am and 4pm. it creates an electrical current that can be measured to determine the intensity of the infrared light and direction it came from.3 Automatic college Bell The automatic bell works based on the program that we have stored on the PIC. 5. It consists of a LCD display to show the clock . Dept.

of ECE 48 VAST .Campus Automation PROJECT REPORT µ11 CHAPTER 6 SOFTWARE SECTION Dept.

1.mm=0.Campus Automation PROJECT REPORT µ11 6.1 FLOWCHART 6. of ECE 49 VAST .TIMER Initialize time hh=0.ss=0 Set the time using switch If (hh>=9) && (hh<=16)&& (mm=0) Print ³alarm´ with beep If ss>=3? A Dept.1TRANSMITTER SECTION START Initialize LCD.

Campus Automation PROJECT REPORT µ11 A Print ³clock´ and Display the time REAPEAT STOP Dept. of ECE 50 VAST .

of ECE 51 VAST .2 Receiver section START LCD initialization Clear the screen If message>= 16 bit ? Display the message on 16*2 bit LCD module STOP Dept.Campus Automation PROJECT REPORT µ11 6.1.

h> #include <stdlib. of ECE 52 VAST .c> #include <stdio.0).h> #include <lcd. } else { output_bit(pin_b6.1).h> unsigned int hh=00.Campus Automation PROJECT REPORT µ11 6.2. } if(count==1) { if(input(pin_a0)) { hh++. if(hh==24) { hh=0.mm=00.1 Transmitter section #include <string.count=1. #int_TIMER1 void TIMER1_isr() { if(input(pin_a2)) { output_bit(pin_b6.ss=00.2 Firmware 6. } Dept.

of ECE 53 PROJECT REPORT µ11 VAST . if(ss==60) { ss=0. } } count=0.ss). printf(lcd_putc."%02u". ss=ss+1. if(mm==60) { mm=0. if(mm==60) { mm=0. lcd_gotoxy(5.2). hh++. printf(lcd_putc.mm).1).hh). if(hh==24) { hh=0. } if((hh>=9)&&(hh<=16)&&(mm==0)) { lcd_gotoxy(7. lcd_gotoxy(10.2). lcd_gotoxy(7. printf(lcd_putc.Campus Automation } if(input(pin_a1)) { mm++.":%02u".":%02u". Dept.2). mm++.

"CLOCK"). set_timer1(0xfffe).Campus Automation printf(lcd_putc. printf(lcd_putc. setup_timer_1(T1_INTERNAL|T1_DIV_BY_8). enable_interrupts(INT_TIMER1).1). lcd_init()."alarm"). enable_interrupts(GLOBAL). printf(lcd_putc. } } } } count++. delay_ms(30).1). ss=ss+3. lcd_gotoxy(7. output_bit(pin_b7.1). } } PROJECT REPORT µ11 Dept. of ECE 54 VAST . lcd_putc('\f'). while(1) { f=getc(). output_bit(pin_b7. lcd_gotoxy(7. } void main() { char f. putc(f).0)."CLOCK").

l1:while(1) { i++. i=0.c> Void main() { Char c. if(i==16) { lcd_putc(µ\f¶).2 RECEIVER SECTION #include ³c:\documents and settings\pjt\desktop\campus\cam. lcd_goto(1. int i=0. } else { go to l1.h´ #include<lcd.Campus Automation PROJECT REPORT µ11 6.´%c´.c). lcd_intit().1). printf (lcd_putc. c=getc(). } } } Dept. of ECE 55 VAST .2.

Campus Automation PROJECT REPORT µ11 CHAPTER 7 SOFTWARE DESCRIPTION Dept. of ECE 56 VAST .

of ECE 57 VAST .Campus Automation PROJECT REPORT µ11 7.1 COMPONENT PCB LA OUT Dept.

of ECE 58 VAST .2 PCB LA OUT Dept.Campus Automation PROJECT REPORT µ11 7.

Campus Automation PROJECT REPORT µ11 CHAPTER 8 THEOR OF PROJECT Dept. of ECE 59 VAST .

11 standard defines communication for wireless LAN and 802.15. If the radio at point C was removed for some reason. PC peripherals. The message could be transmitted through point C and a few other radios to reach the destination.15. and the IEEE 802. IEEE has published the standards that define communication in areas such as the Internet. Routers can also be used as End Devices. the IEEE 802. Since the ZigBee protocol uses the 802. ZigBee is a protocol that uses the 802. industrial communication and wireless technology.4 protocol on which it was built. of ECE 60 VAST .15.15.4 was developed with lower data rate. the frequency. signal bandwidth and modulation techniques are identical. What ZigBee is designed to do is add mesh networking to the underlying 802. 802. As a few examples. and networking features unique to this protocol. Devices in the ZigBee specification can either be used as End Devices. but the distance was too great between the points. This Application Note will explore the ZigBee protocol industry standard for data transmission. Some protocols are proprietary to individual vendors. but intermediate radios are in place that could forward on any messages to and from the desired radios As an example.4 802.16 defines communication for broadband wireless Metropolitan Area Networks. While both of those wireless standards are concerned with higher bandwidth Internet access applications. Another feature of ZigBee is its ability to self-heal. the bandwidth it occupies.4 radio.Campus Automation PROJECT REPORT µ11 8.4 standard to define the PHY and MAC layers. Routers or Coordinators. others are industry standards.4 is a standard for wireless communication put out by the IEEE (Institute for Electrical and Electronics Engineers). a new path would be used to route messages from A to B.15. in the figure above suppose we wanted to transmit data from point A to point B. simple connectivity and Dept.4 standard as a baseline and adds additional routing and networking functionality. 802.15. Here defined are the frequencies used.15.1 ZIGBEE Creating wireless networks can be done using a variety of RF protocols. Mesh networking is used in applications where the range between two points may be beyond the range of the two radios located at those points.

4 GHz band is more popular as it is open in most of the countries worldwide. the 902-928 MHz or the 2.15. the 2. Step 2: Power-up the XBee and prep the software After double checking your connections. I just plug one end of a jumper wire into the XBee reset pin and leave the other end of that jumper hanging off the edge of the board.8MHz.4835 GHz Industrial Scientific and Medical (ISM) bands.2 HOW-TO SET UP XBEE ZNET 2. of ECE 61 VAST . Step 3: Run X-CTU and connect to the XBee: Dept.400-2.5 (SERIES 2) MODULES? Step 1: Construct the circuit Fig (13): Construction of the XBee circuit Build the XBee Breakout board and plug one of the XBee¶s into it. I just momentarily touch the bare end of the jumper to ground. 8. While any of these bands can technically be used by 802.4 standard specifies that communication can occur in the 868868. Both LEDs connected to the XBee should light up and stay on (assuming your XBee shipped as a Router/End Device and there is no Coordinator around to connect to). PROJECT REPORT µ11 The 802. when I need to reset the XBee. Instead of using a reset switch.15.Campus Automation battery application in mind. use the USB-miniB cable to plug the FT232 Breakout into a USB port on your computer. Set up the circuit on your bread board using the diagram.4 devices.

Fig (14): Run X-CTU and connect to the XBee Step 4: Update the firmware Click on the ³Modem Configuration´ tab and then click on the ³Download new versions«´ button to download all of the updated firmwares. You should see a screen like the one shown below. of ECE 62 VAST . After the Fig (15): Update the firmware Dept. If you¶re not sure. you can click the ³Test/Query´ button to read each COM port to discover which one has the XBee.Campus Automation PROJECT REPORT µ11 Run the X-CTU software. Make a Single-click on the USB COM port that the XBee is connected to.

5 Router/End Device AT´ as the firmware in the pull-down menu. This should match the firmware version that you upgraded to (1241 for Router/End Device or 1041 for Coordinator). It should respond with³123´ or whatever unique PAN ID you set in step 4. Type ³ATID´ to check the PAN Network ID that the XBee is using. of ECE 63 VAST . you¶ll need to enter a new command within 5 seconds or the Xbee will exit command mode and you¶ll need to start this step again. The X-CTU software may ask you to push the reset button during the firmware upgrade process. Type ³ATVR´ to check the firmware version on the XBee. Select ³ZNet 2.Campus Automation PROJECT REPORT µ11 firmware downloads have completed. Click on the terminal tab and type ³+++´ in the window to enter command mode. click on the ³Read´ button. Fig (16): Run X-CTU and connect to the XBee Dept. Check the box that says ³Always update firmware´ and click the ³Write´ button. Step 5: Test the XBee Read through this step before you do it since once you enter command mode. The window will display all of the current settings of the attached XBee. The XBee should re spond in a second or two with ³OK´.You may want to change the ³PAN ID´ to a unique number if you plan to use your XBee in a place where others will be using their own XBees. Type ³ATNI´ to check the Node Identifier.

usually a multiple of the bit rate to allow sampling in the middle of a bit period. change the desired settings.3 USART: The USART protocol is used for serial interfacing between the PIC and the PC. you¶ve successfully updated this XBee! Quit the X-CTU program and disconnect the USB-miniB cable from the computer.Campus Automation PROJECT REPORT µ11 The XBee should respond with ³router1´ or whatever unique Node Identifier you set in step 4. A USART usually contains the following components: y a clock generator. first-out (FIFO) buffer memory (optional) Dept. If any of those commands did not return the correct information. Type ³ATCN´ to exit command mode. 8. then congratulations. If those commands returned the correct information. The XBee will respond with ³OK´. of ECE 64 VAST . click back to the ³Modem Configuration´ tab. y y y y y y input and output shift registers transmit/receive control read/write control logic transmit/receive buffers (optional) parallel data bus buffer (optional) First-in. and click the ³Write´ button again.

Campus Automation PROJECT REPORT µ11 8.5 PCB FABRICATION DETAILS The PCB must be fabricated first. of ECE 65 VAST . Fig (17): Circuit diagram of MAX 232 Fig (18): GPS module 8. and can accept 30-V inputs. We should keep in mind that the quality of soldering affects the quantity of output. and voltage-generator functions are available as cells in the Texas Instruments Lin ASIC library.4 RS232 PROTOCOL: The MAX232 is a dual driver/receiver that includes a capacitive voltage generator to supply EIA-232 voltage levels from a single 5-V supply. Each receiver converts EIA-232 inputs to 5-V TTL/CMOS levels.5 V. Dept. receiver.3 V and a typical hysteresis of 0. Each driver converts TTL/CMOS input levels into EIA-232 levels. These receivers have a typical threshold of 1. The driver. The procedure for fabricating the PCB for setting up the circuit of any multipurpose project is described below. Then the components are soldered carefully to PCB.

The component position can be marked on the PCB reverse side if desired. slants and holes should be traced. etc.2 PCB DRAWING Making of PCB drawing involves some preliminary considerations such as placement of components on a piece of paper. Only the connecting lines in PCBs. 8. Preparing the PCB drawing 2. for small scale operations. Thus a sketch of the PCB is made. Locating holes. The traditional method of drawing the PCB with complete placements of parts.Campus Automation 8. the cost saving procedure adopted here may be adopted. the optimum area of each component should occupy the shape and location lands for connecting two or more components at a particular place. grease. taking a photographic negative of the drawing. There are several ways of drawing PCB patterns and making the final boards. the final PCB drawing may be traced by using a carbon paper. For anchoring leads of component 1mm diameter holes and for fixing PCB holding screws to the 3mm diameter holes can be made. The making of PCB patterns and the PCB involves two steps: 1. 8. using a thin Dept.1 PCB MAKING PROJECT REPORT µ11 Making of the PRINTED CIRCUIT BOARD is as much as art on a technique particularly when they are fabricated in very small numbers. There is no other way to arrive at a conclusion than by trial and error. developing the image of negative formed on photo sensitized copper plate and dissolving the excess copper by etching is a standard practice being followed in large scale operations. quick drying enamel paint. With fine emery paper or sand paper on this.5.3 FABRICATION: The copper clad PCB is now prepared by rubbing away the oxide. The marked holes in PCB may be drilled using 1mm or 3mm drill bits and the traced PCB pattern created with black. deciding the diameter of various holes. However.5.5. of ECE 66 VAST . Clips are used to prevent the carbon paper from slipping while PCB pattern is being traced on the laminate. Fabricating the PCB itself from the drawing.

5. In case of any shorting of lines due to spilling of paint. The paint on the pattern can be removed by rubbing with a rag soaked in a thinner. The rest of this chapter briefly explains embedded systems development and how MPLAB IDE is used. like the Microchip PIC MCU or dsPIC Digital Signal Controller (DSCs). After drying. If etching takes longer. The dissolution of unwanted copper would take about 45 minutes. Depending on the wiring diagram. Stirring the solution helps speedy etching. This single device can then be embedded into other electronic and mechanical devices for low-cost digital control. 20-30 gms of ferric chloride in 75 ml of water may be heated to about 60 degrees and over the PCB placed with its copper side upwards in a plastic tray. 8. Dept. of ECE 67 VAST . The PCB may then be washed and dried. It is called an Integrated Development Environment. the resistors are taken care at first. plus some additional circuits on the same chip to make a small control module requiring few other external devices. turpentine or acetone.4 SOFTWARE DESCRIPTION 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. the solution may be heated again and the process is repeated. or IDE. It is also recommended that MPLAB IDE On-line Help and MPLAB IDE Updates and Version Numbering be reviewed. because it provides a single integrated "environment" to develop code for embedded microcontrollers. they may be removed by scraping with blade or knife after the paint has dried.Campus Automation PROJECT REPORT µ11 brush or a small metal case. and then the IC¶s are soldered. These microcontrollers combine a microprocessor unit (like the CPU in a desktop PC) with some additional circuits called "peripherals". DESCRIPTION OF AN "EMBEDDED SYSTEM" An embedded system is typically a design making use of the power of a small microcontroller. Experienced embedded systems designers may want to skip ahead to Components of MPLAB IDE.

Built in libraries are specific to PIC ® MCU registers..5.Campus Automation 8. built-in functions and standard C operators. Minimize lines of new code with CCS provided peripheral drivers. This suite includes an IDE for project management. of ECE 68 VAST . allowing access to hardware features directly from C. analyze. which frees developers to concentrate on design functionality instead of having to become an MCU architecture expert. a context sensitive C aware editor. build tools and real time debugger. y y Maximize code reuse by easily porting from one MCU to another. debug and document project code.5 DEVICE PROGRAMMING CCS SOFTWARE: PROJECT REPORT µ11 CCS provides a complete. The heart of this development tool suite is the CCS intelligent code optimizing C compiler. integrated tool suite for developing and debugging embedded applications running on Microchip PIC® MCUs and dsPIC® DSCs. y Dept..helping developers create.

of ECE 69 VAST .Campus Automation PROJECT REPORT µ11 CHAPTER 9 ADVANTAGES AND LIMITATIONS Dept.

Hardware implementation is simpler. when the observer is far away from the display. Complex programming is required to change the time interval as predetermined rule. Periods can be maintained correctly by the use of automatic bell. of ECE 70 VAST .2 LIMITATIONS y The message is displayed using LCD display is not clear. y The bell rings at the end of each hour.1 ADVANTAGES y y y The energy can be saved by the use of the automatic light and fan controller.Campus Automation PROJECT REPORT µ11 9. Dept. 9. y ZigBee module is very costly.

of ECE 71 VAST .Campus Automation PROJECT REPORT µ11 CHAPTER 10 FUTURE EXPANSION OF PROJECT Dept.

of ECE 72 VAST .Campus Automation PROJECT REPORT µ11 10. y y Dept.1 FUTURE EXPANSION OF THE PROJECT The future development of the device lies in the fact that it uses a microcontroller and that could be programmed in a variety of ways to utilize the available pin connections. Also data can be transmitted to selected ZigBee modules by using addressing schemes. The range of transmission and reception can be increased by using more routers. y Message can also be transmitted to many transceiver modules simultaneously by using network topologies.

Campus Automation PROJECT REPORT µ11 CHAPTER 11 CONCLUSION Dept. of ECE 73 VAST .

It helps to transmit and receive data through ZigBee module. The automatic fan and light controller section is very useful to save energy. Dept.Campus Automation PROJECT REPORT µ11 11. of ECE 74 VAST . This device adds to range of applications for which ZigBee communication is being utilized today. It has the advantages of being a wireless device besides the simpler hardware implementation is required. Data was transmitted from one transceiver module to another module wirelessly.1CONCLUSION The project ³campus automation system´ was concluded to be of a great innovation for the improvement of day to day life. The automatic bell is very useful to maintain the periods accurately.

Campus Automation PROJECT REPORT µ11 APPENDIX Dept. of ECE 75 VAST .

of ECE 76 VAST .Campus Automation PROJECT REPORT µ11 Dept.

Campus Automation PROJECT REPORT µ11 Dept. of ECE 77 VAST .

Campus Automation PROJECT REPORT µ11 Dept. of ECE 78 VAST .

Campus Automation PROJECT REPORT µ11 Dept. of ECE 79 VAST .

of ECE 80 VAST .Campus Automation PROJECT REPORT µ11 Dept.

PGD: Serial programming data. SD1: SPI Data input (SPI mode). CK: synchronous clock input. Vpp: programming voltage input. SD0: SPI data output (SPI Mode). OSC2: oscillator output/clock out. SCL: these pins act as an output for both SPI and I2C modes. VDD: positive supply for logic and input pins. RD: Read control for parallel slave port. PSP0 to PSP7: Parallel slave port. PGC: serial programming clock. T0CK1: clock input to TIMER 0. DT: these are synchronous data terminals. PGM: Low Voltage Programming input.Campus Automation PROJECT REPORT µ11 Multiplexed Functions of 16F877A Pins y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y Analog input port (AN0 TO AN7) : these ports are used for interfacing analog inputs. THV: High voltage test mode controlling. of ECE 81 VAST . TX and RX: These are the USART transmission and reception ports. SCK: these pins are used for giving synchronous serial clock input. T1CK1: clock input to Timer 1. INT: external interrupt. SDA: data input/output in I2C Mode. Dept. VSS: Ground reference for logic and input/output pins. SS: Slave select for the synchronous serial port. T1OS1: Timer 1 oscillator input. MCLR: master clear pin (Active low reset). OSC1: oscillator input/external clock. Vref (+/-): reference voltage. CS: Select control for parallel slave. CCP1 and CCP2: these are capture/compare/PWM modules. T1OSO: Timer 1 oscillator output.

Campus Automation

PROJECT REPORT µ11

DATA SHEET ZIGBEE MODULE

Dept. of ECE

82

VAST

Campus Automation

PROJECT REPORT µ11

Dept. of ECE

83

VAST

Campus Automation

PROJECT REPORT µ11

Pin Details of RS 232
D-Type-9 pin no. 3 2 7 8 6 5 1 4 9 D-Type25pin no. 2 3 4 5 6 7 8 20 22 Pin outs RD TD RTS CTS DSR SG DCD DTR RI Functions Receive Data (Serial data input) Transmit Data (Serial data output) Request to send (acknowledge to modem that UART is ready to exchange data Clear to send (i.e.; modem is ready to exchange data) Data ready state (UART establishes a link) Signal ground Data Carrier detect (This line is active when modem detects a carrier Data Terminal Ready. Ring Indicator (Becomes active when modem detects ringing signal from PSTN

Dept. of ECE

84

VAST

Campus Automation

PROJECT REPORT µ11

Dept. of ECE

85

VAST

of ECE 86 VAST .Campus Automation PROJECT REPORT µ11 Dept.

Rs Microcontroller IC-PIC Zigbee PIR LCD PCB MAX 232 IC Serial port Buzzer IC socket Crystal oscillator Program coding Basic components 260 3500 550 260 800 70 70 60 10 10 300 340 TOTAL Rs: 6500 approx Dept.Campus Automation PROJECT REPORT µ11 COST ESTIMATION ITEMS COST. of ECE 87 VAST .

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.