You are on page 1of 84

A

Project report
On
“PASSWORD BASED CIRCUIT BREAKER”
Submitted to

‘SHIVAJI UNIVERSITY,KOLHAPUR’

In Partial Fullfilment of Diploma in

Electronics And Telecommunication


Submitted By

Under the Gudience of

Department of Electronics and Telecommunication Engg


(2012-2013)
CERTIFICATE

This is to certify that ………………………………. have completed the project report

entiled “Industrial Control & Automation Using Microcontroller” in the satisfactory


manner as

per the rules of ‘SHIVAJI UNIVERSITY KOLHAPUR’for the academic year 2012-13.This

project report is the record of students own work carried out by them under by my

supervision and guidance in the satisfactory manner.

(H.O.D) (guide)
ACKNOWLEDGEMENT

Our sincere thanks go to ………….. our guide for his guidance and valueable

assistance from time to time,during entire work.

Lastly we would like to express our sincere gratitude tpwards our teaching staff,non

teaching staff who helped us during the entire project.

Your sincerely,

……….
……………
…………….
………………
DECLARATION

We hereby declared that the project report entiled “Industrial Control


& Automation Using Microcontroller” written and submitted by us under the
guidance

…………… is our original work. We understand that any such

copying is liable to be punished in any by the university authorites

deem fit.This work has been submitted by our sincere efforts.

CLASS:…………..

PLACE:…………

DATE:

……………
…………….
………………….
……………………
………………
INDEX

Contents Page No
1 Introduction 3
2 Block Diagram 7
3 Block Diagram Description 8
4 Circuit Diagram 10
5 System Hardware designing 11
6 System software designing 12
7 PCB Layout 25
8 Advantages and Limitations 30
9 Future Enhancement 31
10 Component Description 32
11 Conclusion 49
12 References 50
13 Data sheet 53
INTRODUCTION

About our project:

This project is designed to control a circuit breaker with help of a Password &
Thumb only. In this project the Password & Thumb is enter by using keypad. Fatal
electrical accidents are happen due to the line man are increase during the electrical line
repair due to the lack of communication and miscommunication between the
maintenance staff and the electric substation staff. This project provides a solution,
which can ensure the safety of the maintenance staff e.g. line man. This project is used to
control to turn ON/OFF the line with the line man only. This system required Password
& Thumb to operate the circuit breaker (ON/OFF). This system is fully controlled by a
8bit microcontroller which is from 8051 families. The entered Password & Thumb is
compared with the Password & Thumb store in the ROM of the microcontroller. If the
entered Password & Thumb is correct, then only the line can be turn ON/OFF.
Activation or deactivation of the circuit breaker is indicated by a lamp (ON/OFF). This
project is designed to operate the system by only authorized person to avoid such
accidents.
Block Diagram
3. BLOCK DIAGRAM DESCRIPTION:

B. Microcontroller

The AT89c51 microcontroller is used as central processing unit of our project.


Microcontroller is a single chip that contents the Processor, ROM, EPROM, EEPROM,
RAM, clock and I/O ports. ATMEGA16A is a8 bit microcontroller with 16kbytes.

Fig. 2. Pin Diagram.

Circuit Diagram

Fig. 3. Circuit Diagram of Password & Thumb Based Circuit Breaker.


D. LCD Display

Fig. 4. LCD Display.

LCDs mostly connected to the microcontrollers are 16x2 and 20x2 displays.

That means 16 characters per line by 2 lines and 20 characters per line by 2 lines, respectively.

LCD having 16 pins for interfacing & signalling & VCCS & GNDS.

There are three control lines are EN, RS, and RW etc.

EN=Enable (It used for tell the LCD to sending data)

RS=Register Select (When RS is High (1),then data being sent is text data)

(When RS is Low (0), then data is treated as a command)

7) R/W=Read/Write (When RW is low (0),then the data Read the data)

(When RW is High (1), then the data write the data)

E. Matrix Keypad

A keypad is a set of buttons arranged in a block or “pad” which usually bear digits, symbols
and usually a complete set of alphabetical letters. If it mostly contains numbers then it can also be
called a numeric keypad. In order to detect which key is pressed from the matrix, the row lines are to
be made low one by one and read the columns. Assume that if Row1 is made low, then read the
columns. If any of the key in row1 is pressed then correspondingly the column 1will give low that is
if second key is pressed in Row1, then column2 will give low.
Fig. 5. Matrix Keypad.

F. Relay

Relay is a electromagnetic switch which used to control the electrical device.

Copper core magnetic fluxes play the main role here.

The relay’s switch connections are labelled COM, NC and NO:

COM = Common, it is the moving part of the itch.

NC = Normally Closed, when the relay coil is off then the COM is connected to the NC.

NO = Normally Open, when the relay coil is on then the COM is connected to the NO.
Fig. 6. Circuit Diagram of Relay

G. Power Supply

Microcontroller requires +5V supply for its working. This is derived


from 9V transformer. 9V transformer is connected to diode rectifier circuit,
after converting AC to DC by using rectifier is 9V dc is regulated to +5V by
using voltage regulator 7805.This +5V supply is applied to microcontroller

Fig. 7. Power supply

Dept. of ENTC Engg. Page 13


H. Flow Chart

Fig. 8. Flow chart

Algorithm

Step 1:.Start.

Step 2: Initialize the system

Step 3: Read the input or Password & Thumb from keypad.

Step 4: If Password & Thumb is correct then Breaker is ON/OFF.

Step 5: If the Password & Thumb is wrong then go to step no.3..

Step 6: Stop.

Dept. of ENTC Engg. Page 14


I.
This is a fingure print sensor module with TTL UART interface for direct
connections to microcontroller UART or to PC through MAX232 / USB-Serial
adapter. The user can store the finger print data in the module and can configure
it in 1:1 or 1: N mode for identifying the person.The FP module can directly
interface with 3v3 or 5v Microcontroller. A level converter (like MAX232) is
required for interfacing with PC serial port.
Optical biometric fingerprint reader with great features and can be
embedded into a variety of end products, such as: access control, attendance,
safety deposit box, car door locks
Features
Integrated image collecting and algorithm chip together, ALL-in-One
Fingerprint reader can conduct secondary development, can be embedded
into a variety of end products
Low power consumption, low cost, small size, excellent performance
Professional optical technology, precise module manufacturing
techniques
Good image processing capabilities, can successfully capture image up to
resolution 500 dpi

