university of nairobi.pdf kamau - latest news in...

44
UNIVERSITY OF NAIROBI FINAL YEAR UNDERGRADUTE PROJECT DEPARTMENT OF ELECTRICAL AND INFORMATION ENGINEERING APPLICATION AND INTERFACE FOR CONTROLLING SOLAR POWERED SET OF 3 TRAFFIC LIGHTS. PROJECT NO: 52 By MAINA DANIEL KAMAU F17/29185/2009 SUPERVISOR: PROF. J. M. MBUTHIA EXAMINER: MR. S.L. OGABA A PROJECT REPORT SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE AWARD OF THE DEGREE OF BACHELOR OF SCIENCE IN ELECTRICAL AND ELECTRONICS ENGINEERING. UNIVERSITY OF NAIROBI 28/04/2014

Upload: duongnhi

Post on 19-Apr-2018

221 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

UNIVERSITY OF NAIROBI

FINAL YEAR UNDERGRADUTE PROJECT

DEPARTMENT OF ELECTRICAL AND INFORMATION ENGINEERING

APPLICATION AND INTERFACE FOR CONTROLLING SOLAR POWERED SET OF 3 TRAFFIC LIGHTS.

PROJECT NO: 52

By

MAINA DANIEL KAMAU

F17/29185/2009

SUPERVISOR: PROF. J. M. MBUTHIA

EXAMINER: MR. S.L. OGABA

A PROJECT REPORT SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE AWARD OF THE DEGREE OF BACHELOR OF SCIENCE IN ELECTRICAL AND ELECTRONICS ENGINEERING.

UNIVERSITY OF NAIROBI

28/04/2014

Page 2: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

DECLARATION

I hereby declare that this project is my original work and has not been presented for a degree award in this or any other university.

Name Maina Daniel Kamau

Registration Number F17/29185/2009

Signature …………………………….

Date ……………………………..

This project report has been submitted for examination to the Department of Electrical and Electronics Engineering, University of Nairobi with my approval as the university supervisor.

Prof. J. M. Mbuthia

Senior lecturer,

Department of Electrical and Electronics Engineering,

University of Nairobi.

Signature………………………………….

Date………………………………………

i

Page 3: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

DEDICATION

This project is dedicated to my loving parents Mr. and Mrs. Maina for the chance they gave me to pursue my dream career in electrical and electronics engineering. Your encouragement, prayers, motivation and financial support have made me complete this project.

ii

Page 4: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

ACKNOWLEDGEMENT

I am greatly indebted to Prof. J. M. Mbuthia of the University of Nairobi for all his guidance and assistance in accomplishment of this project. His kind encouragement, motivation and guidance during the implementation of this project are highly appreciated.

My sincere thanks goes to my parents Mr. and Mrs. Maina, my siblings Mary and Rosemary for their encouragement, understanding and patience during the project implementation period. I want to express my appreciation and gratitude to Mr. George Kabau for his continuous encouragement. Thank you all and God bless.

iii

Page 5: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

ABSTRACT

Solar traffic lights provide a reliable, inexpensive, affordable and environmentally friendly source for modern traffic management systems. They also reduce electric energy usage. With no trenching, wiring or electrical work required, solar powered traffic lights are perfect for traffic control applications. Also as Power outages are a significant problem in developing countries, it is an obvious advantage that solar traffic lights will keep traffic flowing even during power cuts.

With the economy also fluctuating all the time, the government at times finds itself economically strained. As the national focus turns to finding alternative energy rather than the reliance on fossil fuels, one way the government can save its resources is by taking advantage of the sun’s energy to power traffic signals as well as switching the traditional incandescent bulbs to LED. By retrofitting the signals to solar energy and switching to LED, the government will see major energy and cost savings, as well as a significant decrease in maintenance cost and time due to the longer life span of LEDs and solar panels [19.],[2.].

iv

Page 6: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

TABLE OF CONTENTS

Contents DECLARATION......................................................................................................................................... i

DEDICATION............................................................................................................................................ ii

ACKNOWLEDGEMENT ......................................................................................................................... iii

ABSTRACT .............................................................................................................................................. iv

TABLE OF CONTENTS............................................................................................................................ v

LIST OF FIGURES .................................................................................................................................. vii

LIST OF TABLES................................................................................................................................... viii

CHAPTER ONE ...................................................................................................................................... 1

INTRODUCTION ...................................................................................................................................... 1

1.0 General Introduction.......................................................................................................................... 1

1.1 Problem statement. ............................................................................................................................ 1

1.2 Objectives. ........................................................................................................................................ 2

1.2.1 General Objective ...................................................................................................................... 2

1.2.2 Specific objectives ..................................................................................................................... 2

1.3 Project Justification........................................................................................................................... 2

1.4 Project scope. ………………………………………………………………………………….3

1.5 Organization of Thesis. ..................................................................................................................... 3

CHAPTER TWO ................................................................................................................................... 4

LITERATURE REVIEW ........................................................................................................................... 4

2.1 system description. .......................................................................................................................... 4

2.1.1 Introduction ........................................................................................................................ 4

2.1.2 Light emitting diodes (LEDs) ............................................................................................ 4

2.1.2.1 Principle of operation…..…….............................................................................................. 5

2.1.3 Photovoltaic cells ................................................................................................................. 6

2.1.3.1 Different types of solar cells. ............................................................................................. 7

2.1.3.2 Electricity Generation in a cell........................................................................................... 7

2.1.3.3 Factors affecting power generation................................................................................... 9

2.1.3.4 Technologies to increase or optimize electricity generation...............................................10

Page 7: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

2.1.4 Energy storage........................................................................................................................... 10

2.1.4.1 Lead acid batteries............................................................................................................. 11

2.1.4.2 Battery characteristics...................................................................................................... 12

2.1.5 Charge regulator ….................................................................................................................... 13

CHAPTER THREE .............................................................................................................................. 14

DESIGN METHODOLOGY.................................................................................................................... 14

3.1 General Design ............................................................................................................................... 14

3.2 Deciding LED lighting parameters……............................................................................................ 15

3.2.1 Design. ................................................................................................................................... 15

3.2.2 LEDs arrangement in each aspect........................................................................................... 15

3.3. Battery estimate ................................................................................................................................ 16

3.3.1 100AH 12v battery in traffic light control................................................................................ 17

3.4 Solar panel design .............................................................................................................................. 17 .3.4.1 Calculations………………………………………………………………….……………..18 3.5 130W solar panel……………………………………………………………………………19 3.5.1 A day in Nairobi with 9hrs of sunshine…………………………………………………….19 3.5.2 A day in Nairobi with 4 hours of sunshine………………………………………………….20 3.6 Microcontroller…………………………………………………………………………….….20 3.6.1 Program……………………………………………………………………………………...21

CHAPTER FOUR……………………………………………………………………………………….22

Implementation of the design................................................................................................................... 22

4.1 Solar cells…………............................................................................................................................ 22 4.2 DC-DC converter design and simulation………………………………………………………23 4.3 Charge controller……………………………………………………………………………….24 4.4 Energy storage………………………………………………………………………………….25 4.5 12v DC stop light design…………………………………………………………………………………………………………25 4.6 Fixed and movable solar array……………………………………………………………………………………………….26 4.7 Viability of this project…………………………………………………………………………………………………………..27 4.8 CONCLUSION................................................................................................................................... 28 4.9 REFERENCES ................................................................................................................................... 30 APPENDIX .............................................................................................................................................. 32

vi

Page 8: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

LIST OF FIGURES

