Escolar Documentos
Profissional Documentos
Cultura Documentos
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
7 PCB DESIGN
8 SOFTWARE
SOFTWARE TOOLS
9 ADVANTAGES
1
10 APPLICATION
11 CONCLUSION
12 REFERENCES
1. ABSTRACT
2
2. INTRODUCTION
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.2 MICROCONTORLLER
MICROCONTROLLER
INTRODUCTION TO MICROCONTROLLER
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
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
system design and development. It identifies the vital features responsible for
their tremendous impact, the acute educational need created by them and
chip substantially reduces the cost of building simple products, which use the
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
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
computer. Micro suggests that the device is small, and controller tells you that the
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.
Decoding, and Serial transmission circuits. Many low cost products, such as
Toys, Electric Drills, Microwave Ovens, VCR and a host of other consumer and
EVOLUTION OF MICROCONTROROLLER
Markets for microcontrollers can run into millions of units per application.
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
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 are built-in. If it has buttons and a digital display, chances are it
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
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.
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:
12
PERIPHERAL FEATURES:
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
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,
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.
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.
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
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-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
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
24
INTERRUPTS
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:
instruction. Only internal data RAM and SFR’s can be directly addressed.
INDIRECT ADDRESSING:
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
INDEXED ADDRESSING:
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.
computed as the sum of the base pointer and the Accumulator data.
26
REGISTER INSTRUCTION:
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.
point OT ir. In these cases, the opcode itself points to the correct register.
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.
XTAL1 and XTAL2 are the input and output respectively of an inverting
configuration, in the frequency range of 1.2 Mhz to 12 Mhz. XTAL2 also the input
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
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
CPU TIMING:
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
The manner in which the use of micro controllers is shaping our lives is
The micro controller is the most essential IC for continuous process- based
28
steel, and electrical, employing programmable logic systems (DCS). PLC and
Micro controller devices have many similarities. When you look at the
differences, they are not so great either. Most common and popular MCUs
each family to satisfy most memory, I/O, data conversion, and timing needs of
enduser applications.
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
29
APPLICATIONS OF MICROCONTROLLERS
applications such as
1. Industrial Control
2. Instrumentation and
Motor
Robotics
In medical instrumentation
Oscilloscopes
Telecommunication
Automobiles
Driving an LCD
Period Measurements
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
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.
Find quick answers to questions from the MPLAB IDE on-line Help.
MPLAB SIMULATOR
IC PROG
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.
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.
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)
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.
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']
39
Figure 2: Non-Beacon Network Communication [ZigBee: 'Wireless Control
That Simply Works']
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.
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.
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)
glass plates are coated with transparent electrodes which define the
present in between the electrodes and the liquid crystal, which makes
One each polarizes are pasted outside the two glass panels.
These polarizes would rotate the light rays passing through them to a
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,
43
When sufficient voltage is applied to the electrodes, the liquid
The LCD’s are lightweight with only a few millimeters thickness. Since
the LCD’s consume less power, they are compatible with low power
The LCD does not generate light and so light is needed to read
Changing the display size or the layout size is relatively simple which
the cathode ray tubes (CRTs) used for the display of text and
44
Crystalonics dot–matrix (alphanumeric) liquid crystal displays
are available in TN, STN types, with or without backlight. The use of
10 dots)
display shift.
45
Automatic reset circuit, which initializes the controller / driver
46
6. OVERALL CIRCUIT DIAGRAM DESCRIPTION
Block diagram
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.
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
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.
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
50
Circuit diagram (Power supply)
51
6.2 MICROCONTROLLER CIRCUIT
PIC WITH MICROCONTROLLER
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.
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.
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:
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:
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.
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
INTRODUCTION:
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:
PANELISATION:
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:
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
Find quick answers to questions from the MPLAB IDE on-line Help.
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
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.
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
Reliability
Compatibility
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
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