Documentos de Académico
Documentos de Profesional
Documentos de Cultura
ZIGBEE TECHNOLOGY
ABSTRACT:
Wireless electricity theft detection system using ZIGBEE technology present an efficient
and less costly way to adulterate the wireless technique used in this paper. This wireless system
is used to overcome the theft of electricity via bypassing the energy meter and hence it also
controls the revenue losses and utility of the electricity authorized agency. Mainly this system
consists of microcontroller, energy meter and a ZIGBEE module to check for the theft of
electricity and then to send a message to the authorized agency which looks after the electricity
consumed. The wireless technique used in this system provides the major advantages such as low
power consumption and also the low cost of the ZIGBEE module.
INTRODUCTION:
The electricity is needed to be protected for efficient power delivery to the consumer
because electricity is indispensable to domestic and industrial development activity. There are
two types of losses technical and Nontechnical losses. Every year the electricity companies fare
the line losses at an average 20-30% according to power ministry WAPDA Companys loss more
than RS.125 billion. T&D losses have been a concern for the Indian: electricity sector. Since
these have been very high when compared with other developed countries. The present T&D
losses including unaccounted energy are about 30% and there is need to reduce these losses
through efficient management the best operation and maintenance practice of the transmission
and distribution. When we talk about T&D losses it also includes the theft of electricity, although
it is the part of commercial loss but there is no way to segregate theft from the T&D losses. In
practice, we know the energy billed and the input energy the difference between these two is
T&D losses obviously the theft is included in this loss. SERC, Mop also ask to segregate T&D
loss and commercial loss but nobody is able to tell how these losses can be segregated, as theft
(the part of commercial loss) is embedded with T&D. Electricity theft is at the centre of focus all
over the world, but electricity theft in India has a significant effect on the Indian economy. The
loss on amount of theft is reflected in ARR of the electricity company. Thus these costs are
routinely passed on to the customers in the form of the higher energy charges.
BLOCK DIAGRAM:
TRANSMTTER:
POWER SUPPLY
REALY
ZIGBEE
MICRO
LOAD
CONTROLLER
ENERGY
METER
LCD DISPLAY
RECEIVER
ZIGBEE
COMPUTER (PC)
HARDWARE DISCRIPTION:
PIC 16F877A
ZIGBEE MODULE
RELAY
LCD DISPLAY
ELERGY METER
RECTIFIER UNIT:
INPUT FILTER:
Capacitors are used as filters. The ripples from the dc voltages are removed and pure dc
voltage is obtained. The primary action performed by capacitor is charging and discharging. It
charges in positive half cycle of the ac voltage and it will discharge in negative half cycle. So it
allows only ac voltage and does not allow the dc voltage. This filter is fixed before the regulator.
Capacitors used here are of the value 1000uF.
REGULATOR UNIT:
Regulator regulates the output voltage to a specific value.
maintained irrespective of the fluctuations in the input dc voltage. Whenever there are any ac
voltage fluctuations, the dc voltage also changes, and to avoid this regulators are used.
OUTPUT FILTER:
This filter is fixed after the Regulator circuit to filter any of the possibly found ripples in
the output received finally. Capacitors used here are of value 10F.
PIC16F877A MICROCONTROLLER
Microcontroller PIC16F877A
Introduction
The PIC16F877A CMOS FLASH-based 8-bit microcontroller is upward compatible with
the PIC16C5x, PIC12Cxxx and PIC16C7x devices. It features 200 ns instruction execution, 256
bytes of EEPROM data memory, self programming, an ICD, 2 Comparators, 8 channels of 10-bit
Analog-to-Digital (A/D) converter, 2 capture/compare/PWM functions, a synchronous serial port
that can be configured as either 3-wire SPI or 2-wire I2C bus, a USART, and a Parallel Slave
Port.
Peripheral Features
33 I/O pins; 5 I/O ports
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
16-bit Capture input; max resolution 12.5 ns
16-bit Compare; max resolution 200 ns
10-bit PWM
Synchronous Serial Port with two modes:
SPI Master
I2C Master and Slave
USART/SCI with 9-bit address detection
Parallel Slave Port (PSP)
8 bits wide with external RD, WR and CS controls
Brown-out detection circuitry for Brown-Out Reset
Analog Features
10-bit, 8-channel A/D Converter
Brown-Out Reset
Program
memory
(FLASH)
is
used
for
storing
written
program.
Since memory made in FLASH technology can be programmed and cleared more than once, it
makes this microcontroller suitable for device development.
EEPROM - data memory that needs to be saved when there is no supply.
It is usually used for storing important data that must not be lost if power supply suddenly stops.
For instance, one such data is an assigned temperature in temperature regulators. If during a loss
of power supply this data was lost, we would have to make the adjustment once again upon
return
of
supply.
Thus
our
device
looses
on
self-reliance.
CENTRAL PROCESSING UNIT has a role of connective element between other blocks
in the microcontroller. It coordinates the work of other blocks and executes the user program.
CISC, RISC
It has already been said that PIC16F877A has a RISC architecture. This term is often
found in computer literature, and it needs to be explained here in more detail. Harvard
architecture is a newer concept than von-Neumann's. It rose out of the need to speed up the work
of a microcontroller. In Harvard architecture, data bus and address bus are separate. Thus a
greater flow of data is possible through the central processing unit, and of course, a greater speed
of work. Separating a program from data memory makes it further possible for instructions not to
have to be 8-bit words. PIC16F877A uses 14 bits for instructions which allows for all
instructions to be one word instructions. It is also typical for Harvard architecture to have fewer
instructions than von-Neumann's, and to have instructions usually executed in one cycle.
Microcontrollers with Harvard architecture are also called "RISC microcontrollers".
RISC stands for Reduced Instruction Set Computer. Microcontrollers with von-Neumann's
architecture are called 'CISC microcontrollers'. Title CISC stands for Complex Instruction Set
Computer.
Since PIC16F877A is a RISC microcontroller, that means that it has a reduced set of
instructions, more precisely 35 instructions. (Ex. Intel's and Motorola's microcontrollers have
over hundred instructions) All of these instructions are executed in one cycle except for jump and
branch instructions. According to what its maker says, PIC16F877A usually reaches results of
2:1 in code compression and 4:1 in speed in relation to other 8-bit microcontrollers in its class.
Applications
PIC16F877A perfectly fits many uses, from automotive industries and controlling home
appliances to industrial instruments, remote sensors, electrical door locks and safety devices. It is
also ideal for smart cards as well as for battery supplied devices because of its low consumption.
EEPROM memory makes it easier to apply microcontrollers to devices where permanent
storage of various parameters is needed (codes for transmitters, motor speed, receiver
frequencies, etc.). Low cost, low consumption, easy handling and flexibility make PIC16F877A
applicable even in areas where microcontrollers had not previously been considered (example:
timer functions, interface replacement in larger systems, coprocessor applications, etc.).
System Programmability of this chip (along with using only two pins in data transfer)
makes possible the flexibility of a product, after assembling and testing have been completed.
This capability can be used to create assembly-line production, to store calibration data available
only after final testing, or it can be used to improve programs on finished products.
Pipelining
Instruction cycle consists of cycles Q1, Q2, Q3 and Q4. Cycles of calling and executing
instructions are connected in such a way that in order to make a call, one instruction cycle is
needed, and one more is needed for decoding and execution. However, due to pipelining, each
instruction is effectively executed in one cycle. If instruction causes a change on program
counter, and PC doesn't point to the following but to some other address (which can be the case
with jumps or with calling subprograms), two cycles are needed for executing an instruction.
This is so because instruction must be processed again, but this time from the right address.
Cycle of calling begins with Q1 clock, by writing into instruction register (IR). Decoding and
executing begins with Q2, Q3 and Q4 clocks.
used up for reading in the first instruction from a subprogram at address SUB_1.TCY5 executes
the first instruction from a subprogram SUB_1 and reads in the next one.
Pin description
PIC16F877A has a total of 40 pins. It is most frequently found in a DIP40 type of case
but can also be found in SMD case which is smaller from a DIP. DIP is an abbreviation for Dual
In Package. SMD is an abbreviation for Surface Mount Devices suggesting that holes for pins to
go through when mounting aren't necessary in soldering this type of a component.
RELAY
A relay is
Many
relays
use
an electromagnet to
mechanically operate a switch, but other operating principles are also used, such as solid-state
relays. Relays are used where it is necessary to control a circuit by a low-power signal (with
complete electrical isolation between control and controlled circuits), or where several circuits
must be controlled by one signal. The first relays were used in long distance telegraph circuits as
amplifiers: they repeated the signal coming in from one circuit and re-transmitted it on another
circuit. Relays were used extensively in telephone exchanges and early computers to perform
logical operations.
A type of relay that can handle the high power required to directly control an electric
motor or other loads is called a contactor. Solid-state relays control power circuits with
no moving parts, instead using a semiconductor device to perform switching. Relays with
calibrated operating characteristics and sometimes multiple operating coils are used to protect
electrical circuits from overload or faults; in modern electric power systems these functions are
performed by digital instruments still called "protective relays".
When an electric current is passed through the coil it generates a magnetic field that
activates the armature, and the consequent movement of the movable contact(s) either makes or
breaks (depending upon construction) a connection with a fixed contact. If the set of contacts
was closed when the relay was de-energized, then the movement opens the contacts and breaks
the connection, and vice versa if the contacts were open. When the current to the coil is switched
off, the armature is returned by a force, approximately half as strong as the magnetic force, to its
relaxed position. Usually this force is provided by a spring, but gravity is also used commonly in
industrial motor starters. Most relays are manufactured to operate quickly. In a low-voltage
application this reduces noise; in a high voltage or current application it reduces arcing.
When the coil is energized with direct current, a diode is often placed across the coil to
dissipate the energy from the collapsing magnetic field at deactivation, which would otherwise
generate a voltage spike dangerous to semiconductor circuit components. Some automotive
relays include a diode inside the relay case. Alternatively, a contact protection network consisting
of a capacitor and resistor in series (snubbercircuit) may absorb the surge. If the coil is designed
to be energized with alternating current (AC), a small copper "shading ring" can be crimped to
the end of the solenoid, creating a small out-of-phase current which increases the minimum pull
on the armature during the AC cycle.[1]
APPLICATIONS
Relays are used wherever it is necessary to control a high power or high voltage circuit
with a low power circuit. The first application of relays was in long telegraph systems, where the
weak signal received at an intermediate station could control a contact, regenerating the signal
for further transmission. High-voltage or high-current devices can be controlled with small, low
voltage wiring and pilots switches. Operators can be isolated from the high voltage circuit. Low
power devices such as microprocessors can drive relays to control electrical loads beyond their
direct drive capability. In an automobile, a starter relay allows the high current of the cranking
motor to be controlled with small wiring and contacts in the ignition key.
Electromechanical
switching
systems
exchanges made extensive use of relays in ancillary control circuits. The Relay Automatic
Telephone Company also manufactured telephone exchanges based solely on relay switching
techniques designed by Gotthilf Ansgarius Betulander. The first public relay based telephone
exchange in the UK was installed in Fleetwood on 15 July 1922 and remained in service until
1959.
The use of relays for the logical control of complex switching systems like telephone
exchanges was studied by Claude Shannon, who formalized the application of Boolean
algebra to relay circuit design in A Symbolic Analysis of Relay and Switching Circuits. Relays
can perform the basic operations of Boolean combinatorial logic. For example, the boolean AND
function is realised by connecting normally open relay contacts in series, the OR function by
connecting normally open contacts in parallel. Inversion of a logical input can be done with a
normally-closed contact. Relays were used for control of automated systems for machine tools
and production lines. The Ladder programming language is often used for designing relay
logic networks.
Early electro-mechanical computers such as the ARRA, Harvard Mark II, Zuse Z2,
and Zuse Z3 relays for logic and working registers. However, electronic devices proved faster
and easier to use.
Because relays are much more resistant than semiconductors to nuclear radiation, they
are widely used in safety-critical logic, such as the control panels of radioactive waste-handling
machinery. Electromechanical protective relays are used to detect overload and other faults on
electrical lines by opening and closing circuit breakers.
ZIGBEE MODULE
ZigBee is a specification for a suite of high-level communication protocols used to
create personal area networks built from small, low-power digital radios. ZigBee is based on
an IEEE 802.15.4 standard. Though its low power consumption limits transmission distances to
10100
meters line-of-sight,
depending
on
power
output
and
environmental
characteristics, ZigBee devices can transmit data over long distances by passing data through
a mesh network of intermediate devices to reach more distant ones. ZigBee is typically used in
low data rate applications that require long battery life and secure networking (ZigBee networks
are secured by 128 bit symmetric encryption keys.) ZigBee has a defined rate of 250 kbit/s, best
suited for intermittent data transmissions from a sensor or input device. Applications include
wireless light switches, electrical meters with in-home-displays, traffic management systems, and
other consumer and industrial equipment that requires short-range low-rate wireless data transfer.
The technology defined by the ZigBee specification is intended to be simpler and less expensive
than other wireless personal area networks (WPANs), such as Bluetooth or Wi-Fi.
OVERVIEW:
ZigBee is a low-cost, low-power, wireless mesh network standard targeted at wide
development of long battery life devices in wireless control and monitoring applications. Zigbee
devices have low latency, which further reduces average current. ZigBee chips are typically
integrated with radios and with microcontrollers that have between 60-256 KB flash memory.
ZigBee operates in the industrial, scientific and medical (ISM) radio bands: 2.4 GHz in most
jurisdictions worldwide; 784 MHz in China, 868 MHz in Europe and 915 MHz in the USA and
Australia. Data rates vary from 20 kbit/s (868 MHz band) to 250 kbit/s (2.4 GHz band).
The
ZigBee
network
layer
natively supports
and
generic Mesh networking. Every network must have one coordinator device, tasked with its
creation, the control of its parameters and basic maintenance. Within star networks, the
coordinator must be the central node. Both trees and meshes allow the use of ZigBee routers to
extend communication at the network level.
ZigBee builds on the physical layer and media access control defined in IEEE standard
802.15.4 for low-rate WPANs. The specification includes four additional key components:
network layer, application layer, ZigBee device objects (ZDOs) and manufacturer-defined
application objects which allow for customization and favor total integration. ZDOs are
responsible for a number of tasks, including keeping track of device roles, managing requests to
join a network, as well as device discovery and security .
Released specifications:
IP 1.0
Gateway 1.0
Retail Services
The ZigBee Smart Energy V2.0 specifications define an IP-based protocol to monitor,
control, inform and automate the delivery and use of energy and water. It is an enhancement of
the ZigBee Smart Energy version 1 specifications, [14] adding services for plug-in electric
vehicle (PEV) charging, installation, configuration and firmware download, prepay services, user
information and messaging, load control, demand response and common information and
application profile interfaces for wired and wireless networks. It is being developed by partners
including:
HomeGrid Forum responsible for marketing and certifying ITU-T G.hn technology and
products
IPSO Alliance
SunSpec Alliance
Wi-Fi Alliance.
In 2009 the RF4CE (Radio Frequency for Consumer Electronics) Consortium and ZigBee
Alliance agreed to jointly deliver a standard for radio frequency remote controls. ZigBee RF4CE
is designed for a wide range of consumer electronics products, such as TVs and set-top boxes. It
promises many advantages over existing remote control solutions, including richer
communication and increased reliability, enhanced features and flexibility, interoperability, and
no line-of-sight barrier.[15] The ZigBee RF4CE specification lifts off some networking weight and
does not support all the mesh features, which is traded for smaller memory configurations for
lower cost devices, such as remote control of consumer electronics.
With the introduction of the second ZigBee RF4CE application profile in 2012 and increased
momentum in MSO market, the ZigBee RF4CE team provides an overview on current status of
the standard, applications, and future of the technology.
standard
specifies
operation
in
the
unlicensed
915 MHz (Americas and Australia) and 868 MHz (Europe) ISM bands. Sixteen channels are
allocated in the 2.4 GHz band, with each channel spaced 5 MHz apart, though using only 2 MHz
of bandwidth. The radios use direct-sequence spread spectrum coding, which is managed by the
digital stream into the modulator. Binary phase-shift keying (BPSK) is used in the 868 and
915 MHz bands, and offset quadrature phase-shift keying (OQPSK) that transmits two bits per
symbol is used in the 2.4 GHz band.
The raw, over-the-air data rate is 250 kbit/s per channel in the 2.4 GHz band, 40 kbit/s per
channel in the 915 MHz band, and 20 kbit/s in the 868 MHz band. The actual data throughput
will be less than the maximum specified bit rate due to the packet overhead and processing
delays. For indoor applications at 2.4 GHz transmission distance may be 1020 m, depending on
the construction materials, the number of walls to be penetrated and the output power permitted
in that geographical location. Outdoors with line-of-sight, range may be up to 1500 m depending
on power output and environmental characteristics.
LCD DISPLAY
LCD (Liquid Crystal Display) screen is an electronic display module and find a wide
range of applications. A 16x2 LCD display is very basic module and is very commonly used in
various devices and circuits. These modules are preferred over seven segments and other multi
segment LEDs. The reasons being: LCDs are economical; easily programmable; have no
limitation of displaying special & even custom characters (unlike in seven segments), animations
and so on.A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In
this LCD each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely,
Command and Data.The command register stores the command instructions given to the LCD. A
command is an instruction given to LCD to do a predefined task like initializing it, clearing its
screen, setting the cursor position, controlling display etc. The data register stores the data to be
displayed on the LCD. The data is the ASCII value of the character to be displayed on the LCD.
PIN DIAGRAM
Pin Description:
Pin
Function
Name
No
1
2
3
Ground (0V)
Supply voltage; 5V (4.7V 5.3V)
Contrast
adjustment;
through
Selects command register when low; and data register when high
Register Select
5
6
7
8
9
10
11
12
Read/write
Enable
DB0
DB1
DB2
DB3
DB4
DB5
variable
Ground
Vcc
resistor VEE
13
14
15
16
DB6
DB7
Led+
Led-