Figure.1: A 3 aspects LED traffic signal ……………………………………........................................................... 4 Figure 2: Solar panel................................................................................................................................ 5 Figure 3: The characteristic I-V curve for solar cells............................................................................... 8 Figure 4: Isc vs Voc at different temperatures. ........................................................................................ 9 Figure 5: A lead acid battery ................................................................................................................... 11 Figure 6: Expected lifetime of a sealed lead acid battery ………................................................................ 13 Figure 7: Charge controller operation point ……..................................................................................... 13 Figure 8: Block diagram of a solar powered traffic light........................................................................ 14 Figure 9: LEDs connection block diagram.............................................................................................. 16 Figure10:Basic buck boost converter circuit............................................................................................ 13 Figure11: simulation of a dc-dc converter …............................................................................................. 23 Figure12: Circuit for a charge controller................................................................................................. 24 Figure 13: Battery current vs solar panel voltage ………………………........................................................... 24 Figure 14 : Battery model simulation ……………………................................................................................. 25 Figure 15: Stop light driver circuit block diagram.................................................................................... 26 Figure 16: Microcontroller based circuit simulation................................................................................ 32 Figure 17: PCB layout of prototype.......................................................................................................... 33 Figure 18: Atmega32 pin out diagram……………........................................................................................... 33 Figure 171 &175: Atmega32 characteristics ............................................................................................. 34

vii

Page 9: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

LIST OF TABLES

Table1. Mean daily insolation values for Nairobi…..………………………………….……….18

Table2. Mean sun hours per day in Nairobi……………………………………….…….……….…19

Table3. Different Vin and their respective values of D, L, C……………………………….….….…23

viii

Page 10: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

CHAPTER ONE

INTRODUCTION

1.0 General introduction. This report explains the design of an interface and application for controlling a solar powered set of 3 aspects traffic light. Each traffic pole with 3 aspects is self contained with solar panel, 12V battery, LED aspects and Wi-Fi enabled microcontroller based circuit to control the aspects.

A solar electric system can be divided into five basic parts which are; solar modules to generate electricity from available sunlight, Rechargeable batteries needed to store electricity for later use at night and during inadequate sunshine periods, Control circuit which in this case is microcontroller based used for switching load, and finally Electrical appliances in this case a cluster of LEDs to make an aspect which use up the electricity [2.].

A solar panel which is located at the top of the pole converts sunlight into electrical power [2.]. A charge controller regulates the voltage coming from the solar panel. The regulated power obtained is used to charge a battery [11.].

During daytime, the traffic lights can use voltage direct from solar panel. At the same time, the battery can be charged for it to be used at night and during inadequate sunshine periods. Lighting is produced by arrays of extra bright LEDs that are much brighter than bulbs. LEDs have long life and are very energy efficient. They are small but can produce a significant amount of light. LED bulbs are also directional, meaning they will provide light where aimed [8.].

1.1 Problem statement. The current traffic controlling signals systems are characterized by very high power usage due to use of incandescent lamps as well as risk of interruptions during power outages which then leads to traffic flow controlling failure.

There is still high maintenance costs resulting from incandescent bulbs burning out as well as wire cuts or lightning effect on the power distribution lines from the power grid to the traffic lights. The high power usage and high maintenance of the current traffic controlling lights lead to economic strain on the government which mainly relies on fossil fuels for power production.

Retrofitting the current traffic signals with stand alone self contained solar powered traffic lights where lighting is produced by arrays of extra bright LEDs that are much brighter than bulbs will provide a solution to these challenges.

With each traffic signal pole self contained with a power source from the solar interface, power outages will not exist hence no traffic flow control interruptions. The use of LEDs for lighting will lead to large reduction in power usage as well as reduced maintenance since LEDs are energy efficient and have long life [19.].

1

Page 11: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

1.2 Objectives.

1.2.1 General Objective To design an application and interface that is to be used in controlling a microcontroller based set of 3 aspect traffic light.

1.2.2 Specific objectives a) To determine and design the relevant number of LEDs to replace the current incandescent bulbs and give an illumination bright enough to be applied in an aspect lighting.

b) To design a microcontroller based circuit to switch and control the lighting of the three aspects as in line with the traffic lights code.

c) To design a solar panel size, large enough to be able to cater for the powering of the 3 aspect traffic light.

d) To design a battery size, whose energy capacity will be enough to power the 3 aspect traffic light at night hours and in periods where solar energy collected by solar panel cannot power the traffic light as required.

e) To analyze and implement a solar powered set of 3 aspects traffic light.

1.3 Project Justification

a) LEDs have very low power consumption hence make it possible to power a traffic light with solar power as solar panels normally have quite low power output [19.].

b) The design of stand alone, self contained, solar powered traffic light poles ensure no trenching, wiring or electrical work will be required and will reduce maintenance costs [11.].

c) The use of solar power which is a reliable, free and an environmental friendly source of energy to power traffic lights prevents interruptions in traffic flow control during power outages, as well as no pollution of environment occurs [12.].

2

Page 12: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

1.4 Project scope.

The scope of this project includes the design of an application and interface to control a solar powered set of 3 aspects traffic light. A traffic pole with 3 aspects is self contained with solar panel, 12V rechargeable battery, LED aspects and Wi-Fi enabled microcontroller based circuit to control the aspects lighting. The battery is a backup power supply for periods with little or no sunshine at all. The solar panel collects solar energy and converts it into electricity supplied to the traffic light as well as recharges the battery [2.].

1.5 Organization of thesis

The thesis is organized in an order such as to provide the readers with a general understanding of the different components present in a solar powered traffic light, before moving on to the details specific to the project.

The following chapter introduces the different types of each component, their functions, advantages and disadvantages and their suitability to the project.

Chapter 3 provides a block diagram of the complete system and outlines the different system parameters. It shows the calculations for determining the system size, and shows the relative decrease in power usage by employing LEDs in place of incandescent bulbs. The same chapter explains how the different meteorological factors affect the sizing of panels and the comparative study of solar electricity in different seasons within a year. Nairobi is used for the case study.

The fourth chapter gives a detailed explanation of how the project is implemented. It includes the circuit diagrams and simulations as well as explanation used to build a prototype of the solar powered traffic light system. The paper ends with the viability of this project and a conclusion following the results and discussions.

3

Page 13: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

CHAPTER TWO

LITERATURE REVIEW

2.1 System description.

2.1.1 Introduction

A solar electric system can be divided into five basic parts which are: Solar modules to generate electricity from available sunlight, rechargeable batteries needed to store electricity for backup used at night and during insufficient sunshine periods, a Control circuit which for this case a microcontroller is used for switching load, distribution system which in this case the microcontroller is wifi enabled, and finally Electrical appliances in this case a cluster of LEDs being to make an aspect which consume the electric power and give out light [2.].

A solar panel which is located at the top of the pole converts sunlight into electrical power. A charge controller regulates the voltage coming from the solar panel. The regulated power obtained is used to charge a battery [11.].

During sunshine, the traffic light uses power directly from solar panel. At the same time, the battery can be charged for it to be used at night and during autonomy days.

Lighting is produced by arrays of extra bright LEDs that are much brighter than bulbs. LEDs have long life and are very energy efficient. They are small but can produce a significant amount of light. LED bulbs are also directional, meaning they will provide light where aimed.

Different sources of climate data for Nairobi have been studied and compared, in order to evaluate which data to use. A literature study was done within the field of stand-alone power systems. Scientific articles were studied to evaluate equations and methods for the dimensioning of solar power systems [13.].

Since climate data varies between different sources, the field study includes measurements of the actual generation from solar panels in Nairobi [14.]. From these results, which were compared with literature concerning solar radiation, conclusions could be drawn, of which data source that should be used in the thesis, for the dimensioning of the energy systems.

2.1.2 Light Emitting Diodes (LEDs) lighting system

