Wind & Solar Renewable Energy

10 downloads 0 Views 2MB Size Report
Dec 28, 2010 - Murdochville Project; Phase I & II & III - Murdochville, Quebec, 162 MW. • Centennial Wind Power Facility - Swift Current, Saskatchewan, 149.4 ...
28/12/2010

FYP

WIND & SOLAR RENEWABLE ENERGY

TAQI ABRAR | [email protected]

USMAN INSTITUTE OF TECHNOLOGY Hamdard University Department of Electronics Engineering Batch – 2007 BE (EE) Project Report

Wind & Solar Renewable Energy

BY

Mustafa Shabbir

(07A-055-EE)

Muhammad Owais Siddiqui

(07A-051-EE)

Muhammad Salman

(07A-059-EE)

Syed Salman Abdullah

(07A-077-EE)

Taqi Abrar

(07A-060-EE)

Project Internal Engr. Masood Ahmed (Usman Institute of Technology)

Project External Engr. Hussain Shabbir (Assistant Engineer, Amreli Steel Mills)

Project Advisor: Masood Ahmed This report is submitted as required for the Project in accordance with the rules laid down by the Usman Institute of Technology as part of the requirements for the award of the degree of Bachelor of Engineering. I declare that the work presented in this report is my own except where due reference or acknowledgement is given to the work of others.

Signatures of students

Date

(1) ……………………………..

……………………..

(2) ……………………………..

……………………..

(3) ……………………………..

……………………..

(4) ……………………………..

……………………..

(5) ……………………………..

……………………..

Signature of Supervisor

………………………….

Date

………………………….

1

ACKNOWLEDGMENTS

With the profound intellect and intense appreciation, we take this prospect to express our earnest thanks to ALMIGHTY ALLAH for giving us courage and might to accomplish this phase of life. We also thank our parents who gave us great moral support at every step. Our special thanks are due to Mr. Masood Ahmed, our internal advisor for his assistance and everlasting guidance and Mr. Hussain Shabbir, our external advisor for his assistance. We also express thanks to all our fellow students and those who gave us priceless support to complete this challenging project. We also wish to express our gratitude to all the staff in the university. Last but not the least we acknowledge the efforts of our teachers who have been our source of inspiration throughout the university years and have shared their knowledge and skills with us.

2

PREFACE

Modern is world based on electricity. There are many ways to produce electricity, but taking in concern the now use of electricity these sources seems limited. Man is now working vigorously in searching alternate energy sources and to manage its usage as effective management is of vital importance to save energy. The recent energy and power crisis in our country tells us that we lack in power management and we do not look for proper energy sources. In current scenario, all industries either big or small and houses have backups in case of power failure, these backups in spite of being expensive requires high maintenance, sometimes they do not provide us with required power, and some of them are highly dangerous to environment. Our final year project, which is the Wind & Solar Renewable Energy, provides exactly the solution to this problem. This report is comprised of the complete knowledge about this project, including details of devices and components used to build this project. The report also includes complete working of the project and factors related to the project in simple language so that it can be understandable to an average person. The distributions of the chapters are arranged such that it makes it easier for the readers to comprehend the concept of our project. We hope that we have expressed our views in this report in the most appropriate way by explaining each topic in the most detailed manner and also by not leaving any doubts or complains in the mind of the reader.

3

Table of Content Section: 1 Introduction………………………………………………………………………………...….….5 1.1 What is renewable energy?......................................................................................6 1.2 Main stream form of renewable energy………………………….….….....….…………7 1.2.1 Wind power…………………………………………………..…..……….…...........7 1.2.2 Solar Energy……………………………………………………….………..…….………...8 1.3 Current Project………………………………………………………….……..….……………...8 1.3.1 Wind Power………………………………………………….……….……….……........8 1.3.2 Solar Power……………………………………………………….…….…...…............9 1.4 Objective …………………………………………………………………….……….………........10 1.5 Block Diagram…………………………………………………………………….…..…....……11 Section: 2 Major section………………………………………………………………………….…...…….12 2.1 Wind Turbine……………………………………………………………….…...…….……….13 2.1.1 Introduction & Background…………………………………………................13 2.1.2 What is Wind Mill? ……………………………………………………...................13 2.1.3 Where to install wind turbine? ………………………………………....….....14 2.1.4 Growing International Popularity……………………………………….......14 2.1.5 Types of Wind Turbine…………………………………………………….……....15 2.1.5.1 Horizontal Axis Wind Turbine…………………………………..…......15 2.1.5.2 Vertical Axis Wind Turbine……………….……..………………………..….......17 2.2 Solar Panels…………………………………………………...…………………………..........18 2.2.1 Introduction…………………………………….….……………………..…….….18 2.2.2 How solar panels works………………………………………………...…….18 2.2.3 Types of Solar Panel……………………………..……………………………..19 Section: 3 Circuitry Explanation…………………………………………..……………….….………21 3.1 Charge Controller…………………………………………………..………...….…………..22 3.1.1 Solar Charge Controller………………………………...……………….…….22 3.1.1.1 Block Diagram……………………………………………………...............…23 3.1.1.2 Circuit Diagram………………………………………….…………...............24 3.1.1.3 Circuit Explanation…………………………………….……….…..............25

4

3.1.1.4 Implementation…………………………………………...…..………………...26 3.1.2 Wind Charge Controller…………………………………………………..……...27 3.1.2.1 Block Diagram……………………………………………………..…29 3.1.2.2 Circuit Diagram…………………………………………..……..……………….30 3.1.2.3 Circuit Explanation…………………………………………....…………………….31 3.1.2.4 Implementation…………………………………………...…..……………….32 3.2 Inverter…………………………………………………………………………………………….…33 3.2.1 Block Diagram……………………………………………………………….………34 3.2.2 Circuit Diagram……………………………………………………………..………35 3.2.3 Circuit Explanation………………………………………………………..……...36 3.2.4 Implementation…………………………………………………………………………...37 Section: 4 Accessories…………………………………………………………………………………….38 4.1 BATTERIES……………………………………………………………...…………………….…..39 4.2 Photo Voltic Cells……………………………………………………………………...……..40 4.3 AT89C52 Microcontroller Architecture…………….………………………..………...42 4.4 Liquid Crystal Display……………………………..…….………………………………..46 Section: 5 Completing modules………………………..………………………………………………48 Appendices………………………………………………….………………………………………...…….......52 KESC Billing……………………………………….………………………………………………….……………53 Firmware……………………………………………………………………………………………………………54 Datasheet……………..……………………………………………………………………………………...……..67 References………………………………………………………………..……………………………………………………101

5

SECTION: 1

INTRODUCTION

 Overview of Renewable Energy  Current Project  Objective  Description of our project

6