Dept. of ENTC Engg. Page 15


5. System Hardware designing

System hardware designing is divided in to 2 sections


A. CPU Board
B. Input Board
C. Output Board

A. CPU Board Designing:


In our project we are using 89C51 micro-controller as CPU. 89C51 micro-
controller requires some extra supporting hardware like + 5 volts power supply, POR
as well as manual RESET, Clock generator and pull up resisters.

1. Power supply

For getting +5 volts supply, the + 12 volts supply from power supply output is
taken. And it is given to 7805. The minimum input to 7805 is +7 Vdc and Maximum
input is + 35 vdc. And we are giving + 12 Vdc as input to the 7805. Therefore the
output of the 7805 is constant regulated +5 Vdc.

2. POR and Manual RESET:

When we switch ON the power supply of the CPU board then micro-
controller must be RESET to start the program execution from 0000H memory
location. Therefore POR is must. POR means Power On Reset. For this purpose we
have to use RC differentiator circuit. RC differentiator circuit will provide logic High
pulse to RESET pin of 89C51, when you switch ON the power supply.
Some times we requires manual RESET. For this purpose one push to ON tact
switch is used. When you press this tact switch then logic high signal is given to the
RESET pin of the Micro-controller 89C51.

Dept. of ENTC Engg. Page 16


3. Clock Generator:

The maximum clock frequency of the Micro-controller 89C51 is 24 Mhz.


Therefore we can use any frequency less then 24 Mhz. But if we are using PC
interfacing then for selecting the bits per second we have to use particular crystal. For
selecting 9600 bits per second we have to use 11.0593 MHz crystal. Now just
connecting the crystal is not sufficient to generate the clock, it requires two additional
capacitors to generate the starting spike pulse.

4. External Pull Up resister:

In micro-controller port 0 does not have internal pull up resister therefore we


have to use the external pull up resister at port 0. At other ports external pull up
resistor is optional. But we had connected the external pull up registers for other ports
also.

Dept. of ENTC Engg. Page 17


B. INPUT Board Designing:

In INPUT board we have to select the operation mode. The selection switches
are used to select the following modes PCB Etching machine Start And PCB Etching
machine stop.
Again in input mode we are using limit switches. They are normally open.
When direction is detected then they will close. We will gate logic one for direction
detection, otherwise logic zero.

C. OUTPUT Board Designing:

To drive the motor we are using the special ICL293D. The L293D are quad
push-pull drivers capable of delivering output currents to 1A or 600mA per channel
respectively. Each channel is controlled by a TTL-compatible logic input. This IC is
used to drive the motor. Which drives the PCB etching machine.

Dept. of ENTC Engg. Page 18


Dept. of ENTC Engg. Page 19
COMPONENT DESCRIPTION

10.1 Microcontroller 89C51

The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer


with 4K bytes of flash programmable and erasable read only memory (PEROM). The
device is manufactured using Atmel’s high-density nonvolatile memory technology
and is compatible with the industry-standard MCS-51 instruction set and pin out. The
on-chip Flash allows the program memory to be reprogrammed in-system or by a
conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU
with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer
which provides a highly-flexible and cost-effective solution to many embedded
control applications.
The AT89C51 is designed with static logic for operation down to zero
frequency and supports two Software selectable power saving modes. The Idle Mode
stops the CPU while allowing the RAM, timer / counters, serial port and interrupt
system to continue functioning. The Power-down Mode saves the RAM contents but
freezes the oscillator disabling all other chip functions until the next Hardware reset.

Dept. of ENTC Engg. Page 20


Features of 89C51

Following are the features of 89C51 Micro-controller as per the datasheet


given by Atmel-
i. Compatible with MCS-51TM Products.
ii. 4K Bytes of In-system Programmable Flash Memory Endurance
iii. 1,000 Write / Erase Cycles.
iv. Fully Static Operation : 0 Hz to 24 MHz
v. Three-level Program Memory Lock
vi. 128 x 8-bit Internal RAM
vii. 32 Programmable I / O Lines.
viii. Two 16-bit Timer / Counters
ix. Six Interrupt Sources
x. Programmable Serial Channel
xi. Low-power Idle and Power-down Modes

Dept. of ENTC Engg. Page 21


Pin Diagram of 89C51 Microcontroller

Pin Description
VCC: - Supply Voltage
GND: - Ground

Port 0:-

Port 0 is an 8-bit open-drain bi-directional I /O port. As an output port, each


pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be
used as high impedance inputs. Port 0 may also be configured to be the multiplexed
low order address / data bus during accesses to external program and data memory. In
this mode P0 has internal pull-ups. Port 0 also receives the code bytes during Flash

Dept. of ENTC Engg. Page 22


programming, and outputs the code bytes during program verification. External pull-
ups are required during program verification.

Port 1:-

Port 1 is an 8-bit bi-directional I / O port with internal pull-ups. The port


1output buffers can sink/source four TTL inputs. When 1s are written to port 1 pins
they are pulled high by the internal pull-ups and can be used as inputs. As inputs ,
Port 1 pins that are externally being pulled low will source current (IIL) because of
the internal pull-ups. Port 1 also receives the low-order address bytes during Flash
programming and verification.

Port 2:-

Port 2 is an 8-bit bi-directional I / O port with internal pull-ups. The port 2