There is a wide variety of light sources for outdoor use and had been in use as street lights ever since the invention of street lamps. Incandescent, fluorescent, high intensity discharge (Mercury vapor, mercury halides and high pressure sodium), low pressure sodium and most recent LED are popular choices for traffic lamps (Figure 1).

However for this purpose the aim is to exploit the chosen lighting, by maximizing its efficiency and minimizing its cost thus attempting to yield the best performance.

4

Page 14: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

Figure 1: a 3 aspect LED traffic signal

2.1.2.1 Principle of operation

The LED consists of a chip of semiconducting material doped with impurities to create a p-n junction. As in other diodes, current flows easily from the p-side (anode) to the n-side (cathode), but not in the reverse direction [20.].

Charge carriers, electrons and holes, flow into the junction from electrodes with different voltages. When an electron meets a hole, it falls into a lower energy level and releases energy in the form of a photon.

The wavelength of the light emitted and thus its color depends on the band gap energy of the materials forming the p-n junction.

In silicon and Germanium diodes, the electrons and holes recombine by a non-radiative transition, which produces no optical emission, because these are indirect band gap materials. The materials used for the LED have a direct band gap with energies corresponding to near infrared, visible or near uv- light.

LED technology began with infrared and red devices made with Gallium Arsenide. An advance in materials science has enabled mankind build LEDs with even shorter wavelengths, emitting light in a variety of colours.

The Light Emitting Diode (LED) Traffic Signals have become an efficient and effective alternative to traditional incandescent signals [19.].

The two main advantages of LED signals are very low power consumption (10W to 22W) and very long life as high as 7 to 10years. When compared with an incandescent bulb, which is 135W, it results to a saving of as high as 93% of energy [20.].

This low wattage requirement of LEDs has enabled the possibility of designing an application and interface for controlling a solar powered set of 3 traffic lights.

A complete LED light bulb consists of cathode, anode, LED chip, wire bond, epoxy lens and reflectors. It comes in several colors which are predetermined by the semiconductor material used in manufacturing.

The most common specification that comes with a small LED is its voltage and current rating. A forward voltage is required to initially drive the LED on and the maximum forward current rating

5

Page 15: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

limits the amount of current that can flow through it without damaging the LED.

Another type of current rating can be given along with the LED that gives the value at which the LED will be brightest.

However it is noted that the LED current is dependent on the ambient temperature and any change in voltage. A small change in voltage can lead to big change in current thus damaging the circuitry and the overall lighting system.

To avoid this problem, LEDs, driven by a DC power supply, require a driver circuit. For evading short circuit issues the LEDs are connected in series with a resistor. The calculation for the resistance is shown below:

R= (Vs- V )/I

V I will be given by the rating on the LED lamp and the Vs which is power supply will be controlled by the driver circuit.

A complete LED lighting system consists of LEDs, optical system, thermal system and electrical system. This integrated successfully can provide good illumination besides being energy efficient and economically viable.

LED produces directive light thus to fit it according to our purpose it might need several optical considerations and systems such as lens, reflectors etc.

The performance of an LED is highly altered by the effect of its junction temperature, which in turn influences the LED current, light output and leads to a shorter life. A very good heat sink should be used to minimize the temperature.

2.1.3 Photovoltaic cells

In 1838, Edmund Becquerel noticed that a small voltage is created between two metals placed in a semi-conducting electrolyte that is exposed for light. This is the working principle for photovoltaic cells [2.].

Figure 2: Solar panel

6

LED LED.

LED and LED

Page 16: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

2.1.3.1 Different types of solar cells

There are different types of solar cells; the most common group is the silicon cells. The silicon cell with highest efficiency is the mono-crystalline cell, where the atoms are symmetric placed within the structure. As mentioned before this gives a high efficiency, however it is also very costly to manufacture this symmetric structure. Commercial silicon cells have an efficiency of 14 - 17 %.

A less expensive alternative is the polycrystalline cell, where the structure is less symmetric and less complex. This has an efficiency of about 13 - 15 %.

Another type of silicon solar cell is the thin film cell based on amorphous silicon that is sprayed on a transparent surface.

The main difference from crystalline cells is the amount of silicon needed. For thin film cells a very thin layer of silicon is required, but another material like glass, for holding the silicon together, is required.

Because of the low amount of silicon needed, the required energy for manufacturing and thereby the production cost of those cells can be very low. Today the efficiency of the commercial thin film cells is 5 - 7 %. But the expectations are high and in laboratories efficiencies of around 13 % have been reached.

Within the thin film technology other materials than silicon are used, such as copper, indium, gallium and selenide, for so-called CIGS cells, or cadmium and telluride, for CdTe cells. However a problem is the toxicity of cadmium and telluride and the scarcity of indium [11.].

2.1.3.2 Electricity generation in a cell

Silicon, the most common semi-conductor, has the atomic number 14 and has four valence electrons. In the silicon structure each atom share its valance electrons with four other atoms to create a stabile structure [2.].

However if a photon hits the atoms, the binding breaks and an electron is released, the material gets electrically charged. To increase the conductivity the silicon can be doped with other materials to change the structure.

A photovoltaic silicon cell is divided in two parts, called the n-type and the p-type. The part that is exposed to light is the n-type, which is doped with phosphorus.

Phosphorous has five valance electrons so there will be an extra electron for each phosphorous atom in the doped structure. The lower part of the silicon cell is doped with bor, which has three valence electrons. In this part missing electrons, which can be called ―holes are created.

At the upper part of the silicon cell thin contacts are attached to conduct the electricity. The backside of the cell is covered with a metal-layer that conducts the charge from this side.

7

Page 17: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

When photons with energy content higher than 1.1 electron voltage (eV), the band gap for silicon, hits the silicon cell the energy will be transformed to electricity. The structure of a n-type silicon together with a p-type, also called a pn-junction, forces all released electrons to the same direction If a load is connected between the upper and lower contact a current will conduct through the load.

Only photons with a wavelength under 1100nm have an energy content of 1.1 eV, which is required to release an electron. Photons with less energy cannot be used. If the energy content is higher than 1.1 eV, only 1.1eV will be used, the rest will be unwanted excess heat in the cell.

It is because of this that not all sunlight can be converted to electricity; the theoretical efficiency being about 29 %. To gain higher efficiencies multi-layer cells can be used [11.].

The voltage from a single solar cell is about 0.5 V, which often is too low to connect to a load. To increase the voltage several cells are serial connected.

To get a solar cell applicable to a 12 voltage system, 33 – 36 cells are connected. This gives an open circuit voltage of about 20V.

When a load is connected the voltage drops according to the characteristic I-V curve for solar cells (Figure 3). The voltage for series connected cells is about 15 V when a load is connected.

Figure 3: The characteristic I-V curve for solar cells.

In Figure 3 it can be seen that the power output from the cell depends on the operating voltage. The size of the short-circuit current (I ) is directly dependent of the solar radiation, so if the radiation is doubled, I is also doubled.

The optimal operating voltage thereby depends of the actual radiation. The power production in relation to the product of the short-circuit current and the open-circuit voltage is called the Fill Factor.

8

sc

sc

Page 18: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

2.1.3.3 Factors affecting the power generation The angle of the incident light will affect the amount of power produced by a solar cell. The amount of photons hitting a horizontal surface decreases with the angle from the perpendicular normal line according to the cosine law [11.]. Experiments and models show that the power generated by a solar cell decreases even more than expected by the cosine law, especially for angles >30° from the normal line. The reason is mainly that the reflection from the coating will increase with steeper incident angles. The decreased generation due to reflections is 11 % and 50 % for 60° respectively 80° from the normal line. The temperature of a solar cell affects the shape of the IV curve. Higher temperature means increased internal energy losses and an increased band gap for the semi-conducting material. This leads to a decreased V and a slightly increased I , (Figure 4). The maximum power output, the highest product of the current and voltage in the curve, is lower for a high temperature solar cell. The efficiency of the cell will decrease with about 0.4 %/°C. An increased temperature also means higher stress on a panel, which decreases the lifetime by a factor of two for about every 10°C.

