Download as pdf or txt
Download as pdf or txt
You are on page 1of 49

Automatic Power Supply Control with

four Different Sources to ensure No


Power Interruption; Solar, Mains,
Generator & Wind

Project members
1. Mearg Alemayoh
2. Musie Welday
3. Teklay Haile
4. Tsige Tadesse

Department of Electrical and Electronics Engineering

Mekelle Institute of Technology


Mekelle University.
2016 G.C.
Certificate
This is to certify that the mini-project report entitled “Automatic Power Supply Control
with four Different Sources to ensure No Power Interruption; Solar, Mains,
Generator & Wind” is a bonfire work carried out by;
1. Musie Welday
2. Mearg Alemayoh
3. Teklay Haile
4. Tsige Tadesse
For the partial fulfillment of BSc degree in Electrical and Electronics Engineering from
Mekelle Institute of Technology, Mekelle University. They have worked under my
guidance and supervision. The material referred from other sources has been duly
acknowledged.
Project advisor: Head of Department:
Mr. Tirffneh Yimer Mr. Tirffneh Yimer

Signature: ____________ Signature:____________

Examiners: Signature

1. ________________ _____________

2. ________________ _____________

3. ________________ _____________

i
Acknowledgement

We are using this opportunity to express our gratitude to Mr. Tirffneh Yimer who
supported us throughout the semester in doing this mini project. We are thankful for his
aspiring guidance, invaluably constructive criticism and friendly advice during the
project work. We are sincerely grateful to him for sharing his truthful and illuminating
views on a number of issues related to the project. We would like also to extend our
sincere gratitude to all staff members of Electrical and Electronics Engineering
Department of MU-MIT.

Thank you

The project members

ii
Abstract
The demand for electricity is increasing every day and frequent power cut is causing
many problems in various areas like industries, hospitals and houses. An alternative
arrangement for power source is a must. Therefore, the main objective of this project is
to demonstrate how an uninterrupted power can be supplied to a load, by selecting any
of the four assumed power sources namely; main supply, generator, wind power and
solar powers automatically.

This project uses four switches to demonstrate the respective failure of that power
supply. When any of the switches is pressed it shows the availability of that particular
source, switches are connected to microcontroller as input signals. A microcontroller of
Atmel family, AT89S51 is used. The output of microcontroller is given to the relay
driver IC, which switches for the appropriate relay to maintain uninterrupted supply to
the load. The output shall be observed using a lamp (load) drawing power supply from
mains initially. On failure of the mains supply (which is actuated by pressing the
appropriate switch) the load gets supply from the next available source, say a standby
generator. If the standby generator also fails it switches over to the next available source
and so on. The current status, as to which source supplies the load is also displayed on
an LCD. As it is not feasible to provide all 4 different sources of supply, one source
with alternate switches are provided to get the same function.

The project can be further enhanced by using other sources, which are most likely to be
available locally and then taking into thought for bring into play the best feasible power
whose duty and tariff maintains low at that point of time.

iii
Contents

Certificate....................................................................................................................................................... i
Acknowledgement ........................................................................................................................................ ii
Abstract ........................................................................................................................................................ iii
List of tables................................................................................................................................................. vi
List of figures .............................................................................................................................................. vii
Acronyms ................................................................................................................................................... viii
CHAPTER ONE ....................................................................................................................................... 1
Introduction and objective ............................................................................................................................ 1
1.1 Background ......................................................................................................................................... 1
1.2. Energy sources in Ethiopia ................................................................................................................ 2
1.3. Objectives .......................................................................................................................................... 3
1.3.1 General objectives of the project.................................................................................................. 4
1.3.2 Specific objectives of the project ..................................................................................................... 4
CHAPTER TWO .......................................................................................................................................... 5
Literature Review.......................................................................................................................................... 5
CHAPTER THREE ...................................................................................................................................... 7
Methodology and system design ................................................................................................................... 7
3.1. Embedded system: ............................................................................................................................. 7
3.1.2. Components of embedded system............................................................................................... 8
3.1.1. Functions of Embedded Systems ................................................................................................ 9
3.2 Basic System design and implementation ........................................................................................... 9
HARDWARE DESCRIPTION ...................................................................................................................... 13
1. Power supply block ..................................................................................................................... 13
A. Transformer ................................................................................................................................ 13
2. Microcontroller ........................................................................................................................... 17
3. LCD DISPLAY: .......................................................................................................................... 21
4. Relay Switch: .............................................................................................................................. 22
5. RELAY DRIVER IC ULN2003: ................................................................................................ 22
6. DIFFERENT SOURCES OF POWER SUPPLY: ...................................................................... 23
Software used: ..................................................................................................................................... 28

iv
CHAPTER FOUR....................................................................................................................................... 31
RESULTS AND DISCUSSIONS ............................................................................................................... 31
CHAPTER FIVE ........................................................................................................................................ 37
CONCLUSIONS AND SCOPE OF FUTURE WORK .............................................................................. 37
References:.................................................................................................................................................. 38

v
List of tables

Table 1: 7805 pin description .................................................................................... 17


Table 2: 8051 microcontroller pin description ........................................................ 20

vi
List of figures

Figure 1: Embedded system organization ...................................................................... 8


Figure 2: flow chart diagram of the system ................................................................. 11
Figure 3: The designed system ..................................................................................... 12
Figure 4: power supply unit ......................................................................................... 13
Figure 5: A typical Transformer .................................................................................. 14
Figure 6: Bridge rectifier circuit................................................................................... 15
Figure 7: LM7805 pin description .............................................................................. 17
Figure 8: 8051 Microcontroller Pin layout................................................................... 19
Figure 9: 8051 Architecture ........................................................................................ 20
Figure 10: 16x2 LCD DISPLAY ................................................................................ 21
Figure 11: Relay switch ............................................................................................... 22
Figure 12: ULN2003, Relay driver .............................................................................. 23
Figure 13: Grid-connected residential PV power system ........................................... 25
Figure 14: Standby generator ....................................................................................... 26
Figure 15: Wind turbine connected to a house, battery bank, and/or the state electricity
grid. .............................................................................................................................. 27
Figure 16: Proteus design of the proposed system ....................................................... 30
Figure 17: Regulated power supply unit ...................................................................... 31
Figure 18: oscilloscope results for the PS unit ............................................................. 32