SECTION: 1 Wind and Solar Renewable Energy Lack of energy is the common interest of the world. By the rise in global energy consumption, there should be not enough fuel in this world would leave to meet our needs. Our all system shut down as it‘s purely based on fuel. Fuel is becoming costly day by day. Wind and solar energy is becoming more and more common as a means to power things that normally run electricity. Renewable energy is starting to use more frequently now, and it also does not harmful to our environment. Many step are taken to use of these energy, examples are wind turbine farm, hybrid cars etc. 1.1 What is Renewable Energy? Renewable energy flows involve natural phenomena such as sunlight, wind, tides, plant growth, and geothermal heat, as the International Energy Agency explains:[17] Renewable energy is derived from natural processes that are replenished constantly. In its various forms, it derives directly from the sun, or from heat generated deep within the earth. Included in the definition is electricity and heat generated from solar, wind, ocean, hydropower, biomass, geothermal resources, and biofuels and hydrogen derived from renewable resources. Renewable energy replaces conventional fuels in four distinct areas: power generation, hot water/ space heating, transport fuels, and rural (off-grid) energy services:[1] Power generation: Renewable energy provides 18 percent of total electricity generation worldwide. Renewable power generators are spread across many countries, and wind power alone already provides a significant share of electricity in some areas: for example, 14 percent in the U.S. state of Iowa, 40 percent in the northern German state of Schleswig-Holstein, and 20 percent in Denmark. Some countries get most of their power from renewables, including Iceland (100 percent), Brazil (85 percent), Austria (62 percent), New Zealand (65 percent), and Sweden (54 percent).[2] Heating: Solar hot water makes an important contribution in many countries, most notably in China, which now has 70 percent of the global total (180 GW). Most of these systems are installed on multi-family apartment buildings and meet a portion of the hot water needs of an estimated 50–60 million households in China. Worldwide, total installed solar water heating systems meet a portion of the water heating needs of over 70 million households. The use of

7

biomass for heating continues to grow as well. In Sweden, national use of biomass energy has surpassed that of oil. Direct geothermal for heating is also growing rapidly.[2] Transport fuels. Renewable biofuels have contributed to a significant decline in oil consumption in the United States since 2006. The 93 billion liters of biofuels produced worldwide in 200displaced the equivalent of an estimated 68 billion liters of gasoline, equal to about 5 percent 9 of world gasoline production.[2] 1.2 Mainstream forms of renewable energy  Wind power  Solar energy  Hydropower  Biomass  Biofuel  Geothermal energy

Our prime focus is on wind power and solar energy 1.2.1 Wind power Airflows can be used to run wind turbines. Modern wind turbines range from around 600 kW to 5 MW of rated power, although turbines with rated output of 1.5–3 MW have become the most common for commercial use; the power output of a turbine is a function of the cube of the wind speed, so as wind speed increases, power output increases dramatically.[3] Areas where winds are stronger and more constant, such as offshore and high altitude sites are preferred locations for wind farms. Typical capacity factors are 20-40%, with values at the upper end of the range in particularly favorable sites.[4][5] Globally, the long-term technical potential of wind energy is believed to be five times total current global energy production, or 40 times current electricity demand. This could require large amounts of land to be used for wind turbines, particularly in areas of higher wind resources. Offshore resources experience mean wind speeds of ~90% greater than that of land, so offshore resources could contribute substantially more energy.[6] Wind power is renewable and produces no greenhouse gases during operation, such as carbon dioxide and methane.

8

1.2.2 Solar Energy Solar energy is the energy derived from the sun through the form of solar radiation. Solar powered electrical generation relies on photovoltaic and heat engines. A partial list of other solar applications includes space heating and cooling through solar architecture, day lighting, solar hot water, solar cooking, and high temperature process heat for industrial purposes. Solar technologies are broadly characterized as either passive solar or active solar depending on the way they capture, convert and distribute solar energy. Active solar techniques include the use of photovoltaic panels and solar thermal collectors to harness the energy. Passive solar techniques include orienting a building to the Sun, selecting materials with favorable thermal mass or light dispersing properties, and designing spaces that naturally circulate air. 1.3 Current Project 1.3.1 Wind Power Brazil 

São Gonçalo do Amarante/CE (10 Turbines)