Figure 4: Isc vs Voc at different temperatures

The heat energy of solar cells comes from the solar radiation. Since only 10-15 % is converted to electricity, excess heat will be produced, as previously described. The materials used for the panel affect the temperature. If the excess heat energy easily can be transmitted to the surrounding the temperature will be lower.

As previously described, solar cells are series connected to increase the output voltage. There is one important disadvantage to this which is the mismatch effects. Since serial connection means same current through all cells, mismatch occurs when the current produced in each cell differs. The cell producing the lowest current will decide the effect. This means that if one of the cells is shadowed the generation will drop for the whole panel.

The specified power for a PV panel is rated with perpendicular solar radiation of 1000 W/m2 and a temperature of 25° C. Seen over a whole year, radiation of this level might only occur during a few hours. This means that a lot more capacity must be installed when it comes to solar power, compared with i.e. a diesel generator, in order to obtain the same annual energy generation [2.].

9

oc sc

Page 19: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

2.1.3.4 Technologies to increase or optimize the electricity generation The generated current is direct proportional to the incoming radiation, as previously described. So an increased incoming radiation means higher output.

The radiation can be reflected with mirrors or other material and focused to the solar cells. The increased output varies a lot between different designs and for each design it varies during the year due to radiation angle. One design is the ARCHIMEDES system, which is a solar tracking panel with V-formed concentrators. The system is built up with solar cells covering 50% of the area and reflectors covering the other 50% [11.].

The enhancement of the effective radiation is about 1.5 -1.6 times, but varies depending on the weather conditions since only direct sunlight is reflected as modeled. The tracking system increases the output with another 1.25 – 1.35 times.

To decrease the cell temperature, aluminium fins at the rear part of the panels are used. A more simple method is to use a fixed panel with a plane reflector.

Two panels are considered, one with and one without one plane reflector. The reflector has the same width (W) as the panel. The length of the reflector (L) is equal to the length of the panel plus the width on both sides of the panel (L+2W). The extended length is required to reflect radiation when the sun not is perpendicular to the attachment.

The reflector is tilted once a month and is modelled to reflect light on the whole panel during three hours before and three hours after noon. The cost of the reflector is about 5 % of the cost of the panel. The power output increases over the year with about 22 %.

The negative impact of the reflector is an increased cell temperature. The surface temperature increases with about 10°C, compared with the panel without reflector.

Another important way to increase the power output and lower the investment cost for a stand-alone system is to make sure that the power supply is equal to the power consumption. If the consumption gets lower than the estimated value, the investment will be higher than needed [11.].

2.1.4 Energy storage There are today several opportunities to store energy; electrochemical, flywheel, compressed air or superconducting coil can be used.

For a small stand-alone system in Kenya the flywheel technology is too immature and requires technical maintenance. It is also generally too large for this application. The compressed air requires a closed shaft or another enclosure that is not available in this case. The superconducting coil could have been an alternative, but the specific energy is too small and high effect is not required.

The electrochemical batteries (Figure 5), are the most mature and the most economical option for a small scale energy system [5.].

With a battery, chemical energy is converted to electricity. Primary batteries are Non-reversible and can only be discharged once. Secondary, also called rechargeable batteries can be recharged.

10

Page 20: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

The discharge to recharge efficiency is approximately 70-80 %. The main properties that are important for rechargeable batteries are the energy content, the power output and the amount of discharge and recharge cycles it can provide [4].

Those properties differ among different types of batteries and among different versions of the type of battery.

The state-of-charge (SOC) describes the amount of energy left in the battery compared to the full capacity, i.e. if SOC = 0.7, 70 % of the capacity is left and 30 % has been used.

The C-rate is the time the battery is charged or discharged within. A C-rate of 1 means that the whole capacity is discharged within one hour, while a C-rate of 0.1 means that it is discharged during ten hours. Battery manufacturers use different C-rates for the rating of the specific capacity. It is often called discharge rate, where 10 hours discharge rate equals a C-rate of 0.1 [3.].

2.1.4.1 Lead-acid batteries

The Lead-acid is the most common battery.

F i g u r e 5 : A L e a d a c i d B a t t e r y

It is a mature and relatively low-cost technology. It is, though, the battery with least energy per volume and weight. Within the lead-acid technology, several versions are available.

For automobiles shallow-cycle batteries are used. Only a high power output is required to start the engine, so the battery only requires a small amount of energy.

For other applications, such as a stand-alone solar powered traffic light, a deep-cycle version with long life time is preferable. One such battery is the flooded traction battery; popular in PV systems. Among the flooded lead-acid batteries the lead-antimony, open vent battery is the most widespread.

The advantage is the deep-cycle capacity and that it is a robust battery that can handle abused charging [6.].

The drawback is loss of electrolyte when recharging, which means that it has to be maintained by filling battery water. It also needs to be placed in a ventilated space. They also are the most expensive of the sealed lead-acid.

11

Page 21: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

Some of these batteries are called Valve-Regulated Lead Acid (VRLA). These have an advantage that they require less maintenance and that the life length can be longer. There are two types of VRLA batteries.

The first one is the gelled battery, which is using a gel as electrolyte. Those can be placed in a closed environment but requires controlled slow charging at constant voltage and temperature [4].

There is also a type called absorbent glass mat (AGM) that has similar properties as the gelled type, but without limits for charging time. The efficiency of the AGM batteries is 80 % and the efficiency of the flooded type is 75 %. Lead-acid batteries are available with different capacities, with terminal voltage normally of 2, 4, 6, 12 or 24V.

2.1.4.2 Battery characteristics

The Charge/Discharge (C/D) voltages for a battery cell differ with the type of battery, but for all types of batteries the voltage depends of the SOC. A fully charged battery has a higher voltage than an empty one. During recharge the voltage is higher than during discharge.

The C/D ratio defines the required Ah (ampere-hour) input over the required Ah output. A C/D ratio of 1.2 means 20 % more Ah for charge than for discharge. The energy efficiency is dependent on this but it also includes the different voltages for charge and discharge.

Another efficiency to consider is the charge efficiency, which is the Ah being chemically stored between the plates over the Ah charged to the battery. This efficiency is almost 100 % with low SOC but then decreases to 0% as the SOC goes to 100 %.The curve is dependent of the C- rate, with lower efficiency for high C-rate. This means that it is inefficient to fully charge the battery, especially with a high C-rate [5].

The energy that is not charging the battery is converted to heat. To prevent overheating it is therefore important that the charge is decreased when the battery is almost fully charged. A small current, called trickle charging, is though required to maintain the battery at a fully charged level, since batteries self-discharges. The self-discharge is generally lower than 1 % of the capacity, per day, but it increases a lot with high working temperatures.

The temperature affects the performance of a battery in many ways. As just mentioned, the self-discharge increases with higher temperature. The C/D ratio increase with increased temperature. The charge and discharge efficiency is decreased for low temperatures. The charge efficiency is also decreased for temperatures above 20°C. The optimal temperature differs for different types of batteries and different applications but it is usually in the range of 10 - 25°C.

The life time of a battery varies with type and version. For example a lead-acid battery usually last for 500 – 1000 cycles. The life time can quickly be reduced if the battery is overcharged or deeply discharged [3.].

For a flooded lead-acid the total life time in full Wh cycles can be two or three times higher if the SOC is kept above 90 % instead of 50 %. Deep-cycle batteries often have a specification showing the expected life time with different

Depth of Discharge (DOD), (Figure 6).

12

Page 22: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

Figure 6: Expected lifetime of a sealed lead-acid battery with different DOD.

