You are on page 1of 28

PROJECT REPORT

ON
AUTOMATIC
GENERATOR
CONTROLLER

COMPILED BY:

PANKAJ KUMAR (EIC-1009-2K5)

Y.M.C.A. INSTITUTE OF ENGINEERING,


FARIDABAD
PROJECT REPORT
ON
AUTOMATIC
GENERATOR
CONTROLLER

COMPILED BY:

MUKESH GUPTA (EIC-1005-2K5)

Y.M.C.A. INSTITUTE OF ENGINEERING,


FARIDABAD
ACKNOWLEDGEMENT

Accomplishment of any task requires dedication, vision and most


important of all a steering guidance towards right approach
without which the idea hangs loose before it can be realised.
I would like to thank Mrs. Shailja Aggarwal for her
extremely benevolent guidance and support which made this
project feasible and a success, and always being the helping hand
whenever we encountered any difficulty. She has been infact a
constant motivational soul.
CERTIFICATION

I would like to certify and ensure that PANKAJ KUMAR,


student of Electronics Instrumentation and control (EIC-
1009-2k5), has completed the project “AUTOMATIC
GENERATOR CONTROLLER” successfully under my
guidance and supervision. He was sincere throughout the
process.

(Shailja Aggarwal)
CERTIFICATION

I would like to certify and ensure that MUKESH GUPTA,


student of Electronics Instrumentation and control (EIC-
1005-2k5), has completed the project “AUTOMATIC
GENERATOR CONTROLLER” successfully under my
guidance and supervision. He was sincere throughout the
process.

(Shailja Aggarwal)
INTRODUCTION

It was electricity in the beginning....The people were happy because they did not know
that it was existing all around them and that it could be utilized. It was fine. And then
Faraday came and the stone has started rolling slowly...

During the time, the first machines using a new sort of energy appeared
accompanied with people who knew something about electricity. A long time has passed
since then and just when civilization got used to this innovation and stopped paying
attention to what a new generation of specialists was doing, someone came up with an
idea that electrons could be a very convenient toy being closed in a glass pipe. At first
sight, it was only a good idea, but there was no return, electronics was born and the
stone continued rolling down the hill faster and faster...

What if we bring into usage the electronics that is, microcontrollers, for
example for smoothening the electricity supply through my project “AUTOMATIC
GENERATOR CONTROLLER”?

The project AUTOMATIC GENERATOR CONTROLLER is basically


employing the idea of providing non-stop power supply to an industrial process, driving
it towards more safety and sophistication. It is indeed indispensable for an efficient
industrial process.

The industries have continuously dealt with the problem of continuously


monitoring the undisrupted supply to the process being operated upon; that is manual
control has been a major hurdle towards proper working.

The project helps in overcoming this problem, as it gets rid of manual control
and once started can work efficiently on its own.

PRINCIPLE:

Generator control unit is a device which is used to provide continuous power


supply to an industrial process where power backup is very crucial. It is a device which
can keep the track over main supply and accordingly may provide required control
mechanism to monitor the generator functioning.

The idea is realised through the use of following main components:

MICROCONTROLLER 8051

RELAYS

Moreover in case of unavailability of the microcontroller the project can be made to


work through:

MICROPROCESSOR KIT 8085.


COMPONENTS USED

 Microcontroller 8051

 Microprocessor 8085 Kit(Optional)

 ULN2003 IC

 Three Pin Voltage Regulator IC

1) 7805

2) 7812

 Crystal Oscillator 12 MHz

 Relays 12V DC

 LEDs

1) Green

2) Red

3) Yellow

 Resistances

1) 470ohm

2) 1k

3) 10k

 Capacitors

1) 33pF

2) .1uF

3) 10uF/25V

4) 1000uF/35V

 Diode

