Você está na página 1de 71

FOREST FIRE SURVELLANCE SYSTEM BASED ON WIRELESS

SENSOR NETWORK

CONTENTS
CHAPTER No TITLE
ABSTRACT
1 INTRODUCTION
HARDWARE
2 BLOCK DIAGRAM
3 BLOCK DIAGRAM DESCRIPTION
4.1 RFID TAG AND READ
4.2 ABOUT MICROCONTROLLER
4.3 ZIGBEE
4.4 LIQUID CRYSTAL DISPLAY

5 OVERALL CIRCUIT DIAGRAM


6 OVERALL CIRCUIT DESCRIPTION
6.1 POWER SUPPLY CIRCUIT
6.2 MICROCONTROLLER CIRCUIT
6.3 SMOKE DETECTION
6.4 HUMDITY SENSOR
6.5 TEMPERATURE SENSOR
6.6 RS232

7 PCB DESIGN
8 SOFTWARE
SOFTWARE TOOLS
9 ADVANTAGES

1
10 APPLICATION
11 CONCLUSION
12 REFERENCES

1. ABSTRACT

2
2. INTRODUCTION

Present industry is increasingly shifting towards automation. Two principle


components of today’s industrial automations are programmable controllers and
robots. In order to aid the tedious work and to serve the mankind, today there is a
general tendency to develop an intelligent operation.

The proposed system “FOREST FIRE SURVELLANCE SYSTEM

BASED ON WIRELESS SENSOR NETWORK

” is designed and developed to accomplish the various tasks in an adverse


environment of an industry. The intelligent machine is loaded with several units
such as keyboard, LCD, microcontroller, Zigbee, Humidity sensor, Temperature
Sensor, Smoke Detection high purchase equipment, relay and driver circuit and
alarm which synchronously work with the help of a start-of-the-art Atmel
microcontroller. This Loan watcher system is an owe to the technical
advancement. This prototype system can be applied effectively and efficiently in
an expanded dimension to fit for the requirement of industrial, research and
commercial applications.

Microcontroller is the heart of the device which handles all the sub devices
connected across it. We have used as Pic microcontroller. It has flash type
reprogrammable memory. It has some peripheral devices to play this project
perform. It also provides sufficient power to inbuilt peripheral devices. We need
not give individually to all devices. The peripheral devices also activates as low
power operation mode. These are the advantages are appear here.

3
3. BLOCK DIAGRAM

4
4. BLOCK DIAGRAM DESCRIPTION

4.1 RFID TRANSMITER AND RECEIVER

4.2 MICROCONTORLLER
MICROCONTROLLER

INTRODUCTION TO MICROCONTROLLER

Microcontrollers are destined to play an increasingly important role in

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

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

microcontroller has been recognized as a general purpose building block for

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

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

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

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

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

acute education need for imparting the knowledge of microcontroller based

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

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

provides a glimpse of the major application area.


5
MICROCONTROLLER

A microcontroller is a complete microprocessor system built on a single IC.

Microcontrollers were developed to meet a need for microprocessors to be put

into low cost products. Building a complete microprocessor system on a single

chip substantially reduces the cost of building simple products, which use the

microprocessor's power to implement their function, because the microprocessor

is a natural way to implement many products. This means the idea of using a

microprocessor for low cost products comes up often. But the typical 8-bit

microprocessor based system, such as one using a Z80 and 8085 is expensive.

Both 8085 and Z80 system need some additional circuits to make a

microprocessor system. Each part carries costs of money. Even though a product

design may requires only very simple system, the parts needed to make this

system as a low cost product.

To solve this problem microprocessor system is implemented with a single

chip microcontroller. This could be called microcomputer, as all the major parts

are in the IC. Most frequently they are called microcontroller because they are

used to perform control functions.

The microcontroller contains full implementation of a standard

MICROPROCESSOR, ROM, RAM, I/O, CLOCK, TIMERS, and also SERIAL

PORTS. Microcontroller also called "system on a chip" or "single chip

microprocessor system" or "computer on a chip".

A microcontroller is a Computer-On-A-Chip, or, if you prefer, a single-chip

computer. Micro suggests that the device is small, and controller tells you that the

device might be used to control objects, processes, or events. Another term to

6
describe a microcontroller is embedded controller, because the microcontroller

and its support circuits are often built into, or embedded in, the devices they

control.

Today microcontrollers are very commonly used in wide variety of

intelligent products. For example most personal computers keyboards and

implemented with a microcontroller. It replaces Scanning, Debounce, Matrix

Decoding, and Serial transmission circuits. Many low cost products, such as

Toys, Electric Drills, Microwave Ovens, VCR and a host of other consumer and

industrial products are based on microcontrollers.

EVOLUTION OF MICROCONTROROLLER

Markets for microcontrollers can run into millions of units per application.

At these volumes of the microcontrollers is a commodity items and must be

optimized so that cost is at a minimum. .Semiconductor manufacturers have

produced a mind-numbing array of designs that would seem to meet almost any

need. Some of the chips listed in this section are no longer regular production,

most are current, and a few are best termed as "smoke ware": the dreams of an

aggressive marketing department.

Sl.No
Manufacturer Chip Year No. No RAM ROM Other
Designation of of Features
Pins I/O
4 Bit MC
1. Texas TMS 1000 Mid 28 23 64 1K LED
Instruments 1970 Display

7
2. Hitachi HMCS 40 - 28 10 32 512 10 bit
ROM
3. Toshiba TLCS 47 - 42 35 128 2K Serial bit
I/O
8 bit MC
1. Intel 8048 1976 40 27 64 1K External
Memory
8K
2 Intel 8051 1980 40 32 128 4K External
Memory
128 K
3. Motorola 6081 1977 - 31 128 2K
4. Motorola 68HC11 1985 52 40 256 8K Serial
Port,
ADC,
5. Zilog Z8 - 40 32 128 2K External
Memory
128K,
16 Bit MC
1. Intel 80C196 - 68 40 232 8K External
Memory
64K,
Serial
Port,
ADC,
WDT,
PWM
2. Hitachi H8/532 - 84 65 1K 32K External
Memory

8
1M,
Serial
Port,
ADC,
PWM
3. National HPC16164 - 68 52 512 16K External
Memory
64K,
ADC,
WDT,
PWM
32 Bit MC
1. Intel 80960 - 132 20 MHz clock, 32 bit bus, 512
byte instruction cache

9
APPLICATION

Microcontrollers did you use today?

A microcontroller is a kind of miniature computer that you can find in all

kinds of Gizmos. Some examples of common, every-day products that have

microcontrollers are built-in. If it has buttons and a digital display, chances are it

also has a programmable microcontroller brain.

Every-Day the devices used by ourselves that contain Microcontrollers.

Try to make a list and counting how many devices and the events with

microcontrollers you use in a typical day. Here are some examples: if your clock

radio goes off, and you hit the snooze button a few times in the morning, the first

thing you do in your day is interact with a microcontroller. Heating up some food

in the microwave oven and making a call on a cell phone also involve operating

microcontrollers. That's just the beginning. Here are a few more examples:

Turning on the Television with a handheld remote, playing a hand held game,

Using a calculator, and Checking your digital wrist watch. All those devices have

microcontrollers inside them, that interact with you. Consumer appliances aren't

the only things that contain microcontrollers. Robots, machinery, aerospace

designs and other high-tech devices are also built with microcontrollers.

10
BLOCK DIAGRAM OF MICROCONTROLLER

PIC
The microcontroller that has been used for this project is from PIC series.
PIC microcontroller is the first RISC based microcontroller fabricated in CMOS
(complimentary metal oxide semiconductor) that uses separate bus for
instruction and data allowing simultaneous access of program and data memory.
The main advantage of CMOS and RISC combination is low power consumption
resulting in a very small chip size with a small pin count. The main advantage of
CMOS is that it has immunity to noise than other fabrication techniques.