output buffers can sink / source four TTL inputs. When 1s are written to Port 2 pins
they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port
2 pins that are externally being pulled low will source current (IIL) because of the
internal pull-ups. Port 2 emits the high-order address byte during fetches from
external program memory and during accesses to external data memory that uses 16-
bit addresses (MOVX @ DPTR). In this application, it uses strong internal pull-ups
when emitting 1s. During accesses to external data memory that uses 8-bit addresses
(MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register. Port 2
also receives the high-order address bits and some control signals during Flash
programming and verification.

Dept. of ENTC Engg. Page 23


Port 3:-

Port 3 is an 8-bit bi-directional I /O port with internal pull-ups. The Port 3


output buffers can sink / source four TTL inputs. When 1s are written to Port 3 pins
they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port
3 pins that are externally being pulled low will source Current (IIL) because of the
pull-ups.
Port 3 also serves the functions of various special features of the AT89C51 as
listed below ,Port Pin Alternate Functions –
P3.0 RXD (Serial input port)
P3.1 TXD (Serial output port)
P3.2 INT0 (External Interrupt 0)
P3.3 INT1 (External Interrupt 1)
P3.4 T0 (Timer 0 external input)
P3.5 T1 (Timer 1 external input)
P3.6 WR (External data memory write strobe)
P3.7 RD (External data memory read strobe)

Dept. of ENTC Engg. Page 24


RST:-
Reset input , A high on this pin for two machine cycles while the oscillator is
running resets the device.

ALE / PROG:-
Address Latch Enable output pulse for latching the low byte of the address
during accesses to external memory. This pin is also the program pulse input (PROG)
during Flash programming. In normal operation ALE is emitted at a constant rate 1 /
6 the oscillator frequency, and may be used for external timing or clocking purposes.
Note, however, that one ALE pulse is skipped during each access to external Data
Memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location
8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction.

Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if
the Microcontroller is in external execution mode.

Dept. of ENTC Engg. Page 25


PSEN:-

Program Store Enable is the read strobe to external program memory. When
the AT89C51 is executing code from external program memory, PSEN is activated
twice each cycle, except that two PSEN activations are skipped during each access to
external data memory.

EA / VPP:-

External Access Enable. EA must be strapped to GND in order to enable the


device to fetch code from external program memory locations starting at 0000H up to
FFFFH. Note, however , that if lock bit 1 is programmed , EA will be internally
latched on reset. EA should be strapped to VCC for internal program executions. The
pin also receives the 12-volt programming enable voltage (VPP) during Flash
programming, for parts that require 12-volt VPP.

XTAL1:-

Input to the inverting oscillator amplifier and input to the internal clock
operating circuit.

XTAL2:-

Output from the inverting oscillator amplifier.

Dept. of ENTC Engg. Page 26


10.2 Three Terminal Voltage Regulator: -

General Features: -
A three terminal voltage regulator is a regulator in which the output voltage is
set at some predetermined value. Such regulators do not
require an external feedback connection. Hence, only three
terminals are required for device of such types, input (Vin)
output (Vo) and a ground terminal. Since the regulator
operates at a preset output voltage the current limiting
resistor is also internal to the device. The main advantages
of such regulators are the simplicity of connections to the external circuit and the
minimum of external components. Fig. Shows the basic circuit configuration of the
three terminal voltage regulator. Although, the three terminal regulators offers only
fixed output voltages, there are wide variety of voltages available, both positive and
negative. The output current range from 100 mA to 3 A.

LM 78 MXX series 3 terminal positive voltage regulators.

General description: -
The LX78MXX series of three terminal regulators is available with several
fixed output voltages making them useful in a wide range of applications. The voltage
available allows these regulators to be used in logic system, instrumentation, Hi – Fi
and other solid state electronic equipment. Although designed primarily devices can
be used with external component to obtain adjustable voltage and current.

Features:
Internal thermal overload protection.
NO external components required.
Output transistor safe area protection.
Internal short circuit current limit.

Dept. of ENTC Engg. Page 27


Circularity allows start up even if output is pulled to negative voltage (I
supplies)

Absolute maximum ratings:


Input voltage 35 V
Internal power dissipation Internally limited.
Operating temperature range 00 C to 700 C
Maximum junction temperature + 1250C
Storage temperature range - 650 C to 1500 C
Lead temperature + 2300 C

Dept. of ENTC Engg. Page 28


10.3Capacitors

Capacitors store electric charge. They are used to smooth varying DC supplies
by acting as a reservoir of charge. They are also used in filter circuits because
capacitors easily pass AC (changing) signals but they block DC (constant) signals.

Polarised capacitors (large values, 1µF +)

Electrolytic capacitors are polarized and they


must be connected the correct way round, at least
one of their leads will be marked + or -. They are not damaged by heat when
soldering.
There are two designs of electrolytic capacitors; axial where the leads are
attached to each end (220µF in picture) and radial where both leads are at the same
end (10µF in picture). Radial capacitors tend to be a little smaller and they stand
upright on the circuit board.
It is easy to find the value of electrolytic capacitors because they are clearly
printed with their capacitance and voltage rating. The voltage rating can be quite low
and it should always be checked when selecting an electrolytic capacitor.

Dept. of ENTC Engg. Page 29


Unpolarised capacitors (small values, up to 1µF)

Small value capacitors are unpolarised and may


be connected either way round. They are not damaged
by heat when soldering, except for one unusual type
(polystyrene). It can be difficult to find the values of
these small capacitors because there are many types of
them and several different labeling systems. Many
small value capacitors have their value printed but
without a multiplier, so you need to use experience to
work out what the multiplier should be!

10.4 Diodes

Diodes allow electricity to flow in only one direction. The


arrow of the circuit symbol shows the direction in which
the current can flow. Diodes are the electrical version of a
valve and early diodes were actually called valves.

Forward Voltage Drop

Electricity uses up a little energy pushing its way through the diode, rather
like a person pushing through a door with a spring. This means that there is a small
voltage across a conducting diode, it is called the forward voltage drop and is about
0.7V for all normal diodes, which are made from silicon. The forward voltage drop of
a diode is almost constant whatever the current passing through the diode so they
have a very steep characteristic (current-voltage graph).

Dept. of ENTC Engg. Page 30


Reverse Voltage

When a reverse voltage is applied a perfect diode does not conduct, but all
real diodes leak a very tiny current of a few µA or less. This can be ignored in most
circuits because it will be very much smaller than the current flowing in the forward
direction. However, all diodes have a maximum reverse voltage (usually 50V or
more) and if this is exceeded the diode will fail and pass a large current in the reverse
direction, this is called breakdown.
Ordinary diodes can be split into two types: Signal diodes which pass small
currents of 100mA or less and Rectifier diodes which can pass large currents. In
addition there are LED (which have their own page) and Zener diodes (at the bottom
of this page).

10.5 Light Emitting Diodes (LEDs)

LEDs emit light when an electric current passes through them.

Dept. of ENTC Engg. Page 31


Colours of LEDs

LEDs are available in red, orange, amber, yellow, green, blue and white. Blue
and white LEDs are much more expensive than the other colours.
The colour of an LED is determined by the semiconductor material, not by the
colouring of the 'package' (the plastic body). LEDs of all colours are available in
uncoloured packages which may be diffused (milky) or clear (often described as
'water clear'). The coloured packages are also available as diffused (the standard type)
or transparent.

10.6 Presets
These are miniature versions of the standard
variable resistor. They are designed to be mounted directly
onto the circuit board and adjusted only when the circuit is
built. For example to set the frequency of an alarm tone or
the sensitivity of a light-sensitive circuit. A small
screwdriver or similar tool is required to adjust presets.
Presets are much cheaper than standard variable resistors so they are
sometimes used in projects where a standard variable resistor would normally be
used.
Multi-turn presets are used where very precise adjustments must be made. The
screw must be turned many times (10+) to move the slider from one end of the track
to the other, giving very fine control.

10.7 Transistors

Transistors amplify current, for example they can be used to


amplify the small output current from a logic chip so that it can
operate a lamp, relay or other high current device. In many circuits a

Dept. of ENTC Engg. Page 32


resistor is used to convert the changing current to a changing voltage, so the transistor
is being used to amplify voltage.
A transistor may be used as a switch (either fully on with maximum current,
or fully off with no current) and as an amplifier (always partly on). The amount of
current amplification is called the current gain, symbol hFE.

Types of transistor

There are two types of standard transistors, NPN


and PNP, with different circuit symbols. The letters refer
to the layers of semiconductor material used to make the
transistor. Most transistors used today are NPN because
this is the easiest type to make from silicon. If you are new
to electronics it is best to start by learning how to use NPN transistors.
The leads are labeled base (B), collector (C) and emitter (E).
These terms refer to the internal operation of a transistor but they are not much help
in understanding how a transistor is used, so just treat them as labels.
10.8 LCD display:

This display contains two internal


byte wise resisters, One for the commands
(RS=0) and second for character to be
displayed (RS=1). It also contains a user
programmed RAM area (the character
RAM) that can be programmed to generate
any desired character that can form using a dot matrix. To distinguish between these
two data areas, the hex command byte 80H will be used to signify that display RAM
address 00H is chosen. Port 1 is used to furnish the command or data byte, and ports
3.2 to 3.4 furnish register select and read/write levels. The display takes varying

Dept. of ENTC Engg. Page 33


amounts of time to accomplish the functions. LCD bit 7 is monitored for a logic high
( Busy ) to ensure the display is not overwritten.

10.9 L293D MOTOR DRIVER:

The L293 and L293D are quad push-pull drivers capable of delivering output
currents to 1A or 600mA per channel respectively. Each channel is controlled by a
TTL-compatible logic input and each pair of drivers (a full bridge) is equipped with
an inhibit input which turns off all four transistors. A separate supply input is
provided for the logic so that it may be run off a lower voltage to reduce dissipation.
Additionally the L293D includes the output clamping diodes within the IC for
complete interfacing with inductive loads. Both devices are available in 16-pin
Batwing DIP packages. They are also available in Power S0IC and Hermetic DIL
packages

FEATURES

· Output Current 1A Per Channel (600mA for L293D)


· Peak Output Current 2A Per Channel (1.2A for L293D)
· Inhibit Facility
· High Noise Immunity
· Separate Logic Supply
· Over-Temperature Protection

Dept. of ENTC Engg. Page 34


Dept. of ENTC Engg. Page 35
System Flowchart:
System program:
a2 0000 ORG 0000H
4 0000 MAIN:
6 0000 ;DIRECTION OF I/O PORT
8 0000 MOV P3,#0FFH ;TO SELECT I/P PORT
9 0003 MOV P2,#00H
10 0006 CLR P1.0
11 0008 CLR P1.1
12 000A CLR P1.2
14 000C MOV R0,#00H
15 000E MOV R1,#00H
16 0010 MOV R2,#00H
17 0012 MOV R3,#00H
19 0014 ;LCD COMMAND
21 0014 MOV DPTR,#COMMAND
22 0017 MOV R7,#04
23 0019 UP: CLR A
24 001A MOVC A,@A+DPTR
25 001B ACALL CMD
26 001D ACALL DELAY
27 001F INC DPTR
28 0020 DJNZ R7,UP
31 0022 MAIN111:
33 0022 MOV A,#80H
34 0024 ACALL CMD
35 0026 MOV R7,#00H
36 0028 MOV DPTR,#NAME1
37 002B RPT7:clr a
38 002C MOVC A,@A+DPTR
39 002D ;MOV P2,A

Dept. of ENTC Engg. Page 36


40 002D ACALL WRT
41 002F ACALL DELAY
42 0031 INC DPTR
43 0032 INC r7
44 0033 CJNE r7,#10H,RPT7
46 0036 MOV A,#0C0H
47 0038 ACALL CMD
48 003A MOV R7,#00H
49 003C MOV DPTR,#NAME2
50 003F RPT71:clr a
51 0040 MOVC A,@A+DPTR
52 0041 ;MOV P2,A
53 0041 ACALL WRT
54 0043 ACALL DELAY
55 0045 INC DPTR
56 0046 INC r7
57 0047 CJNE r7,#10H,RPT71
60 004A SPARK:
61 004A JNB P3.0,SW1
62 004D JNB P3.1,SW2
63 0050 JNB P3.2,SW33
64 0053 JNB P3.3,SW44
65 0056 JNB P3.4,SW55
66 0059 SJMP SPARK
67 005B SW33:
68 005B LJMP SW3
69 005E SW44:
70 005E LJMP SW4
71 0061 SW55:
72 0061 LJMP SW5
75 0064 SW1:

Dept. of ENTC Engg. Page 37


76 0064 INC R0
77 0065 MOV A,#80H
78 0067 ACALL CMD
79 0069 MOV R7,#00H
80 006B MOV DPTR,#TITLE1
81 006E RPT7S:clr a
82 006F MOVC A,@A+DPTR
83 0070 ;MOV P2,A
84 0070 ACALL WRT
85 0072 ACALL DELAY
86 0074 INC DPTR
87 0075 INC r7
88 0076 CJNE r7,#10H,RPT7S
90 0079 MOV A,#0C0H
91 007B ACALL CMD
92 007D MOV R7,#00H
93 007F MOV DPTR,#TITLE2
94 0082 RPT71S:clr a
95 0083 MOVC A,@A+DPTR
96 0084 ;MOV P2,A
97 0084 ACALL WRT
98 0086 ACALL DELAY
99 0088 INC DPTR
100 0089 INC r7
101 008A CJNE r7,#10H,RPT71S
102 008D MOV A,#0C8H
103 008F ACALL CMD
104 0091 MOV A,#'1'
105 0093 ACALL WRT
106 0095 ACALL DELAY
107 0097 ACALL DELAY

Dept. of ENTC Engg. Page 38


108 0099 ACALL DELAY
109 009B ACALL DELAY
110 009D ACALL DELAY
111 009F ACALL DELAY
112 00A1 LJMP SPARK
117 00A4 SW2:
118 00A4 INC R1
119 00A5 MOV A,#80H
120 00A7 ACALL CMD
121 00A9 MOV R7,#00H
122 00AB MOV DPTR,#TITLE1
123 00AE RPT7S3:clr a
124 00AF MOVC A,@A+DPTR
125 00B0 ;MOV P2,A
126 00B0 ACALL WRT
127 00B2 ACALL DELAY
128 00B4 INC DPTR
129 00B5 INC r7
130 00B6 CJNE r7,#10H,RPT7S3
132 00B9 MOV A,#0C0H
133 00BB ACALL CMD
134 00BD MOV R7,#00H
135 00BF MOV DPTR,#TITLE2
136 00C2 RPT71S3:clr a
137 00C3 MOVC A,@A+DPTR
138 00C4 ;MOV P2,A
139 00C4 ACALL WRT
140 00C6 ACALL DELAY
141 00C8 INC DPTR
142 00C9 INC r7
143 00CA CJNE r7,#10H,RPT71S3

Dept. of ENTC Engg. Page 39


144 00CD MOV A,#0C8H
145 00CF ACALL CMD
146 00D1 MOV A,#'2'
147 00D3 ACALL WRT
148 00D5 ACALL DELAY
149 00D7 ACALL DELAY
150 00D9 ACALL DELAY
151 00DB ACALL DELAY
152 00DD ACALL DELAY
153 00DF ACALL DELAY
154 00E1 LJMP SPARK
157 00E4 SW3:
158 00E4 INC R2
159 00E5 MOV A,#80H
160 00E7 ACALL CMD
161 00E9 MOV R7,#00H
162 00EB MOV DPTR,#TITLE1
163 00EE RPT7S2:clr a
164 00EF MOVC A,@A+DPTR
165 00F0 ;MOV P2,A
166 00F0 ACALL WRT
167 00F2 ACALL DELAY
168 00F4 INC DPTR
169 00F5 INC r7
170 00F6 CJNE r7,#10H,RPT7S2
172 00F9 MOV A,#0C0H
173 00FB ACALL CMD
174 00FD MOV R7,#00H
175 00FF MOV DPTR,#TITLE2
176 0102 RPT71S2:clr a
177 0103 MOVC A,@A+DPTR

Dept. of ENTC Engg. Page 40


178 0104 ;MOV P2,A
179 0104 ACALL WRT
180 0106 ACALL DELAY
181 0108 INC DPTR
182 0109 INC r7
183 010A CJNE r7,#10H,RPT71S2
184 010D MOV A,#0C8H
185 010F ACALL CMD
186 0111 MOV A,#'3'
187 0113 ACALL WRT
188 0115 ACALL DELAY
189 0117 ACALL DELAY
190 0119 ACALL DELAY
191 011B ACALL DELAY
192 011D ACALL DELAY
193 011F ACALL DELAY
194 0121 LJMP SPARK
198 0124 SW4:
199 0124 INC R3
200 0125 MOV A,#80H
201 0127 ACALL CMD
202 0129 MOV R7,#00H
203 012B MOV DPTR,#TITLE1
204 012E RPT7S1:clr a
205 012F MOVC A,@A+DPTR
206 0130 ;MOV P2,A
207 0130 ACALL WRT
208 0132 ACALL DELAY
209 0134 INC DPTR
210 0135 INC r7
211 0136 CJNE r7,#10H,RPT7S1

Dept. of ENTC Engg. Page 41


213 0139 MOV A,#0C0H
214 013B ACALL CMD
215 013D MOV R7,#00H
216 013F MOV DPTR,#TITLE2
217 0142 RPT71S1:clr a
218 0143 MOVC A,@A+DPTR
219 0144 ;MOV P2,A
220 0144 ACALL WRT
221 0146 ACALL DELAY
222 0148 INC DPTR
223 0149 INC r7
224 014A CJNE r7,#10H,RPT71S1
225 014D MOV A,#0C8H
226 014F ACALL CMD
227 0151 MOV A,#'4'
228 0153 ACALL WRT
229 0155 ACALL DELAY
230 0157 ACALL DELAY
231 0159 ACALL DELAY
232 015B ACALL DELAY
233 015D ACALL DELAY
234 015F ACALL DELAY
235 0161 LJMP SPARK
238 0164 SW5:
239 0164 MOV A,#80H
240 0166 ACALL CMD
241 0168 MOV R7,#00H
242 016A MOV DPTR,#TITLE
243 016D SP1:clr a
244 016E MOVC A,@A+DPTR
245 016F ;MOV P2,A

Dept. of ENTC Engg. Page 42


246 016F ACALL WRT
247 0171 ACALL DELAY
248 0173 INC DPTR
249 0174 INC r7
250 0175 CJNE r7,#10H,SP1
254 0178 MOV A,#0C0H
255 017A ACALL CMD
256 017C MOV R7,#00H
257 017E MOV DPTR,#TITLE2
258 0181 SP2:clr a
259 0182 MOVC A,@A+DPTR
260 0183 ;MOV P2,A
261 0183 ACALL WRT
262 0185 ACALL DELAY
263 0187 INC DPTR
264 0188 INC r7
265 0189 CJNE r7,#10H,SP2
266 018C MOV A,#0C8H
267 018E ACALL CMD
268 0190 MOV A,#'1'
269 0192 ACALL WRT
270 0194 ACALL DELAY
271 0196 MOV A,#'='
272 0198 ACALL WRT
273 019A ACALL DELAY
275 019C MOV A,R0
276 019D DA A
277 019E ANL A,#0F0H
278 01A0 RR A
279 01A1 RR A
280 01A2 RR A

Dept. of ENTC Engg. Page 43


281 01A3 RR A
282 01A4 ADD A,#30H
283 01A6 ACALL WRT
284 01A8 ACALL DELAY
285 01AA MOV A,R0
286 01AB DA A
287 01AC ANL A,#0FH
288 01AE ADD A,#30H
289 01B0 ACALL WRT
290 01B2 ACALL DELAY
292 01B4 JNB P3.4,$
293 01B7 JB P3.4,$
296 01BA MOV A,#0C8H
297 01BC ACALL CMD
298 01BE MOV A,#'2'
299 01C0 ACALL WRT
300 01C2 ACALL DELAY
301 01C4 MOV A,#'='
302 01C6 ACALL WRT
303 01C8 ACALL DELAY
304 01CA MOV A,R1
305 01CB DA A
306 01CC ANL A,#0F0H
307 01CE RR A
308 01CF RR A
309 01D0 RR A
310 01D1 RR A
311 01D2 ADD A,#30H
312 01D4 ACALL WRT
313 01D6 ACALL DELAY
314 01D8 MOV A,R1

Dept. of ENTC Engg. Page 44


315 01D9 DA A
316 01DA ANL A,#0FH
317 01DC ADD A,#30H
318 01DE ACALL WRT
319 01E0 ACALL DELAY
321 01E2 JNB P3.4,$
322 01E5 JB P3.4,$
325 01E8 MOV A,#0C8H
326 01EA ACALL CMD
327 01EC MOV A,#'3'
328 01EE ACALL WRT
329 01F0 ACALL DELAY
330 01F2 MOV A,#'='
331 01F4 ACALL WRT
332 01F6 ACALL DELAY
333 01F8 MOV A,R2
334 01F9 DA A
335 01FA ANL A,#0F0H
336 01FC RR A
337 01FD RR A
338 01FE RR A
339 01FF RR A
340 0200 ADD A,#30H
341 0202 ACALL WRT
342 0204 ACALL DELAY
343 0206 MOV A,R2
344 0207 DA A
345 0208 ANL A,#0FH
346 020A ADD A,#30H
347 020C ACALL WRT
348 020E ACALL DELAY

Dept. of ENTC Engg. Page 45


350 0210 JNB P3.4,$
351 0213 JB P3.4,$
354 0216 MOV A,#0C8H
355 0218 ACALL CMD
356 021A MOV A,#'4'
357 021C ACALL WRT
358 021E ACALL DELAY
359 0220 MOV A,#'='
360 0222 ACALL WRT
361 0224 ACALL DELAY
362 0226 MOV A,R3
363 0227 DA A
364 0228 ANL A,#0F0H
365 022A RR A
366 022B RR A
367 022C RR A
368 022D RR A
369 022E ADD A,#30H
370 0230 ACALL WRT
371 0232 ACALL DELAY
372 0234 MOV A,R3
373 0235 DA A
374 0236 ANL A,#0FH
375 0238 ADD A,#30H
376 023A ACALL WRT
377 023C ACALL DELAY
378 023E JNB P3.4,$
379 0241 JB P3.4,$
381 0244 LJMP SW5
382 0247 CMD:
383 0247 MOV P2,A

Dept. of ENTC Engg. Page 46


384 0249 CLR P1.0 ;SELECT COMMAND RESISTOR
385 024B CLR P1.1 ;WRITE
386 024D SETB P1.2 ;ENABLE
387 024F ACALL DELAY
388 0251 CLR P1.2
389 0253 RET
391 0254 WRT:
392 0254 MOV P2,A
393 0256 SETB P1.0
394 0258 CLR P1.1
395 025A SETB p1.2
396 025C ACALL DELAY
397 025E CLR P1.2
398 0260 RET
401 0261 DELAY:
402 0261 MOV R6,#05
403 0263 H1:MOV R5,#255
404 0265 H:DJNZ R5,H
405 0267 DJNZ R6,H1
407 0269 RET
420 026A COMMAND: DB 38H,0EH,01H,06H

Dept. of ENTC Engg. Page 47


Dept. of ENTC Engg. Page 48
PCB Designing:

For designing the PCB we had used Express PCB software. This software is
downloaded from NET. This is user friendly and very simple. We made the PCB
layouts in this Software. The main disadvantage of this software is, we can’t take the
mirror image directly.
To eliminate this disadvantage we have to take the print out on tracing paper.
After taking the printout, reverse the tracing paper you will get the mirror image of
the PCB layout. After getting the PCB layout give it to screen printer. The screen
printer will paint that mirror image on Cu clad. After painting it wait for drying it.
After that using FeCl3 solution remove the unwanted Cu. Process of removing
the unwanted Cu is known as etching. After etching process removes the color by
using blade. After removing color, using PCB hand drill machine make the drills.
After drilling your PCB is ready for soldering.

Dept. of ENTC Engg. Page 49


Dept. of ENTC Engg. Page 50
Dept. of ENTC Engg. Page 51
8. 1 ADVANTAGES

1. Avoids electrical accidents to line man


2. It improve the line man safety
3. Project is simple and easy
4. Uses commonly available components
5. Most useful to operate in the public areas

Dept. of ENTC Engg. Page 52


Dept. of ENTC Engg. Page 53
Future Enhancement

In future,we can use wireless technology to control the device


using compter.

Dept. of ENTC Engg. Page 54


Dept. of ENTC Engg. Page 55
CONCLUSION

Password & Thumb Based Circuit Breaker Control the Line Man’s Safety.
This system provides a solution, which can improve the safety of the project. It is
designed to control a circuit breaker with the help of a Password & Thumb. The
maintenance staff e.g. Line man’s for control to turn ON/OFF. The line works with the
line man only this system is arrangement such that a Password & Thumb is required to
operate the circuit breaker (ON/OFF). Line man can turn off the supply and
comfortably repair it, and return to the substation, then turn on the line by entering the
correct or same Password & Thumb. The system fully controlled by a AT89C51 IC. If
the Password & Thumb entered is correct, then the line can be turned (ON/OFF).
Security is prime concern in our day-to-day life. Everyone wants to be more secure as to
be possible. This system provides a new approach to a lineman security for their life.
The circuit can be used without any fail of a lineman. The circuit can be used without
any load can also be controlled when required.

Dept. of ENTC Engg. Page 56


Dept. of ENTC Engg. Page 57
11. REFERENCES

1. Principles Of Electronics

By V.K. Mehta.

2. Electronic Instrumentation

By H.S. Kalsi.

3. Electronic Instrumentation and control systems

By A.K. Sawhney

4 Veena, “Electric line man safety system with OTP based circuit breaker”, SR
Engineering College, Volume: 2, May 2015
5 Muhaad Ali Mazidi and Janice Gillisllispie Mazid, “The Microcontroller and
embedded system”, Person Education, 2nd edition, Issue: 1999
6 Dr.Neelam Rup, Prakash, “International Journal of Engineering Trends and
Technology”, (IJETT), Volume 13, page: 261, Issue: 3 – Jul 2014.
7 Mark Halpin: “National Code Committee”, Volume40, page: 228, Issue: 2002
8 Deepak Sharma & Major Sing Goraga: “International Journal Of Current
Engineering And Scientific Research (IJCESR)” Volume2, issue-May 2015

9.Software used

i. EDIT.com - Editor
ii. ASM31.exe - Assembler
iii. Express PCB - For PCB
iv. uC Flash - Microcontroller Programmer

Dept. of ENTC Engg. Page 58


Dept. of ENTC Engg. Page 59
The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K
bytes of Flash Programmable and Erasable Read Only Memory (PEROM). The
device is manufactured using Atmel’s high density nonvolatile memory technology
and is compatible with the industry standard MCS-51™ instruction set and pinout. The
on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional
nonvolatile memory programmer. By combining a versatile 8-bit CPU with
Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which
provides a highly flexible and cost effective solution to many embedded control applications.

Dept. of ENTC Engg. Page 60


,

Dept. of ENTC Engg. Page 61


Pin Description
1)VCC.
Supply voltage.