2.1.5 Charge regulator To prevent the battery from overcharging or deep discharging in a small power system a charge regulator is required. A simple controller only has the opportunity to switch off the charging power when the battery reaches a certain voltage, deep discharge must be avoided in other ways [11.].

For a lead-acid battery the charge regulator uses maximum charge until the gassing in the cells starts. The charge is then gradually reduced to the trickle-charge rate. This is called a multiple charge rate and is applied in modern controllers.

The charge controllers have developed a lot the recent years and today some controllers have the possibility to increase the power output from a solar panel. As described in earlier, there is a maximum power point for each certain level of radiation.

The Maximum Power Point Tracking (MPPT) controller is able to adapt the voltage level from the panel, so the panel can operate at the optimal point (B) at all times. A regular charge controller operates at a voltage level slightly above the battery voltage (A), (Figure 7).

Figure 7: The operation point differs with a regular charge controller and a MPPT charge controller

Page 23: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

12V battery

Traffic light

Figure 8: Block diagram of a solar powered three aspects traffic light.

With a single LED producing a given amount of light in lumens, the amount of light to be emitted by each aspect dictates the total number of LEDs comprised by the aspect.

The number of LEDs in turn dictates the amount of power drawn from a solar panel or a battery by the traffic light.

This power gives an amount of current drawn which dictates the battery capacity and solar panel capacity required in the design of a stand-alone, solar-powered traffic light.

3.2 Deciding LED Light Quantity and number of LEDs for the aspects in lighting a solar powered traffic light:

The amount of light is always personal preference. At least minimum amount of required light and well distribution of light is considered. LED lights are to be used at maximum to get full return of investment. Fewer lights will fail to give enough illumination [21.].

14

CHAPTER THREE

DETERMINING THE SYSTEM PARAMETERS (DESIGN)

3.1 General design

Charge controller

Solar panel

Page 24: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

Amount of light is measured in lumens & Lux. Lumen is intensity of light, while Lux is light amount per square meter. Almost all of the lighting products mention lumens in their description. So a decision on how much lumens are required is needed.

Every environment/premise needs different light requirements. Many sample data for premises are found on internet.

A well designed traffic light is considered to give around 2000 Lumens up to 5000 Lumens: (a clear and visible indication light).

Now choosing lights: A typical well build LED light provide 80-110 Lumens per watt. Considering an estimate of 100 lumens per watt, to get 2000 lumens in each aspect, a 20W LED light is required. The incandescent bulbs used in conventional traffic lights normally could consume from 116W to 150W of electrical power. This shows the major energy saving advantage with use of LEDs.

{These calculations are just for reference. It is not most accurate data. Human eye can see in full moon light (0.25 lux) as well as mid noon light (110,000 lux). Also, lighting level is a relative field.}

3.2.1 Design

For a cluster of 3V LEDs being driven at the maximum current of 25mA to be used; then the power requirement of a single LED is given given from the formulae;

V × I = P

3V× 0.025A = 0.075W In order to make a 20W lamp in every aspect, then we would need, 20÷ 0.075 = ~ 267 LEDs per lamp.

3.2.2 LEDs arrangement in each aspect

A 12V battery is used to power the 3V LEDs in hours of no sun shine; therefore the LEDs are arranged as parallel links with 4 LEDs in series in each link, to ensure a 12V drop in every link and avoid malfunctioning. Several similar links, depending on the number of LEDs required, subsequently dependent on the illumination required, are interconnected in parallel.

15

Page 25: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

With 4 LEDs in each link, out of the 267 LEDs required, we have 267÷ 4=~ 67 links; and all links are interconnected in a parallel manner.

Each link/column draws 25mA (maximum current to drive an LED) from the 12V battery therefore for the 67 links connected in parallel, a total current of, 0.025× 67= 1.675A is drawn from the battery.

3.3 Battery estimate;

A 12V Battery which is recharged using solar power, powers the microcontroller based LED traffic light. The correct battery parameters for controlling the traffic light are estimated from the current drawn by the traffic light and the hours the traffic light is expected to be working, therefore;

With the traffic light drawing a steady 1.675 amps and it is supposed to last 24 hours, therefore:

C=1.675 amps * 24 hours = 40.2 AH

Then with cycle life considerations;

C’ = 40.2 AH / 0.8 = 50.25 AH

Then taking the rate of discharge (Peukart effect) into account;

C’‘=50.25/.5 = 100.5 AH

Thus a 100 amp hour sealed lead acid battery is needed to run the traffic light for 24 hours at 1.67 amps average draw.

16

Power source

12V 3v

3v 3v

3v

Microcontroller

Regulator

3v 3 3

3v 3v

3v 3v 3v 3v

3v Figure 9:

3v LEDs connection to achieve 12v3v drop by 3v LEDs.

v v

Page 26: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

3.3.1 100AH 12V rechargeable battery in traffic light control

Energy stored in the battery when fully charged is, 100AH x 12V = 1200Wh. This means the battery could supply the 20W aspect for 60 hours, or two and a half days without recharging before being completely drained.

3.4 Solar panel suitable to power the 3 aspect solar powered microcontroller based traffic light.

Solar panels are rated in watts. The watt rating is how much power a panel will produce in full sunlight at 77 degrees F. (These are ideal conditions. In real life the wattage is less by 10%- 15%).

The watt size range of a singular panel could be anywhere from 1 watt to 300+ watts. Most solar panels up to 135 watts are 12 volt panels. Many with wattage over 135 are of a higher voltage but designed mainly for grid tie applications.

Most 12 volt panels operate at a higher voltage when working; as high as 17 volts. It’s an intentional boost.

The general rule of how many watts are needed in relationship to the battery size is approximately 1 watt of solar panel for every amp hour of battery. So a 100 amp hour battery for instance, could show that a panel(s) of 75 to 130 watts would be in the right range. But, again, this depends on how it is used, what it is used for, affordability, what kind of space is available, how much sunlight the target area gets and so on.

A more professional and accurate way to determine the size of best suited solar panel is however by monitoring the radiation pattern or solar insolation of the target area and from it calculating the most applicable solar panel for that area.

Nairobi’s location close to the equator gives good circumstances for solar power. The annual irradiation is about 2 100 kWh/m2 for a horizontal surface. The daily insolation varies between 2 380 and 7 160 Wh/m2. The lowest values are during the first days of June, which is considered as a cloudy month. The highest insolation is between December and March, with February at the top [17.][14.].

The table (1) below shows the mean values for daily insolation (Wh/m2) at a horizontal surface in Nairobi for 3 different analyses.

17

Page 27: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

Month Jan Feb Mar Apr May Jun Jul Aug Sept Oct Nov Dec Av/ year 1 6670 7020 6730 5910 5250 4620 4250 4540 5820 6050 5720 6340 5740 2 5690 6500 5990 4940 5060 4520 5200 4610 4800 5300 4650 5720 5250 3 6450 6610 6350 5270 4650 4300 3810 4000 5270 5610 5270 6030 5300

Table 1: Mean values for daily insolation (Wh/m2) at a horizontal surface in Nairobi sampled over a year

three times. From the table, in years1, 2&3 Nairobi received a mean daily insolation of 5740, 5250 & 5300

Wh/m2 respectively. Therefore, the minimum value which is 5250 Wh/m2 was used to determine expected power output from a solar panel:

3.4.1 Calculations to design solar panel:

It is normally assumed that for each Wp (peak wattage) of rated power the module should provide 0.85watt hours of energy for each kWhm-2 per day of insolation (Hulscher 1994).

Since the three aspects (each 20W) are ON at different times, with the traffic light working for all the 24hours in a day, then the traffic light will require 20W × 24hr= 480Wh of energy daily.

