Professional Documents
Culture Documents
Final Report
Final Report
Project members
1. Mearg Alemayoh
2. Musie Welday
3. Teklay Haile
4. Tsige Tadesse
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
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
vi
List of figures
vii
Acronyms
IC Integrated Circuit
EU European Union
MC Micro Chip
GND Ground
MPU Microprocessor
PV Photovoltaic
viii
CHAPTER ONE
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.
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.
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.
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]
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
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.
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.
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.
Applications
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.
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.
11
Below is the design of the system accompanied by the descriptions of each and every
block in the model.
12
HARDWARE DESCRIPTION
(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
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.
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).
14
B. Bridge rectifier:
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:
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.
16
Pin details:
2. Microcontroller
An integrated electronic computing device that includes three major components on a
single chip
Microprocessor (MPU)
Memory
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]
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
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.
In our case the LCD display is used to show which power supply is being currently used
to power the load (lamp).
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.
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
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.
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.
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]
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.
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.
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
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.
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.
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.
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
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]
[5]. Ethiopia Inaugurates Wind Farm With 153 MWs Featured, [accessed 04-feb-2016]
[8]. KARANJA JAMES KIRONJI and LABEJA CALEPS” DESIGN AND SIMULATION OF
DOMESTIC HYBRID POWER SUPPLY PROJECT”; BSEE/43352/101/DF,
BSEE/43534/101/DU
[10]. Adamu Murtala Zungeru and Ambafi James Garba, “DESIGN OF A SMART
EMBEDDED UNINTERRUPTED POWER SUPPLY SYSTEM FOR PERSONAL
COMPUTERS”.
[12]. Lawrence and Kansas, “Embedded Systems Building Blocks, Complete and Ready-to-Use
modules in C”.
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
[24]. Solar Cells and their Applications Second Edition, Lewis Fraas, Larry Partain, Wiley, 2010
[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