vii
Acronyms

IC Integrated Circuit

LCD Liquid Crystal Display

EU European Union

UPS Uninterrupted Power Supply

ATS Automatic Transfer Switch

MC Micro Chip

GND Ground

MPU Microprocessor

UART Universal asynchronous receiver transmitter

ADC Analog to digital converter

OpAmps Operational amplifier

RAM Random access memory

CMOS Complementary Metal-Oxide Semiconductor

PV Photovoltaic

LED Light emitting diode

RTOS Real Time Operating System

CPU Central Processing Unit

EMF Electromotive force

MATLAB Matrix Laboratory

PCB Printed Circuit Board

CSP Concentrated solar power.

viii
CHAPTER ONE

Introduction and objective


1.1 Background

In 2012, world energy consumption by power source was oil 31.4%, coal 29.0%, natural
gas 21.3%, biofuels and waste 10.0%, nuclear 4.8%, hydro 2.4%, and 'other'
(hydro, peat, solar, wind, geothermal power, etc.) 1.1%. Oil, coal, and natural gas were
the most popular energy fuels.[1]
Recently there has been a large increase in international agreements and national
Energy Action Plans, such as the EU 2009 Renewable Energy Directive, to increase the
use of renewable energy due to the growing concerns about pollution from energy
sources that come from fossil fuels such as oil, coal, and natural gas. One such initiative
was the United Nations Development Program’s World Energy Assessment in 2000
that highlighted many challenges humanity would have to overcome in order to shift
from fossil fuels to renewable energy sources. From 2000 - 2012 renewable energy
grew at a rate higher than any other point in history, with a consumption increase of
176.5 million tones. [2]
Renewable energy resources exist over wide geographical areas, in contrast to other
energy sources, which are concentrated in a limited number of countries. In
international public opinion surveys there is strong support for promoting renewable
sources such as solar power, wind power, hydro and biomass. At the national level, at
least 30 nations around the world already have renewable energy contributing more
than 20 percent of energy supply.

Within different countries various renewable energy sources are becoming integrated
to the national grids to supply the end users. With technology advancement in recent
years, the need for reliable and continuous power sources has also grown.

Though we do have many alternatives of energy sources, but still power outages occur
due to faults at power stations, damage to electric transmission lines, substations or other
parts of the distribution system, a short circuit, or the overloading of electricity mains.
Power failures are particularly critical at sites where the environment and public safety
are at risk. Institutions such as hospitals, sewage treatment plants, mines, and the like

1
will usually have backup power sources such as standby generators or UPS, which will
automatically start up when electrical power is lost. To do so an automatic transfer
mechanism should be used to quickly and safely shifts the load circuit from the normal
source of power to the emergency (alternate) source of power.

In early times, World War II, transfer switches were used on naval ships. In combat, a
ship may lose the function of its boilers, which power the steam turbines for the ship’s
generator. In such a case, one or more diesel engines are used to drive back-up
generators. Early transfer switches relied on manual operation; two switches would be
placed horizontally, in line and the "on" position facing each other a rod is placed in
between. In order to operate the switch one source must be turned off, the rod moved
to the other side and the other source turned on.

In our country the most available and growing energy sources are hydro, wind, solar
and in most institutions which demand a continuous power a standby generator is
common one. Having these different power sources at once, we propose a
microcontroller based automatic transfer mechanism to switch in between the available
sources in case the main fails.

1.2. Energy sources in Ethiopia


Ethiopia generates most of its electricity from renewable energy, mainly from
hydropower (like Tekeze, Tis Abay, Glgel gibie I, II&III, Awash II&III…). In 2011,
over 96% of Ethiopia's electricity was from hydropower. The country began a large
program to expand electricity supply in the 2010s from 2,000 MW to 10,000 MW. This
was to be done mainly with renewable sources. Wind and geothermal were included to
offset seasonal differences in water levels. Current plans of Ethiopia to export electricity
to neighboring countries needs transmission lines to be upgraded and expanded.[3]
Solar Photovoltaic is being promoted to replace fuel-based lighting and off-grid
electrical supply with a solar panel assembly plant opening in Addis Ababa in early
2013. The first large installation of solar was a village grid of 10 kW in 1985, expanded
to 30 kW in 1989. Almost all current solar power is used for telecommunications,
village well pumps, health care centers and school lighting.[4]
As our dry season is also a windy season, wind power has also been started as a good
complement to hydropower. Our government plans to have 800MW power out of wind

2
power, but so far about 324MW is installed. One in Ashogoda wind farm (120MW)
nearby Mekelle, Adama I (51MW) and Adama II (153MW).[5]
The 7MW Geothermal Pilot Plant found at Aluto Langano is part of our national power
source. The majority of Ethiopia's energy needs are met by biofuels (fuel wood) for
cooking. But Ethiopia plans to distribute 9 million more efficient stoves by 2015 to
reduce wood use while improving air quality and lowering CO2 emissions.[6]
Diesel powered generators are highly used in different institutions and business centers
in case of the main national grid power lost. Though the cost is high to have different
power supplies at once, but for uninterrupted power requirements they can make a best
complement of each other.

1.3. Objectives

Outage of electrical grid power due to thunderstorms, natural disasters or high power
demands are increasingly common. With a growing dependence on technology and
interconnected systems that rely on electricity, power reliability becomes increasingly
critical.

Interruptions of electrical power, even for a short while, can create situations that could
imperil public health and safety. Hospitals, data centers, water and sewage facilities,
fueling stations, and communication and transportation systems require continuous
power to protect public health and safety.