Prainha de Aquiraz-CE (20 Turbines



Osório-RS (75 Turbines)



Rio do Fogo - RN (61 turbines

Canada 

Melancthon EcoPower Centre - Shelburne, Ontario, 199.5 MW



Wolfe Island Wind Project - Kingston, Ontario, 197.8 MW



Prince Project — Phase I & II - Sault Ste. Marie, Ontario, 189 MW



Enbridge Ontario Wind Farm - Bruce County, Ontario, 181 MW



Murdochville Project; Phase I & II & III - Murdochville, Quebec, 162 MW



Centennial Wind Power Facility - Swift Current, Saskatchewan, 149.4 MW

Iran 

Manjil and Rudbar Wind Farm (100.8 MW - 171 turbines)

9 

Binalood wind farm (28.2 MW - 43 turbines) "Under construction"

Japan 

Hibikinada Wind Farm (10 turbines)



Aoyama Plateau Wind Farm (32 turbines)



Nunobiki Plateau Wind Farm (33 turbines)



Seto Wind Farm (11 turbines)

Morocco 

Tarfaya Wind Farm (200 MW) "Under construction"



Tangier Wind Farm (140 MW - 165 turbines) "Under construction"



Amogdoul Farm (60 MW)



Touahar Farm (60 MW)

1.3.2 Solar Power Capacity

Name

Country

Location

Notes

USA

Mojave Desert California

Collection of 9 units

(MW) 354

Solar Energy Generating Systems

150

Solnova Solar Power Station

Spain

Seville

Completed 2010

100

Andasol solar power station

Spain

Granada

Completed 2009

64

Nevada Solar One

USA

Boulder City Nevada

50

Ibersol Ciudad Real

Spain

Puertollano, Ciudad Real

Completed May 2009

50

Alvarado I

Spain

Badajoz

Complete July 2009

50

Extresol 1

Spain

50

La Florida

Spain

Torre de Miguel Sesmero (Badajoz) Alvarado (Badajoz)

Completed February 2010 completed July 2010

10

1.4 Objective This project has aimed to utilize all the available technologies regarding the implementation of power through alternate resources that encounters solar and wind powers as well as all those applied in inverters to produce a fully autonomous electrical charging system catering to the energy consumption requirement of industries as well as homes. The implementation of this project is to use this technology in productive and efficient way that can readily be implemented in its targeted areas. So, we use the two alternate sources of energy (wind and solar) to convert it into electrical form of energy. Another subsequent advantage of our project is that no such system exists in Pakistan. Feasibility It provides the electricity when and where power is most limited and most expensive, which is a highly valuable and strategic contribution. Wind and solar electricity mitigates the risk of fuel price volatility and improve grid reliability While many of the costs of fossil fuels are known, others (population related health problem, environmental degradation, the impact on national security from relying on foreign energy sources) are indirect and difficult to calculate these are traditionally external to the pricing system, and are thus often referred to as externalities. A corrective pricing mechanism, such as carbon tax, could lead to renewable energy and the power become cheaper to the consumer then fossil fuel based energy.

11

1.5 Block Diagram:

SOLAR CELLS (PV)

INTENSITY SENSING

MOTOR

CHARGE CONTROLLER

WIND TURBINE

CHARGE CONTROLLER

MICRO CONTROLLER

BATTERIES

PC INTERFACE

INVERTER

LOAD

12

The brief descriptions of the components of the project are as follows: 1.5.1 Wind Turbine Wind turbines, like windmills, are mounted on a tower to capture the most energy. At 100 feet (30 meters) or more aboveground, they can take advantage of the faster and less turbulent wind. Turbines catch the wind's energy with their propeller-like blades. Usually, two or three blades are mounted on a shaft to form a rotor. A blade acts much like an airplane wing. When the wind blows, a pocket of low-pressure air forms on the downwind side of the blade. The low-pressure air pocket then pulls the blade toward it, causing the rotor to turn. This is called lift. The force of the lift is actually much stronger than the wind's force against the front side of the blade, which is called drag. The combination of lift and drag causes the rotor to spin like a propeller, and the turning shaft spins a generator to make electricity. Wind turbines can be used as stand-alone applications, or they can be connected to a utility power grid or even combined with a photovoltaic system. For utility-scale sources of wind energy, a large number of wind turbines are usually built close together to form a wind plant. 1.5.2 Solar Cells A solar cell or photovoltaic cell is a device that converts solar energy into electricity by the photovoltaic effect. Photovoltaic is the field of technology and research related to the application of solar cells as solar energy. Sometimes the term solar cell is reserved for devices intended specifically to capture energy from sunlight, while the term photovoltaic cell is used when the source is unspecified. Assemblies of cells are used to make solar modules, which may in turn be linked in photovoltaic arrays.

13

.5.3 Tracker It positioned the solar panel in position with sun to increase the efficiency of the system. 1.5.3 Charge Controller A charge controller or charge regulator limits the rate at which electric current is added to or drawn from electric batteries. It prevents overcharging and may prevent against overvoltage, which can reduce battery performance or lifespan, and may pose a safety risk. It may also prevent completely draining ("deep discharging") a battery, or perform controlled discharges, depending on the battery technology, to protect battery life. Either the terms ―charge controller‖ or ―charge regulator‖ may refer to a stand-alone device, or to control circuitry integrated within a battery pack, battery-powered device, or battery recharger. Most "12 volt" panels put out about 16 to 20 volts, so if there is no regulation the batteries will be damaged from overcharging. Most batteries need around 14 to 14.5 volts to get fully charged.

1.5.4 Battery Bank The battery bank consists of several batteries, depending on the type of voltage and current ratings will be used to store DC energy. Also they will supply this stored DC power to the inverter.

1.5.5 Inverter The inverter is the major part of this system. It consists on a DCAC converter circuit which converts the DC voltage supplied by the batteries into AC electricity which will be utilizable for the electrical appliances.

1.5.6 Display Panel A display panel consists of a liquid crystal display, showing battery and turbine status, overload and under load condition.

14

SECTION: 2

MAJOR SECTION

 Introduction to Wind Turbine  Introduction to Solar panel

15

SECTION: 2 2.1 Wind Turbine 2.1.1 Introduction & Background Energy issues are critical to earth's environment. For Earth Day 2005 – April 22 – the Washington File is featuring a series of articles on renewable energy, an increasingly promising element in future energy calculations. Washington -- Wind power, the technology of using the wind to generate electricity, is the fastest-growing new source of electricity worldwide. Continuing this trend requires aggressive research and development, experts say, and government commitment to giving the technology an economic foothold. The modern age of wind power arose in the late 1970s and the first wind plants began to appear in California in the 1980s. Today, the industry is growing at 20 percent to 30 percent annually worldwide, said Charles McGowin, wind-power technical leader at the Electric Power Research Institute, an independent, nonprofit center for public-interest energy and environmental research. ―It‘s growing because it‘s become the most economical renewable energy resource as a result of the large growth in the market,‖ he said. ―In the 1980s, wind cost about 40 cents per kilowatt hour,‖ said Robert Thresher, director of the U.S. Department of Energy National Wind Technology Center at the National Renewable Energy Laboratory (NREL) in Colorado. ―Now the cost is between 4 [cents] and 6 cents per kilowatt hour, so we‘ve reduced the cost of wind by an order of magnitude in the past two decades,‖ putting it in a competitive range with some conventional technologies. 2.1.2 What is Wind Mill? A machine that captures the energy of the wind and transfers the motion to a generator shaft. Wind energy is produced mainly by massive three-bladed wind turbines that sit atop tall towers and work like fans in reverse. Rather than using electricity to make wind, turbines use wind to make electricity.

16

2.1.3 Where to install wind turbine? In wind plants or wind farms, groups of turbines are linked together to generate electricity for the utility grid. The electricity is sent through transmission and distribution lines to consumers. The best places to locate wind plants are areas that have strong, frequent winds. For areas around the world, NREL produces wind maps that incorporate wind speeds based on measurements taken over the course of the year at monitoring stations and on estimates from meteorological models. For specific locations, annual average wind speed is used to calculate the amount of energy in the wind blowing through a wind turbines rotor per square meter of area. From this calculation of energy available in the wind, geographic areas as small as one square mile are assigned a wind power class from 1 to 7, with 7 being highest. Developers use this information to find the best areas for wind development. Sites in Wind Power Class 3 or higher are candidates for wind-farm development. Class 2 sites or higher offer possibilities for adding small wind generators. 2.1.4 Growing International Popularity As an industry, wind power is also growing internationally, McGowin said. The leading wind turbine manufacturers are in Denmark, and there are manufacturers in India, Germany, Spain and Japan. In terms of installed wind power, he added, ―Germany by far has the most -- 17,000 megawatts, of a total worldwide installed capacity of more than 47,000 megawatts.‖ ―Spain is number two and the United States is number three.‖ NREL's Thresher said the Kyoto Protocol – an international agreement among 141 countries to reduce emissions of carbon dioxide and five other greenhouse gases – is driving the use of wind energy in European countries, where governments are subsidizing the increase in installed wind capacity. The Kyoto Protocol, an amendment to the U.N. Framework Convention on Climate Change, came into force February 16. The United States is not a signatory to the protocol.

17

In the United States, Thresher said, the installed capacity of wind energy is 6,700 megawatts out of a total U.S. demand for electricity of 800,000 megawatts. ―Today,‖ he said, ―wind supplies less than one half of 1 percent of the country‘s electricity needs. In comparison, Denmark gets about 20 percent of its electrical energy from wind, and Germany gets something on the order of 6 percent.‖ 2.1.5 Types of Wind Turbine Wind mills are classified into two types 1. Horizontal axis wind turbine 2. Vertical axis wind turbine

2.1.5.1 Horizontal Axis Wind Turbine Horizontal axis wind turbines have the main rotor shaft running horizontally. Fig shows a schematic arrangement of a horizontal axis machine.

This system

consists of a tower mounted two bladed or multi bladed rotor facing the wind, rotating around a horizontal axis and turning an electrical generator. The Blades are generally made of composite material, usually fiber reinforced plastic (FRP) because of its high strength and light weight. Wind mills are manufactured with a capacity from a few kilowatts to several megawatts in Europe, the USA, and other parts of the world.

2.1.5.2 Vertical Axis Wind Turbine Vertical axis wind turbines have the main rotor shaft running vertically. The tower construction is simple here because the generator and gear box can be placed at the bottom, near the

18

ground. Vertical axis wind turbine can be classified into two types 1. Darrieus type 2. Savonius type Darrieus type rotor This wind mill needs much less surface area. It is shaped like an egg beater and has two or three blades shaped like aero foils. Savonius type rotor Savonius turbine is S-shaped if viewed from top. This turbine turns relatively slow, but yields high torque. It is used for grinding grains and for pumping water. 2.2 Solar Panels 2.2.1 Introduction Solar Panels are a form of active solar power, a term that describes how solar panels make use of the sun's energy: solar panels harvest sunlight and actively convert it to electricity. Solar Cells, or photovoltaic cells, are arranged in a grid-like pattern on the surface of the solar panel. These solar voltaic cells collect sunlight during the daylight hours and convert it into electricity. Solar panels are typically constructed with crystalline silicon, which is used in other industries (such as the microprocessor industry), and the more expensive gallium arsenide, which is produced exclusively for use in photovoltaic (solar) cells. 2.2.2 How solar panels works Solar panels collect solar radiation from the sun and actively convert that energy to electricity. Solar panels are comprised of several individual solar cells. These solar cells function similarly to large semiconductors and utilize a large-area p-n junction diode. When the solar cells are exposed to sunlight, the p-n junction diodes convert the energy

19

from sunlight into usable electrical energy. The energy generated from photons striking the surface of the solar panel allows electrons to be knocked out of their orbits and released, and electric fields in the solar cells pull these free electrons in a directional current, from which metal contacts in the solar cell can generate electricity. The more solar cells in a solar panel and the higher the quality of the solar cells, the more total electrical output the solar panel can produce. The conversion of sunlight to usable electrical energy has been dubbed the Photovoltaic Effect. The photovoltaic effect arises from the properties of the p-n junction diode, as such there are no moving parts in a solar panel. 2.2.3 Types of Solar Panel Monocrystal solar panels Monocrystalline panels use crystalline silicon produced in a large sheet which has been cut to the size of the panel, thus making one large single cell. Metal strips are laid over the entire cell and act as a conductor that captures electrons. Mono panels are slightly more efficient than Polycrystalline panels but they don't usually cost more than Poly Panels. Polycrystalline panels Polycrystalline panels use a bunch of small cells put together instead of one large cell. Poly panels are slightly less efficient than mono panels. They are also claimed to be cheaper to manufacturer than mono panels although we have noticed them to be very similariced. There are a couple different ways a polycrystalline silicon cell can be made: Cast Polysilicon:

In this process, molten silicon is cast in a large block which, when cooled, can be cut into thin wafers to be used in photovoltaic cells. These cells are then assembled in a panel. Conducting metal strips are then laid over the cells, connecting them to each other and forming a

20

continuous electrical current throughout the panel. String Ribbon Silicon

String ribbon uses a variation of the polycrystalline production process, using the same molten silicon but slowly drawing a thin strip of crystalline silicon out of the molten form. These strips of photovoltaic material are then assembled in a panel with the same metal conductor strips attaching each strip to the electrical current.

Thin Film or Amorphous Panels Thin film panels are produced very differently from crystalline panels. Instead of molding, drawing or slicing crystalline silicon, the silicon material in these panels have no crystalline structure and can be applied as a film directly on various materials. Variations

on

semiconductor

this

technology

materials

like

use

other

copper

indium

diselenide (CIS) and cadmium telluride

(CdTe).

These materials are then connected to the same metal conductor strips used in the other processes, but do not necessarily use the other components typical in photovoltaic panels as they do not require the same level of protection needed for more fragile crystalline cells.

21

SECTION: 3

CIRCUITRY EXPLANATION

 Introduction of Modules  Block Diagram  Circuit Diagram  Explanation  Implementation

22

SECTION: 2 3.1 Charge Controller: This device regulates rates of flow of electricity from the generation source to the battery and the load. The controller keeps the battery fully charged without over-charging it. When the load is drawing power, the controller allows the charge to flow from the generation source into the battery, the load, or both. When the controller senses that the battery is fully (or nearly fully) charged, it reduces or stops the flow of electricity from the generation source, or diverts it to an auxiliary or "shunt" load (most commonly an electric water heater). Many controllers will also sense when loads have taken too much energy from batteries and will stop the flow until sufficient charge is restored to the batteries. This last feature can greatly extend the battery's lifetime. [7] 3.1.1 Solar Charge Controller Charge controller is at the heart of every solar system, and is required to monitor and control the power going into and coming out of the battery. [8] It must also manage the power generated by the solar panel to ensure it does not overcharge the battery. The charge controller must also ensure that the connected loads don‘t over-discharge the battery, there damaging it. Charge controller is used to charge batteries from Solar Panels. Solar panels normal give 15-17 volt, charge controller converts that to 12-14 volt and charges battery. Battery often needs a higher voltage than it already has to charge the battery. Charge controller prevents batteries to be over charged. And stops to charge when battery is fully charged. And it will give longer life for battery. You can also use blocking diode instead of charge controller. But there are some negative effects of blocking diodes. If you do not use charge controller and just use a blocking diode, so battery can be over charged and damaged. If you is using big solar panel system so it is better to have an advanced charge controller. That gives you complete statistics of how much volt and ampere it has charged battery. Advanced charge controllers also show you how much ampere is on batteries. Charges controller can automatic disconnect battery if it is going to be empty. For bigger systems like tube well or water pumping they are used high voltage charge controllers, called MPPT(Maximum Power Point Tracker) charge controllers. MPPT charge controller can convert dc-dc voltage. [9]

23

3.1.1.1 Block Diagram:

Panel Voltage

Charge Voltage (13.7V)

Main Comparator

Comparator

Comparator

Solar Voltage < Charge Voltage

Solar Voltage > Charge Voltage

Diode for limiting Current LED showing Low status

Relay

Charge Batteries

LED showing High status

From Solar Panel

1 2

J3

Panel +Vcc

+Vcc

100K

+12V

100K

+12V

10K

10K

10K

10K

10K

6

5

9

10

2

3

-

+

-

+

-

+ LM324

+12V

LM324

U10C

+12V

LM324

U8A

+12V

4

11

4

11

in

4

another LM339 in

11

7

U9B

8

1

10K

10K

10K

10K

4

5

6

7 -

+

-

+

is

10

11

LM339

U12B

+12V

1

8

9 -

-

+

1K

LM339

U14D 13

LM339

104

+12V

2

3

+

U13C

+12V

+12V

LM339

U11A

+12V

3

U9B) and its output 12

U11A). A references 12