Various microcontrollers offer different kinds of memories. EEPROM,


EPROM, FLASH etc. are some of the memories of which FLASH is the most
recently developed. Technology that is used in pic16F877 is flash technology, so
that data is retained even when the power is switched off. Easy Programming
and Erasing are other features of PIC 16F877.

CORE FEATURES:

11
• High-performance RISC CPU
• Only 35 single word instructions to learn
• All single cycle instructions except for program branches which are two cycle
• Operating speed: DC - 20 MHz clock input
DC - 200 ns instruction cycle
• Up to 8K x 14 words of Flash Program Memory,
Up to 368 x 8 bytes of Data Memory (RAM)
Up to 256 x 8 bytes of EEPROM data memory
• Pin out compatible to the PIC16C73/74/76/77
• Interrupt capability (up to 14 internal/external
• Eight level deep hardware stack
• Direct, indirect, and relative addressing modes
• Power-on Reset (POR)
• Power-up Timer (PWRT) and Oscillator Start-up Timer (OST)
• Watchdog Timer (WDT) with its own on-chip RC Oscillator for reliable
operation
• Programmable code-protection
• Power saving SLEEP mode
• Selectable oscillator options
• Low-power, high-speed CMOS EPROM/EEPROM technology
• Fully static design
• In-Circuit Serial Programming (ICSP) via two pins
• Only single 5V source needed for programming capability
• In-Circuit Debugging via two pins
• Processor read/write access to program memory
• Wide operating voltage range: 2.5V to 5.5V
• High Sink/Source Current: 25 mA
• Commercial and Industrial temperature ranges
• Low-power consumption:

< 2mA typical @ 5V, 4 MHz


20mA typical @ 3V, 32 kHz
< 1mA typical standby current

12
PERIPHERAL FEATURES:

• Timer0: 8-bit timer/counter with 8-bit prescaler


• Timer1: 16-bit timer/counter with prescaler, can be incremented during sleep
Via external crystal/clock
• Timer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler

• Two Capture, Compare, PWM modules


Capture is 16-bit, max resolution is 12.5 ns,
Compare is 16-bit, max resolution is 200 ns,
PWM max. Resolution is 10-bit
• 10-bit multi-channel Analog-to-Digital converter
• Synchronous Serial Port (SSP) with SPI. (Master Mode) and I2C.
(Master/Slave)
• Universal Synchronous Asynchronous Receiver Transmitter (USART/SCI)
with
9- Bit addresses detection.
• Brown-out detection circuitry for Brown-out Reset (BOR)

ARCHITECTURE OF PIC 16F877:

The complete architecture of PIC 16F877 is shown in the fig 2.1. Table 2.1
gives details about the specifications of PIC 16F877. Fig 2.2 shows the complete
pin diagram of the IC PIC 16F877.

13
TABLE SPECIFICATIONS

DEVICE PROGRAM FLASH DATA MEMORY DATA EEPROM


PIC
8K 368 Bytes 256 Bytes
16F877
PIN DIAGRAM OF PIC 16F877

14
PIN OUT DESCRIPTION

15
16
Legend: I = input O = output I/O = input/output P = power
= Not used TTL = TTL input ST = Schmitt Trigger input

Note :
1. This buffer is a Schmitt Trigger input when configured as an external interrupt.
2. This buffer is a Schmitt Trigger input when used in serial programming mode.
3. This buffer is a Schmitt Trigger input when configured as general purpose I/O
and a TTL input when used in the Parallel Slave Port mode (for interfacing to a
microprocessor bus).
4. This buffer is a Schmitt Trigger input when configured in RC oscillator mode
and a

17
CMOS input otherwise.

I/O PORTS:

Some pins for these I/O ports are multiplexed with an alternate function for
the peripheral features on the device. In general, when a peripheral is enabled,
that pin may not be used as a general purpose I/O pin.
Additional Information on I/O ports may be found in the IC micro™ Mid-
Range Reference Manual,

PORTA AND THE TRISA REGISTER:

PORTA is a 6-bit wide bi-directional port. The corresponding data direction


register is TRISA. Setting a TRISA bit (=1) will make the corresponding PORTA
pin an input, i.e., put the corresponding output driver in a Hi-impedance mode.
Clearing a TRISA bit (=0) will make the corresponding PORTA pin an output, i.e.,
put the contents of the output latch on the selected pin.

PORTB AND TRISB REGISTER:

PORTB is an 8-bit wide bi-directional port. The corresponding data


direction register is TRISB. Setting a TRISB bit (=1) will make the corresponding
PORTB pin an input, i.e., put the corresponding output driver in a hi-impedance
mode. Clearing a TRISB bit (=0) will make the corresponding PORTB pin an
output, i.e., put the contents of the output latch on the selected pin. Three pins of
PORTB are multiplexed with the Low Voltage Programming function; RB3/PGM,
RB6/PGC and RB7/PGD. The alternate functions of these pins are described in
the Special Features Section. Each of the PORTB pins has a weak internal pull-
up. A single control bit can turn on all the pull-ups.
This is performed by clearing bit RBPU (OPTION_REG<7>). The weak
pull-up is automatically turned off when the port pin is configured as an output.
The pull-ups are disabled on a Power-on Reset.

PORTC AND THE TRISC REGISTER:


18
PORTC is an 8-bit wide bi-directional port. The corresponding data
direction register is TRISC. Setting a TRISC bit (=1) will make the corresponding
PORTC pin an input, i.e., put the corresponding output driver in a hi-impedance
mode. Clearing a TRISC bit (=0) will make the corresponding PORTC pin an
output, i.e., put the contents of the output latch on the selected pin. PORTC is
multiplexed with several peripheral functions. PORTC pins have Schmitt Trigger
input buffers.

PORTD AND TRISD REGISTERS:

This section is not applicable to the 28-pin devices. PORTD is an 8-bit port
with Schmitt Trigger input buffers. Each pin is individually configurable as an
input or output. PORTD can be configured as an 8-bit wide microprocessor Port
(parallel slave port) by setting control bit PSPMODE (TRISE<4>). In this mode,
the input buffers are TTL.

PORTE AND TRISE REGISTER:

PORTE has three pins RE0/RD/AN5, RE1/WR/AN6 and RE2/CS/AN7,


which are individually configurable as inputs or outputs. These pins have Schmitt
Trigger input buffers.
The PORTE pins become control inputs for the microprocessor port when
bit PSPMODE (TRISE<4>) is set. In this mode, the user must make sure that the
TRISE<2:0> bits are set (pins are configured as digital inputs). Ensure ADCON1
is configured for digital I/O. In this mode the input buffers are TTL.
PORTE pins are multiplexed with analog inputs. When selected as an
analog input, these pins will read as '0's. TRISE controls the direction of the RE
pins, even when they are being used as analog inputs. The user must make sure
to keep the pins configured as inputs when using them as analog inputs.

MEMORY ORGANISATION:

19
There are three memory blocks in each of the PIC16F877 MUC’s. The
program memory and Data Memory have separate buses so that concurrent
access can occur.

PROGRAM MEMORY ORGANISATION:

The PIC16f877 devices have a 13-bit program counter capable of


addressing 8K *14 words of FLASH program memory. Accessing a location
above the physically implemented address will cause a wraparound.
The RESET vector is at 0000h and the interrupt vector is at 0004h.

DATA MEMORY ORGANISTION:

The data memory is partitioned into multiple banks which contain the
General Purpose Registers and the special functions Registers. Bits RP1
(STATUS<6) and RP0 (STATUS<5>) are the bank selected bits.

RP1:RP0 Banks
00 0
01 1
10 2
11 3

Each bank extends up to 7Fh (1238 bytes). The lower locations of each
bank are reserved for the Special Function Registers. Above the Special
Function Registers are General Purpose Registers, implemented as static RAM.
All implemented banks contain special function registers. Some frequently used
special function registers from one bank may be mirrored in another bank for
code reduction and quicker access.

EEPROM:

20
EEPROM (electrically erasable, programmable read only memory) technology
supplies
Nonvolatile storage of variables to a PIC-controlled device or instrument. That is
variables stored in an EEPROM will remain there even after power has been
turned off and then on again. Some instruments use an EEPROM to store
calibration data during manufacture. In this way, each instrument is actually
custom built, with customization that can be easily automated. Other instruments
use and EEPROM to allow a user to store several sets of setup information.
For an instrument requiring a complicated setup procedure, this permits a user
to retrieve the setup required for any one of several very
Different measurements. Still other devices use an EEPROM in a way that is
transparent
To a user, providing backup of setup parameters and thereby bridging over
power outages

The data EEPROM and flash program memory are readable and writable
during normal operation over the entire VDD range. A bulk erase operation may
not be issued from user code (which includes removing code protection. The
data memory is not directly mapped in the register file space. Instead it is
indirectly addressed through the special function registers (SFR).
There are six SFRS used to read and write the program and data EEPROM
memory.
These registers are:

EECON1
EECON2
EEDATA
EEDATH
EEADR
EEADRH
EEDATA holds the 8-bit data for read/write and EEADRR holds the address of
the EEPROM location being accessed. The 8-bit EEADR register can access up
to 256 locations of data EEPROM. The EEADR register can be thought of as the
indirect addressing register of the data EEPROM. EEcon1 contains the control

21
bits, while eecon2 is the register used to initiate the read/write. The EEPROM
data memory allows bytes read and write. A byte write automatically erases the
location and writes the new data. The write time is controlled by timer in-built.

TIMERS

There are three timers used Timer 0, Timer1 and Timer2

Timer 0

8-bit timer/counter
Software programmable prescaler
Internal or external clock select
Readable writable
Interrupt on overflow
Edge selects for external clock

22
Timer 1

Timer 1 can be used as timer or counter


It is 16-bit register
Software programmable prescaler
Interrupt on overflow
Readable and writable

The timer-1 module is a 16-bit timer/counter consisting two 8-bit register


(TMR1H) and
TMR1L), which are readable and writable. The TMR1 register pair
(TMR1H:TMR1L)
Increments from 0000h to FFFFH and rolls over to 0000h. The tmr1 interrupt, if
enabled, is generated on overflow, which is latched in interrupt flag bit tmr1IF.
This interrupt can be enabled/disabled by setting/clearing tmr1 interrupt enable
bit tmr1IE.

Timer-2

Timer2 is an 8-bit timer with a prescaler and a postscaler. IT can be used as the
PWM
Time-base for the PWM mode of the CCP module(s). The TMR2 register is
readable and writable, and is cleared on any device reset.
The input clock (Fosc/4) has a prescale option of 1:1, 1:4 OR 1:16,
selected by control bits.
The timer2 module has an 8-bit period register PR2. Timer2 increments
from 00h until it match PR2 and then resets to 00h on the next increment cycle.
PR2 is a readable and writable register. The PR2 register is initialized to FFh
upon reset.
The match output of TMR2 goes through a 4-bit postscaler (which gives a 1:1 to
1:16 scaling inclusive) to generate a tmr2 interrupt
Timer 2 can be shut off by clearing control bit tmr2on to minimize power
consumption.

23
The prescaler and postscaler counters are cleared when any of the following
occurs:
A write to the tmr2 register
A write to the t2con register
An any device reset
Tmr2 is not cleared when t2con is written

ANALOG TO DIGITAL CONVERTER (ADC)

There are two types of analog to digital converter is present in this IC. We
use 10-bit ADC. The ADC module can have up to eight analog inputs for a
device. The analog input charges a sample and hold capacitor. The output of
sample and hold capacitor is the input into the converter. The converter then
generates a digital result of this analog level via successive approximation. The
A/D conversion of the analog input signal results in a

Corresponding10-bit digital number. The A/D module has high and low voltage
reference input that is software selectable to some combination of VDD, VSS,
and RA2
Or RA3.
The A/D module has four registers. These registers are

A/D result high register (ADRESH)


A/D RESULT LOW REGISTER (ADRESL)
A/D CONTROL REGISTER 0 (ADCON0)
A/D CONTROL REGISTER 1 (ADCON1)

24
INTERRUPTS

The PIC16F87X FAMILY HAS UPTO 14 SOURCES OF INTERRUPT. The


interrupt control register (INTCON) records individual interrupt requests in flag
bits. IT also has individual interrupt requests in flag bits. IT also has individual
and global interrupt enables bits.

Though some modules may generate multiple interrupts such as (USART) They
have 14 sources. There is a minimum of one register used in the control and
status of the interrupts.
INTCON
Additionally if the device has peripheral interrupts, then it will have
registers to enable the peripheral interrupts and registers to hold the interrupt flag
bits
PIE1
PIE2
PIR1
PIR2

25
ADDRESSING MODES:

DIRECT ADDRESSING:

In direct addressing, the operand specified by an 8-bit address field in the

instruction. Only internal data RAM and SFR’s can be directly addressed.

INDIRECT ADDRESSING:

In Indirect addressing, the instruction specifies a register that contains the

address of the operand. Both internal and external RAM can indirectly address.

The address register for 8-bit addresses can be either the Stack Pointer or

R0 or R1 of the selected register Bank. The address register for 16-bit addresses

can be only the 16-bit data pointer register, DPTR.

INDEXED ADDRESSING:

Program memory can only be accessed via indexed addressing this

addressing mode is intended for reading look-up tables in program memory. A 16

bit base register (Either DPTR or the Program Counter) points to the base of the

table, and the accumulator is set up with the table entry number. Adding the

Accumulator data to the base pointer forms the address of the table entry in

program memory.

Another type of indexed addressing is used in the“ case jump ”

instructions. In this case the destination address of a jump instruction is

computed as the sum of the base pointer and the Accumulator data.

26
REGISTER INSTRUCTION:

The register banks, which contains registers R0 through R7, can be

accessed by instructions whose opcodes carry a 3-bit register specification.

Instructions that access the registers this way make efficient use of code, since

this mode eliminates an address byte. When the instruction is executed, one of

four banks is selected at execution time by the row bank select bits in PSW.

REGISTER - SPECIFIC INSTRUCTION:

Some Instructions are specific to a certain register. For example some

instruction always operates on the Accumulator, so no address byte is needed to

point OT ir. In these cases, the opcode itself points to the correct register.

Instruction that register to Accumulator as A assemble as Accumulator - specific

Opcodes.

IMMEDIATE CONSTANTS:

The value of a constant can follow the opcode in program memory For

example. MOV A, #100 loads the Accumulator with the decimal number 100.

The same number could be specified in hex digit as 64h.

OSCILLATOR AND CLOCK CIRCUIT:

XTAL1 and XTAL2 are the input and output respectively of an inverting

amplifier which is intended for use as a crystal oscillator in the pioerce

configuration, in the frequency range of 1.2 Mhz to 12 Mhz. XTAL2 also the input

to the internal clock generator.

27
To drive the chip with an internal oscillator, one would ground XTAL1 and

XTAL2. Since the input to the clock generator is divide by two filip flop there are

no requirements on the duty cycle of the external oscillator signal. However,

minimum high and low times must be observed.

The clock generator divides the oscillator frequency by 2 and provides a

tow phase clock signal to the chip. The phase 1 signal is active during the first

half to each clock period and the phase 2 signals are active during the second

half of each clock period.

CPU TIMING:

A machine cycle consists of 6 states. Each stare is divided into a phase /

half, during which the phase 1 clock is active and phase 2 half. Arithmetic and

Logical operations take place during phase1 and internal register - to register

transfer take place during phase 2

TRENDS AND DEVELOPMENTS IN MICRO CONTROLLER

The manner in which the use of micro controllers is shaping our lives is

breathtaking. Today, this versatile device can be found in a variety of control

applications. CVTs, VCRs, CD players, microwave ovens, and automotive

engine systems are some of these.

A micro controller unit (MCU) uses the microprocessor as its central

processing unit (CPU) and incorporates memory, timing reference, I/O

peripherals, etc on the same chip. Limited computational capabilities and

enhanced I/O are special features.

The micro controller is the most essential IC for continuous process- based

applications in industries like chemical, refinery, pharmaceutical automobile,

28
steel, and electrical, employing programmable logic systems (DCS). PLC and

DCS thrive on the programmability of an MCU.

There are many MCU manufacturers. To understand and apply general

concepts, it is necessary to study one type in detail. This specific knowledge

can be used to understand similar features of other MCUs.

Micro controller devices have many similarities. When you look at the

differences, they are not so great either. Most common and popular MCUs

are considered to be mature and well-established products, which have their

individual adherents and devotees. There are a number of variants within

each family to satisfy most memory, I/O, data conversion, and timing needs of

enduser applications.

The MCU is designed to operate on application-oriented sensor data-for

example, temperature and pressure of a blast furnace in an industrial process

that is fed through its serial or operated on under the control of software and

stored in ROM. Appropriate signals are fed via output ports to control external

devices and systems.

29
APPLICATIONS OF MICROCONTROLLERS

Microcontrollers are designed for use in sophisticated real time

applications such as

1. Industrial Control

2. Instrumentation and

3. Intelligent computer peripherals

They are used in industrial applications to control

 Motor

 Robotics

 Discrete and continuous process control

 In missile guidance and control

 In medical instrumentation

 Oscilloscopes

 Telecommunication

 Automobiles

 For Scanning a keyboard

 Driving an LCD

 For Frequency measurements

 Period Measurements

LIQUID CRYSTAL DISPLAY (LCD)

30
Liquid crystal displays (LCDs) have materials, which combine the properties of
both liquids and crystals. Rather than having a melting point, they have a temperature
range within which the molecules are almost as mobile as they would be in a liquid, but
are grouped together in an ordered form similar to a crystal.
An LCD consists of two glass panels, with the liquid crystal material sand
witched in between them. The inner surface of the glass plates are coated with transparent
electrodes which define the character, symbols or patterns to be displayed polymeric
layers are present in between the electrodes and the liquid crystal, which makes the liquid
crystal molecules to maintain a defined orientation angle.
One each polarizes are pasted outside the two glass panels. These polarizes would
rotate the light rays passing through them to a definite angle, in a particular direction.
When the LCD is in the off state, light rays are rotated by the two polarizes and the liquid
crystal, such that the light rays come out of the LCD without any orientation, and hence
the LCD appears transparent.
When sufficient voltage is applied to the electrodes, the liquid crystal molecules
would be aligned in a specific direction. The light rays passing through the LCD would
be rotated by the polarizes, which would result in activating / highlighting the desired
characters. The LCD’s are lightweight with only a few millimeters thickness. Since the
LCD’s consume less power, they are compatible with low power electronic circuits, and
can be powered for long durations.
The LCD does not generate light and so light is needed to read the display. By
using backlighting, reading is possible in the dark. The LCD’s have long life and a wide
operating temperature range. Changing the display size or the layout size is relatively
simple which makes the LCD’s more customers friendly.
The LCDs used exclusively in watches, calculators and measuring instruments are
the simple seven-segment displays, having a limited amount of numeric data. The recent
advances in technology have resulted in better legibility, more information displaying
capability and a wider temperature range. These have resulted in the LCDs being
extensively used in telecommunications and entertainment electronics. The LCDs have
even started replacing the cathode ray tubes (CRTs) used for the display of text and
graphics, and also in small TV applications.

31
Crystalonics dot–matrix (alphanumeric) liquid crystal displays are available in
TN, STN types, with or without backlight. The use of C-MOS LCD controller and driver
ICs result in low power consumption. These modules can be interfaced with a 4-bit or 8-
bit microprocessor /Micro controller.
 The built-in controller IC has the following features:
 Correspond to high speed MPU interface (2MHz)
 80 x 8 bit display RAM (80 Characters max)
 9,920-bit character generator ROM for a total of 240 character fonts. 208 character
fonts (5 x 8 dots) 32 character fonts (5 x 10 dots)
 64 x 8 bit character generator RAM 8 character generator RAM 8 character fonts (5 x
8 dots) 4 characters fonts (5 x 10 dots)
 Programmable duty cycles
 1/8 – for one line of 5 x 8 dots with cursor
 1/11 – for one line of 5 x 10 dots with cursor
 1/16 – for one line of 5 x 8 dots with cursor
 Wide range of instruction functions display clear, cursor home, display on/off, cursor
on/off, display character blink, cursor shift, display shift.
 Automatic reset circuit, which initializes the controller / driver ICs after power on.

MPLAB

MPLAB IDE is an integrated development environment that provides


development engineers with the flexibility to develop and debug firmware for
various Microchip devices

MPLAB IDE is a Windows-based Integrated Development Environment for the


Microchip Technology Incorporated PICmicrocontroller (MCU) and dsPIC digital
signal controller (DSC) families. In the MPLAB IDE, you can:

 Create source code using the built-in editor.

32
 Assemble, compile and link source code using various language tools. An
assembler, linker and librarian come with MPLAB IDE. C compilers are
available from Microchip and other third party vendors.

 Debug the executable logic by watching program flow with a simulator,


such as MPLAB SIM, or in real time with an emulator, such as MPLAB
ICE. Third party emulators that work with MPLAB IDE are also available.

 Make timing measurements.

 View variables in Watch windows.

 Program firmware into devices with programmers such as PICSTART Plus


or PRO MATE II.

 Find quick answers to questions from the MPLAB IDE on-line Help.

MPLAB SIMULATOR

MPLAB SIM is a discrete-event simulator for the PIC microcontroller (MCU)


families. It is integrated into MPLAB IDE integrated development environment.
The MPLAB SIM debugging tool is designed to model operation of Microchip
Technology's PIC microcontrollers to assist users in debugging software for these
devices

IC PROG

The PRO MATE II is a Microchip microcontroller device programmer. Through


interchangeable programming socket modules, PRO MATE II enables you to
quickly and easily program the entire line of Microchip PICmicro microcontroller
devices and many of the Microchip memory parts.

33
PRO MATE II may be used with MPLAB IDE running under supported Windows
OS's (see Read me for PRO MATE II.txt for support list), with the command-line
controller PROCMD or as a stand-alone programmer

COMPILER-HIGH TECH C

A program written in the high level language called C; which will be converted
into PICmicro MCU machine code by a compiler. Machine code is suitable for
use by a PICmicro MCU or Microchip development system product like MPLAB
IDE.

PIC START PLUS PROGRAMMER:

The PIC start plus development system from microchip technology


provides the product development engineer with a highly flexible low cost
microcontroller design tool set for all microchip PIC micro devices. The pic start
plus development system includes PIC start plus development programmer and
MPLAB IDE.

The PIC start plus programmer gives the product developer ability to
program user software in to any of the supported microcontrollers. The PIC start
plus software running under MPLAB provides for full interactive control over the
programmer.

34
4.3 ZIGBEE
ZIGBEE:

The mission of the ZigBee Working Group is to bring about the existence of
a broad range of interoperable consumer devices by establishing open
industry specifications for unlicensed, untethered peripheral, control and
entertainment devices requiring the lowest cost and lowest power
consumption communications between compliant devices anywhere in and
around the home.

The ZigBee specification is a combination of HomeRF Lite and the 802.15.4


specification. The spec operates in the 2.4GHz (ISM) radio band - the same
band as 802.11b standard, Bluetooth, microwaves and some other devices. It
is capable of connecting 255 devices per network. The specification supports
data transmission rates of up to 250 Kbps at a range of up to 30 meters.
ZigBee's technology is slower than 802.11b (11 Mbps) and Bluetooth (1
Mbps) but it consumes significantly less power.