This energy is received from the solar panel during sunshine hours and from the battery off sunshine hours; but all energy consumed from the battery during off sunshine hours is to be replaced when there is sunshine through the same solar panel.

Therefore in the available sunshine hours, the selected solar panel is supposed to collect a total of 480Wh of energy from the available sunlight/ daily insolation.

If the size (peak wattage rating) of the panel is X, then; Using insolation of 5.25 kWhm-2 per day (typical value for Nairobi region), then the system to produce 480Wh per day is X × 0.85 × 5.25= 480;

Giving X to be 107.5W

In reality (practically) it is recommended to always overrate the requirements by at least 20%. From this therefore, 130W solar panel is needed.

18

Page 28: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

Using the above information for Nairobi, the average hours a solar panel is exposed to sunshine lie between 4 to 9 hours in a day.

Therefore for a 20W per aspect traffic light with 100Ah 12v battery storage and a 130W solar panel; The relation is as follows:

3.5.1 A day in Nairobi with 9 hours of sunshine

For (24-9)hrs or 15hours, the traffic light consumes power from the battery storage i.e 20W × 15hr = 300Wh of energy is discharged from the battery.

For the 9 hrs of sunshine, the traffic light is expected to consume power directly from solar panel i.e 20W × 9hr = 180Wh of energy is required from the solar panel.

Still during the 9 hrs of sunshine, the battery is expected to be recharged fully by the solar panel.

Since it was discharged by an amount of 300Wh when there was no sunshine, this amount is expected to be recharged, therefore the solar panel is expected to give an additional 300Wh.

This means 300Wh + 180Wh = 480Wh is required from the solar panel.

For a solar panel with power generation rating given as 130W;

Calculating the energy it can supply the system; which is multiplying Watts by the hours exposed to sunshine, then multiplying the result by 0.85 (this factor allows for natural system losses).

19

3.5 130W SOLAR PANEL SUPPLYING POWER TO RECHARGE STORAGE BATTERY AND POWER THE TRAFFIC LIGHT, USING NAIROBI RADIATION DATA FOR ILLUSTRATION

Table 2: The mean sun hours per day in Nairobi for the different months in a year.

Jan Feb Mar Apr May Jun Jul Aug Sept Hours 9 9 8 7 6 5 4 4 6 of sunshine

Oct Nov Dec 7 7 8

(daily) Hours of daylight(daily)

12 12 12 12 12 12 12 12 12 12 12 12

Page 29: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

For the solar 130W panel in 9 hours of sunshine, 130 x 9 x 0.85 = 994.5Wh. This is the amount of energy the solar panel can supply to the system, and is greater than the required 480Wh, therefore the battery will be fully recharged and the traffic light will be supplied by enough power.

3.5.2 A day in Nairobi with 4 hours of sunshine

For (24-4)hrs or 20hours, the traffic light consumes power from the battery storage i.e 20W × 20hr = 400Wh of energy is discharged from the battery.

For the 4 hrs of sunshine, the traffic light is expected to consume power directly from solar panel i.e 20W × 4hr = 80Wh of energy is required from the solar panel.

Still during the 4 hrs of sunshine, the battery is expected to be recharged fully by the solar panel.

Since it was discharged by an amount of 400Wh when there was no sunshine, this amount is expected to be recharged, therefore the solar panel is expected to give an additional 400Wh.

This means 400Wh + 80Wh = 480Wh is required from the solar panel.

For a solar panel with power generation rating given as 130W. Calculating the energy it can supply the system;

The solar 130W panel in 4 hours of sunshine collects, 130 x 4 x 0.85 = 442Wh. This amount of energy is supplied to the system, which is a little less than the required 480Wh meaning the battery is likely not to be fully recharged on such a day.

Such days are few (from the data table above), therefore using a 130W solar panel suitable to recharge the 100Ah 12V battery and power the traffic light during sunshine hours.

3.6 Microcontroller

A programmable microcontroller (Atmega32 is selected for this specific project) controls the lighting and switching of the three different aspects as regarding to a program involving the code of traffic control.

The program is designed so as to light the red aspect to indicate stop, then the amber colour aspect indicating get ready, with green light lighting right after to indicate go; then the red aspect lights again as the process repeats itself.

20

Page 30: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

3.6.1 Program

The traffic light program in C language below was fed to the Atmega32 microcontroller; Port B was used as output of the microcontroller. The red aspect of the traffic light was connected to pin1, the orange aspect was connected to pin2, and the green aspect was connected to pin3. In the prototype, the red aspect was to light for 20s therefore a delay of 20s was set on pin1 once it was logic 1 (high). Similarly, the orange and green aspects were set to delay for 5s and 20s respectively, once the respective microcontroller output pins were at logic 1 (high).

The red aspect was set to be first to light indicating stopping of vehicles on the road, and once it was off, the amber (orange) aspect would light immediately as an indication to motorists to get ready just before the traffic could start moving. The switching off of the amber aspect was followed by an immediate lighting of the green aspect which would be an instruction to the motorists to start moving. This would light till the instant when the red aspect lights again to indicate stopping for motorists affected.

#include <avr/io.h> #include <util/delay.h>

int main(void) {

DDRB = 0b00000111; //Data Direction Register output for only pin0 pin1 pin2 on portB

while(1) { PORTB=0b00000001; //Assigning 5v to pin0 _delay_ms(20000); //Delay of 20000ms PORTB=0b00000000; //Assigning 0v to pin0 _delay_ms(0); //Delay of 0ms PORTB=0b00000010; //Assigning 5v to pin1 _delay_ms(5000); //Delay of 5000ms PORTB=0b00000000; //Assigning 0v to pin1 PORTB=0b00000100; //Assigning 5v to pin2 _delay_ms(20000); //Delay of 20000ms PORTB=0b00000000; //Assigning 0v to pin2 _delay_ms(0); //Delay of 0ms

} }

21

Page 31: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

CHAPTER FOUR

IMPLEMENTATION AND SIMULATION DESIGNS; VIABILITY OF THE PROJECT AND CONCLUSION

4.1 Solar Cells

Photovoltaic energy is the conversion of sunlight into electricity through a photovoltaic (PV) cell, commonly called a solar cell. Photovoltaic cells absorb sunlight and convert it directly into electricity [11.].

To produce 12 volts from a solar panel formed by a number of 24-cm2 cell, the total area needed will be about 870 cm2. Therefore, the number of cells required will be 36 cells, which could be aligned in a six-by-six configuration

PV cells are constructed out of semi-conductors so that when light shines onto the cells a certain amount of the light is absorbed. The energy of the absorbed light knocks the electrons loose from their atoms allowing them to flow through the compound. This flow of electrons produces a current that can be extracted and used as electricity.

The performance of a photovoltaic cell depends upon the following:

• Sunlight and the angle that the sun rays hit the PV cell. The most optimal position for the rays to hit the PV cell is at a 90 degree angle, which

takes place at noon.

• Climate conditions (e.g., clouds, fog, dust, etc.) have a significant effect amount of solar energy received by a PV cell and, in turn, its performance.

on the

• Absorption and reflection by the atmospheric layer shrouding the earth reduces the amount of solar energy arriving on earth.

• Temperature.

4.2. DC-DC Converter Design and Simulation

A dc-dc converter accepts a variable dc input voltage and produces a fixed dc output voltage that is either higher or lower than the voltage level of the input.

There are three basic type of dc converters; buck, boost, and buck-boost converters. A buck-boost converter was chosen because the output voltage of the solar panel varies depending on light intensity. Therefore, the generated voltage will be sometimes more than 12 volts and sometimes less those 12 volts.

A non-isolated, ( no transformer), topology of the buck-boost converter is show in Figure 10. The converter consists of a dc input voltage source, Vs = Vin, inductor L1, controlled switch S, diode D, filter capacitor C1, and a load resistance R . With the load switch on, the inductor current increases while the diode is maintained off. When the switch is turned off, the diode provides a path for the inductor current.