2)GND
Ground.

3)Port 0
Port 0 is an 8-bit open drain bidirectional I/O port. As an output port each pin can sink eight
TTL inputs. When 1s are written to port 0 pins, the pins can be used as highimpedance
inputs.
Port 0 may also be configured to be the multiplexed low order address/data bus during
accesses to external program
and data memory. In this mode P0 has internal pullups. Port 0 also receives the code bytes
during Flash programming, and outputs the code bytes during program verification.
External pullups are required during program verification.

4)Port 1
Port 1 is an 8-bit bidirectional I/O port with internal pull ups. The Port 1 output buffers can
sink/source four TTL inputs. When 1s are written to Port 1 pins they are pulled high by
the internal pullups and can be used as inputs. As inputs, Port 1 pins that are externally being
pulled low will source current (IIL) because of the internal pullups. Port 1 also receives the
low-order address bytes during
Flash programming and verification.

5)Port 2
Port 2 is an 8-bit bidirectional I/O port with internal pullups. The Port 2 output buffers can
sink/source four TTL inputs. When 1s are written to Port 2 pins they are pulled high by
the internal pullups and can be used as inputs. As inputs, Port 2 pins that are externally being
pulled low will source current (IIL) because of the internal pullups. Port 2 emits the high-
order address byte during fetches from external program memory and during accesses to
external data memory that use 16-bit addresses (MOVX @DPTR). In this application it uses
strong internal pullupswhen emitting 1s. During accesses to external data memory
that use 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function
Register. Port 2 also receives the high-order address bits and some
control signals during Flash programming and verification.