ZigBee/ General Characteristics:


1 Dual PHY (2.4GHz and 868/915 MHz)
2 Data rates of 250 kbps (@2.4 GHz), 40 kbps (@ 915 MHz), and 20
kbps (@868 MHz)
3 Optimized for low duty-cycle applications (<0.1%)

35
4 CSMA-CA channel access Yields high throughput and low latency for
low duty cycle devices like sensors and controls
5 Low power (battery life multi-month to years)
6 Multiple topologies: star, peer-to-peer, mesh
7 Addressing space of up to:
- 18,450,000,000,000,000,000 devices (64 bit IEEE address)
- 65,535 networks
8 Optional guaranteed time slot for applications requiring low latency
9 Fully hand-shaked protocol for transfer reliability
10 Range: 50m typical (5-500m based on environment)

ZigBee - Typical Traffic Types Addressed


1 Periodic data
2 Application defined rate (e.g., sensors)
3 Intermittent data
4 Application/external stimulus defined rate (e.g., light switch)
5 Repetitive low latency data

ZigBee is an established set of specifications for wireless personal area


networking (WPAN), i.e. digital radio connections between computers and
related devices.

WPAN Low Rate or ZigBee provides specifications for devices that have
low data rates, consume very low power and are thus characterized by long
battery life. ZigBee makes possible completely networked homes where all
devices are able to communicate and be controlled by a single unit.