So secondary power supply means must be provided to able to get reliable, immediate
and full strength electric power when there is a failure of the primary power supply
system.

Emergency generators, small-scale solar powers and wind power and power from
inverters can be used as backup sources.

Then the important requirement of electric power distribution systems is the need for
automatic operation. In particular, the rapid and reliable transfer of the system from
one power source to another during certain system events is important to achieving
the reliability goals for such systems and the facility serves.

3
1.3.1 General objectives of the project
 To study the mechanism of continuously supplying power from 4 different
sources
 To automatically switch between the different sources to ensure power
reliability of the electrical supply connected to the load. There are some loads
that are affected by even the slightest loss of power. There are also operational
conditions where it may be desirable to transfer loads with zero interruption of
power when conditions permit.
 To offer constant power supply to delicate processes and operations
such as surgery cases in hospitals, transfer of money between banks,
data and information transfer at data centers, in order to prevent the loss
of life or data resources which could be very expensive to business
operations
 To eliminates the element of manpower interaction in starting a
generator and changing power supply from one source to another.

1.3.2 Specific objectives of the project


 To simulate power supply into a given load from 4 different sources without
power interruption
 To develop a system that will effectively manage power supply changeover
between the four sources using 8051 microcontroller in proteus software
 Designing the PCB using software simulation which will help us in time we
need to implement the project with hardware

4
CHAPTER TWO

Literature Review

Many studies have been conducted related to hybridization different power sources and
automatically switching the load to the available ones.

Amuzuvi, C. K. and Addo, E. (2015), developed A Microcontroller-Based Automatic


Transfer Switching System for a Standby Electric Generator. This paper explains a
Microcontroller-Based Automatic Transfer Switching System , which avoids a
manual switching system. A voltage sensing circuit, a Hall Effect current sensor,
relays, LEDs and an LCD were all coordinated using a PIC16F877A microcontroller.
The designed circuitry was conducted using Proteus design suit software, which
combines a standby diesel generator and the AC mains only. An Automatic Transfer
Switch (ATS) was used with standby systems and includes a main voltage sensor
circuit. When mains power is interrupted, the control circuit starts up the generator
set, disconnects the load from the utility and connects it to the generator set. But
there was no means to check the availability of the generator power: weather it runs out
of fuels or gets some faults. [7]

Similar work was also conducted by AGBETUYI A. F., ADEWALE A. A.,


OGUNLUYI J. O., OGUNLEYE D. S for a single phase power generator
demonstrating the ability of automatic transfer switch to perform automatic power
change over activities easily and with little or no human interaction using
Microcontroller (PIC 16F877) to convert the measured analogue alternating current.

KARANJA JAMES KIRONJI and LABEJA CALEPS carried out a research on design
and simulation of DOMESTIC HYBRID POWER SUPPLY; the integration of solar,
wind and a battery bank by interlinking them to act as a single source of power thus
providing a solution to frequent power shortages which is a common phenomenon in
the East African region [8]. But they didn’t provide a means for controlling circulating
currents when hybridizing the power supplies in a power system. Circulating currents
occur mainly when hybridized generators in a power system share a common neutral.
In any paralleling operation, it is extremely important that voltages produced by the
generating equipment are as closely matched as possible. To properly match voltages:
RMS and instantaneous values should be similar well. These circulating currents can

5
cause overheating in the generator windings and false tripping of overcurrent protection
equipment, particularly ground fault detection schemes. [9]

Adamu Murtala Zungeru and Ambafi James Garba studied on DESIGN OF A


SMART EMBEDDED UNINTERRUPTED POWER SUPPLY SYSTEM FOR
PERSONAL COMPUTERS .The design of this uninterrupted power supply for
personal computer (PC) was proposed for enhanced portability in the design of
personal computer desktop workstations. Apart from its original functionality as a
backup source of power, this design incorporated the unit within the system unit casing,
thereby reducing the number of system components available. But the system
requires DC supply for charging the battery since the rechargeable batteries are not
charged by AC voltages .In their work they includes switching circuit block for
automatic changeover from AC mains to inverted DC power, comprises a single
microcontroller chip used for both interfacing with a conventional personal
computer (software control) and for other circuit components control (hardware
control). This system enables the automatic shutdown of the personal computer
when the battery level falls below a designated safe voltage value. This occurs only
when there is a power outage. [10]

Most of the papers done so far on uninterrupted power supply, used only two power
sources a standby generator with an automatic transfer switch and/or UPS units as a
backup to the main utility feed. But we extended the number of sources to four different
supplies. Their idea was also for applications that require small power demand such as
personal computer (PC).our proposed design helps for medium power demand
applications as it switches between the four ac supplies and we can regulate it depending
on our power demand requirements. And the most important thing in ours is the ability
of the programmability. Having a programmable system adds the versatility and
flexibility features.

6
CHAPTER THREE

Methodology and system design

The main and core system in our project design is the embedded system, so we need to
have a vivid image on them before we get in to the main proposed design.

3.1. Embedded system:

An embedded system combines mechanical and electrical components along with a


computer, hidden inside, to perform a single dedicated purpose. In a more ease
definition Embedded system is a microcontroller-based system which is a combination
of hardware and software form together a component of larger machine. Most of the
computers nowadays are single-chip microcontrollers that are the brains of an
embedded system. Embedded systems are a ubiquitous component of our everyday
lives. We interact with hundreds of tiny computers every day that are embedded into
our houses, our cars, our bridges, our toys, and our work. As our world has become
more complex, so have the capabilities of the microcontrollers embedded into our
devices. [11]

An embedded system is designed to run on its own without human intervention, and
may be required to respond to events in real time. To save costs, embedded systems
frequently have the cheapest processors that can do the job. This means your programs
need to be written as efficiently as possible. Embedded systems frequently control
hardware, and must be able to respond to them in real time. Failure to do so could cause
inaccuracy in measurements, or even damage hardware such as motors. Almost all
embedded systems need to be able to prioritize some tasks over others, and to be able
to put off/skip low priority tasks such as user interface in favor of high priority tasks
like hardware control.