6)Port 3
Port 3 is an 8-bit bidirectional I/O port with internal pullups. The Port 3 output buffers can
sink/source four TTL inputs.When 1s are written to Port 3 pins they are pulled high by
the internal pullups and can be used as inputs. As inputs, Port 3 pins that are externally being
pulled low will source current (IIL) because of the pullups. Port 3 also serves the functions of
various special features of the AT89C51 as listed below:
Port 3 also receives some control signals for Flash programming and verification.

Dept. of ENTC Engg. Page 62


7)RST
Reset input. A high on this pin for two machine cycles while the oscillator is running resets
the device.

8)ALE/PROG
Address Latch Enable output pulse for latching the low byte of the address during accesses to
external memory. This pin is also the program pulse input (PROG) during Flash
programming. In normal operation ALE is emitted at a constant rate of 1/6 the oscillator
frequency, and may be used for external timing or clocking purposes. Note, however, that
one ALE pulse is skipped during each access to external Data Memory.If desired, ALE
operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is
active only during a MOVX or MOVC instruction. Otherwise, the pin is
weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in
external execution mode.

9)PSEN
Program Store Enable is the read strobe to external program When the AT89C51 is executing
code from external program memory, PSEN is activated twice each machine cycle, except
that two PSEN activations are skipped during each access to external data memory.