36
There are three different ZigBee device types that operate on these layers in
any self-organizing application network. These devices have 64-bit IEEE
addresses, with option to enable shorter addresses to reduce packet size, and
work in either of two addressing modes – star and peer-to-peer.

1. The ZigBee coordinator node: There is one, and only one, ZigBee
coordinator in each network to act as the router to other networks, and can
be likened to the root of a (network) tree. It is designed to store information
about the network.

2. The full function device FFD: The FFD is an intermediary router


transmitting data from other devices. It needs lesser memory than the
ZigBee coordinator node, and entails lesser manufacturing costs. It can
operate in all topologies and can act as a coordinator.
3. The reduced function device RFD: This device is just capable of talking
in the network; it cannot relay data from other devices. Requiring even less
memory, (no flash, very little ROM and RAM), an RFD will thus be cheaper
than an FFD. This device talks only to a network coordinator and can be
implemented very simply in star topology.

37
ZigBee/ addresses three typical traffic types. MAC can accommodate all the
types.
1. Data is periodic. The application dictates the rate, and the sensor activates
checks for data and deactivates.
2. Data is intermittent. The application, or other stimulus, determines the
rate, as in the case of say smoke detectors. The device needs to connect to
the network only when communication is necessitated. This type enables
optimum saving on energy.
3. Data is repetitive, and the rate is fixed a priori. Depending on allotted time
slots, called GTS (guaranteed time slot), devices operate for fixed durations.
ZigBee employs either of two modes, beacon or non-beacon to enable the to-
and-fro data traffic. Beacon mode is used when the coordinator runs on
batteries and thus offers maximum power savings, whereas the non-beacon
mode finds favour when the coordinator is mains-powered.
In the beacon mode, a device watches out for the coordinator's beacon that
gets transmitted at periodically, locks on and looks for messages addressed
to it. If message transmission is complete, the coordinator dictates a
schedule for the next beacon so that the device ‘goes to sleep'; in fact, the
coordinator itself switches to sleep mode.
While using the beacon mode, all the devices in a mesh network know when
to communicate with each other. In this mode, necessarily, the timing
circuits have to be quite accurate, or wake up sooner to be sure not to miss
the beacon. This in turn means an increase in power consumption by the
coordinator's receiver, entailing an optimal increase in costs.