and

its 3

lm324(U10C) 12

Solar supply 3

Fig 3.1

which

12

comparator, 1K

1K

+12V

14

1K

1K

2

2

+12V

LED

LED

Title

Q12A C945

1K

Q3A C945

1K +12V

Q4A C945

1K

3

LED

+12V

2

1N4007

1K

+12V

3

Circuit 1

3.1.1.3 3

U14D) 4

5

ISO2 PC 817

RELAY SPDT

1 2

3

LS3

Panel +Vcc

ISO1 PC 817

LOW

HIGH

+V in High LOW

+V in

+12V J4

To Controller Board

1 2 3 4 5

Circuit

1

3.1.1.2

1

+12V

24

Diagram

Explanation:

given

is

to

a

output is given to

non-inverting(U12B

&

inverting(U13C

&

is set by LM324(U8A &

is given to LM339 for

25

comparison. U13C is high voltage indication and U14D is for low voltage indication. Q4A, Q3A and Q12A are the switching transistor. When the respective transistor of high and low voltage indication get bias voltage it goes in saturation completing the circuit and glow the LED which that we have low or high voltages. The relay act as a switch when we have low and high voltages it stops the charging of the battery and the diode 1N4007 is to protect from relay back current. ISQ1 and ISQ2 are the isolator. Isolator are essentially digital devices are use for on-off signal. Here it is use for sending signal to microcontroller which will be display on LCD.

26

3.1.1.4 Implementation

Fig 3.2: Testing Circuit

Fig 3.3 Circuit Completed on PCB

27

3.1.2 Wind Charge Controller One of the most important things that you can get for your wind generators is the charge controller. As the name implies this device is used to control the charging of your batteries. Continuous overcharging of your cells can lead to your electrolyte boiling, leaving your batteries dry and ultimately ruining the expensive battery bank. If you are familiar with how other charge controllers work, like those for solar panels for example. You would know that they simply monitor the battery voltage and once the batteries are fully charged, the controller shorts the panels. However, this type of device does not work for wind generators, because they could burn out your controller or even destroy your generator. [10] You may be thinking why not just unplug the batteries once they are fully charged? Well, that will not work either because most wind generators will overload when they have no load and then go on to possibly damage the generator. This happened to a friend of mine recently, and he was not amused by this at all. So this leaves installing a wind generator charge controller as your only plausible option. What this does is allow the batteries to fully charge, and then automatically switch to an alternate load that can continue to use the power being generated by the wind elsewhere. Some of the things you can use the extra energy include heating your water, powering your household refrigerator or even just using it for lighting the home. Wind generator charge controllers are available in different voltages such as 12V, 24V, and 36V to suit any model wind generator.

28

3.1.2.1 Block Diagram

From Generator

1 2

+

1000uf

50K

+

33K

33K

8 9

V OUT

+ 2M2

U7C LM339 14

6.2 V

D25

470R

+V in

5

7

1

2

2

U5A LM339

+V in

470R

6

IK

+V in

4

U6B LM339

+V in

1 2

J3

470R

C945

LOW

4 NO

5 NC

4R7 10W

Diode 6 Amp

RELAY SPDT

LS2

+V in

Title

To UPS Board

V OUT

Charger Circuit for Wind Power Gen.

NOTE +Vin From Generator

1 2

COM 3

LED

LED

+V in

+V in

470R

HIGH

+V in

To UPS Board

3

BRIDGE 15 AMP

+

3

-

-

J2

V OUT

3 12

+

Fig 3.4 12

Circuit

1

3.1.2.2

-

+V in

29

Diagram

30

3.1.2.3 Circuit Explanation For wind generator we cannot use the same charger as the difference in voltage and ampere values. In this new charge controller design the output from wind generator is given to high ampere bridge. The bridge is to constant the polarity as the wind turbine revolves in both clockwise and anti-clockwise direction. Now, the output from bridge to comparator LM339 through a zener diode which set the reference point at 6.2V. U7C is the main comparator which compares the wind generator voltages with 6.2V. Wind generator voltage is divided in half by applying VDR at the input. Now, when the wind generator voltages are same as we require the transistor is in cutoff. So, the relay is connected to NC which charge batteries. When we get high voltages the comparator U6B gives output turning on the LED showing high status and when we get low voltages comparator U5A gives output turning on the LED showing low voltages. In both cases when we get high and low voltages the output of comparator U7C cause the transistor to be in saturation hence the coil get energizes disconnecting the wind generator from charging the batteries.

31

3.1.2.4 Implementation

Fig 3.4 Testing Circuit

Fig 3.6 Complete PCB

32

3.2 Inverter DC-AC inverters are electronic devices used to produce .mains voltage. AC power from low voltage DC energy (from a battery or solar panel). This makes them very suitable for when you need to use AC power tools or appliances but the usual AC mains power is not available. Examples include operating appliances in caravans and mobile homes, and also running audio, video and computing equipment in remote areas. Most inverters do their job by performing two main functions: first they convert the incoming DC into AC, and then they step up the resulting AC to mains voltage level using a transformer. And the goal of the designer is to have the inverter perform these functions as efficiently as possible. So that as much as possible of the energy drawn from the battery or solar panel is converted into mains voltage AC, and as little as possible is wasted as heat.

How Inverter Works Modern inverters use a basic circuit scheme like that shown in Fig.1. As you can see the DC from the battery is converted into AC very simply, by using a pair of power MOSFETs (Q1 and Q2) acting as very efficient electronic switches. The positive 13.8V DC from the battery is connected to the centre-tap of the transformer primary, while each MOSFET is connected between one end of the primary and earth (battery negative). So by switching on Q1, the battery current can be made to flow through the ‗top‘ half of the primary and to earth via Q1. Conversely by switching on Q2 instead, the current is made to flow the opposite way through the ‗lower‘ half of the primary and to earth. Therefore by switching the two MOSFETs on alternately, the current is made to flow first in one half of the primary and then in the other, producing an alternating magnetic flux in the transformer‘s core. As a result a corresponding AC voltage is induced in the transformer‘s secondary winding, and as the secondary has about 24 times the number of turns in the primary, the induced AC voltage is much higher: around 650V peak to peak. By the way if you.re wondering why MOSFETs are used as the electronic switches, to convert the DC into AC, it‘s because they make the most efficient high-current switches. When they‘re ‗off‘ they are virtually an open circuit, yet when they‘re ‗on‘ they are very close to a short circuit (only a few milliohms). So very little power is wasted as heat. In DC-AC inverters designed to deliver high power, there are actually quite a few MOSFETs connected to each side of the transformer primary, to share the heavy current. However because they.re essentially connected in parallel, you can still think of them as

33

behaving very much like the single transistors shown in Fig.2.2.1. They just behave like very high-power MOSFETs, able to switch many tens of amps. [11] Note that because the switching MOSFETs are simply being turned on and off, this type of inverter does not produce AC of the same ‗pure sinewave‘ type as the AC power mains. The output waveform is essentially alternating rectangular pulses, as you can see from Fig.2.2.2. However the width of the pulses and the spacing between them is chosen so that the ratio between the RMS value of the output waveform and its peak-to-peak value is actually quite similar to that of a pure sine wave. The resulting waveform is usually called a .modified sinewave and as the RMS voltage is close to 230V many AC tools and appliances are able to operate from such a waveform without problems.

Fig.2.2.1: The basic circuit scheme used in many modern DC-AC inverters.

Fig.2.2.2

34

3.2.1 Block Diagram

35

3.2.2 Circuit Diagram

2.2.3 Circuit Explanation

Fig 3.7

36

3.2.3 Circuit Explanation The inverter consists of two major parts: Pulse generator and Power amplifier In this circuit we use SG3524 which is an oscillator IC. The top circuit is for operating the oscillator. Pin 12 and 13 is the output pin which is given to BJT transistor Q1 and Q2. This transistor acts as a driver as the IC SG3524 is voltage control voltage device and the MOSFET are current control voltage device so the BJT is use to operate the MOSFET by SG3524. Battery output is given to the centre tap transformer‘s centre to constant the 12V, the MOSFET alternatively do switching which causes the output to be square wave. This is then step up to 220V by transformer. Two relays are used to control the inverter through microcontroller. To on the inverter microcontroller signal is used and to emergency shutdown the controller microcontroller signal is used. This circuit is also used to constant the voltage. An addition wire is given out from the transformer input and is given to the CON1. If the output voltage decreases then the oscillator produce more pulses to switch the MOSFET very fast to bring back the required voltage.

37

3.2.4 Implementation

Fig 3.8 Testing Circuit

Fig 3.9 complete PCB

38

SECTION: 4

ACCESSORIES

 Batteries  PV Cells  Microcontroller  Display panel

39

SECTION: 4 4.1 BATTERIES An electrical battery is one or more electrochemical cells that convert stored chemical energy into electrical energy. Since the invention of the first battery (or "voltaic pile") in 1800 by Alessandro Volta, batteries have become a common power source for many household and industrial applications. There are two types of batteries: primary batteries (disposable batteries), which are designed to be used once and discarded, and secondary batteries (rechargeable batteries), which are designed to be recharged and used multiple times. 4.1.1 Batteries Charge and Discharge Ratings A battery with a capacity of 1 amp-hour should be able to continuously supply a current of 1 amp to a load for exactly 1 hour, or 2 amps for 1/2 hour, or 1/3 amp for 3 hours, etc., before becoming completely discharged. In an ideal battery, this relationship between continuous current and discharge time is stable and absolute, but real batteries don't behave exactly as this simple linear formula would indicate. Therefore, when amp-hour capacity is given for a battery, it is specified at either a given current, given time, or assumed to be rated for a time period of 8 hours (if no limiting factor is given). For example, an average automotive battery might have a capacity of about 70 amphours, specified at a current of 3.5 amps. This means that the amount of time this battery could continuously supply a current of 3.5 amps to a load would be 20 hours (70 amp-hours / 3.5 amps). But let's suppose that a lower-resistance load were connected to that battery, drawing 70 amps continuously. Our amp-hour equation tells us that the battery should hold out for exactly 1 hour (70 amp-hours / 70 amps), but this might not be true in real life. With higher currents, the battery will dissipate more heat across its internal resistance, which has the effect of altering the chemical reactions taking place within. Chances are, the battery would fully discharge some time before the calculated time of 1 hour under this greater load.

40

4.2 Photo Voltic Cells A solar panel (photovoltaic module or photovoltaic panel) is a packaged interconnected assembly of solar cells, also known as photovoltaic cells. The solar panel can be used as a component of a larger photovoltaic system to generate and supply electricity in commercial and residential applications. Because a single solar panel can only produce a limited amount of power, many installations contain several panels. This is known as a photovoltaic array. A photovoltaic installation typically includes an array of solar panels, an inverter, batteries and interconnection wiring. Photovoltaic systems are used for either on- or off-grid applications, and on spacecraft. 4.2.1 Batteries and PV Ratings This rating are taken on 5W panel on varies days Day1 Date

26/02/2010

Time

A 12 Volt, 3.5 Amp battery is used for charging Panel output voltage = Voc =20.3 Volt Panel output current = Isc = 0.37 Amp Initial charging level = V1 = 4.57 Volts Final charged level = V2 = 11.9 Volts Potential rise for battery = Vs = V2 - V1 = 7.33 Volts Time taken for charging= Tc = 120 mins For the load of 55 Watt discharge time = TD = 8 mins 55 sec

12:15 pm

41

Day 2 Date

27/02/2010

Time

9:00 am

A 12 Volt, 3.5 Amp battery is used for charging Panel output voltage = Voc = 20.1 Volt Panel output current = Isc = 0.31 Amp Initial charging level = V1 = 3 Volts Final charged level = V2 = 11.9 Volts Potential rise for battery = Vs = V2 - V1 = 8.9 Volts Battery no load current = Io = 16 Amp Time taken for charging= Tc = 480 mins For the load of 35 Watt discharge time = TD = 77 mins Day 3 Date

28/02/2010

Time

A 12 Volt, 3.5 Amp battery is used for charging Panel output voltage = Voc = 19.1 Volt Panel output current = Isc = 0.34 Amp Initial charging level = V1 = 3 Volts Final charged level = V2 = 11.9 Volts Potential rise for battery = Vs = V2 - V1 = 8.9 Volts Battery no load current = Io = 16 Amp Time taken for charging= Tc = 450 mins For the load of 55 Watt discharge time = TD = 18 mins

10:30 pm

42

4.3 AT89C52 Microcontroller Architecture 4.3.1 Description The AT89C52 is a low-power, high-performance CMOS 8-bit microcomputer with 8K bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmel‘s high density nonvolatile memory technology and is compatible with the industry-standard 80C51 and 80C52 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C52 is a powerful microcomputer which provides a highly-flexible and costeffective solution to many embedded control applications. [13] 4.3.2 Features The AT89C52 provides the following standard features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, three 16-bit timer/counters, a six-vector two-level interrupt architecture, a full-duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89C52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and interrupt system to continue functioning. The Power-down mode saves the RAM contents but freezes the oscillator, disabling all other chip functions until the next hardware reset. • Compatible with MCS-51™ Products • 8K Bytes of In-System Reprogrammable Flash Memory • Endurance: 1,000 Write/Erase Cycles • Fully Static Operation: 0 Hz to 24 MHz • Three-level Program Memory Lock • 256 x 8-bit Internal RAM • 32 Programmable I/O Lines • Three 16-bit Timer/Counters • Eight Interrupt Sources

43

• Programmable Serial Channel • Low-power Idle and Power-down Modes 4.3.3 Pin Configuration & Description Pin Description 4.3.3.1 VCC Supply voltage. 4.3.3.2 GND Ground. 4.3.3.3 Port 0 Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high impedance inputs. Port 0 can also be configured to be the multiplexed low order address/data bus during accesses to external program and data memory. In this mode, P0 has internal pull ups. Port 0 also receives the code bytes during Flash programming and outputs the code bytes during program verification. External pull ups are required during program verification. 4.3.3.4 Port 1 Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. In addition, P1.0 and P1.1 can be configured to be the timer/counter 2 external count input (P1.0/T2) and the timer/counter 2 trigger input (P1.1/T2EX), respectively, as shown in the following table. Port 1 also receives the low-order address bytes during Flash programming and verification. 4.3.3.5 Port 2

44

Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that uses 16-bit addresses (MOVX @ DPTR). In this application, Port 2 uses strong internal pull-ups when emitting 1s. During accesses to external data memory that uses 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification. 4.3.3.6 Port 3 Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups. Port 3 also serves the functions of various special features of the AT89C51, as shown in the following table. Port 3 also receives some control signals for Flash programming and verification. 4.3.3.7 RST Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. 4.3.3.8 ALE/PROG Address Latch Enable is an output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external data memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode. 4.3.3.9 PSEN

45

Program Store Enable is the read strobe to external program memory. When the AT89C52 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory. 4.3.3.10 EA/VPP External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming when 12-volt programming is selected. 4.3.3.11 XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit. 4.3.3.12 XTAL2 Output from the inverting oscillator amplifier. 4.3.4 Block Diagram

46

4.4 Liquid Crystal Display Standard liquid crystal display (LCD) display device designed for interfacing with embedded systems. These screens come in a variety of configurations including 8x1, which is one row of eight characters, 16x2, and 20x4. The most commonly manufactured configuration is 40x4 characters, which requires two individually addressable HD44780 controllers with expansion chips as the HD44780 can only address up to 80 characters. These LCD screens are limited to text only and are often used in copiers, fax machines, laser printers, industrial test equipment, networking equipment such as routers and storage devices. [12] Character LCDs can come with or without backlights, which may be LED, fluorescent, or electroluminescent. Character LCDs use a standard 14-pin interface and those with backlights have 16 pins. The pinouts are as follows: 1. Ground 2. VCC (+3.3 to +5V) 3. Contrast adjustment (VO) 4. Register Select (RS). RS=0: Command, RS=1: Data 5. Read/Write (R/W). R/W=0: Write, R/W=1: Read 6. Clock (Enable). Falling edge triggered 7. Bit 0 (Not used in 4-bit operation) 8. Bit 1 (Not used in 4-bit operation) 9. Bit 2 (Not used in 4-bit operation) 10. Bit 3 (Not used in 4-bit operation) 11. Bit 4 12. Bit 5 13. Bit 6 14. Bit 7 15. Backlight Anode (+) 16. Backlight Cathode (-)

47

There may also be a single backlight pin, with the other connection via Ground or VCC pin. The two backlight pins may precede the pin 1. The nominal backlight voltage is around 4.2V at 25˚C using a VDD 5V capable model. Character LCDs can operate in 4-bit or 8-bit mode. In 4 bit mode, pins 7 through 10 are unused and the entire byte is sent to the screen using pins 11 through 14 by sending 4-bits (nibble) at a time. 4.4.1 Font The character generator ROM contains 208 characters in a 5x8 dot matrix, and 32 characters in a 5x10 dot matrix. There is a Japanese version of the ROM which includes kana characters, and a European version which includes Cyrillic and Western European characters. The 7-bit ASCII subset for the Japanese version is non-standard: it supplies a Yen symbol where the backslash character is normally found, and left and right arrow symbols in place of tilde and the rub-out character. A limited number of custom characters can be programmed into the device in the form of a bitmap using special commands. These characters have to be written to the device each time it is switched on, as they are stored in volatile memory.

48

SECTION: 5

Completing Modules

49

5.1 Wind Turbine

5.2 Electronics Module

50

Working Electronic Module

51

Cost Wind turbine

8000

Solar panel

2000

Inverter

2000

Solar charger

300

Wind charger

300

Controller

500

Battery

4000

Pcb

400

Fabrication

3000

Testing

2500

Turbine testing

2000

Casing

1000

Dc motor

3000

Tracking

3000

Others

5000

Total

37000

52

APPENDICES

 KESC Billing  Firmware  Datasheet  References

53

KESC Billing For 500 W Supply and 1000 W Supply  Back up Time = 7 hrs  KESC unit per day = 7 units  1 unit cost from 1 to 100 units = 21 Rs  1 unit cost from 100 to 300 units = 26 Rs  For one month KESC units = 154 units  KESC bill for one month = 154*26 = 4000 For 500W Supply and 1000W Supply  Back up Time = 7 hrs  KESC unit per day = 7 units  1 unit cost from 1 to 100 units = 21 Rs  1 unit cost from 100 to 300 units = 26 Rs  For one month KESC units = 154 units  KESC bill for one month = 154*26 = 4000

54

Firmware ;=================IN THE NAME OF ALLAH=============== ;

Wind and Solar Renewable Energy

;==================================================== RS

BIT

EN

BIT

RLY1

BIT P3.6

RLY2

BIT P3.5

SWRLY

BIT P1.2

BEN

BIT P2.7

ADCST

BIT P2.6

SHIGH

BIT P3.2

SLOW

BIT P3.3

LDRUP

BIT P2.0

LDRDW

BIT P2.1

BUZZ

BIT P3.4

P1.0 P1.1

;-------------------------------------------------TFLG

BIT 06H

SHI_F

BIT 00H

SLW_F

BIT 01H

TEMP

BIT 04H

;===================================================

;===================BYTE ASSIGNMENTS================ ;=================================================== DATAPRT

EQU 80H

TC0

EQU 30H

TC1

EQU 31H

WIND

EQU 32H

BATT

EQU 33H

WD1

EQU 40H

WD2

EQU 41H

WD3

EQU 42H

BD1

EQU 43H

BD2

EQU 44H

55 BD3

EQU 45H

;=================================================== ;=================================================== ORG

00H

JMP

INI

ORG

000BH

LJMP

T0ISR

ORG

30H

;==============LCD INITILALIZATION================== INI: MOV

R2,#50H

MOV

R3,#0FFH

DJNZ

R3,$

DJNZ

R2,$-4

CLR

RS

SETB

EN

MOV

DATAPRT,#01H

CALL

CLOCK

MOV

DATAPRT,#02H

CALL

CLOCK

MOV

DATAPRT,#00111100B

CALL

CLOCK

MOV

DATAPRT,#00001100B

CALL

CLOCK

;=================================================== CLR

ADCST

SETB

SHIGH

SETB

SLOW

SETB

BEN

CLR

BUZZ

SETB

RLY1

SETB

RLY2

SETB

LDRUP

SETB

LDRDW

;===================================================

56 MOV

TMOD,#21H

MOV

IE,#82H

MOV

TH0,#HIGH(-50000)

MOV

TL0,#LOW(-50000)

MOV

TC0,#20

MOV

TC1,#30

MOV

SCON,#50H

MOV

TH1,#0FDH

SETB

TR1

MOV

DPTR,#MSG1

CALL

LINE1

MOV

DPTR,#MSG2

CALL

LINE2

CALL

DELAY

CALL

DELAY

CALL

DELAY

SETB

ADCST

CALL

DELAY

CALL SETB MOV CALL MOV

DELAY TFLG DPTR,#MSG3 LINE1 DPTR,#MSG4

CALL

LINE2

CALL

AUTO

;==================================================== CALL

CDIS

MOV

DPTR,#MSG5

CALL

LINE1

CALL

DELAY

CALL

DELAY

CALL

DELAY

MOV

DPTR,#MSG6

CALL

LINE1

SETB

TR0

57 ;================MAIN PROGRAM======================= MAIN: CALL

ADC

CALL

CONV

CALL

LINE3

CALL

STATUS

CALL

COMP

CALL

LINE2

CALL

SER

CALL

DELAY

SETB

BUZZ

CALL

SDLY

CLR

BUZZ

CALL

AUTO

SJMP

MAIN

;=====================ADC

ROUTINE================

ADC: MOV

DATAPRT,#0FFH

CLR

BEN

CALL

SDLY

CALL

SDLY

MOV

A,DATAPRT

CALL

CADC

MOV

WIND,A

CALL

SDLY

CLR

SWRLY

CALL CALL

DELAY DELAY

MOV

DATAPRT,#0FFH

CALL

SDLY

MOV

A,DATAPRT

CALL

CADC

MOV

BATT,A

SETB

SWRLY

58 CALL

DELAY SETB

BEN

CALL

SDLY

RET ;-----------------------------------------------CADC: MOV

C,ACC.0

MOV

0FH,C

MOV

C,ACC.1

MOV

0EH,C

MOV

C,ACC.2

MOV

0DH,C

MOV

C,ACC.3

MOV

0CH,C

MOV

C,ACC.4

MOV

0BH,C

MOV

C,ACC.5

MOV

0AH,C

MOV

C,ACC.6

MOV

09H,C

MOV

C,ACC.7

MOV

08H,C

MOV

A,21H

RET ;==============BCD CONVERSION ROUTINE============= CONV: MOV

A,WIND

MOV

B,#100

DIV

AB

MOV

WD1,A

MOV

A,B

MOV

B,#10

DIV

AB

MOV

WD2,A

MOV

WD3,B

59 MOV

A,BATT

MOV

B,#100

DIV

AB

MOV

BD1,A

MOV

A,B

MOV

B,#10

DIV

AB

MOV

BD2,A

MOV

BD3,B

RET

;===================STATUS ROUTINE================= STATUS: MOV

C,SHIGH

MOV

SHI_F,C

MOV

C,SLOW

MOV

SLW_F,C

RET ;====================COMPARE ROTINE================= COMP: JB

SHI_F,L1

MOV

DPTR,#MSG9

RET L1: JB

SLW_F,L2

MOV

DPTR,#MSG8

RET L2: MOV

DPTR,#MSG7

RET ;===================SERIAL ROUTINE================= SER: JNB

RI,C_1

MOV

A,SBUF

CLR

RI

60 CJNE

A,#'A',C_1

SJMP

C_2

C_1: RET C_2: MOV

A,#'A'

MOV

SBUF,A

JNB

TI,$

CLR

TI

MOV

A,WD1

ORL

A,#30H

MOV

SBUF,A

JNB

TI,$

CLR

TI

MOV

A,WD2

ORL

A,#30H

MOV

SBUF,A

JNB

TI,$

CLR

TI

MOV

A,WD3

ORL

A,#30H

MOV

SBUF,A

JNB

TI,$

CLR

TI

MOV

A,BD1

ORL

A,#30H

MOV

SBUF,A

JNB

TI,$

CLR

TI

MOV

A,BD2

ORL

A,#30H

MOV

SBUF,A

JNB

TI,$

CLR

TI

MOV

A,BD3

61 ORL

A,#30H

MOV

SBUF,A

JNB

TI,$

CLR

TI

CLR

A

MOV

C,SHI_F

MOV

ACC.0,C

ORL

A,#30H

MOV

SBUF,A

JNB

TI,$

CLR

TI

CLR

A

MOV

C,SLW_F

MOV

ACC.0,C

ORL

A,#30H

MOV

SBUF,A

JNB

TI,$

CLR

TI

RET ;===============AUTO ADJUST ROUTINE================= AUTO: JNB

TFLG,A1

CLR

TFLG

JNB

LDRUP,A2

CLR

RLY1

SJMP

A4

SETB

RLY1

JNB

LDRDW,A3

CLR

RLY2

SJMP

A5

SETB

RLY2

A4:

A2:

A5:

A3:

62 SETB

TR0

CLR

TFLG

A1:

RET ;=============TIMER 0 INTERRUPT ROUTINE=========== T0ISR: CLR

TR0

MOV

TH0,#HIGH(-50000)

MOV

TL0,#LOW(-50000)

DJNZ

TC0,T0ISREX

MOV

TC0,#20

DJNZ

TC1,T0ISREX

MOV

TC1,#30

SETB

TFLG

RETI T0ISREX: SETB

TR0

RETI

;===================PRINT LINE 1==================== LINE1: MOV

DATAPRT,#10000000B

CALL

CLOCK

CALL

DISP

CALL

SDLY

RET LINE2: MOV

DATAPRT,#11000000B

CALL

CLOCK

CALL

DISP

CALL

SDLY

RET ;================================================== LINE3: MOV

DATAPRT,#85H

63 CALL

CLOCK

MOV

A,WD1

ORL

A,#30H

SETB

RS

MOV

DATAPRT,A

CALL

CLOCK

CALL

SDLY

CLR

RS

CALL

SDLY

MOV

DATAPRT,#86H

CALL

CLOCK

MOV

A,WD2

ORL

A,#30H

SETB

RS

MOV

DATAPRT,A

CALL

CLOCK

CALL

SDLY

CLR

RS

CALL

SDLY

MOV

DATAPRT,#87H

CALL

CLOCK

MOV

A,WD3

ORL

A,#30H

SETB MOV

RS DATAPRT,A

CALL

CLOCK

CALL

SDLY

CLR

RS

CALL

SDLY

MOV

DATAPRT,#8DH

CALL

CLOCK

MOV

A,BD1

ORL

A,#30H

SETB

RS

64 MOV CALL

CLOCK

CALL

SDLY

CLR

RS

CALL

SDLY

MOV

DATAPRT,#8EH

CALL

CLOCK

MOV

A,BD2

ORL

A,#30H

SETB

RS

MOV

SETB

DATAPRT,A

DATAPRT,A

CALL

CLOCK

CALL

SDLY

CLR

RS

CALL

SDLY

MOV

DATAPRT,#8FH

CALL

CLOCK

MOV

A,BD3

ORL

A,#30H

RS MOV

DATAPRT,A

CALL

CLOCK

CALL

SDLY

CLR

RS

CALL

SDLY

RET ;===================DISPLAY LINE=================== DISP: SETB

RS

MOV

R3,#00H

MOV

A,R3

MOVC

A,@A+DPTR

MOV

DATAPRT,A

CALL

CLOCK

BAK:

65 INC R3 CJNE

R3,#16,BAK

CLR

RS

RET ;===============150 uS SMALL DELAY=============== SDLY: MOV

R6,#09H

MOV

R7,#0BFH

DJNZ

R7,$

DJNZ

R6,$-4

RET ;===============1 SECOND DELAY=================== DELAY:

ABC:

MOV

R6,#07H

MOV

R4,#0FFH

MOV

R5,#0FFH

DJNZ

R5,$

DJNZ

R4,$-4

DJNZ

R6,ABC

RET

;=============DELAY & EN,DISABLE=============== CLOCK: CALL

SDLY

CLR

EN

CALL

SDLY

SETB

EN RET

;================CLEAR DISPLAY=================== CDIS: MOV

DATAPRT,#01H

CALL

CLOCK

MOV

DATAPRT,#02H

CALL

CLOCK

66 RET ;================================================== MSG1:

DB

'WELCOME TO SOLAR'

MSG2:

DB

'TRACKING SYSTEM.'

MSG3:

DB

' SYSTEM IN AUTO '

MSG4:

DB

' PLEASE WAIT... '

MSG5:

DB

'SYSTEM IS RUNING'

MSG6:

DB

'WIND=000,BAT=000'

MSG7:

DB

'SYSTEM IS NORMAL'

MSG8:

DB

'

HIGH VOLTAGE

'

MSG9:

DB

'

LOW VOLTAGE

'

'0123456789abcdef' END

67

References: 1. Renewable energy... into the mainstream 2. Renewables 2010 Global Status Report 3. Executive summary "Analysis of Wind Energy in the EU-25" 4. How Does A Wind Turbine's Energy Production Differ from Its Power Production? 5. Wind Power: Capacity Factor, Intermittency 6. Evaluation of global wind power 7. "Charge Controllers for Stand-Alone Systems" 8. Charge Controller 9. Solar System Charge Controller 10. Wind Generator Charge Controller 11. Understanding and Using DC-AC Inverter 12. HD44780 Character LCD 13. Atmel 8952 Microcontroller