You are on page 1of 25

POWER LINE MONITORING &

PROTECTION
Contents
 Introduction
 Linear Power Supply
 Rectifiers
 Regulators
 PIC Microcontroller
 Interfacing a PIC with a LCD
 Relay
 Conclusion
Introduction
 There is a need to monitor the voltage,
current & frequency to protect devices from
variation of these parameters. Our device is
based on PIC16F877A microcontroller & it
monitors voltage, frequency & current & if
these parameters go below or above the
set limit a relay is turned ON which can be
used to cut the power till the parameters
return back to normal
Block Diagram
Linear Power Supply:
 An AC powered linear power supply
usually uses a transformer to convert
the voltage from the wall outlet
(mains) to a different, usually a lower
voltage.
 To produce DC, a rectifier is used. A
capacitor is used to smooth the
pulsating current from the rectifier.
Rectifiers
 A rectifier is an electrical device that
converts alternating current (AC) to
direct current (DC), a process known
as rectification. Rectifiers have many
uses including as components of
power supplies and as detectors of
radio signals
Regulators:

 Regulator (automatic control) is a


device which has the function of
maintaining a designated
characteristic. A voltage regulator is
an electrical regulator designed to
automatically maintain a constant
voltage level.
PIC Microcontroller
 PIC16F877A is a small piece of semiconductor
integrated circuits. The package type of this
integrated circuits is DIP package

 Additional components that you need to make this IC


work are just a 5V power supply adapter, a 20MHz
crystal oscillator and 2 units of 22pF capacitors.
Core Architecture:

The PIC architecture is distinctively minimalist. It


is characterized by the following features:
 Separate code and data spaces (Harvard
architecture)
 A small number of fixed length instructions
 Most instructions are single cycle execution
 A single accumulator (W), the use of which (as
source operand) is implied (i.e. is not encoded
in the opcode)
Core Architecture:

 All RAM locations function as registers as both source


and/or destination of math and other functions.
 A hardware stack for storing return addresses
 A fairly small amount of addressable data space
(typically 256 bytes), extended through banking
 Data space mapped CPU, port, and peripheral
registers
 The program counter is also mapped into the data
space and writable (this is used to implement indirect
jumps).
Data Space (RAM):
PICs have a set of registers that function as general purpose
RAM. Special purpose control registers for on-chip hardware
resources are also mapped into the data space.
Code space:
All PICs feature Harvard architecture, so the code space and the
data space are separate. PIC code space is generally
implemented as EPROM, ROM, or flash ROM.
Word Size:
The word size of PICs can be a source of confusion. All PICs
handle (and address) data in 8-bit chunks, so they should be
called 8-bit microcontrollers
Stacks:
 PICs have a hardware call stack,
which is used to save return
addresses. The hardware stack is not
software accessible on earlier
devices, but this changed with the 18
series devices.
Instruction Set
 The instruction set includes
instructions to perform a variety of
operations on registers directly, the
accumulator and a literal constant or
the accumulator and a register, as
well as for conditional execution, and
program branching.
 In general, PIC instructions fall into 5 classes:
 Operation on W with 8-bit immediate ("literal")
operand (movlw)(and lw).
 Operation with W and indexed register (addwf reg,w)
( addwf reg,f)
 Bit operations (set or clear a bit, and test and skip on
set/clear )
 Control transfers (goto and call )
 Zero Operand Instructions(return from subroutine,
and sleep to enter low-power mode)
Pin Diagram
 5 sets of input and output ports (total of 33
ports)
 Analog-digital converter of 10 bits of
resolution and 8 channels of entry
 Peripheral parallel and serial
communication (USART and MSSP)
 CPC Modules
 3 Timers (1 to 16 bits and 2 of 8 bits)
 Watchdog timer
Keypad:
 A KEYPAD is a set of buttons arranged in a block which
usually bear digits and other symbols but not a complete set of
alphabetical letters.


LCD Display
Interfacing a PIC with a LCD
Relay:
 A relay is an electrically operated switch. Current flowing
through the coil of the relay creates a magnetic field which
attracts a lever and changes the switch contacts. The coil
current can be on or off so relays have two switch positions and
they are double throw (changeover) switches.

 COM = Common, always connect to this, it is the moving part of


the switch.
 NC = Normally Closed, COM is connected to this when the relay
coil is off.
 NO = Normally Open, COM is connected to this when the relay
coil is on.
Choosing a Relay

Physical size and pin arrangement

Coil voltage

Coil resistance
MP Lab Compiler
MPLAB C Compiler is a cross-compiler that
runs on a PC and produces code that can
be executed by the Microchip PIC18XXXX
family of microcontrollers.
ATMEL ISP:
ATMEL Microcontroller can programming
with ISP(In-System Programming) which
easy to develop the applications without
insert/remove microcontroller.
Conclusion:

 Increasing worldwide power demands are


driving an increase in the number of power
lines and power-line substations. As more
and more automated monitoring- and fault-
detection systems are required, the trend
will be towards systems with a large
number of channels. With multiple ADCs on
each board, efficient use of board area and
power dissipation become critical as system
designers try to reduce cost while
increasing performance.

You might also like