38
Figure 1: Beacon Network Communication [ZigBee: 'Wireless Control That
Simply Works']

The non-beacon mode will be included in a system where devices are


‘asleep' nearly always, as in smoke detectors and burglar alarms. The
devices wake up and confirm their continued presence in the network at
random intervals.

On detection of activity, the sensors ‘spring to attention', as it were, and


transmit to the ever-waiting coordinator's receiver (since it is mains-
powered). However, there is the remotest of chances that a sensor finds the
channel busy, in which case the receiver unfortunately would ‘miss a call'.

39
Figure 2: Non-Beacon Network Communication [ZigBee: 'Wireless Control
That Simply Works']

The functions of the Coordinator, which usually remains in the


receptive mode, encompass network set-up, beacon transmission, node
management, storage of node information and message routing between
nodes.
The network node, however, is meant to save energy (and so ‘sleeps'
for long periods) and its functions include searching for network availability,
data transfer, checks for pending data and queries for data from the
coordinator.

Figure 1: ZigBee Network Model [ZigBee: 'Wireless Control That Simply


Works']
40
For the sake of simplicity without jeopardizing robustness, this particular
IEEE standard defines a quartet frame structure and a super-frame structure
used optionally only by the coordinator.
The four frame structures are
1 Beacon frame for transmission of beacons
2 Data frame for all data transfers
3 Acknowledgement frame for successful frame receipt confirmations
4 MAC command frame
These frame structures and the coordinator's super-frame structure play
critical roles in security of data and integrity in transmission.

All protocol layers contribute headers and footers to the frame structure,
such that the total overheads for each data packet range are from 15 octets
(for short addresses) to 31 octets (for 64-bit addresses).
The coordinator lays down the format for the super-frame for sending
beacons after every 15.38 ms or/and multiples thereof, up to 252s. This
interval is determined a priori and the coordinator thus enables sixteen time
slots of identical width between beacons so that channel access is
contention-less. Within each time slot, access is contention-based.
Nonetheless, the coordinator provides as many as seven GTS (guaranteed
time slots) for every beacon interval to ensure better quality.

The ZigBee Alliance targets applications "across consumer, commercial,


industrial and government markets worldwide".

Unwired applications are highly sought after in many networks that are
characterized by numerous nodes consuming minimum power and enjoying
long battery lives.
41
ZigBee technology is designed to best suit these applications, for the reason
that it enables reduced costs of development, very fast market adoption, and
rapid ROI.

Airbee Wireless Inc has tied up with Radio crafts AS to deliver "out-of-the-
box" ZigBee-ready solutions; the former supplying the software and the
latter making the module platforms. With even light controls and thermostat
producers joining the ZigBee Alliance, the list is growing healthily and
includes big OEM names like HP, Philips, Motorola and Intel.

With ZigBee designed to enable two-way communications, not only will the
consumer be able to monitor and keep track of domestic utilities usage, but
also feed it to a computer system for data analysis.

A recent analyst report issued by West Technology Research Solutions


estimates that by the year 2008, "annual shipments for ZigBee chipsets into
the home automation segment alone will exceed 339 million units," and will
show up in "light switches, fire and smoke detectors, thermostats, appliances
in the kitchen, video and audio remote controls, landscaping, and security
systems."

Futurists are sure to hold ZigBee up and say, "See, I told you so". The
ZigBee Alliance is nearly 200 strong and growing, with more OEM's signing
up. This means that more and more products and even later, all devices and
their controls will be based on this standard. Since Wireless personal Area
Networking applies not only to household devices, but also to individualized
office automation applications, ZigBee is here to stay. It is more than likely
the basis of future home-networking solutions.
42
4.4 LIQUID CRYSTAL DISPLAY (LCD)

Liquid Crystal Display (LCD’s) have materials, which combine

the properties of both liquids and crystals. Rather than having a

melting point, they have a temperature range within which the

molecules are almost as mobile as they would be in a liquid, but are

grouped together in an ordered form similar to a crystal.

An LCD consists of two glass panels, with the liquid crystal

material sand witched in between them. The inner surface of the

glass plates are coated with transparent electrodes which define the

character, symbols or patterns to be displayed polymeric layers are

present in between the electrodes and the liquid crystal, which makes

the liquid crystal molecules to maintain a defined orientation angle.

One each polarizes are pasted outside the two glass panels.

These polarizes would rotate the light rays passing through them to a

definite angle, in a particular direction. When the LCD is in the off

state, light rays are rotated by the two polarizes and the liquid crystal,

such that the light rays come out of the LCD without any orientation,

and hence the LCD appears transparent.

43
When sufficient voltage is applied to the electrodes, the liquid

crystal molecules would be aligned in a specific direction. The light

rays passing through the LCD would be rotated by the polarizes,

which would result in activating / highlighting the desired characters.

The LCD’s are lightweight with only a few millimeters thickness. Since

the LCD’s consume less power, they are compatible with low power

electronic circuits, and can be powered for long durations.

The LCD does not generate light and so light is needed to read

the display. By using backlighting, reading is possible in the dark. The

LCD’s have long life and a wide operating temperature range.

Changing the display size or the layout size is relatively simple which

makes the LCD’s more customers friendly.

The LCDs used exclusively in watches, calculators and

measuring instruments are the simple seven-segment displays,

having a limited amount of numeric data. The recent advances in

technology have resulted in better legibility, more information

displaying capability and a wider temperature range. These have

resulted in the LCDs being extensively used in telecommunications

and entertainment electronics. The LCDs have even started replacing

the cathode ray tubes (CRTs) used for the display of text and

graphics, and also in small TV applications.

44
Crystalonics dot–matrix (alphanumeric) liquid crystal displays

are available in TN, STN types, with or without backlight. The use of

C-MOS LCD controller and driver ICs result in low power

consumption. These modules can be interfaced with a 4-bit or 8-bit

microprocessor /Micro controller.

 The built-in controller IC has the following features:

 Correspond to high speed MPU interface (2MHz)

 80 x 8 bit display RAM (80 Characters max)

 9,920-bit character generator ROM for a total of 240 character

fonts. 208 character fonts (5 x 8 dots) 32 character fonts (5 x

10 dots)

 64 x 8 bit character generator RAM 8 character generator RAM

8 character fonts (5 x 8 dots) 4 characters fonts (5 x 10 dots)

 Programmable duty cycles

 1/8 – for one line of 5 x 8 dots with cursor

 1/11 – for one line of 5 x 10 dots with cursor

 1/16 – for one line of 5 x 8 dots with cursor

 Wide range of instruction functions display clear, cursor home,

display on/off, cursor on/off, display character blink, cursor shift,

display shift.

45
 Automatic reset circuit, which initializes the controller / driver

ICs after power on.

5. OVERALL CIRCUIT DIAGRAM

46
6. OVERALL CIRCUIT DIAGRAM DESCRIPTION

6.1 POWER SUPPLY DESCRIPTION

Block diagram

The ac voltage, typically 220V rms, is connected to a transformer,


which steps that ac voltage down to the level of the desired dc output. A
diode rectifier then provides a full-wave rectified voltage that is initially
filtered by a simple capacitor filter to produce a dc voltage. This resulting dc
voltage usually has some ripple or ac voltage variation.

A regulator circuit removes the ripples and also remains the same dc
value even if the input dc voltage varies, or the load connected to the output
dc voltage changes. This voltage regulation is usually obtained using one of
the popular voltage regulator IC units.

TRANSFORMER RECTIFIER FILTER IC REGULATOR LOAD

47
Working principle

Transformer

The transformer will step down the power supply voltage (0-230V) to (0-
6V) level. Then the secondary of the potential transformer will be connected
to the precision rectifier, which is constructed with the help of op–amp. The
advantages of using precision rectifier are it will give peak voltage output as
DC; rest of the circuits will give only RMS output.

Bridge rectifier

When four diodes are connected as shown in figure, the circuit is


called as bridge rectifier. The input to the circuit is applied to the diagonally
opposite corners of the network, and the output is taken from the remaining
two corners.

Let us assume that the transformer is working properly and there is a


positive potential, at point A and a negative potential at point B. the positive
potential at point A will forward bias D3 and reverse bias D4.

The negative potential at point B will forward bias D1 and reverse D2.
At this time D3 and D1 are forward biased and will allow current flow to
pass through them; D4 and D2 are reverse biased and will block current
flow.
48
The path for current flow is from point B through D1, up through RL,
through D3, through the secondary of the transformer back to point B. this
path is indicated by the solid arrows. Waveforms (1) and (2) can be observed
across D1 and D3.

One-half cycle later the polarity across the secondary of the


transformer reverse, forward biasing D2 and D4 and reverse biasing D1 and
D3. Current flow will now be from point A through D4, up through RL,
through D2, through the secondary of T1, and back to point A. This path is
indicated by the broken arrows. Waveforms (3) and (4) can be observed
across D2 and D4. The current flow through RL is always in the same
direction. In flowing through RL this current develops a voltage
corresponding to that shown waveform (5). Since current flows through the
load (RL) during both half cycles of the applied voltage, this bridge rectifier
is a full-wave rectifier.

One advantage of a bridge rectifier over a conventional full-wave


rectifier is that with a given transformer the bridge rectifier produces a
voltage output that is nearly twice that of the conventional full-wave circuit.

This may be shown by assigning values to some of the components


shown in views A and B. assume that the same transformer is used in both
circuits. The peak voltage developed between points X and y is 1000 volts in
both circuits. In the conventional full-wave circuit shown—in view A, the
peak voltage from the center tap to either X or Y is 500 volts. Since only one
diode can conduct at any instant, the maximum voltage that can be rectified
at any instant is 500 volts.

49
The maximum voltage that appears across the load resistor is nearly-
but never exceeds-500 v0lts, as result of the small voltage drop across the
diode. In the bridge rectifier shown in view B, the maximum voltage that can
be rectified is the full secondary voltage, which is 1000 volts. Therefore, the
peak output voltage across the load resistor is nearly 1000 volts. With both
circuits using the same transformer, the bridge rectifier circuit produces a
higher output voltage than the conventional full-wave rectifier circuit.

IC voltage regulators

Voltage regulators comprise a class of widely used ICs.


Regulator IC units contain the circuitry for reference source, comparator
amplifier, control device, and overload protection all in a single IC. IC units
provide regulation of either a fixed positive voltage, a fixed negative
voltage, or an adjustably set voltage. The regulators can be selected for
operation with load currents from hundreds of milli amperes to tens of
amperes, corresponding to power ratings from milli watts to tens of watts.

50
Circuit diagram (Power supply)

A fixed three-terminal voltage regulator has an unregulated dc input


voltage, Vi, applied to one input terminal, a regulated dc output voltage, Vo,
from a second terminal, with the third terminal connected to ground.
The series 78 regulators provide fixed positive regulated voltages
from 5 to 24 volts. Similarly, the series 79 regulators provide fixed negative
regulated voltages from 5 to 24 volts.
 For ICs, microcontroller, LCD --------- 5 volts
 For alarm circuit, op-amp, relay circuits ---------- 12 volts

51
6.2 MICROCONTROLLER CIRCUIT
PIC WITH MICROCONTROLLER

We connect the lcd display with PIC through PORT B.

PORTB AND TRISB REGISTER :

52
PORTB is an 8-bit wide bi-
directional port. The corresponding data direction register is TRISB.
Setting a TRISB bit (=1) will make the corresponding PORTB pin an
input, i.e., put the corresponding output driver in a hi-impedance
mode. Clearing a TRISB bit (=0) will make the corresponding
PORTB pin an output, i.e., put the contents of the output latch on the
selected pin. Three pins of PORTB are multiplexed with the Low
Voltage Programming function; RB3/PGM, RB6/PGC and RB7/PGD.
The alternate functions of these pins are described in the Special
Features Section. Each of the PORTB pins has a weak internal pull-
up. A single control bit can turn on all the pull-ups.
This is performed by clearing bit RBPU
(OPTION_REG<7>). The weak pull-up is automatically turned off
when the port pin is configured as an output. The pull-ups are disabled
on a Power-on Reset.

Four of PORT B’s pins, RB7:RB4, have an


interrupt on change feature. Only pins configured as inputs can cause
this interrupt to occur (i.e. any RB7:RB4 pin configured as an output
is excluded from the interrupt on change comparison). The input pins
(of RB7:RB4) are compared with the old value latched on the last read
of PORTB. The “mismatch” outputs of RB7:RB4 are OR’ed together
to generate the RB Port Change Interrupt with flag bit RBIF
(INTCON<0>). This interrupt can wake the device from SLEEP. The
user, in the interrupt service routine, can clear the interrupt in the
following manner:
a) Any read or write of PORTB. This will end the
mismatch condition.
b) Clear flag bit RBIF. A mismatch condition will
continue to set flag bit RBIF. Reading PORTB will end the mismatch