1) IN4007

 Connectors`````
CIRCUIT DIAGRAM
CIRCUIT DESCRIPTION

The circuit diagram of this project clearly illustrates the use of microcontroller as a
central component governing the functioning of others for efficient working of
generator controller. The circuit is very simple and efficient one to understand and
work upon. The description can be divided in following main parts of the circuit used to
build the entire circuit as whole project.

POWER SUPPLY:

This is the power house of our project. The project works on two voltages level 5 volt
and 12 volt. So we have used a small step down transformer with a bridge rectifier to
convert the ac supply to dc one. After that two VOLTAGE REGULATOR IC are used
to obtain the required voltage levels. The ICs are:

 7805

 7812

The Capacitors are used in power supply are mainly for filtering out the ripples
present in output supply.

CENTRAL UNIT:

The main unit of my project is the microcontroller 8051. It is the central part of my
project. All the functions of project are controlled by the microcontroller.

As all other good things, this powerful component is basically very simple and is
obtained by uniting tested and high- quality "ingredients" (components) as per
following receipt:

1. The simplest computer’s processor is used as a "brain" of the future system.


2. Depending on the taste of the producer, it is added: a bit of memory, a few A/D
converters, timers, input/output lines etc.
3. It is all placed in one of standard packages.
4. Simple software that will be able to control it all and about which everyone will
be able to learn has been developed.

Three things have had a crucial impact on such a success of the microcontrollers:

• Powerful and intelligently chosen electronics embedded in the microcontrollers


can via input/output devices ( switches, push buttons, sensors, LCD displays,
relays…) control various processes and devices such as: industrial automatics,
electric current, temperature, engine performance etc.
• A very low price enables them to be embedded in such devices in which, until
recent time it was not worth embedding anything. Thanks to that, the world is
overwhelmed today with cheap automatic devices and various “intelligent”
appliences.
• Prior knowledge is hardly needed for programming. It is sufficient to have any
kind of PC (software in use is not demanding at all and it is easy to learn to work
on it) and one simple device (programmer) used for “transffering” completed
programs into the microcontroller.

Therefore, if you are infected with a virus called electronics, there is nothing left for you
to do but to learn how to control its power and how to direct it at the right course.

What is what in microcontroller?

Obviously, everything that occurs in the microcontroller occurs at high speed and quite
simple, but it would not be so useful if there are no special interfaces which make it
complete. Text below refers to that (in short).

Program Memory (ROM)

The Program Memory is a type of memory which permanently stores a program being
executed. Obviously, the maximal length of the program that can be written to depends
on the size of the memory. Program memory can be built in the microcontroller or
added from outside as a separate chip, which depends on type of the microcontroller.
Both variants have advantages and disadvantages: if added from outside, the
microcontroller is cheaper and program can be considerably longer. At the same time, a
number of available pins is decremented as the microcontroller uses its own
input/output ports to be connected to the memory. The capacity of Internal Program
Memory is usually smaller and more expensive but such a chip has more possibilities of
connecting to peripheral environment. Program memory size ranges from 512B to
64KB.

Data Memory (RAM)

Data Memory is a type of memory used for temporary storing and keeping different
data and constants created and used during operating process. The content of this
memory is erased once the power is off. For example: when the program performs
addition, it is necessary to have a register presenting what in everyday life is called “a
sum”. For that purpose one of the registers in RAM is named as such and serves for
storing results of addition. Data memory size goes up to a few KBs.

EEPROM Memory
The EEPROM Memory is a special type of memory which not all the types of the
microcontrollers have. Its content can be changed during program execution (similar to
RAM), but it is permanently saved even after the power goes off (similar to ROM). It is
used for storing different values created and used during operating process and which
must be saved upon turning off the device (calibration values, codes, values to count up
to etc.). A disadvantage of this memory is that programming is relatively slow-
measured in milliseconds.
SFRs (Special Function Registers)

SFRs are a particular part of memory whose purpose is defined in advance by the
producer. Each of these registers has its name and controls some of interfaces within the
microcontroller. For example: by writing zero or one to the SFR controlling some
input/output port, each of the port pins can be configured as input or output (each bit in
this register controls the purpose of one single pin).

Program Counter

Program Counter is an engine which starts the program and indicates the address in
memory where next instruction to execute is found. Immediately after its execution, the
value of the counter is incremented by 1. For this automatic increment, the program
executes one instruction at a time as it is written. However…the program counter value
could be changed at any moment, which will cause “jump” to a new location in the
program memory. This is how subroutines or branch instructions are executed. When
finding its new place in the program, the counter resumes even automatic counting +1,
+1, +1…

CPU (Central Processor Unit)

As its name tells, this is "Big Brother" who monitors and controls all operations being
performed within the microcontroller and the user cannot affect its work. It consists of
several smaller units. The most important are:

• Instruction decoder - a part of electronics which recognizes program instructions


and on the basis of which runs other circuits.

• Arithmetical Logical Unit (ALU) - performs all mathematical and logical


operations with data. The features of this circuit are described in the
"instruction set" which differs for each type of the microcontroller.

• Accumulator - is a special type of the SFR closely related to operating mode of


the ALU. It is a kind of desk on which all data needed to perform some operation
on are set (addition, shift etc.). It also contains a result, ready to be used further
in operation. One of the SFRs, called the Status Register, is closely related to the
accumulator, showing at any time the "status" of a number being in the
accumulator (the number is greater than or less than zero etc.).
PIN DIAGRAM OF MICROCONTROLLER

8051 Microcontroller's pins’ Description:

Pins 1-8: Port 1Each of these pins can be configured as input or output.

Pin 9: RS Logical one on this pin stops microcontroller’s operating and erases the
contents of most registers. By applying logical zero to this pin, the program starts
execution from the beginning. In other words, a positive voltage pulse on this pin resets
the microcontroller.

Pins10-17: Port 3 Similar to port 1, each of these pins can serve as universal input or
output . Besides, all of them have alternative functions:

Pin 10: RXD Serial asynchronous communication input or Serial synchronous


communication output.

Pin 11: TXD Serial asynchronous communication output or Serial synchronous


communication clock output.

Pin 12: INT0 Interrupt 0 input

Pin 13: INT1 Interrupt 1 input

Pin 14: T0 Counter 0 clock input


Pin 15: T1 Counter 1 clock input

Pin 16: WR Signal for writing to external (additional) RAM

Pin 17: RD Signal for reading from external RAM

Pin 18, 19: X2, X1 Internal oscillator input and output. A quartz crystal which
determines operating frequency is usually connected to these pins. Instead of quartz
crystal, the miniature ceramics resonators can be also used for frequency stabilization.
Later versions of the microcontrollers operate at a frequency of 0 Hz up to over 50 Hz.

Pin 20: GND Ground

Pin 21-28: Port 2 If there is no intention to use external memory then these port pins are
configured as universal inputs/outputs. In case external memory is used then the higher
address byte, i.e. addresses A8-A15 will appear on this port. It is important to know that
even memory with capacity of 64Kb is not used ( i.e. note all bits on port are used for
memory addressing) the rest of bits are not available as inputs or outputs.

Pin 29: PSEN If external ROM is used for storing program then it has a logic-0 value
every time the microcontroller reads a byte from memory.

Pin 30: ALE Prior to each reading from external memory, the microcontroller will set
the lower address byte (A0-A7) on P0 and immediately after that activates the output
ALE. Upon receiving signal from the ALE pin, the external register (74HCT373 or
74HCT375 circuit is usually embedded) memorizes the state of P0 and uses it as an
address for memory chip. In the second part of the microcontroller’s machine cycle, a
signal on this pin stops being emitted and P0 is used now for data transmission (Data
Bus). In this way, by means of only one additional (and cheap) integrated circuit, data
multiplexing from the port is performed. This port at the same time used for data and
address transmission.

Pin 31: EA By applying logic zero to this pin, P2 and P3 are used for data and address
transmission with no regard to whether there is internal memory or not. That means
that even there is a program written to the microcontroller, it will not be executed, the
program written to external ROM will be used instead. Otherwise, by applying logic
one to the EA pin, the microcontroller will use both memories, first internal and
afterwards external (if it exists), up to end of address space.

Pin 32-39: Port 0 Similar to port 2, if external memory is not used, these pins can be
used as universal inputs or outputs. Otherwise, P0 is configured as address output (A0-
A7) when the ALE pin is at high level (1) and as data output (Data Bus), when logic zero
(0) is applied to the ALE pin.

Pin 40: VCC Power supply +5V

Basic Power on circuit:


Reset

Reset occurs when the RS pin is supplied with a positive pulse in duration of at least 2
machine cycles ( 24 clock cycles of crystal oscillator). After that, the microcontroller
generates internal reset signal during which all SFRs, excluding SBUF registers, Stack
Pointer and ports are reset ( the state of the first two ports is indefinite while FF value is
being written to the ports configuring all pins as inputs). Depending on device purpose
and environment it is in, on power-on reset it is usually push button or circuit or both
connected to the RS pin. One of the most simple circuit providing secure reset at the
moment of turning power on is shown on the picture.
Everything functions rather simply: upon the power is on, electrical condenser is being
charged for several milliseconds through resistor connected to the ground and during
this process the pin voltage supply is on. When the condenser is charged, power supply
voltage is stable and the pin keeps being connected to the ground providing normal
operating in that way. If later on, during the operation, manual reset button is pushed,
the condenser is being temporarily discharged and the microcontroller is being reset.
Upon the button release, the whole process is repeated…

RELAYS:

A relay is an electrical switch that opens and closes under the control of another
electrical circuit. In the original form, the switch is operated by an electromagnet to
open or close one or many sets of contacts. It was invented by Joseph Henry in 1835.
Because a relay is able to control an output circuit of higher power than the input
circuit, it can be considered to be, in a broad sense, a form of an electrical amplifier.
OPERATION:

When a current flows through the coil, the resulting magnetic field attracts an armature
that is mechanically linked to a moving contact. The movement either makes or breaks
a connection with a fixed contact. 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 is 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 is to reduce noise. In a high voltage or high current application, this is
to reduce arcing.

If the coil is energized with DC, a diode is frequently installed across the coil, to
dissipate the energy from the collapsing magnetic field at deactivation, which would
otherwise generate a spike of voltage and might cause damage to circuit components.
Some automotive relays already include that diode inside the relay case. Alternatively a
contact protection network, consisting of a capacitor and resistor in series, may absorb
the surge. If the coil is designed to be energized with AC, a small copper ring can be
crimped to the end of the solenoid. This "shading ring" creates a small out-of-phase
current, which increases the minimum pull on the armature during the AC cycle.[1]

By analogy with the functions of the original electromagnetic device, a solid-state relay
is made with a thyristor or other solid-state switching device. To achieve electrical
isolation an optocoupler can be used which is a light-emitting diode (LED) coupled with
a photo transistor.
ULN2003:

This IC is used mainly to derive high current operated device from a low current source
device. The basic methodology behind it is current amplification using a transistor
configuration known as DARLINGTON PAIR.

Circuit diagram of Darlington configuration

In electronics, the Darlington transistor (often called a Darlington pair) is a


semiconductor device which combines two bipolar transistors in a single device so that
the current amplified by the first is amplified further by the second. This gives a high
current gain (written β or hFE), and takes less space than two discrete transistors in the
same configuration. Integrated packaged devices are available, but it is still common
also to use two separate transistors.

The Darlington configuration was invented by Bell Laboratories engineer Sidney


Darlington in 1953. He patented the idea of having two or three transistors on a single
chip, but not that of an arbitrary number (which might have covered all modern
integrated circuits).

A similar configuration but with transistors of opposite type (NPN and PNP) is the
Sziklai pair, sometimes called the "complementary Darlington".

IC ULN2003 contains inside itself such kind of seven Darlington Pairs. So we can derive
seven high current operated devices. In my project I have used only two of the
Darlington Pairs to derive two relays: one for starting the GEN SET and one for
stopping the GEN SET.
PIN CONFIGURATION OF ULN2003

RESISTANCE:

Electrical resistance is a measure of the degree to which an object opposes an electric


current through it, measured in ohms. Its reciprocal quantity is electrical conductance
measured in siemens. Assuming a uniform current density, an object's electrical
resistance is a function of both its physical geometry and the resistivity of the material it
is made from:

where

"l" is the length

"A" is the cross sectional area, and

"ρ" is the resistivity of the material

Electrical resistance shares some conceptual parallels with the mechanical notion of
friction. The SI unit of electrical resistance is the ohm, symbol Ω. The resistance of an
object determines the amount of current through the object for a given potential
difference across the object.

where

R is the resistance of the object, measured in ohms,


equivalent to J·s/C2

V is the potential difference across the object,


measured in volts

I is the current through the object, measured in


amperes

For a wide variety of materials and conditions, the electrical resistance does not depend
on the amount of current through or the amount of voltage across the object, meaning
that the resistance R is constant

CAPACITOR:
Capacitance is a measure of the amount of electric charge stored (or separated) for a
given electric potential. The most common form of charge storage device is a two-plate
capacitor. If the charges on the plates are +Q and −Q, and V gives the voltage difference
between the plates, then the capacitance is given by

The SI unit of capacitance is the farad; 1 farad = 1 coulomb per volt

CRYSTAL OSCILLATOR:

A crystal oscillator is an electronic circuit that uses the mechanical resonance of a


vibrating crystal of piezoelectric material to create an electrical signal with a very
precise frequency. This frequency is commonly used to keep track of time (as in quartz
wristwatches), to provide a stable clock signal for digital integrated circuits, and to
stabilize frequencies for radio transmitters.

Piezoelectricity was discovered by Jacques and Pierre Curie in 1880. Paul Langevin
first investigated quartz resonators for use in sonar during World War 1. The first
crystal controlled oscillator, using a crystal of Rochelle salt, was built in 1917 and
patented in 1918 by Alexander M. Nicholson at Bell Telephone Laboratories, although
his priority was disputed by Walter Guyton Cady. Cady built the first quartz crystal
oscillator in 1921.
CRYSTAL OSCILLATOR

In my project crystal oscillator is used to provide the timing signal to microcontroller so


that it can perform the required operation.

LED (Light emitting Diode):


This is main indicating device used in the project. It indicates the various status signals.

Five LEDs have been used in the project for the following signals:

 MAIN LIGHT ON

 GEN SET LIGHT ON

 FAULT

 START GEN SET SIGNAL

 STOP GEN SET SIGNAL


PCB LAYOUT (COMPONENT SIDE)
PCB LAYOUT (SOLDER SIDE)
WORKING
The working of this project basically revolves around two components employed that is
8051 microcontroller and four relays.

Here first microcontroller senses the input supply relay and according to status of relay
it takes the necessary action. If light is present (that is relay is ON), then it turns on
Main Light LED ON and keeps on monitoring the input main supply. As soon as the
light goes OFF (that is relay is OFF), the microcontroller goes to the next step and issues
the start signal to start the GEN SET. It takes two attempts to start the GEN SET. If in
these two attempts GEN SET does not get started, issues the FAULT signal to turn the
FAULT LED ON and shut downs the all other systems running.

Normally the GEN SET gets started and simultaneously monitors the GEN SET
relay and according to status of relay, that is if GEN SET is ON(relay is on) turns GEN
LIGHT LED ON and monitors again the input supply by checking the status of input
relay and GEN SET supply using the GEN SET relay.

If due to any fault GEN SET fails to produce electricity the controller senses it
and issues a signal to stop the GEN SET immediately and simultaneously turns the
FAULT LED ON. The stop signal is of approx. 30 sec.

As soon as the MAIN light comes(the input relay gets on) the controller senses it
and after a delay turns the MAIN LIGHT LED ON and issues a signal to STOP the
GEN SET. This is again of approx.30 sec because normally a GEN SET gets turned off
in 25 to 28 sec.

If the GEN SET gets turned off in this time delay then the controller turns the
GEN LIGHT LED OFF. This is again done by monitoring the GEN SET relay status.
On the other hand if GEN SET does not get turned off within the given time constraint
then the relay(GEN SET supply relay) remains ON and controller again issues the
FAULT signal by turning the FAULT LED ON so that the operator over there may
take the concerned steps to remove the above disorder of the GEN SET.

The PROGRAM framed for working of this project is as given below:

MOV P1, #0E7H

ACALL DELAY1 ; 3 SECONDS DELAY

BEGIN: JB P2.5, LIGHT ; SENSES MAIN LIGHT

MOV A, #03H
SETB P1.1 ; TURNS OFF MAIN LIGHT LED

ACALL DELAY1 ; 3 SECONDS DELAY

START: DEC A

JZ FAULT

SETB P1.4 ; START GEN SET

ACALL DELAY1 ; 3 SECONDS DELAY

CLR P1.4

ACALL DELAY1 ; 3 SECONDS DELAY

ACALL DELAY1 ; 3 SECONDS DELAY

JB P2.2, LEDON ; SENSES GEN SET LIGHT

JNB P2.2, START ; CHECKS FAULT IN GEN SET


START

AGAIN: JNB P2.2, FAULT1 ; CHECKS FAULT IN GEN SET

JNB P2.5, AGAIN ; CHECKS FOR MAIN LIGHT

ACALL DELAY1 ; 3 SECONDS DELAY

CLR P1.1 ; TURNS ON MAIN LIGHT LED

ACALL DELAY2 ; 1 SECONDS DELAY

SETB P1.3 ; STOP GEN SET

ACALL DELAY ; 30 SECONDS DELAY

CLR P1.3

JB P2.2, FAULT ; CHECKS FAULT IN GEN SET


STOP

SETB P1.0 ; TURNS OFF GEN SET LIGHT LED

ACALL DELAY1 ; 3 SECONDS DELAY

SJMP BEGIN

LIGHT: CLR P1.1 ; TURNS ON MAIN LIGHT LED

SJMP BEGIN

LEDON: CLR P1.0 ; TURNS ON GEN SET LIGHT LED


SJMP AGAIN

FAULT: MOV A, #03H

MOV P1, A ; TURNS ON FAULT SIGNAL LED

SJMP FAULT

FAULT1: MOV A, #00001011B

MOV P1, A

ACALL DELAY ; 30 SECONDS DELAY

CLR P1.3

SJMP FAULT
BIBLIOGRAPHY

 The 8051 Microcontroller and Embedded Systems

By: M. A. Mazidi

J. G. Mazidi

 Web site accessed : www.Wikipedia.com

www.Google.com
CONTENTS

 ACKNOWLEDGEMENT

 CERTIFICATION

 INTRODUCTION

 COMPONENTS USED

 CIRCUIT DIAGRAM

 CIRCUIT DESCRIPTION

 PCB LAYOUT (COMPONENT SIDE)

 PCB LAYOUT (SOLDER SIDE)

 WORKING

 BIBLIOGRAPHY

You might also like