Automatic Genrator Controller (Project Report)
Automatic Genrator Controller (Project Report)
ON
AUTOMATIC
GENERATOR
CONTROLLER
COMPILED BY:
COMPILED BY:
(Shailja Aggarwal)
CERTIFICATION
(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 helps in overcoming this problem, as it gets rid of manual control
and once started can work efficiently on its own.
PRINCIPLE:
MICROCONTROLLER 8051
RELAYS
Microcontroller 8051
ULN2003 IC
1) 7805
2) 7812
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:
Three things have had a crucial impact on such a success of the microcontrollers:
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.
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).
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 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…
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:
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 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 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.
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.
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:
where
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
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
CRYSTAL OSCILLATOR:
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
Five LEDs have been used in the project for the following signals:
MAIN LIGHT ON
FAULT
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.
MOV A, #03H
SETB P1.1 ; TURNS OFF MAIN LIGHT LED
START: DEC A
JZ FAULT
CLR P1.4
CLR P1.3
SJMP BEGIN
SJMP BEGIN
SJMP FAULT
MOV P1, A
CLR P1.3
SJMP FAULT
BIBLIOGRAPHY
By: M. A. Mazidi
J. G. Mazidi
www.Google.com
CONTENTS
ACKNOWLEDGEMENT
CERTIFICATION
INTRODUCTION
COMPONENTS USED
CIRCUIT DIAGRAM
CIRCUIT DESCRIPTION
WORKING
BIBLIOGRAPHY