53
condition, and allow flag bit RBIF to be cleared. The interrupt on
change feature is recommended for wake-up on key depression
operation and operations where PORTB is only used for the interrupt
on change feature. Polling of PORTB is not recommended while using
the interrupt on change feature. This interrupt on mismatch feature,
together with software configurable pull-ups on these four pins, allow
easy interface to a keypad and make it possible for wake-up on key
depression

54
6.3 HUMIDITY SENSOR HUMIDITY MEASUREMENT

55
Humidity:
Humidity is the amount of water vapor in an air sample. There are three different
ways to measure humidity: absolute humidity, relative humidity, and specific humidity.
Relative humidity is the most frequently encountered measurement of humidity because
it is regularly used in weather forecasts. It’s an important part of weather reports because
it indicates the likelihood of precipitation, dew, or fog. Higher relative humidity also
makes it feel hotter outside in the summer because it reduces the effectiveness of
sweating to cool the body by preventing the evaporation of perspiration from the skin.
This effect is calculated in a heat index table. Warmer air has more thermal energy than
cooler air; thus more water molecules can evaporate and stay in the air in a vapour state
rather than a liquid state. This may be why people say that warmer air "holds" more
moisture — in warmer air, there is more energy for more water molecules to hold
themselves in the air (and overcome hydrogen bonds which seek to pull water molecules
together).
Circuit description:
This circuit is designed to measure the humidity level in the atmosphere air.
The humidity sensor is used for the measurement device. The humidity sensor is consists
of astable mulitivibrator in which the capacitance is varied depends on the humidity level.
So the multivibrator produce the varing pulse signal which is converted into
corresponding voltage signal.
The voltage signal is given to invering input terminal of the comparator. The
reference voltage is given to non invering input terminal. The comparator is desigened
by the LM 741 operational amplifier.
The comparator is compared with reference humidity level and delivered the
corresponding error voltage at its output which is given to next stage of gain amplifier in
which the variable resistor is connected in the feedback path by adjusting the resistor we
can get the deesired gain. Then the final voltage is given to microcontroller or other
circuit in order to find the humidity level in the atmosphere.