10)EA/VPP
External Access Enable. EA must be strapped to GND in order to enable the device to fetch
code from external program memory locations starting at 0000H up to FFFFH.Note,
however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should
be strapped to VCC for internal program executions. This pin also receives the 12-volt
programming enable voltage (VPP) during Flash programming, for parts that require
12-volt VPP.

11)XTAL1
Input to the inverting oscillator amplifier and input to the internal clock operating circuit.

12)XTAL2
Output from the inverting oscillator amplifier.

Oscillator Characteristics
XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which
can be configured for use as an on-chip oscillator, as shown in Figure 1. Either a quartz
crystal or ceramic resonator may be used. To drive the device from an external clock source,
XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 2.
There are no requirements on the duty cycle of the external clock signal, since the input to
the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and
maximum voltage high and low time specifications must be
observed.

Idle Mode

Dept. of ENTC Engg. Page 63


In idle mode, the CPU puts itself to sleep while all the onchip peripherals remain active. The
mode is invoked by software. The content of the on-chip RAM and all the special
functions registers remain unchanged during this mode. The idle mode can be terminated by
any enabled It should be noted that when idle is terminated by a hardware reset, the device
normally resumes program execution, from where it left off, up to two machine cycles before
the internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM
in this event, but access to the port pins is not inhibited. To eliminate the possibility of
an unexpected write to a port pin when Idle is terminated by reset, the instruction following
the one that invokes Idle should not be one that writes to a port pin or to external