7
3.1.2. Components of embedded system
 Hardware
Processor, Timers, Interrupt controller, I/O Devices, Memories, Ports,
etc.
 It has main Application Software
Which may perform concurrently the series of tasks or multiple tasks.
 It has Real Time Operating System (RTOS)
RTOS defines the way the system work. Which supervise the application
software. It sets the rules during the execution of the application
program. A small scale embedded system may not need an RTOS.

Figure below shows one possible organization for an embedded system.

Figure 1: Embedded system organization [12]

8
3.1.1. Functions of Embedded Systems

By then let’s see the importance of the embedded systems and their functions.
Following are some of the functions expected out of the embedded systems.

 Monitoring of the environment


 Reading the sensor inputs
 Processing of the inputs
 Displaying
 Controlling the environment
o Generating and transmitting commands for the actuators
 Transforming the information
o E.g. Data compression/decompression. [12]

Applications

o Military and aerospace embedded software applications


o Communication Applications
o Industrial automation and process control software.
o Home appliances

3.2 Basic System design and implementation

Designing automatic transfer systems is very important for cases where electric power
continuity is very essential. Power supply Changeover mechanism can be designed
using different tools. In software wise this can be designed by different electrical and
electronics software like MATLAB (SIMULINK), PROTEUS+KEIL (embedded
system), MULTISIM extra. In our case we use embedded system which is 8051
microcontroller in Proteus suit software and keil-uvision for writing a code where the
Microcontroller is directly interfaced with relay driver to monitor and control the power
source at any instant time. Proteus design suit software is wholly unique in offering the
ability to co-simulate both high and low-level micro-controller codes. It combines

9
mixed mode SPICE circuit simulation, animated components and microprocessor
models to facilitate co-simulation of complete microcontroller based designs. Using
Proteus we can design and test the results before the physical prototype is constructed
and we create PCB design with it so it could be an all in one package for students and
hobbyists this makes it to take the edge over the other development tools.

Proteus incorporates many functions derived from several other languages: C, BASIC,
Assembly, Clipper/dBase; it is especially versatile in dealing with strings, having
hundreds of dedicated functions; this makes it one of the richest languages for text
manipulation.

Proteus does all the tasks with help of software (like mikroC PRO for 8051, Keil-
uvision, Proteus text code environment…) which include the following functions code
writing, assembling, debugging and changing object files to executable file (HEX file).
In our project mikroC PRO for 8051 is to be used. The programming language in
mikroC PRO for 8051 is the higher level language, C which is most popular and
simplest one. This software can provide us with the final executable HEX (sequence of
0s and 1s) file which is ready to be loaded to the flash memory of the microcontroller,
so that the microcontroller is functional.

How the proposed system works?

The main supply has the given the highest priority, which means if there is mains power
continuity, there is no need for the other sources to turn on and if mains resumes while
the load is connected to the rest three sources, the system takes action through the relay
driver to switch the load to the mains.

The microcontroller first checks for the availability of the mains supply, if it exists the
load will be continuously supplied by the mains. In case there is an outage (power
interruption) in the mains, the system automatically goes to check for the next power
supply (say wind power). If there is wind power continuity, the microcontroller will
immediately switch the load to wind power. Now the relay connected to the wind source
is closed. The Microcontroller will continue to monitor the condition of the utility
power source until it is restored, and then it send a signal to shut down the wind power
source and then retransfer the load back to the utility line. Incase both (mains and wind
powers) are down the microcontroller turn over to the subsequent existing power source
(the solar power). If it exists the load will be powered by the solar power source, if not
it will goes to the standby generator. The cycle continuous in the same fashion.

10
The whole system working principle is summarized in the flow chart shown below.

Figure 2: flow chart diagram of the system

11
Below is the design of the system accompanied by the descriptions of each and every
block in the model.

Figure 3: The designed system [13]

12
HARDWARE DESCRIPTION

1. Power supply block


This power is mainly to be used by the microcontroller but the Proteus software
provides power to the microcontroller internally, pin 40(Vcc=5V) and pin 20

(Vss =GND) are missed from the 8051 microcontroller. Though we don’t use these
circuits in our software design but in case we need to implement it in hardware it is
worth designing the power systems.

Socket

Figure 4: power supply unit

A. Transformer:
Transformer is a static electrical device that transfers energy by Inductive coupling
between its winding circuits. A varying current in the primary winding creates a varying
magnetic flux in the transformer's core and thus a varying magnetic flux through the
secondary winding. This varying magnetic flux induces a varying electromotive force
(EMF) or voltage in the secondary winding.

Transformers range in size from thumbnail-sized used in microphones to units weighing


hundreds of tons interconnecting the power grid. A wide range of transformer designs

13
are used in electronic and electric power applications. Transformers are essential for the
transmission, distribution, and utilization of electrical energy.

The ideal transformer model assumes that all flux generated by the primary winding
links all the turns of every winding, including itself. In practice, some flux traverses
paths that take it outside the windings.[14] Such flux is termed leakage flux, and results
in leakage inductance in series with the mutually coupled transformer windings.[12]

Leakage flux results in energy being alternately stored in and discharged from the
magnetic fields with each cycle of the power supply. It is not directly a power loss, but
results in inferior voltage regulation, causing the secondary voltage to not be directly
proportional to the primary voltage, particularly under heavy load. Transformers are
therefore normally designed to have very low leakage inductance. Nevertheless, it is
impossible to eliminate all leakage flux because it plays an essential part in the
operation of the transformer. The combined effect of the leakage flux and the electric
field around the windings is what transfers energy from the primary to the secondary.

Having saying this, as most of today’s microchips, microcontrollers need 5V for normal
operation. Then we need to step down the available 220V from the four different
sources to 12V ac-voltage which is available for further processes (rectifying,
smoothing and regulating).