6.3SMOKE SENSOR
56
6.4

Infrared transmitter is one type of LED which emits infrared rays generally called
as IR Transmitter. Similarly IR Receiver is used to receive the IR rays transmitted by the
IR transmitter. One important point is both IR transmitter and receiver should be placed
straight line to each other.
The transmitted signal is given to IR transmitter whenever the signal is high, the
IR transmitter LED is conducting it passes the IR rays to the receiver. The IR receiver is
connected with comparator. The comparator is constructed with LM 358 operational
amplifier. In the comparator circuit the reference voltage is given to inverting input
terminal. The non inverting input terminal is connected IR receiver. When interrupt the
IR rays between the IR transmitter and receiver, the IR receiver is not conducting. So the
comparator non inverting input terminal voltage is higher then inverting input. Now the
comparator output is in the range of +5V. This voltage is given to microcontroller or PC
and led so led will glow.
When IR transmitter passes the rays to receiver, the IR receiver is conducting due
to that non inverting input voltage is lower than inverting input. Now the comparator

57
output is GND so the output is given to microcontroller or PC. This circuit is mainly
used to for counting application, intruder detector etc.

6.5 TEMPERATURE SENSOR


Temperature measurement Using Thermistor
Schematic diagram :

Schematic Explanation:
In this circuit the thermistor is used to measure the temperature.
Thermistor is nothing but temperature sensitive resistor. There are two type
of thermistor available such as positive temperature co-efficient and negative
temperature co- efficient. Here we are using negative temperature co-
efficient in which the resistance value is decreased when the temperature is
increased.
Potential divider form:

If the R1 and R2 value is equal means


the output is half of the Vcc supply. In this
circuit output is a variable one. So the output
is depending upon the R2 resistance value.

58
Resistance value will be varied depend upon the Temperature level.
Temperature varied means the resistance value also varied. If resistance
value increased means output also increased. The resistance value and output
is a directly proportional one. Then the final voltage is given to ADC for
convert the analog signal to digital signal. Then the corresponding digital
signal is taken to process in microcontroller.
The ADC value will increase if the temperature increased. We can
measure the temperature only with the help of any controller or processor.
PCB LAYOUT :

THERMISTOR :
A thermistor is a type of resistor used to measure temperature
changes, relying on the change in its resistance with changing temperature.
Thermistor is a combination of the words thermal and resistor. If we assume
that the relationship between resistance and temperature is linear (i.e. we
make a first-order approximation), then we can say that:
ΔR = kΔT
Where
ΔR = change in resistance
ΔT = change in temperature

59
k = first-order temperature coefficient of resistance
Thermistors can be classified into two types depending on the sign of
k. If k is positive, the resistance increases with increasing temperature, and
the device is called a positive temperature coefficient (PTC) thermistor,
Posistor. If k is negative, the resistance decreases with increasing
temperature, and the device is called a negative temperature coefficient
(NTC) thermistor. Resistors that are not thermistors are designed to have the
smallest possible k, so that their resistance remains almost constant over a
wide temperature range.

Symbol:

6.6 RS232 CIRCUIT

RS232 COMMUNICATION

60
RS232:
In telecommunications, RS-232 is a standard for serial binary data
interconnection between a DTE (Data terminal equipment) and a DCE (Data Circuit-
terminating Equipment). It is commonly used in computer serial ports.
Scope of the Standard:
The Electronic Industries Alliance (EIA) standard RS-232-C [3] as of 1969 defines:
 Electrical signal characteristics such as voltage levels, signaling rate, timing and
slew-rate of signals, voltage withstand level, short-circuit behavior, maximum
stray capacitance and cable length
 Interface mechanical characteristics, pluggable connectors and pin identification
 Functions of each circuit in the interface connector
 Standard subsets of interface circuits for selected telecom applications