22

1

Page 32: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

Figure 10: Basic Buck-Boost Converter Circuit

The condition of a zero volt-second product for the inductor in steady state yields: V D T = -V (1-D) T

Where, V is Voltage Source; D is Duty Cycle; T is Period; V is Output Voltage, and; f is Switching Frequency. Using R equal to 964 Ohms, the values of L, C, and D with switching frequency are determined as follows:

Table 3: Different Vin and their Respective Values of D, L, C

Vout Vin D L 12 0.5 0.96 0.000015H 12 12.5 0.489796 0.0025175H 12 24 1/3 0.00428H 12 25 0.3243 0.004401H

C 1.9917x10-8 F 1.0145x10-8 F 1.9917x10-8 F 6.72 x10-9 F

A simulation of a dc-dc converter was done in PSim using an input voltage of 12.5V and 24V and the results shown in figure 11 below

. Figure11: Simulation of a dc/dc converter in . PSim (Gating Details)- 12.5 V input

s o

s

o

Page 33: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

4.3. Design and Simulation of a Charge Controller

A charge controller is used to control the flow of charge through the battery during charging and discharging. A charge controller protects the battery from overcharging and deep discharging in order to protect the battery from damage and also to increase its life span. The simple charge controller is implemented using the Multisim program. The program simulates input, output voltages and current through the battery. The circuit built on Multisim program is shown in Figure 12.

. Figure 12: Multisim circuit for

. chargecontroller

A graph is obtained by running a DC sweep simulation for V1, the voltage sweeps from 13 V to 20 V (the minimum and maximum voltage produced by solar panel). The corresponding values of the current are graphed against the voltage values and the results are shown in Figure 13.

Figure 13: Battery current vs solar panel voltage

24

Page 34: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

4.4 Electric Energy Storage

Chemical batteries are used to store energy in stand-alone systems for use during the night and when solar energy is not available. These batteries have reversible reactions that are rechargeable.

The most suitable battery technologies to use in a stand-alone photovoltaic system are: lead acid batteries, Lithium-ion batteries, Ni-Cd batteries. For photovoltaic applications in our project, lead acid batteries are the most suitable due to their low cost, low rate of self discharge and their ability to work at higher temperatures. The Peukert model is used for simulation of the battery:

(I1.35)(t)=1.1

The circuit battery model used for simulation is the Thevenin battery model as shown below:

Figure 14: Battery model for simulation

4.5 DESIGN OF A 12V DC STOP LIGHT

In this project a 12V DC running stop light is needed which has LED lights. The stoplight designed using a cluster of 3V LEDs available has an extra integrated circuit to control the light shifting.

These cluster of LEDs are of the three different traffic signal colours, red, amber and green, and are arranged in three separate aspects according to these colours. The traffic light receives its electric energy from the solar panel through the DC-DC converter during sunshine hours.

From chapter 3, a 20W lamp was designed for use in each aspect. This then means that relays controlled by a microcontroller are used to switch these aspects. Relays are devices which allow low power circuits to switch a relatively high Current/Voltage ON/OFF.

25

Page 35: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

For a relay to operate, a suitable pull-in & holding current should be passed through its coil. Generally relay coils are designed to operate from a particular voltage often its 5V or 12V. In this case, 12v relays are suitable.

Driving relays typically requires a transistor to switch the relay coil current and a diode parallel across the coil terminals. This is done so as to protect the transistor from damage due to the BACK EMF generated in the relay's inductive coil when the transistor is turned OFF. When the transistor is switched OFF the energy stored in the inductor is dissipated through the diode & the internal resistance of the relay coil.

Normally 1N4001 & 1N4148 can be used as it is fast switching diode with a maximum forward current of 300ma. This diode is also called as free-wheeling diode.

Resistors are used as Series Base Resistors to set the base current.

An integrated circuit designed to work with 12V DC voltage power source instead of 220V AC voltage power source is shown below:

Figure 15: Block diagram of stop light driver circuit

The relays have nominal coil voltage of 12V each, transistors are all NPN transistors either BC547 or BCX38C, the resistors values are 4.7kilo ohms each and diodes are of type 1N4001.

The regulator is LM7805 regulating 12v to 5v, with the capacitors connected to it being 0.22uF on the input and 0.1uF on the output side. The crystal is 16 MHz and the connected capacitors are 22pF each. The microcontroller used was an Atmega32 model.

4.6. Fixed and Movable Solar Array

Mounts are used to support solar panels and install them almost anywhere. Fixed solar arrays are known as solar panel mounts. They help to place the panel at the best angle to absorb the most solar light energy.

26

Page 36: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

There are several categories of these mounts: flush mounts, universal roof/ground, and pole mounts. New movable arrays or trackers are being introduced to track the sun all day and get the maximum power output possible.

For the purpose of measuring the voltage output of the solar panel at different angles and at different times of the day, a fixed solar mount is designed support the solar panel at fixed angles: 0, 15, 30, 45, 60, 75 and 90 degrees.

4.7. VIABILITY OF THIS PROJECT

The implementation of self contained, solar powered traffic lights (case study, Nairobi), is faced with some strengths (positivities) and weaknesses (negativities) as discussed below.

Nairobi’s location close to the equator gives good circumstances for solar power. Nairobi is located about 1° south of the equator in the central part of Kenya. The altitude is about 1800 meters above sea level, which gives a generally cool climate compared with the rest of the region. There is one wet season considered as ―the long rains between March and May. April usually gets the most rain with an average of 15 rainy days. ―The short rains occur between October and December. ―The short rains often have much less precipitation than ―the long rains. From June to September the weather is often chilly and cloudy, but with few rainy days. January and February are sunny and hot months with little rain. However, Nairobi receives a fair amount of sunshine daily.

With Nairobi having extremely rare cases of a day with no sunshine, this project is highly suitable as the solar energy supply is readily available always and quite reliable.

Stand-alone self contained solar powered traffic lights would ensure the disconnection of traffic lights from the national grid as it is currently. This would lead to saving of resources, with a significant decline on the reliance of fossil fuels for energy supply.

The traffic lights being self contained would also ensure that if a fault occurs in one traffic light, it only affects that specific traffic light pole as the others continue functioning normally.

Subsequently, with the LED lamps having long life(s) of up to ten years, the solar panels and batteries used also having very long life(s) with low rates of depreciation, maintenance costs will be extremely minimal hence economic savings will be experienced. The designed solar powered traffic lights have very high durability.

However, very high initial costs are incurred in implementation of this project. As with the current market price (Figure), a single 130W solar panel costs approximately KShs. 25,000 and a single 12V 100A battery costs approximately KShs. 15,500. This therefore means with inclusion of labour charges as well as other miscellaneous charges, to build a single solar powered traffic light would lead to very high costs of not less than KShs. 50,000.

27

Page 37: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

Replacing all the current traffic lights in Nairobi with solar powered traffic lights such as that designed in this project would thus lead to extremely high costs being incurred. This would not affect much the developed countries as it would affect developing countries such as Kenya.

A destruction and vandalism case of equipments used is also another factor considered in the implementation viability of this project. Equipments such as solar panels and batteries are expensive items and highly valuable therefore highly open to the risk of vandalism cases.

4.8. CONCLUSION

The main objective of this project was to design an application and interface to be used in controlling a microcontroller based set of 3 aspect traffic light [1.]. This was achieved under the following procedures:

a) Relevant number of LEDs to replace the current incandescent bulbs in each lamp and give an illumination bright enough were determined and designed. This was achieved by taking into account the amount of illumination needed to be given out for the lamps to be sufficiently clear (2000 lumens), and LEDs with ratings of 3V each were used.