Figure 5: A typical Transformer [15]

14
B. Bridge rectifier:

A diode bridge is an arrangement of four (or more) diodes in a bridge circuit


configuration that provides the same polarity of output for either polarity of input. When
used in its most common application, for conversion of an alternating current (AC)
input into a direct current (DC) output, it is known as a bridge rectifier. A bridge rectifier
provides full-wave rectification from a two-wire AC input, resulting in lower cost and
weight as compared to a rectifier with a 3-wire input from a transformer with a center-
tapped secondary winding.

Figure 6: Bridge rectifier circuit


In the diagrams above, when the input connected to the left corner of the diamond is
positive, and the input connected to the right corner is negative, current flows from the
upper supply terminal to the right along the positive path to the output, and returns to
the lower supply terminal via the negative path.

In each case, the upper right output remains positive and lower right output negative.
Since this is true whether the input is AC or DC, this circuit not only produces a DC
output from an AC input, it can also provide what is sometimes called reverse polarity
protection". That is, it permits normal functioning of DC-powered equipment when
batteries have been installed backwards, or when the leads (wires) from a C power
source have been reversed, and protects the equipment from potential damage caused
by reverse polarity.

Having 12v ac-voltage output from the transformer as input to the ridge rectifier, we
will get a DC output with high ripples.

15
C. FILTER:

Capacitors are used as filter. The voltage ripples from the bridge are removed and pure
DC voltage is obtained. And also these capacitors are used to reduce the harmonics of
the input voltage. The primary action performed by capacitor is charging and
discharging. It charges in positive half cycle of the AC voltage and it will discharge in
negative half cycle. So it allows only AC voltage and does not allow the DC voltage.
This filter is fixed before the regulator. Thus the output is free from ripples.

D.Voltage Regulator:

A voltage regulator is designed to automatically maintain a constant voltage level. A


voltage regulator may be a simple "feed-forward" design or may include negative
feedback control loops. It may use an electromechanical mechanism, or electronic
components. Depending on the design, it may be used to regulate one or more AC or
DC voltages.

Electronic voltage regulators are found in devices such as computer power supplies
where hey stabilize the DC voltages used by the processor and other elements. In
automobile alternators and central power station generator plants, voltage regulators
control the output of the plant. In an electric power distribution system, voltage
regulators may be installed at substation or along distribution lines so that all customers
receive steady voltage independent of how much power is drawn from the line.

7805 is a voltage regulator integrated circuit. It is a member of 78xx series of fixed


linear voltage regulator ICs. The voltage source from the filter still may have
fluctuations and would not give the fixed voltage output. The voltage regulator IC
maintains the output voltage at a constant value. The xx in 78xx indicates the fixed
output voltage it is designed to provide. 7805 provides +5V regulated power supply.
Capacitors of suitable values can be connected at input and output pins depending upon
the respective voltage levels.[16]

16
Pin details:

Figure 7: LM7805 pin description [17]


Pin No Function Name

1 Input voltage (5V-18V) Input

2 Ground (0V) Ground

3 Regulated output; 5V Output


(4.8V-5.2V)

Table 1: 7805 pin description

2. Microcontroller
An integrated electronic computing device that includes three major components on a
single chip

 Microprocessor (MPU)

 Memory

 I/O (Input / Output) ports

17
8051 MICRO CONTROLLER:

The Intel 8051 is an 8-bit microcontroller which means that most available operations
are limited to 8 bits.
Some of the features that have made the 8051 popular are:
 4 KB on chip program memory,128 bytes on chip data memory(RAM) [ 32 bank
register + 16 bit addressable register + 80 general purpose register]
 128 user defined software flags,8-bit data bus,16-bit address bus
 16 bit timers, Bit as well as byte addressable RAM area of 16 bytes.
 Four 8-bit ports, (short models have two 8-bit ports).
 1 Microsecond instruction cycle with 12 MHz Crystal.
 consist of 32 general purpose registers each of 8 bits
 consist of 16-bit program counter and data pointer
 consist of 3 internal and two external interrupts
 Level interrupt priority.
 less power usage in 8051 with respect to other micro-controller
8051 models may also have a number of special, model-specific features, such as
UART, ADC, OpAmps etc.it is a very powerful micro controller. [18]
CMOS TECHNOLOGY:
 Low-power, high-speed Flash/EEPROM technology.
 Wide operating voltage range (2.0V to 5.5V).
 Commercial and Industrial temperature ranges.
 Low-power consumption.

18
Figure 8: 8051 Microcontroller Pin layout [19]

Pin number Description


1 to 8 Pins of port 1. Each of them can be configured as input or output pin.
9 It is used to Reset Microcontroller 8051. A positive pulse is given on this Pin
to reset Microcontroller.
10 to 17 Pins of Port 3. These Pins can be used as universal Input or output. These are
dual function Pins. Besides the I/O function, these pins can be used as
interrupt pins, counter/timer, serial COM, control instructions (RD and WR)
18 and 19 Input output PINS for oscillator. An internal oscillator is connected to Micro
controller through these PINS.
20 Ground
21 to 28 Pins of port 2, can be configured as Input Output Pins in case when we don't
use any external memory. If we use external memory then these pins will
work as high order address bus (A8 to A15).
29 If we uses an external ROM then it should has a logic 0 to indicate Micro
controller can read data from memory.

19
30 Address Latch Enable. If we uses multiple memory chips then this pin is used
to distinguish between them. This Pin also gives program pulse input during
programming of EPROM
31 Enable Access. In case of multiple memories, applying logic 1 to this pin
instructs Micro controller to read data from both memories first internal and
afterwards external.
32 to 39 Port0 pins, can be used as I/O pins when we don't use any external memory.
When ALE=1 this port is used as data bus, when ALE=0, then this port is
used as lower order address bus (A0 to A7).
40 Vss : power source pin = 5V