Power Down Mode


In the power down mode the oscillator is stopped, and the instruction that invokes power
down is the last instruction executed. The on-chip RAM and Special Function Registers
retain their values until the power down mode is terminated. The only exit from power down
is a hardware reset. Reset redefines the SFRs but does not change the on-chip RAM. The
reset should not be activated before VCC is restored to its normal operating level and must be
held active long enough to allow the oscillator to restart and stabilize.

Programming the Flash


The AT89C51 is normally shipped with the on-chip Flash memory array in the erased state
(that is, contents = FFH) and ready to be programmed. The programming interface accepts
either a high-voltage (12-volt) or a low-voltage (VCC) program enable signal. The low
voltage programming mode provides a convenient way to program the AT89C51 inside the

Dept. of ENTC Engg. Page 64


user’s system, while the high-voltage programming mode is compatible with conventional
third party Flash or EPROM programmers.

Programming Algorithm:
Before programming the AT89C51, the address, data and control signals should be
set up according to the Flash programming mode table and Figures 3 and 4. To program the
AT89C51, take the following steps.
1. Input the desired memory location on the address lines.
2. Input the appropriate data byte on the data lines.
3. Activate the correct combination of control signals.
4. Raise EA/VPP to 12V for the high-voltage programming mode.
5. Pulse ALE/PROG once to program a byte in the Flash array or the lock bits.