b) Microcontroller based circuit to switch and control the lighting of the three aspects as in line with the traffic lights code was designed. The circuit involved a microcontroller which switched the lighting of the aspects through energizing of relays connected to its ports.

Relays are devices which allow low power circuits to switch a relatively high Current/Voltage ON/OFF. For a relay to operate a suitable pull-in & holding current was passed through its coil. Generally relay coils are designed to operate from a particular voltage often its 5V or 12V.

Each relay had a driver circuit connecting it to the microcontroller used. The function of relay driver circuit was to provide the necessary (typically 25 to 70ma) to energize the coil.

NPN transistor BC547 was being used to control the relay. The transistor was driven into saturation (turned ON) when a LOGIC 1 was written on the PORT PIN connected to it thus turning ON the relay. The relay is turned OFF by writing LOGIC 0 on the port pin.

A diode (1N4001) was connected across the relay coil; this being done so as to protect the transistor from damage due to the BACK EMF generated in the relay's inductive coil when the transistor was turned OFF.

When the transistor was switched OFF the energy stored in the inductor was dissipated through the diode & the internal resistance of the relay coil. Normally 1N4001 was used as it is fast

28

Page 38: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

switching diode with a maximum forward current of 300ma. This diode is also called as free- wheeling diode.

A resistor (R) was used as a Series Base Resistor to set the base current.

Microcontrollers have internal pull up resistors hence when a port pin is HIGH the output current flows through this internal pull up resistor.Most microcontrollers have an internal pull up of 10KΩ. Hence the maximum output current will be 5v/10k = 0.5ma. This current is not sufficient to drive the transistor into saturation and turn ON the relay. Hence an external pull up resistors (R) were used.

The value of (R) was calculated as follows: Normally a relay requires a pull in current of 70ma to be turned ON. So the BC547 transistor would require enough base current to make sure it remained saturated and provide the necessary collector current i.e. 70ma. The gain (h ) of BC547 is 100 so we needed to provide at least 70ma/100 = 0.7ma of base current. In practice, it is required roughly double the value of this current so calculations for 1.4ma of base current were done.

Base Current (1.4ma) =o/p current of controller (0.5ma) + 5v/R

From the above equation the value of R was 5.55KΩ. Typically 4.7KΩ resistors were used.

c)A solar panel size, large enough to be able to cater for the 24hrs powering of the 3 aspect traffic light was designed. This was achieved by monitoring the solar insolation and climate data for Nairobi, and the amount of power required by the traffic light. The solar insolation determines how much energy a solar panel can generate.

d) A battery for power backup plan was designed, of which the energy capacity would be enough to power the 3 aspect traffic light at night hours and in cases where solar energy collected by solar panel could not be sufficient to power the traffic light as required. The size if this battery was determined mainly by the amount of current being drawn when the traffic lights are supplied power by the battery.

e) The implemented solar powered set of 3 aspects traffic light was analyzed on whether it is a viable project. This was done mainly through cost and performance analysis of this project.

It was however noted that very high initial costs are incurred in implementation of this project. Nonetheless, Nairobi’s strategic location is a great advantage to the implementation of this project in the area.

Implementation of stand-alone self contained traffic lights would lead to the disconnection of traffic lights from the national grid as it is currently, therefore saving resources.

Risks of theft and bulgarly of equipments used was also another factor considered in the implementation viability of this project. Equipments such as solar panels and batteries are expensive items and highly valuable therefore highly open to the risk of vandalism cases.

29

fe

Page 39: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

REFERENCES:

[1.] D. K. Maina, “Application and interface for controlling a solar powered set of three aspects traffic light”, undergraduate project, U.O.N, Kenya. “Project 052, 2014”.

[2.] Simon Roberts, SOLAR ELECTRICITY, “ A Practical Guide to Designing and Installing Small Photovoltaic Systems” , JKML Library, U.O.N, TK 2960 .R62 c.3

[3.] Colin A. Vincent & Bruno Scrosati, MODERN BATTERIES, “An Introduction To Electrochemical Power Sources” Second Edition, JKML Library, U.O.N, TK 2901 .M56 1997

[4.] Mantell, C.L. “Batteries and Energy Systems” , JKML Library, U.O.N, TK 2921 .M35

[5.] M.Z.A. Munshi, “Handbook of Solid State Batteries & Capacitors” , JKML Library, U.O.N, TK 2942. H36

[6.] D.H. Collins, “Batteries 2 Research and Development in Non-Mechanical Electrical Power Sources”, JKML Library, U.O.N, TK 2896 .I54 1964

[7.] M. H. Rashid, power electronics and converters, prentice Hall 2003.

[8.] Mukund, R. Patel. 10. Energy Storage. “Wind and Solar Power Systems Design, Analysis, and Operation”, Second Edition. eBook ISBN: 978-1-4200-3992-4 : CRC Press , 2006.

[9.] Foster, et. al. Chapter 11. Energy Storage. Solar Energy. ISBN: 978-1-4200- 7567-0: CRC Press, 2010.

[10.] da Rosa, Aldo Vieira. 14 Photovoltaic converters. [book auth.] Aldo Vieira da Rosa. Fundamentals of Renewable Energy Processes. Amsterdam ; Boston : Academic Press/Elsevier ISBN 0123746396 , 2009.

[11.] Solar Server. Photovoltaic’s: Solar Electricity and Solar Cells in Theory and Practice. SolarServer. [Online] 26 08 2010. [Cited: 11 11 2010.] http://www. solarserver.com/knowledge/basic-knowledge/photovoltaics.html.

[12.] SWEREA. Renewable energy Resource Explorer (RREX). Solar and Wind Energy Resource Assessment, (SWERA). [Online] [Cited: 28 11 2010.] http://swera. unep.net/index.php?id=swera_web_mapping.

[13.] Pidwirny, Michael. Solar Radiation. The Encyclopedia of Earth. [Online] 01 24, 2010. [Cited: 11 08, 2010.] http://www.eoearth.org/article/Solar_radiation.

30

Page 40: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

[14.] Climatetemp. What is the Climate, Average Temperature/ Weather in Nairobi? Climatetemp. [Online] [Cited: 16 11 2010.] http://www.climatetemp.info/kenya/ nairobi.html.

[15.] Rabah, Kefa V.O. Integrated solar energy systems for rural electrification in Kenya. Renewable Energy. 01 2005.

[16.] Guekos, A. Heinämäkia and G. Solar cell short-circuit current dependence on the angle of the incident radiation. Solar cells. 02 1987, pp. Volume 20, Issue 1.

[17.] Kenya National Bureau of Statistics. National Energy Consumption. Kenya National Bureau of Statistics. [Online] 2010. [Cited: 16 11 2010.] http://www.knbs. or.ke/.

[18.] Khatib, Tamer. A review of designing, installing and evaluating standalone photovoltaic power systems. Journal of Applied Sciences. 2010, pp. Volume 10, Issue 13, 2010.

[19.] http://en.wikipedia.org/wiki/Light-emitting_diode

[20.] http://ecee.colorado.edu/~bart/book/book/chapter4/ch4_6.htm

[21.] www.quantumdev.com/pdf/qf2-01.pdf

31

Page 41: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

5.0. APPENDIX:

Figure 16: A microcontroller based circuit simulation using relays to switch aspects with multiple LEDs

32

Page 42: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

Figure 17: PCB layout of implemented microcontroller controlled traffic light prototype

F

33

Page 43: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

(

34

Page 44: UNIVERSITY OF NAIROBI.pdf kamau - Latest News in ...eie.uonbi.ac.ke/sites/default/files/cae/engineering/eie/APPLICATION... · UNIVERSITY OF NAIROBI ... one way the government can

35