RENEWABLE ENERGY AUTOMATIC SWITCH FOR HOME APPLICATION
NUR AMANI BINTI NOR IDI
This Report Is Submitted In Partial Fulfillment of Requirements for the Degree of
Electrical Engineering (Industrial Power)
Faculty of Electrical Engineering
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
MAY 2010
“I hereby declare that I have read through this report entitle “Renewable Energy Automatic
Switch for Home Application” and found that it has comply the partial fulfillment for
awarding the degree of Bachelor of Electrical Engineering (Industrial Power)”
Signature : ………………………………………………
Supervisor’s Name : MR. FARHAN BIN HANAFFI
Date : 12TH MAY 2010
I declare that this report entitle “Renewable Energy Automatic Switch for Home
Application” is the result of my own research except as cited in the references. The report
has not been accepted for any degree and is not concurrently submitted in candidature of
any other degree.
Signature : ………………………………………………
Name : NUR AMANI BINTI NOR IDI
Date : 12TH MAY 2010
Special dedicated to
My beloved father and mother
Mr Nor Idi Bin Ayob and Mrs Hamidah Khairuddin
My inspirational Motivator
Mr Farhan Bin Hanaffi
Special Invitation
Mr Aminurrashid Noordin
And
Mr Musa Bin Lada
All my fellow friends,
Thank you for everything
ACKNOWLEDGEMENT
First of all, I would like to express my thankfulness and gratitude to Allah S.W.T
who has given me all the strength that I needed to complete this final year project and also
prepare this report.
With this opportunity, I would like to express my gratitude to the Faculty of
Electrical Engineering (FKE), Universiti Teknikal Malaysia Melaka (UTeM) generally,
and especially to my supervisor Mr Farhan Bin Hanaffi because helped, advised and
guided me during complete this final progress report. Besides, I would like to thanks to Mr
Aminurrashid Bin Noordin and Mr Musa Bin Lada because they were guided and helped
especially during completed task of the programming and the simulation.
And also to my parents, thanks to them because of their supported me with their
prayer and love. Last but not least, I would like to thank all of my friends whom have been
such wonderful friends to me and also to everyone who was involved in the completion of
this final progress report.
ABSTRACT
This project proposes about the renewable energy uses as power sources that
connected for home appliance. The renewable energy sources come from several of
sources such as solar, wind and also tidal used to generate electricity. Solar energy is a part
of widely recognized in renewable energy sources besides the without charge any cost and
clean energy whereby environmental impacts are negligible. The Renewable Energy
Automatic Switch has to design and connected between main source and renewable energy
sources as solar sources for home application. The controller systems will carry out by
Programmable Intelligent Controller (PIC16F877A) function as the control circuit to
communicate between switch and sensor. Photovoltaic cell sensor or Light Dependant
Resistor (LDR) sense the light and convert to the voltage. The final result from this project
has bring automatic switching that can be applied for home application which connected
between two power energy sources without by human or manually to switch the power
supply through the load for minimize the electricity consumption. In addition solar energy
component system including of converter and inverter has been designed in this project by
doing the simulation.
ABSTRAK
Projek ini mencadangkan tentang tenaga yang boleh diperbaharui dengan
digunakan sebagai sumber tenaga yang berkaitan untuk peralatan di rumah. Sumber-
sumber tenaga yang boleh diperbaharui adalah daripada beberapa sumber seperti tenaga
suria, tenaga angin dan tenaga ombak dengan menjanakan bekalan arus elektrik. Tenaga
suria ialah salah satu sumber tenaga yang digunakan secara meluas di dalam sumber tenaga
yang boleh diperbaharui selain tanpa dikenakan sebarang kos dan tenaga yang dijamin
bersih. Renewable Energy Automatic Switch direka dan disambungkan di antara sumber
utama dan sumber tenaga yang boleh diperbaharui untuk diaplikasikan kepada kawasan
perumahan. Sistem pengawal akan dijalankan oleh Programmable Intelligent Controller
(PIC16F877A) iaitu fungsi sebagai litar kawalan untuk berkomunikasi antara suis dan
penderia. Rasa penderia sel fotovolta oleh voltan dan semasa dan nilai bateri akan
mengesan oleh penderia. Keputusan yang telah didapati daripada akhir projek ini adalah
membawa pensuisan automatic ini yang boleh digunakan di antara dua sumber tenaga
secara automatik tanpa dikawal oleh manusia untuk menukarkan antara dua bekalan kuasa
melalui beban untuk meminimumkan penggunaan tenaga elektrik. Di samping itu, di dalam
component yang terdapat dalam tenaga suria iaitu terdiri daripada converter dan inverter
direkabentuk melalui simulasi di dalam menghasilkan projek ini.
vii
TABLE OF CONTENTS
CHAPTER TITLE PAGE
TITLE OF PROJECT i
DECLARATION ii
DEDICATION iii
ACKNOWLEDGMENT iv
ABSTRACT v
ABSTRAK vi
TABLE OF CONTENTS vii
LIST OF TABLES xi
LIST OF FIGURES xii
LIST OF APPENDICES xiii
1 INTRODUCTION
1.1 Overview of Project 1
1.2 Problem Statement 2
1.3 Objective of Project 3
1.4 Scope of Project 3
1.5 Thesis Structure 3
2 LITERATURE REVIEW
2.1 Introduction 5
2.2 Statistic Renewable Energy in Malaysia 5
2.3 Solar Energy Power in Malaysia 6
2.4 PIC16F877A 40-pin CMOS Flash Microcontroller 8
2.5 Solar Energy System of Component 8
2.6 DC-to-DC Converter 9
2.6.1 Buck Converter 10
2.6.2 Boost Converter 11
viii
CHAPTER TITLE PAGE
2.6.3 Buck-Boost Converter 12
2.6.4 Converter Comparison 13
2.7 Inverter 13
2.7.1 Classification of Inverter 14
2.7.2 Current Sources Inverter (CSI) 14
2.7.3 Voltage Source Inverter (VSI) 15
2.8 Characteristic of Photocell (LDR) 15
3 METHODOLOGY 18
3.1 Introduction 18
3.2 Research and Literature Review 19
3.3 Development of Hardware 20
3.3.1 Operation of Automatic Switch 21
3.3.2 Input Sensor 21
3.3.3 Relay with PIC Microcontroller 22
3.3.4 Software Design 23
3.3.5 Testing for Hardware 23
3.3.6 Analog Voltage Reading Method 25
3.4 Simulation 27
3.4.1 Boost Converter Simulation 28
3.4.2 Design Procedure of Converter Simulation 28
3.4.3 Inverter Design Simulation 29
3.5 Analysis Phases 30
4 RESULTS 31
4.1 Introduction 31
4.2 Implementation of Hardware Result 31
4.2.1 Input Sensor Device of Variable Resistor 32
4.2.2 Input Sensor Device of LDR 33
4.2.3 Microcontroller PIC16F877A 34
ix
CHAPTER TITLE PAGE
4.2.4 Relay 5VDC 35
4.2.5 Load of Circuit 36
4.3 Implementation of Simulation Result 37
4.3.1 Converter Design of Simulation Circuit 37
4.3.2 Inverter Design of Simulation Circuit 42
5 ANALYSIS AND DISCUSSIONS 45
5.1 Introduction 45
5.2 Analysis and Testing Hardware 45
5.2.1 Relationship between Voltage and Resistor 46
5.2.2 Performance of Automatic Switch 47
5.3 Analysis of Testing Simulation 50
5.3.1 Ripple Boost Converter Analysis 50
5.3.2 Analysis harmonic waveform 51
6 CONCLUSION 52
6.1 Introduction 52
6.2 Conclusion 53
6.3 Recommendation 53
REFERENCES 54
APPENDICES 55
x
LIST OF TABLES
TABLE TITLE PAGE
2.1 Renewable Energy resource potential in Malaysia 6
2.2 Characteristic and features of photocell 16
3.1 Analog Voltage based on Photocell resistance 26
4.1 The value of variable resistor and input voltage 32
4.2 The value of output voltage converts from resistor by LDR 33
xi
LIST OF FIGURES
FIGURE TITLE PAGE
2.1 Buck Converter Circuit 10
2.2 Voltage and current changes 10
2.3 Boost Converter Circuit 11
2.4 Voltage and current waveform 11
2.5 Buck-Boost Converter Circuit 12
2.6 Buck-Boost Converter Circuit 12
2.7 Comparison voltage ratio between types of converter 13
2.8 Typical construction of photocell 16
3.1 Flow Chart of development project 19
3.2 Hardware and Software Design 20
3.3 Relay 5VDC is connected to microcontroller 22
3.4 The schematic diagram of the microcontroller circuit 23
3.5 Check value of input voltage at the port PIC before switch on 24
3.6 Testing circuit of hardware during simulation 25
3.7 Block diagram of simulation of power sources 27
3.8 Block Diagram of Boost Converter 28
3.9 Boost Converter Circuit 29
4.1 Block diagram of hardware result 31
4.2 Port of the base PIC16F877A 34
4.3 Relay connected to microcontroller 35
4.4 Controller Circuit connected to the lamp 36
4.5 Block diagram of simulation parts 37
4.6 Boost Converter Circuit simulation 38
4.7 Input voltage boost converter 38
xii
FIGURE TITLE PAGE
4.8 Average input current boost converter 39
4.9 Average value of voltage on the diode 40
4.10 Average value of voltage equal to 24VDC 41
4.11 Inverter circuit design 42
4.12 Output voltage inverter equal to 24VAC 43
4.13 Output Current value of 24VAC 44
4.14 Output voltage between 24VDC and 240VAC 44
5.1 Relationship between Voltage and LDR 46
5.2 Relationship between Voltage and Variable Resistor 47
5.3 Testing 1Waveform of 240VAC during switch on relay 48
5.4 Testing 2 Waveform of 240VAC during switch on relay 48
5.5 Testing 3 Waveform of 240VAC during switch on relay 49
5.6 Testing 4 Waveform of 240VAC during switch on relay 49
5.7 Voltage ripple at output voltage of boost converter 50
5.8 Harmonic transform in inverter design simulation 51
xiii
LIST OF APPENDICES
APPENDIX TITLE PAGE
A Gann chart of Project 55
B Coding of PIC16F877A 56
C Testing of Hardware Development 57
CHAPTER 1
INTRODUCTION
1.1 Overview of Project
The Renewable Energy such as the resources that would implement in this project.
Generally, input power sources connected to the home is come from the Tenaga Nasional
Berhad (TNB). The generation comes from power sources such as gas, hydroelectric, and
coal as resources to produce the electricity. Malaysia such as the country has a good mixed
of energy sources. As an alternatively way, the renewable energy sources has been used to
replace it and to generate the electricity.
The most of power sources are come from the solar energy. Solar energy such as a
large resource comes from the sunlight which is free of pollution. In Malaysia, the
renewable energy provides more benefits to remain strong include an improved balance of
trade, foreign exchange savings, more competitive industries, new export markets,
employment opportunities, lower consumer prices and improvement of environment.
Moreover, this project was implementing two of sources which come from main
and other renewable energy power sources connected to the load form home application.
The primary sources are main power and while the secondary is renewable energy sources.
The automatic switching helps human while selected the two of power sources that has
connected to the load.
2
1.2 Problem Statement
Nowadays, the global warming issue was emphasizing into our earth from the
energy sources that we used every day. The solution to this problem being the low level of
the temperature of global warming, renewable energy sources is the best way to generate
electricity. The renewable energy includes solar, wind, hydropower, biomass and
geothermal. Besides, an orientation in tropical and whether country such as Malaysia, solar
energy has more potential utilized in wide range of application growing rapidly.
The renewable energy as solar energy currently less used in the residential because
of cost is expensive to build the system. Towards, to improve the performance and this
critical issue, the solar energy used to solve this problem. Moreover, by improvement the
system, the automatic switch has controlled to help human on the way to select primary or
secondary power sources.
Therefore, the several advantages give more uncomplicated while selected the
power sources that has connected to the load. On proper designed, the automatic switch is
proposed to ensure workings safely.
3
1.3 Objectives of Project
The several objectives of this project that need to be accomplished in developing
renewable energy automatic switching. These projects intend to achieve the following
objectives:
i. To design and develop switch two power supply from TNB or renewable
energy
ii. To use and optimize renewable energy as secondary power sources
iii. To simulate and design system energy sources circuit using OrCAD
1.4 Scopes of Project
The way to achieve the several objectives, this project needs to be implementing as
below:
i. To design and build automatic switch 240VAC/50Hz between two sources
ii. The controller use by PIC16F877A microcontroller in this project
iii. Automatic switch operates through Light Dependent Resistor (LDR)
iv. OrCAD simulation to design circuit for inverter, converter and battery
v. Limiting energy sources for a vital load such as lighting
1.5 Project Outline
The project outline has been constructed into six chapters. The Chapter One
explained about the introduction of this project. This chapter consists of the problem
statement, objectives, scopes and also the project outline. Next, the Chapter Two covered
the literature review based on the previous research that conducted towards the
development of this project. Based on research and study, the implementation of the
microcontroller was introduced and explained about the solar energy system consist of
converter and inverter.
4
In addition, Chapter Three explained the methodology about this project in
developing the automatic switches consist of software, hardware and simulation
implementation. The literature review of this project focuses on solar power energy. This
chapter describes the entire project designed involved which in hardware, software and
simulation development.
The Chapter Four will discuss the overall result in this project. The analysis and
discussion of the result will be based on the testing and troubleshooting explained on the
Chapter Five. Finally, the last chapter which of Chapter Six, concludes based on summary
of this project and the recommendation of this project.
CHAPTER 2
LITERATURE REVIEW
2.1 Introduction
This chapter will be discussing the research and study about this project consists of
the statistic of the renewable energy. Besides, the implementation of the hardware and
simulation of this project which parts of the power electronic briefly explained in this
chapter.
2.2 Statistic Renewable Energy in Malaysia
Malaysia has tremendous reserve of both non-renewable and renewable sources of
energy. The largest non-renewable energy source found in Malaysia is petroleum (oil and
gas) which is actively exploited. Although, Malaysia has some coal deposits only a small
percentage is being mined. The two abundant renewable energy sources in Malaysia are
biomass and solar. [1]
Malaysia recorded a total available capacity of electricity generation at
19,296.7MW in 2003. With regarded to electricity generation mix, the share of natural gas,
coal, hydropower, fuel oil and diesel oil were 65%, 24%, 6.3% and 1.5% respectively in
2003. [1]
The government of Malaysia had developed of renewable energy and targeted a
five percent contribution of renewable energy to electricity mix by 2005. Besides, the most
promising areas for renewable energy are in the conversion of biomass waste to energy and
in solar-power applications. [1]
6
Identification two renewable energy sources to exploit are palm oil waste and the
largest resources that can easily be development the solar, particular for rural electrification
and water heating. The potential for solar power is great, given that Malaysia receives
between 4.5 to 8 hours of sunshine per day and as equatorial country, a substantial amount
of solar radiation year around. [1]
Moreover, a recent renewable energy study identified the renewable energy
resource potential in Malaysia has showed in the Table below which in US Dollar value.
Table 2.1: Renewable Energy resource potential in Malaysia
Renewable Energy Resource Eenrgy Value in US$ Million (Annual)
Forest Residues 3,154
Palm Oil Biomass 1,679
Solar Thermal 796
Mill Residues 220
Hydro 133
Solar PV 100
Municipal Waste 50
Risk Husk 20
Landfill Gas 1
Source: Ministry of Energy. Water and Commnicatios Conversion rate:
US$1 equals RM 3.8
2.3 Solar Energy Power in Malaysia
Malaysia has a huge reserve of natural gas and crude oil which are generally used
in power generation. Moreover, these fuels are subsidized to a large extent. Besides, the
price of electricity from the national grid is also relatively cheap. Biomass based power
generation is quite prominent among the industries because the country produces large
quantities of agro-residues and industrial waste. [2]
7
Since Malaysia is situated in the equatorial region with an average radiation of
4,500 KWh per square meter, it is an ideal location for large scale solar power installations.
Considering that Malaysia gets on an average 4.5 hours to 8 hours of free and bountiful
sunshine every day, the potential for solar power generation is very high. However, the real
harnessing of this renewable energy source is way below its actual potential. [2]
A few remedial measures are:
i. Create awareness among the people through various programs about the
benefits of solar power. Extensive details of information should be
publicized pertaining to technology, financial aspects, support services,
legal requirements, and environmental advantages.
ii. Incentives can be provided and credit guarantee schemes can be established
to make solar power attractive.
iii. Imposing effective pricing laws taking into consideration the technology,
the size and location of the plant.
iv. Gradually reduce the subsidies given to conventional energy and
alternatively provide them to renewable energy.
In order to achieve that, Malaysia should focus to achieve betterment in various
social, environmental and economic parameters. Elimination of subsidies for non-
renewable energy sources and instead providing some initial handholding for renewable
energy sources should help among other things in rural electrification, environmental
betterment and sustainable development. Needless to say that solar being the second major
renewable energy source after biomass, would get a big boost.
8
2.4 PIC16F877A 40-Pin CMOS Flash Microcontroller
As defined by James L. Atonakos, microcontrollers are actually sopped-up
microprocessors with build-in features such as RAM, ROM, Interval timers, parallel I/O
ports and even A/D. The PIC16F877A is a powerful flash microcontroller that has many
features in a 40-pin DIP package. [6]
Microcontroller differs from microprocessor in many ways. First and the most
important is it functionality. These are the several advantages and the features of the PIC
microcontroller such as speed capability, versatility and security.
i. Speed – the PIC has an internal division that divides by four connected
between the oscillator and the internal block bus. This makes instruction
times easy to calculate, especially if using 4MHz Crystal. Each instruction
cycle then works out at one microsecond (1us).
ii. Versatility – the PIC is versatility micro and in volume as low cost solution
to replace even a few logic gates which where space is at a premium.
iii. Security – the PIC has a code protection facility, which is one of the best in
the industry.
2.5 Component of Solar Energy System
Due to the nature of solar energy, two components are required to have a functional
solar energy generator. These two components are a collector and a storage unit. The
collector simply collects the radiation that falls on it and converts a fraction of it to other
forms of energy (either electricity and heat or heat alone). The storage unit is required
because of the non-constant nature of solar energy; at certain times only a very small
amount of radiation will be received. [3]
At night or during heavy cloud cover, for example, the amount of energy produced
by the collector will be quite small. The storage unit can hold the excess energy produced
9
during the periods of maximum productivity, and release it when the productivity drops. In
practice, a backup power supply is usually added, too, for the situations when the amount
of energy required is greater than both what is being produced and what is stored in the
container. [3]
Moreover, in this project the component design of the simulation tack are inverter
and converter equipment system. Converter is used to convert from small or large value of
voltage directly current (DC) to get the output value whether increase or decrease. Besides,
for inverter system is converting from direct current voltage to alternating current (AC)
voltage.
2.6 DC-to-DC Converters
Different type of dc-to-dc converters are widely used for dc drives in traction
(electric trains), electric vehicles (EV), electric cars, trolley cars, golf carts, forklift trucks
and switched-mode power supplies (SMPS). Moreover, there are numerous application in
solar photovoltaic (PV) cell based power generation systems. At presents, PV based dc-to-
dc converters are extensively used in space applications, lighting applications in remote
areas and PV based water pumping systems. [4]
A DC-to-DC converter is a device that accepts a DC input voltage and produces a
DC output voltage. Typically the output produced is at a different voltage level than the
input. In addition, DC-to-DC converters are used to provide noise isolation, power bus
regulation, etc. This is a summary of some of the popular DC-to-DC converter topologies:
[5]
i. Buck converter step-down converter
ii. Boost converter step-up converter
iii. Buck-Boost converter
10
2.6.1 Buck Converter
In this circuit the transistor turning ON will put voltage Vin on one end of the
inductor. This voltage will tend to cause the inductor current to rise. When the transistor is
OFF, the current will continue flowing through the inductor but now flowing through the
diode. We initially assume that the current through the inductor does not reach zero, thus
the voltage at Vx will now be only the voltage across the conducting diode during the full
OFF time. The average voltage at Vx will depend on the average ON time of the transistor
provided the inductor current is continuous. Figure 2.1and Figure 2.2 showed that buck of
converter circuit. [7]
Figure 2.1: Buck Converter Circuit
Figure 2.2: Voltage and current changes