The standard does not define such elements as character encoding (for example,
ASCII, Baudot or EBCDIC), or the framing of characters in the data stream (bits per
character, start/stop bits, parity). The standard does not define protocols for error
detection or algorithms for data compression.
The standard does not define bit rates for transmission, although the standard says it
is intended for bit rates lower than 20,000 bits per second. Many modern devices can
exceed this speed (38,400 and 57,600 bit/s being common, and 115,200 and 230,400 bit/s
making occasional appearances) while still using RS-232 compatible signal levels.
Details of character format and transmission bit rate are controlled by the serial port
hardware, often a single integrated circuit called a UART that converts data from parallel

61
to serial form. A typical serial port includes specialized driver and receiver integrated
circuits to convert between internal logic levels and RS-232 compatible signal levels.

Circuit working Description:


In this circuit the MAX 232 IC used as level logic converter. The MAX232 is a
dual driver/receiver that includes a capacive voltage generator to supply EIA 232 voltage
levels from a single 5v supply. Each receiver converts EIA-232 to 5v TTL/CMOS levels.
Each driver converts TLL/CMOS input levels into EIA-232 levels.

In this circuit the microcontroller transmitter pin is connected in the MAX232


T2IN pin which converts input 5v TTL/CMOS level to RS232 level. Then T2OUT pin is
connected to reviver pin of 9 pin D type serial connector which is directly connected to
PC.
In PC the transmitting data is given to R2IN of MAX232 through transmitting pin
of 9 pin D type connector which converts the RS232 level to 5v TTL/CMOS level. The

62
R2OUT pin is connected to receiver pin of the microcontroller. Likewise the data is
transmitted and received between the microcontroller and PC or other device vice versa.

7 PCB DESIGN

Design and Fabrication of Printed circuit boards

INTRODUCTION:

Printed circuit boards, or PCBs, form the core of electronic equipment


domestic and industrial. Some of the areas where PCBs are intensively used
are computers, process control, telecommunications and instrumentation.

MANUFATCURING:

63
The manufacturing process consists of two methods; print and etch,
and print, plate and etch. The single sided PCBs are usually made using the
print and etch method. The double sided plate through – hole (PTH) boards
are made by the print plate and etch method.
The production of multi layer boards uses both the methods. The inner
layers are printed and etch while the outer layers are produced by print, plate
and etch after pressing the inner layers.

SOFTWARE:

The software used in our project to obtain the schematic layout is


ORCAD.

PANELISATION:

Here the schematic transformed in to the working positive/negative films.


The circuit is repeated conveniently to accommodate economically as
many circuits as possible in a panel, which can be operated in every
sequence of subsequent steps in the PCB process. This is called
penalization. For the PTH boards, the next operation is drilling.

DRILLING:

PCB drilling is a state of the art operation. Very small holes are drilled
with high speed CNC drilling machines, giving a wall finish with less or no
smear or epoxy, required for void free through hole plating.

64
PLATING:

The heart of the PCB manufacturing process. The holes drilled in the
board are treated both mechanically and chemically before depositing the
copper by the electro less copper platting process.

ETCHING:

Once a multiplayer board is drilled and electro less copper deposited,


the image available in the form of a film is transferred on to the out side by
photo printing using a dry film printing process. The boards are then
electrolytic plated on to the circuit pattern with copper and tin. The tin-
plated deposit serves an etch resist when copper in the unwanted area is
removed by the conveyor’s spray etching machines with chemical etch ants.
The etching machines are attached to automatic dosing equipment, which
analyses and controls etch ants concentrations

SOLDERMASK:

Since a PCB design may call for very close spacing between
conductors, a solder mask has to be applied on the both sides of the circuitry
to avoid the bridging of conductors. The solder mask ink is applied by
screening. The ink is dried, exposed to UV, developed in a mild alkaline
solution and finally cured by both UV and thermal energy.

65
HOT AIR LEVELLING:

After applying the solder mask, the circuit pads are soldered using the
hot air leveling process. The bare bodies fluxed and dipped in to a molten
solder bath. While removing the board from the solder bath, hot air is blown
on both sides of the board through air knives in the machines, leaving the
board soldered and leveled. This is one of the common finishes given to the
boards. Thus the double sided plated through whole printed circuit board is
manufactured and is now ready for the components to be soldered.

8 SOFTWARE TOOLS
8 SOFTWARE TOOLS

8.1 MPLAB

MPLAB IDE is an integrated development environment that provides


development engineers with the flexibility to develop and debug firmware for
various Microchip devices

MPLAB IDE is a Windows-based Integrated Development Environment for the


Microchip Technology Incorporated PICmicrocontroller (MCU) and dsPIC digital
signal controller (DSC) families. In the MPLAB IDE, you can:

 Create source code using the built-in editor.


66
 Assemble, compile and link source code using various language tools. An
assembler, linker and librarian come with MPLAB IDE. C compilers are
available from Microchip and other third party vendors.

 Debug the executable logic by watching program flow with a simulator,


such as MPLAB SIM, or in real time with an emulator, such as MPLAB
ICE. Third party emulators that work with MPLAB IDE are also available.

 Make timing measurements.

 View variables in Watch windows.

 Program firmware into devices with programmers such as PICSTART Plus


or PRO MATE II.

 Find quick answers to questions from the MPLAB IDE on-line Help.

8.2 MPLAB SIMULATOR

MPLAB SIM is a discrete-event simulator for the PIC microcontroller (MCU)


families. It is integrated into MPLAB IDE integrated development environment.
The MPLAB SIM debugging tool is designed to model operation of Microchip
Technology's PIC microcontrollers to assist users in debugging software for these
devices

8.3 IC PROG

67
The PRO MATE II is a Microchip microcontroller device programmer. Through
interchangeable programming socket modules, PRO MATE II enables you to
quickly and easily program the entire line of Microchip PICmicro microcontroller
devices and many of the Microchip memory parts.

PRO MATE II may be used with MPLAB IDE running under supported Windows
OS's (see Read me for PRO MATE II.txt for support list), with the command-line
controller PROCMD or as a stand-alone programmer

8.4 COMPILER-HIGH TECH C

A program written in the high level language called C; which will be converted
into PICmicro MCU machine code by a compiler. Machine code is suitable for
use by a PICmicro MCU or Microchip development system product like MPLAB
IDE.

8.5 PIC START PLUS PROGRAMMER:

The PIC start plus development system from microchip technology


provides the product development engineer with a highly flexible low cost
microcontroller design tool set for all microchip PIC micro devices. The pic start
plus development system includes PIC start plus development programmer and
MPLAB IDE.

The PIC start plus programmer gives the product developer ability to
program user software in to any of the supported microcontrollers. The PIC start
plus software running under MPLAB provides for full interactive control over the
programmer.
68
9. ADVANTAGES

Low power consumption

By using this microcontroller IC we can know about many more


results

Reliability

Compatibility

Easy convenience to handle

10. APPLICATIONS
Used in forest department

69
11. CONCLUSION AND SCOPE FOR FUTURE

This project may be implemented in the banks and also we may implement it
in the houses where there are security needed. It is a beautiful thing to those
who are always busy in business or in other activities. It is a less expensive
one so that all the people can get secured by using this project. In future we
can use this id for many more control purposes.

12. REFERENCES

MILL MAN J and HAWKIES C.C. “INTEGRATED


ELECTRONICS” MCGRAW HILL, 1972
70
ROY CHOUDHURY D, SHAIL JAIN, “LINEAR
INTEGRATED CIRCUIT”, New Age International Publishers,
New Delhi, 2000

“THE 8051 MICROCONTROLLER AND EMBEDDED


SYSTEM” by Mohammad Ali Mazidi.

http://www.atmel.com/

http://www.microchip.com/

http://www.8052.com

http://www.beyondlogic.org

http://www.ctv.es/pckits/home.html

http://www.aimglobal.org/

71

Você também pode gostar