Table 2: 8051 microcontroller pin description

Architecture:

Figure 9: 8051 Architecture

20
3. LCD DISPLAY:

A liquid-crystal display (LCD) is a flat panel display, electronic visual display, or video
display that uses the light modulating properties of liquid crystals.

LCDs are available to display arbitrary images (as in a general-purpose computer


display) or fixed images which can be displayed or hidden, such as preset words, digits,
and 7-segmentdisplays as in a digital clock. They use the same basic technology, except
that arbitrary images are made up of a large number of small pixels, while other displays
have larger elements. LCDs are used in a wide range of applications including computer
monitors, televisions, instrument panels, aircraft cockpit displays, and signage. LCDs
are, however, susceptible to image persistence. [20]

In our case the LCD display is used to show which power supply is being currently used
to power the load (lamp).

Figure 10: 16x2 LCD DISPLAY [21]

21
4. Relay Switch:
It is an electromagnetic switch which is used to control the electrical devices. Copper
core magnetic flux plays main role here. Many relays use an electromagnet to operate
a switching mechanism mechanically, but other operating principles are also used.
Relays are used where it is necessary to control circuit by a low-power signal (with
complete electrical isolation between control and controlled circuits), or where several
circuits must be controlled by one signal. The first relays were used in long distance
telegraph circuits, repeating the signal coming in from one circuit and re-transmitting it
to another. Relays were used extensively in telephone exchanges and early computers
to perform logical operations.

Figure 11: Relay switch [22]

5. RELAY DRIVER IC ULN2003:

ULN2003 is a high voltage and high current Darlington array IC. It contains seven Open
collector Darlington pairs with common emitters. A darling ton pair is an arrangement
of two bipolar transistors.

ULN2003 belongs to the family of ULN200X series of ICs. Different versions of this
family interface to different logic families. ULN2003 is for 5V TTL, CMOS logic
devices. These ICs are used when driving a wide range of loads and are used as relay
drivers, display drivers, line drivers etc. it is also commonly used for driving Stepper

22
Motors. Each channel or Darlington pair ULN2003 is rated at 500mA and can withstand
peak current of 600mA. The inputs and outputs are provided opposite to each other in
the pin layout. Each driver also contains suppression diode to dissipate voltage spikes
while driving inductive loads.[23] The schematic or each driver is given below:

U1
9
COM
1 16
1B 1C
2 15
2B 2C
3 14
3B 3C
4 13
4B 4C
5 12
5B 5C
6 11
6B 6C
7 10
7B 7C
ULN2003A

Figure 12: ULN2003, Relay driver

6. DIFFERENT SOURCES OF POWER SUPPLY:

MAINS SUPPLY:
Mains electricity is the general-purpose alternating-current (AC) electric power supply.
Worldwide, many different mains power systems are found for the operation of
household and light commercial electrical appliances and lighting.

In most countries, household power is single-phase electric power, with two or three
wired contacts at each outlet. The live wire (also known as phase, hot or active contact),
carries alternating current between the power grid and the household. The neutral wire
completes the electrical circuit by also carrying alternating current between the power
grid and the household. The neutral is connected to the ground, and therefore has nearly

23
the same electrical potential as the earth. This prevents the power circuits from rising
beyond earth, such as when they’re struck by lightning or become otherwise charged.

The voltages are generally in the range 100–240 V (always expressed as root-mean-
square voltage). The two commonly used frequencies are 50 Hz and 60 Hz. In Ethiopia
the common voltage levels are 220 ac (single phase) and 380V ac (three phase) with
50Hz frequency, which is mostly hydro-based power.

SOLAR POWER:
Solar power is the conversion of sunlight into electricity, either directly using
photovoltaic (PV), or indirectly using concentrated solar power (CSP). Concentrated
solar power systems use lenses or mirrors and tracking systems to focus a large area of
sunlight into a small beam. Photovoltaic convert light into electric current using the
photoelectric effect.

PHOTOVOLTAIC:
A solar cell, or photovoltaic cell (PV), is a device that converts light into electric current
using the photoelectric effect.

Solar cells produce direct current (DC) power which fluctuates with the sunlight's
intensity. For practical use this usually requires conversion to certain desired voltages
or alternating current (AC), through the use of inverters. Multiple solar cells are
connected inside modules. Modules are wired together to form arrays, then tied to an
inverter, which produces power at the desired voltage, and for AC, the desired

24
frequency/phase.

Figure 13: Grid-connected residential PV power system [24]

Solar energy can be stored at high temperatures using molten salts. Salts are an effective
storage medium because they are low-cost, have a high specific heat capacity and can
deliver heat at temperatures compatible with conventional power systems.

In Ethiopia, Solar photovoltaic are emerging in replacement of the fuel and wood-based
lighting and off-grid electrical needs especially in most of the rural areas/. Nationally,
it is thought to have about 5 MW of off-grid solar. Almost all current solar power is
used for telecommunications. Other uses include village well pumps, health care and
school lighting. A solar panel assembly plant opened in Addis Ababa in early 2013
capable of making 20 MW of panel per year. [25]

25
GENERATOR:
An alternator is an electromechanical device that converts mechanical energy to
electrical energy in the form of alternating current.

Most alternators use a rotating magnetic field with a stationary armature but
occasionally, a rotating armature is used with a stationary magnetic field; or a linear
alternator is used. Alternators generate electricity using the same principle as DC
generators, namely, when the magnetic field around a conductor changes, a current is
induced in the conductor.

Standby generator systems are designed to keep lights and home appliances powered in
the event of a power outage - automatically. Best of all, they provide peace of mind that
our family won't have to endure another headache-inducing power outage in the dark.
To ensure a proper response to an outage, a standby generator runs weekly self-tests.
Most units run on diesel, natural gas or liquid propane gas.

Figure 14: Standby generator

WIND POWER:

Wind power is an affordable, efficient and abundant source of domestic electricity. It's
pollution-free and cost-competitive with energy from new coal- and gas-fired power
plants in many regions. The wind's kinetic energy can be harnessed by a wind turbine.
The wind moves the turbine's blades, which transfer energy through a central hub to a
generator. The generator converts this mechanical energy into electrical energy that is
then delivered to the power grid.

In Ethiopia 153MW Adama/Nazrath Wind farm and Ashegoda with total installed
capacity 120 MW and annual energy of 400GWh/year are two typical examples of wind

26
power which are critical during the dry season and when droughts happen as the level
of the existing dams’ decreases. [6]

Electricity output depends on a number of variables including location (how much


wind there is), turbine size and style, and rotor diameter.

Figure 15: Wind turbine connected to a house, battery bank, and/or the state
electricity grid. [26]
Residential wind turbines are designed to function with wind speeds between 11 and 15
meters per second. Larger turbines are often positioned in high wind-exposure
locations, so are designed to function at higher wind speeds – thus producing more
electricity.

Because of the intermittent nature of wind, general guidelines are that wind turbines
will output between 10-40% of their rated capacity.

A realistic estimate of how much electricity a wind turbine would produce can be
calculated using the average wind speed and hours for your location and turbine model
specifications.

In a nutshell, wind is a low cost, low maintenance energy production method. Wind
energy works by harnessing natural wind movements, capturing it as kinetic energy
through turbine blades, and then converting the kinetic energy into electricity through
an electromagnetic generator at the top of the turbine. [27]

27
Software used:
Programming language: Embedded C
Embedded C is a set of language extensions for the C Programming language by the C
Standards committee to address commonality issues that exist between C extensions for
different embedded systems. Embedded C uses most of the syntax and semantics of
standard C, e.g., main () function, variable definition, datatype declaration, conditional
statements (if, switch, case), loops (while, for), functions, arrays and strings, structures
and union, bit operations, macros, etc.

It has the following merits:

 small and simpler to learn, understand, program and debug


 More reliable and scalable, Compared to assembly language.
 C compilers are available for almost all embedded devices in use today, and there
is a large pool of experienced C programmers.
 Unlike assembly, C has advantage of processor-independence and is not
specific to any particular microprocessor/microcontroller or any system. This
makes it convenient for a user to develop programs that can run on most of the
systems.

Compiler: MikroC PRO for 8051


MikroC PRO for 8051 software is being used for coding, which is merely supports for
Intel microcontroller families. It is a full-featured ANSI C compiler for 8051 devices
developed by Microchip Company. After successfully finishing the code with
embedded c language, the HEX object file is generated. The HEX object file is the
executable file that can be downloaded to the 8051 microcontroller easily using G540
burner or other techniques.

Design environment: Proteus 8 ISIS Professional


Proteus ISIS Professional software is a PCB design software integrated with the
simulation of the circuit you design. It is integrated with real time simulation of the

28
electronic circuit. It has many integrated feature that lets the developers to create circuit
diagram in schematic and PCB layout and run hex file to view proper simulation.

Designed Circuit diagrams

Cooperating all the afore-described materials and tools we have developed the system
in proteus 8 ISIS Professional which is shown below:

29
Figure 16: Proteus design of the proposed system

30
CHAPTER FOUR

RESULTS AND DISCUSSIONS

A. Regulated power supply for microcontroller, LCD display and switch input.

The regulated power supply can be used with circuits containing linear integrated circuit
elements. It is constructed to get necessary voltage of 5V to supply DC at electronic
equipment. The power source is usually the main electricity supply of 220V AC.

The 220v ac voltage source is rectified and converted to 5v dc voltage which is


compatible to the small electrical equipment such as 8051 microcontroller, LCD display
and indicator switch input to microcontroller ports. we simulate and get the desired 5v
dc voltage output in Proteus ISIS .

Below is the circuit schematic of rectifier regulated power supply using LM7805
voltage regulator IC.LM7085 is a positive voltage regulator and available for 5v voltage
DC output.

Figure 2: Regulated power supply unit

31
Figure 3: oscilloscope results for the PS unit

The ac input voltage have magnitude 220v supplied to step down transformer almost
to 5v ac. Output of secondary transformer is feed to full bridge rectifier for better output
ripple and easy smoothing. Capacitors are connected to the output of the bridge in
parallel to smooth the ac content and LM7805 is also connect to regulate and adjust the
output voltage to 5v in dc.

As you can observe from the above simulation picture 220v ac voltage is converted to
5v dc through the aforementioned electrical equipment.

B. Switches and relay tripping

Every time the switch which shows mains supply availability is ON, the load stays
connected to the mains supply. If the mains supply’s switch tripped, the relay driver
automatically closes the relay for wind power source, now load is connected to the wind
power. In the same fashion applies to the rest sources as seen from the following
diagrams.

32
Figure 19 :Main supply

The above figure shows when the main supply is available it supplied to the load despite
other sources are available(active) or disconnected. PB1 is an indicator for the
availablity of the main supply,thus when PB1 is connected main supply(Hydro
Power)source is active to provide the loadn with necessary current and voltage. But if
PB1is disconnect some how there is a failure in the main supply and load is supplyed
by another alternative source.

33
Figure 20 :Wind Power Supply

Fig.20 illustrates main supply is disconnected from supplying the load,but the load is
not interrupted due to have an alternative power supply ,the wind power source. As we
can afforementioned in the above figure PB2 is used for indicating the availability of
Wind Power Supply. Therefore, when PB1 is disconnect(Main Supply) and PB2 is
connect(Wind Supply) or active the load gets its source of electric from the wind
whenever the remaining two supplies are active or not.

34
Figure 21 :Solar Power Source

This simulating result shows when both main source and wind power source are not
available and wether generator is active or not the load demand gets its supply from
solar power source which is active. PB3 indicates the availability of solar power source,
if it is connected solar power source is available otherwise not.

35
Figure 22: Generator Source