The byte-write cycle is self-timed and typically takes no more than 1.5 ms. Repeat steps1
through 5, changing the address and data for the entire array or until the end of the object file
is reached.
Data Polling: The AT89C51 features Data Polling to indicate the end of a write cycle.
During a write cycle, an attempted read of the last byte written will result in the complement
of the written datum on PO.7. Once the write cycle has been completed, true data are valid on
all outputs, and the next cycle may begin. Data Polling may begin any time after a write
cycle has been initiated.
Ready/Busy: The progress of byte programming can also be monitored by the RDY/BSY
output signal. P3.4 is pulled low after ALE goes high during programming to indicate
BUSY. P3.4 is pulled high.

Dept. of ENTC Engg. Page 65


Dept. of ENTC Engg. Page 66
Dept. of ENTC Engg. Page 67
Liquid Crystal Display:

Dept. of ENTC Engg. Page 68


1

Dept. of ENTC Engg. Page 69


LM78XX Voltage Series Regulators:
General Description:

The LM78XX series of three terminal regulators is available with several fixed output
voltages making them useful in a wide range of applications. One of these is local on card
regulation, eliminating the distribution problems associated with single point regulation. The
voltages available allow these regulators to be used in logic systems, instrumentation,
HiFi, and other solid state electronic equipment. Although designed primarily as fixed
voltage regulators these devices can be used with external components to obtain
adjustable voltages and currents.
The LM78XX series is available in an aluminum TO-3 package which will allow over 1.0A
load current if adequate heat sinking is provided. Current limiting is included to limit the
peak output current to a safe value. Safe area protection for the output transistor is provided
to limit internal power dissipation. If internal power dissipation becomes too high for
the heat sinking provided, the thermal shutdown circuit takes over preventing the IC from
overheating. Considerable effort was expanded to make the LM78XX series
of regulators easy to use and mininize the number of external components. It is not necessary
to bypass the output, although this does improve transient response. Input
bypassing is needed only if the regulator is located far from the filter capacitor of the power
supply. For output voltage other than 5V, 12V and 15V the LM117 series provides an output
voltage range from 1.2V to 57V.

Features:
Y Output current in excess of 1A
Y Internal thermal overload protection
Y No external components required
Y Output transistor safe area protection
Y Internal short circuit current limit
Y Available in the aluminum TO-3 package
Voltage Range
LM7805C 5V
LM7812C 12V
LM7815C 15V

Dept. of ENTC Engg. Page 70


Dept. of ENTC Engg. Page 71
Dept. of ENTC Engg. Page 72
Dept. of ENTC Engg. Page 73
Dept. of ENTC Engg. Page 74
Dept. of ENTC Engg. Page 75
Dept. of ENTC Engg. Page 76
Dept. of ENTC Engg. Page 77
Dept. of ENTC Engg. Page 78
Dept. of ENTC Engg. Page 79
Push-Pull Four Channel Driver

FATURES:

· Output Current 1A Per Channel (600mAfor L293D)

· Peak Output Current 2A Per Channel


(1.2A for L293D)

· Inhibit Facility

· High Noise Immunity

· Separate Logic Supply

· Over-Temperature Protection

DESCRIPTION

The L293 and L293D are quad push-pull drivers capable of delivering output currents to 1A
or 600mA per channel respectively. Each channel is controlled by a TTL-compatible logic
input and each pair of drivers (a full bridge) is equipped with an inhibit input which turns off
all four transistors. A separate supply input is provided for the logic so that it may be run off
a lower voltage to reduce dissipation. Additionally the L293D includes the output clamping
diodes within the IC for complete interfacing with inductive loads. Both devices are available
in 16-pin Batwing DIP packages. They are also available in Power S0IC and Hermetic DIL
packages.

Dept. of ENTC Engg. Page 80


Dept. of ENTC Engg. Page 81
Dept. of ENTC Engg. Page 82
Dept. of ENTC Engg. Page 83
Dept. of ENTC Engg. Page 84

You might also like