If all of the three renewable energy source are not available, standby generator is using
as last alternative to continue uninterrupted power supply to the load. PB4 is used to
show the status of the generator whether it is ON or OFF.

36
CHAPTER FIVE

CONCLUSIONS AND SCOPE OF FUTURE WORK

The project “Automatic Power Supply Control with 4 Different Sources to ensure No
Power Interruption; Solar, Mains, Generator & Wind” has been explained in this paper
with all its features and details. The significance of this project lies in its various
advantages and wide places of applications where this project can be used efficiently.
It has been developed by integrating features of all the hardware components used with
their equivalent software components in Proteus software and simulated successfully.
Presence of every equipment or tool has been reasoned out and placed carefully in the
prior chapters thus contributing to the best working of the unit.

Future works:
 Hardware implementation
 Priority assignment based on the estimated running cost of each power supply
 Including the effects of faults, voltage sags and swells, to ensure the safety of
the load.
 Report on the length of the time each source was in service and the estimated
running cost of the units especially the generator.
 Incorporating Over voltage and over current protection
 Including Protection alarm and many others.
 Monitoring the total elapsed running time of the generator, total elapsed time
since last maintenance, and then providing at least one alarm to an operator to
provide maintenance of the generator after a predetermine time elapse

37
References:
[1]. http://www.iea.org/publications/freepublications/ [accessed 04-feb-2016]

[2]. BP: Statistical Review of World Energy, Workbook (xlsx), London, 2013 [accessed 12-
Dec- 2015]

[3]. http://isei.org/fileadmin/DATEIEN/Dateien/PV-Industry-ET[accessed 04-feb-2016]

[4]. New PV panel plant commissioned in Ethiopia (www.pv-


magazine.com/news/details/beitrag/new-pv-panel-plant-commissioned-in-
ethiopia_100009953/#axzz2ixJ6EtlP), pv magazine, 28 January 2013

[5]. Ethiopia Inaugurates Wind Farm With 153 MWs Featured, [accessed 04-feb-2016]

[6]. Ethiopia’s Climate-Resilient Green Economy Strategy, Government of Ethiopia, 2011

[7]. Amuzuvi, C. K. and Addo, E. (2015), “A Microcontroller-Based Automatic Transfer


Switching System for a Standby Electric Generator”, Ghana Mining Journal, Vol. 15, No. 1, pp.
85 - 92.

[8]. KARANJA JAMES KIRONJI and LABEJA CALEPS” DESIGN AND SIMULATION OF
DOMESTIC HYBRID POWER SUPPLY PROJECT”; BSEE/43352/101/DF,
BSEE/43534/101/DU

[9]. Anthony (Tony) Hoevenaars,” Preventing-Neutral-Circulating-Current-when-Paralleling-


Generators”; P. Eng President and CEO Mirus International Inc.

[10]. Adamu Murtala Zungeru and Ambafi James Garba, “DESIGN OF A SMART
EMBEDDED UNINTERRUPTED POWER SUPPLY SYSTEM FOR PERSONAL
COMPUTERS”.

[11]. http://users.ece.utexas.edu/~valvano/Volume1/EBook/C1_EmbeddedSystems Shape The


World.htm [accessed 03-jan-2016]

[12]. Lawrence and Kansas, “Embedded Systems Building Blocks, Complete and Ready-to-Use
modules in C”.

[13]. http://www.projectsstore.com [accessed 12- Dec- 2015]

38
[14]. McLaren, P. G. (1984). Elementary Electric Power and Machines. pp. 68–74

[15]. http://www.dhgate.com/product/5-pcs-lot-5w-mini-amp-transformer-diy-
kit/162668942.html

[16]. http://www.engineersgarage.com/electronic-components/7805-voltage-regulator-ic
[accessed 8-jan-2016]

[17]. https://www.google.com.et/imgres?imgurl=https://electrosome.com/wp-
content/uploads/2013/05/Lm7805-pinout-
diagram.gif&imgrefurl=https://electrosome.com/power-supply-design-5v-7805-voltage-
regulator/&h=242&w=305&tbnid=nL1wLRQ2L9_WeM:&docid=6AnNPI1blWw8AM&ei=E9-
0VqTYMoXTygPCwLnYDw&tbm=isch&ved=0ahUKEwjkrZGHluHKAhWFqXIKHUJgDvsQ
MwgaKAAwAA

[18]. Muhammad Ali Mazidi,Janice Gillispie Mazidi and Rolin D. McKinlay, The 8051
Microcontrollers in The 8051 Microcontroller and Embedded Systems( Using Assembly and C
),Second Edition,2008,pearson edition

[19]. ]. http://www.slideshare.net/nishank100ny/the-8051-microcontroller-42350596

[20]. "LCD Image Persistence". Fujitsu technical support. Fujitsu. Retrieved December 11,2011.

[21]. ]. http://www.buydisplay.com/default/character-2x16-lcd-display-modules-hd44780-
controller-black-on-yg

[22]. ]. http://www.phidgets.com/docs/3051_User_Guide [accessed 12-Dec-2015]

[23]. http://www.engineersgarage.com/electronic-components/uln2003-datasheet [accessed 8-


jan-2016]

[24]. Solar Cells and their Applications Second Edition, Lewis Fraas, Larry Partain, Wiley, 2010

[25]. New PV panel plant commissioned in Ethiopia (www.pv-


magazine.com/news/details/beitrag/new-pv-panel-plant-commissioned-in-
ethiopia_100009953/#axzz2ixJ6EtlP), pv magazine, 28 January 2013

[26]. http://exploringgreentechnology.com/wind-energy/how-does-wind-energy-work/

[accessed 8-Jan-2016]

[27]. Energy Efficiency and Conservation Authority (EECA). (retrieved 2011). Small Wind
Turbines. Retrieved from http://www.energywise.govt.nz/how-to-be-energy-efficient/generating-
renewable-energy-at-home/small-wind-turbines

39

You might also like