Acc. No. DC 343.pdf

Embed Size (px)

Citation preview

  • 8/14/2019 Acc. No. DC 343.pdf

    1/98

    DEVELOPMENT OF A MICROCONTROLLER

    BASED SOLAR PHOTOVOLTAIC MPPT

    CHARGE CONTROL SYSTEM

    Using

    INCREMENTAL CONDUCTANCE METHOD

    A Thesis

    Submitted in partial fulfillment of the

    Requirement for the degree of

    MASTER OF ELECTRONICS & TELE-COMMUNICATION ENGINEERING

    (With Specialization in ELECTRON DEVICE)

    By

    TANUSREE DUTTA

    Reg. No. 105231 of 2008-2009 Exam Roll No. M4ETC10-02

    Class Roll No. 000810702003 of 1008-1009MAY 2010

    Under the supervision of

    PROF. H. SAHA

    Department of Electronics & Tele-communication Engineering

    JADAVPUR UNIVERSITY,

    KOLKATA- 700032, INDIA

  • 8/14/2019 Acc. No. DC 343.pdf

    2/98

    CERTIFICATE OF APPROVAL*

    The foregoing thesis is hereby approved as a creditable study of an engineering subject and

    presented in a manner satisfactory to warrant acceptance as pre-requisite to the degree for which

    it has been submitted. It is understood that by this approval the undersigned do not necessarily

    endorse or approve any statement made, opinion expressed or conclusion drawn there in but

    approve the thesis only for which it is submitted.

    Committee on final examination

    For the evaluation of the Thesis

    .

    .

    Examiners

    * Only in case the thesis is approved

  • 8/14/2019 Acc. No. DC 343.pdf

    3/98

    A C K N O W L E D G E M E N T A C K N O W L E D G E M E N T A C K N O W L E D G E M E N T A C K N O W L E D G E M E N T

    It gives me imm ense pleasure to express my deepest sense of grat itude and s incere thanks to m y highly

    respected and esteemed supervisor Prof .Prof.Prof .Prof . HiranmayHiranmayHiranmayHiranmay Saha,Saha,Saha,Saha, Supervisor,Supervisor,Supervisor,Supervisor, IC Design & fabricat ion Centre,IC Design & fabricat ion Centre,IC Design & fabricat ion Centre,IC Design & fabricat ion Centre,

    JJJJadavpur adavpur adavpur adavpur Univers ityUniversityUniversityUnivers ity, for his revered supervis ion throughout my dissertat ion work, which made this task a

    pleasa nt jo b. It w as re al p leasu re to w ork under his su per vis io n.

    I extend my s incere thanks to Prof . Goutam Bhattacharya, Ramkrishna Miss ion Vidyamandira, for his keen

    interest, continuous encouragement and support.

    I am also indebted to my mother, brother, sisters and well wishers who are taking lot of pains for progress in

    my life and for their sacrifices, blessing and constant prayers for my advancement.

    I express my special thanks to Prof . B.Gupta (HOD,Dept.of ETCE,JU) and Prof . S.K.Sanyal , Dept. of

    ETC E,JU, for their kindness and providing m e the faci l it ies of the Labo ratory to use for my w ork.

    I would also l ike to thanks al l the Research Scholars , staff members and project students of IC Design &

    Fabricat ion Center. Special thanks are due to Mr.A.Mondal , Mr.G.P.Mishra, Mr.A.Kindu. Dr.S.Roy

    Choudh ury, Mrs.S.Roy, Ms.T.Majhi , Mr.A.Sengupta.

    I am also thankful to Prof . R.N.Ghosh, St . Thomas Col lege of Engg. & Tech., Kol . & Mr.Arup Sarkar, Agni

    Power Electronics, Kol., for their support.

    I also l ike to thank Dr.S.Mukhopadhya, Secretary, St . Thomas Col lege of Engg. & Tech., Kol . Prof .Mrs.

    S.Sen, Principal , St . Thomas Col lege of Engg. & Tech., kol , M r.Goutam Ban erjee, Registrar, St. Thomas

    Col lege of Engg. & Tech., kol , for al lowing me to p ursuing my M .E. in Electronics & Tele-commu nication at

    Jadavpur Univers ity.

    T A N U S R E E D U T T A T A N U S R E E D U T T A T A N U S R E E D U T T A T A N U S R E E D U T T A

    Reg. No. Reg. No. Reg. No. Reg. No.105231 of 2008105231 of 2008105231 of 2008105231 of 2008- ---09,09,09,09,

    D A T E D A T E D A T E D A T E : ::: Rol l No.000810702003Rol l No.000810702003Rol l No.000810702003Rol l No.000810702003 of 2008of 2008of 2008of 2008- ---09090909

    Exam Roll No. M4ETC10Exam Roll No. M4ETC10Exam Roll No. M4ETC10Exam Roll No. M4ETC10----02020202

  • 8/14/2019 Acc. No. DC 343.pdf

    4/98

    1.0 Introduction to Maximum Power Point Tracking (MPPT).

    Introduction. 2Need for Maximum Power Point Tracking

    How Maximum Power Point is Achieved 7

    Methods of Maximum Power Point 7

    Application of MPPT. . 8

    2.0 Literature Review 11

    Algorithms for MPPTPerturb & Observe

    Incremental Conductance 17

    Parasitic Capacitance 18

    Voltage Based Maximum Power Point Tracking 18

    Current Based Maximum Power Point Tracking 18

    4.0 Block Diagram of MPPT System.

    Basic Block diagram of MPPT 20

    What is MPPT 20

    Solar Photovoltaic Cell 22

    DC-DC Converter. 30

  • 8/14/2019 Acc. No. DC 343.pdf

    5/98

    Introduction to Microcontroller 34Characteristics of Battery 36

    5.0Hardware Description 39

    6.0 Software Description... 62

    7.0Experimental Setup. 75

    8.0Result 82

    9.0Conclusions & Future Scope. . 85

    10.0References ... 87

    11.0Annexure... 88

  • 8/14/2019 Acc. No. DC 343.pdf

    6/98

    1

    ABSTRACT

    Renewable energy sources play an important role in electricity

    generation. Various renewable energy sources like wind, solar, geothermal, ocean

    thermal and biomass can be used for generation of electricity and for meeting our

    daily energy needs. Energy from the sun is the best option for electricity

    generation as it is available everywhere and is free to harness. On an average the

    sunshine hour in India is about 6hrs annually also the sun shine shines in India for

    about 9 months in a year. Electricity from the sun can be generated through the

    solar photovoltaic modules (SPV). The SPV comes in various power output to

    meet the load requirement. Maximization of power from a solar photo voltaic

    module (SPV) is of special interest as the efficiency of the SPV module is verylow. A maximum power tracker is used for extracting the maximum power from

    the SPV module .The present work describes the maximum power point tracker

    (MPPT) for the SPV module connected to a battery which is used as a load. A

    Microcontroller is used for control of the MPPT algorithm. The power tracker is

    developed and tested successfully in the laboratory.

    Maximum power point tracking (MPPT) is used in photovoltaic (PV)

    systems to maximize the photovoltaic array output power, irrespective of the

    temperature and irradiation conditions and of the load electrical characteristics. Anew MPPT system has been developed, consisting of a Buck-type dc/dc converter,

    which is controlled by a microcontroller-based unit. The main difference between

    the method used in the proposed MPPT system and other techniques used in the

    past is that the PV array output power is used to directly control the dc/dc

    converter, thus reducing the complexity of the system. The resulting system has

    high-efficiency, lower-cost and can be easily modified to handle more energy

    sources (e.g., wind-generators).

  • 8/14/2019 Acc. No. DC 343.pdf

    7/98

    2

    `

    CHAPTER 1.

    Introduction to Maximum Power

    Point Tracking (MPPT).

  • 8/14/2019 Acc. No. DC 343.pdf

    8/98

    3

    Introduction

    Develop a Microcontroller based dedicated MPPT controller for solar PV module based on the

    incremental conductance method. As people are much concerned with the fossil fuel exhaustion

    and the environmental problems caused by the conventional power generation, renewable

    energy sources and among them photovoltaic panels and wind-generators are now widely used.

    So Solar Energy is a good choice for electric power generation. The solar energy is directly

    converted into electrical energy by solar photovoltaic module. Photovoltaic sources are used

    today in many applications such as battery charging, water pumping, home power supply,

    swimming-pool heating systems, satellite power systems etc. They have the advantage of being

    maintenance and pollution-free but their installation cost is high and inmost applications, they

    require a power conditioner (dc/dc or dc/ac converter) for load interface. Since PV modules still

    have relatively low conversion efficiency, the overall system cost can be reduced using high

    efficiency power conditioners which, in addition, are designed to extract the maximum possiblepower from the PV module.

    The photovoltaic modules are made up of silicon cells. The silicon solar cell which give output

    voltage of around 0.7V under open circuit condition. When many such cells are connected in

    series we get a solar PV module. Normally in a module there are 36 cells which amount for a

    open circuit voltage of about 20V. The current rating of the modules depends on the area of the

    individual cells. Higher the cell area high is the current output of the cell. For obtaining higher

    power output, the solar PV modules are connected in series and parallel combinations forming

    solar PV arrays. A typical characteristic curve of the called current (I) and voltage (V) curve and

    power (W) and voltage (V) curve of the module is shown is fig.1.

  • 8/14/2019 Acc. No. DC 343.pdf

    9/98

    4

    Fig.1 Characteristics of a typical Solar PV Module.

  • 8/14/2019 Acc. No. DC 343.pdf

    10/98

    5

    Need for maximum power point tracking

    Power output of a Solar PV module changes with change in direction of sun, changes in solar

    insolation level and with varying temperature as shown in the fig.2 & 3.

    Fig.2 Changes in the characteristics of the Solar PV module due to change in the insolation

    level.

    As seen in the PV (power vs. voltage) curve of the module there is a single maxima of power.

    That is there exists a maximum power corresponding to a particular voltage and current. We

    know that the efficiency of the solar PV module is low about 13%. Since the module efficiency

    is low it is desirable to operate the module at the maximum power point so that the maximumpower can be delivered to the load under varying temperature and insolation conditions. Hence

    maximization of improves the utilization of the solar PV module. A maximum power point

    tracker (MPPT) is used for extracting the maximum power from the solar PV module and

    transferring that power to the load. A dc/dc converter (step up/step down) serves the purpose of

    transferring maximum power from the solar PV module to the load. A dc/dc converter acts as an

    interface between the load & module in fig.4.

  • 8/14/2019 Acc. No. DC 343.pdf

    11/98

    6

    Fig.3 Change in the module characteristics due to the change in temperature

    By changing the duty cycle the load impedance as seen by the source is varied and matched at

    the point of the maximum power with the source so as to transfer the maximum power.

    Fig.4 Block diagram of a typical MPPT system

  • 8/14/2019 Acc. No. DC 343.pdf

    12/98

    7

    How maximum power point is obtained.

    As discuss in this chapter the maximum power point is obtained by introducing dc/dc converter

    in between the load and the solar PV module. The duty cycle of the converter is changed till the

    maximum power point is obtained considering a down converter is used.

    Vo=D*Vi ( Vo is output voltage and Vi is input voltage)

    D is the duty cycle of the PWM.

    Io = D*Ii

    So the Output Power

    Pout = Vo * Io

    Input Power,

    Pin = Vi * Ii

    By varying the duty cycle of the PWM, maximum power point is extract from the Solar PV

    module by using a different algorithm.

    Fig.5 DC/DC converter helps in tracking the maximum power point.

    Methods of Maximum Power Point Tracking.The maximum power is reached with the help of a dc/dc converter by adjusting its dutycycle.Now question arises how to vary the duty cycle and in which direction so that maximumpower is reached. Whether manual tracking or automatic tracking? Manual tracking is notpossible so automatic tracking is preferred to manual tracking. An automatic tracking can beperformed by utilizing various algorithms.a. Perturb and observeb. Incremental Conductancec. Parasitic Capacitance

    d. Voltage Based Maximum Power Trackinge. Current Based Maximum power Tracking

  • 8/14/2019 Acc. No. DC 343.pdf

    13/98

    8

    The algorithms are implemented in a microcontroller to implement the maximum power point

    tracking. The algorithm changes the duty cycle of the dc/dc converter to maximize the power

    output of the module and make it operate at the maximum power point of the module.

    Applications of Maximum Power Point Trackers.MPPT systems are used mainly in systems where source of power is nonlinear. Such as thesolar PV modules or the wind generator systems. MPPT systems are generally used in solar PV

    applications such as battery chargers and grid connected stand alone PV systems.

    a) Battery charging:Charging of battery (lead acid/NiCad) which is used for the storage of

    electrical energy. This energy if it comes from the solar PV systems then fast charging of

    the battery can be done with the help of the MPPT charge controller.

    Fig.6.Battery charging application of MPPT

    b) Grid connected and standalone PV systems:In grid connected or stand alone PV systems.Thesolar arrays supply power to the grid or to the local load. A dc/dc converter is used as the

    array voltage is dc and as grid voltage is ac an dc/ac converter must be used.

    Fig.7.Grid connected application using MPPT

  • 8/14/2019 Acc. No. DC 343.pdf

    14/98

    9

    Before a dc/ac converter a dc/dc converter (normally step up) is used which serves the purpose

    of the maximum power point tracking as explained earlier. Due to maximum power tracking

    always the maximum power is transferred to the grid or the local load.

    c) Water pumping applications:Solar PV arrays can be used to run dc motors which drive the

    pump for supplying the water in the fields. By using the maximum power point tracker the

    power to the motor can be increased and so the output flow rate of the pump will also increase.

    Fig.8. Pumping application of the MPPT.

  • 8/14/2019 Acc. No. DC 343.pdf

    15/98

    10

    CHAPTER 2.Literature Review.

  • 8/14/2019 Acc. No. DC 343.pdf

    16/98

  • 8/14/2019 Acc. No. DC 343.pdf

    17/98

    12

    Fig.9 MPPT system with the incremental conductance control method.

    Fig.10 Feed-forward maximum power tracking control system.

    In this method the power converter is controlled using the PV array output power. The MPPT

    control algorithm is based on the calculation of the PV output power and of the power change

    by sampling voltage and current values. The power change is detected by comparing the present

    and previous voltage levels, in order to calculate a reference voltage which is used to produce

    the PWM control signal.The dc/dc converter is driven by a DSP-based controller for fast-

    response and the overall system stability is improved by including a PI controller which is so

    used to match the array and reference voltage levels. However, the DSP-based control unit

    increases the implementation cost of the system.

    2). Control of DC/DC Converters for Solar Energy System with Maximum Power

    Tracking.

    Chihchiang Hua and Chihming Shen.

    The object of this paper is to analyze and design DC/DC converters of different types in a solarenergy system to investigate the performance of the converters.A simple method which

    combines a discrete time control and a PI compensator is used to track the Maximum power

    points (MPP's) of the solar array. The system is kept to operate close to the MPPT's, thus the

    maximum possible power transfer from the solar array is achieved. The implementation of the

    proposed converter system was based on a digital signal processor (DSP). Experimental tests

    where carried out for buck, boost and buck-boost converters using a simple maximum power

  • 8/14/2019 Acc. No. DC 343.pdf

    18/98

    13

    point tracking (MPPT) algorithm. The efficiencies for the system with different converters are

    compared. The paper is use full in evaluating the response of step up, step down converter for

    the MPPT system. Paper proposes that the Step down converter is the best option for the use in

    the MPPT system as it give higher efficiency.

    3) Maximum Power Tracking for Photovoltaic Power Systems.

    Joe-Air Jiang1, Tsong-Liang Huang2, Ying-Tung Hsiao2* and Chia-Hong Chen2.

    The authors have developed a new MPPT algorithm based on the fact that the MPOP(maximum

    peak operating point) of a PV generator can be tracked accurately by comparing the incremental

    and instantaneous conductances of the PV array. The work was carried out by both simulation

    and experiment, with results showing that the developed incremental conductance(IntCond)

    algorithm has successfully tracked the MPOP, even in cases of rapidly changing atmospheric

    conditions, and has higher efficiency than ordinary algorithms in terms of total PV energy

    transferred to the load.

    4) A New Algorithm for Rapid Tracking of Approximate Maximum Power Point in

    Photovoltaic Systems.

    Sachin Jain, Student Member, IEEE, and Vivek Agarwal.

    A robust oscillation method is used for implementing the maximum power point tracking for

    the solar arrays. The method uses only one variable that is load current for detecting the

    maximum power.This method is suitable for the battery charging application where MPPT is to

    be implemented.The algorithm is implemented through a simple circuit.The paper gives detailed

    discussion about design of a step down converter used for the MPPT.

    5). Microprocessor-Controlled New Class of Optimal Battery Chargers for Photovoltaic

    Applications.

    Mohamad A. S. Masoum, Seyed Mahdi Mousavi Badejani, and Ewald F. Fuchs.

    The authors discuss a control system of a residential photovoltaic system.The paper explains a

    perturb and observe algorithm and how can it be implemented using a microprocessor. This

    paper is one of the basic papers which explains the Incremental Conductance algorithm.Also

    controller design using PI scheme obtained.

  • 8/14/2019 Acc. No. DC 343.pdf

    19/98

    14

    6) Implementation of a DSP-controlled Photovoltaic Peak Power Tracking system.

    Chihchiang Hua,Member, IEEE, Jongrong Lin, and Chihming Shen

    The corresponding authors have proposed a new kind of maximum power point tracking

    algorithm based on Incremental Conductance algorithm.The algorithm is fast acting which

    eliminate the ripple in the module voltage. The module voltage and current that are taken forprocessing are not averaged but are instantaneous this speed ups the process of peak power

    tracking. Also the paper implements the new algorithm on the real time platform.The software

    used was DSP.

    7). Comparative Study of Maximum Power Point Tracking Algorithms Using an

    Experimental, Programmable, Maximum Power Point Tracking Test Bed.

    D. P. Hohm, M. E. Ropp.

    The authors have compares all the different kinds of algorithm that are used for the maximum

    power point tracking.This helps in proper selection of the algorithm.Preliminary results indicatethat perturb and observe compares favorably with incremental conductance and constant

    voltage. Although incremental conductance is able to provide marginally better performance in

    case of rapidly varying atmospheric conditions, the increased complexity of the algorithm will

    require more expensive hardware and therefore may have an advantage over perturb and

    observe only in large PV arrays.

    8) Theoretical and Experimental Analyses of Photovoltaic Systems With Voltage and

    Current-Based Maximum Power-Point Tracking.

    Mohammad A. S. Masoum, Hooman Dehbonei, and Ewald F. Fuchs

    Detailed theoretical and experimental analyses of two simple, fast and reliable maximum

    power-point tracking (MPPT) techniques for photovoltaic (PV) systems are presented. Voltage-

    based (VMPPT) and the Current-based (CMPPT) approaches.A microprocessor-controlled

    tracker capable of online voltage and current measurements and programmed with VMPPT and

    CMPPT algorithms is constructed.The load of the solar system is either a water pump or

    resistance. The paper has given a simulink model of the Dc/Dc converter and a solar PV

    module.

    The literature review consists of vast survey of papers from the various conferences. The

    literatures give sufficient idea about the basics of the MPPT algorithm and how the MPPtracking is takes place.

  • 8/14/2019 Acc. No. DC 343.pdf

    20/98

    15

    CHAPTER 3.

    Algorithms to track the Maximum

    Power Point.

  • 8/14/2019 Acc. No. DC 343.pdf

    21/98

    16

    Different algorithms help to track the maximum power point of the solar pv module

    automatically.

    The various algorithms used are:

    a) Perturb and Observe.

    b) Incremental Conductance.

    c) Parasitic Capacitance.

    d) Voltage Based Peak Power Tracking.

    e) Current Based peak power Tracking

    a) Perturb and Observe method- In this algorithm a slight perturbation is introduced in

    the system. Due to this perturbation the power of the module changes. If the power increases

    due to the perturbation then the perturbation is continued in that direction. After the peak power

    is reached the power at the next instant decreases and hence after that the perturbation reverses.

    Fig.11 Perturb and observe algorithm

    When the steady state is reached the algorithm oscillates around the maximum point. In order to

    keep the power variation small the perturbation size is kept very small.The algorithm is

    developed in such a manner that it sets a reference voltage of the module corresponding to the

    maximum voltage of the module. A Microcontroller then acts moving the operating point of the

    module to that particular voltage level. It is observed that there some power loss due to this

    perturbation also the fails to track the power under fast varying atmospheric conditions. But still

    this algorithm is very popular and simple.

  • 8/14/2019 Acc. No. DC 343.pdf

    22/98

    17

    Implemented Methodb) Incremental conductance method:- The disadvantage of the perturb and observemethod to track the maximum power under fast varying atmospheric condition is overcome byIncremental conductance method. The algorithm makes use of the equation:

    P=V*I(where P= module power,V=module voltage, I=module current);

    Diff. with respect to dV

    dP/dV=I+V*dI/dV

    Depending on this equation the algorithm work at maximum power point

    dP/dV=0

    dI/dV=-I/V

    Fig.12.Incremental conductance method.

    If operating point is to the left of the power curve then we have

    dP/dV>0

    dI/dV>I/V

    By using this equation, algorithm works.

    The incremental conductance can determine that the MPPT has reached the MPP and stop

    perturbing the operating point.If this condition is not met, the direction in which the MPPT

  • 8/14/2019 Acc. No. DC 343.pdf

    23/98

    18

    operating point must be perturbed can be calculated using the relationship between dl/dV and -

    I/V. This relationship is derived from the fact that dP/dV is negative when the MPPT is to the

    right of the MPP and positive when it is to the left of the MPP. This algorithm has disvantages

    over perturb and observe in that it can determine when the MPPT has reached the MPP, where

    perturb and observe oscillates around the MPP. Also, incremental conductance can track rapidly

    increasing and decreasing irradiance conditions with higher accuracy than perturb and

    observe.One disadvantage of this algorithm is the increased complexity when compared to

    perturb and observe method.

    Others Method

    c) Parasitic capacitances:- The parasitic capacitance method is a refinement of

    incremental conductance method that takes into account the parasitic capacitances of the solar

    cells in the PV array . Parasitic capacitance uses the switching ripple of the MPPT to perturb the

    array. To account for the parasitic capacitance, the average ripple in the array power and

    voltage,generated by the switching frequency, are measured using a series of filters and

    multipliers and then used to calculate the array conductance.The incremental conductancealgorithm is then used to determine the direction to move the operating point of the MPPT. One

    disadvantage of this algorithm is that the parasitic capacitance in each module is very small, and

    will only come into play in large PV arrays where several module strings are connected in

    parallel. Also, the DC-DC converter has a sizable input capacitor used filter out small ripple in

    the array power.This capacitor may mask the overall effects of the parasitic capacitance of the

    PV array.

    d) Voltage control maximum point tracker:- It is assumed that a maximum power

    point of a particular solar PV module lies at about 0.75 times the open circuit voltage of the

    module. So by measuring the open circuit voltage a reference voltage can be generated and feedforward voltage control scheme can be implemented to bring the solar pv module voltage to the

    point of maximum power.One problem of this technique is the open circuit voltage of the

    module varies with the temperature. So as the temperature increases the module open circuit

    voltage changes and we have to measure the open circuit voltage of the module very often.

    Hence the load must be disconnected from the module to measure open circuit voltage. Due to

    which the power during that instant will not be utilize.

    e) Current control maximum power point tracker:- The maximum power of the

    module lies at the point which is at about 0.9 times the short circuit current of the module. In

    order to measure this point the module or array is short-circuited. And then by using the current

    mode control the module current is adjusted to the value which is approx 0.9 times the shortcircuit current. The problem with this method is that a high power resistor is required which can

    stain the short-circuit current. The module has to be short circuited to measure the short circuit

    current as it goes on varying with the changes in insolation level.

  • 8/14/2019 Acc. No. DC 343.pdf

    24/98

    19

    CHAPTER 4.BLOCK DIAGRAM OF MPPT SYSTEM

  • 8/14/2019 Acc. No. DC 343.pdf

    25/98

    20

    Fig.13

    What is MPPT ?

    A MPPT, or maximum power point tracker is an electronic DC to DC converter that

    optimizes the match between the solar array (PV panels), and the battery bank, utility power,

    DC motor, or DC pump.

    .Fig.14 Characteristic curve of solar photovoltaic MPPT system

  • 8/14/2019 Acc. No. DC 343.pdf

    26/98

    21

    what do we mean by "optimize"?

    Most PV panels are built to put out a nominal 12 volts. The catch is nominal. In actual fact,

    most all are designed to put out from 16 to 36 volts. The problem is that a nominal 12 volt

    battery is pretty close to an actual 12 volts - 10.5 to 12.7 volts, depending on state of charge.

    Under charge, most batteries want from around 13.2 to 14.2 volts to fully charge , quite a bit

    different than what most panels are designed to put out.This is electronic tracking, and has

    nothing to do with moving the panels. Instead, the controller looks at the output of the panels,

    and compares it to the battery voltage. It then figures out what is the best power that the panel

    can put out to charge the battery. It takes this and converts it to best voltage to get maximum

    AMPS into the battery. Most modern MPPT's are around 92-97% efficient in the conversion.

    You typically get a 20 to 45% power gain in winter and 10-15% in summer. Actual gain can

    vary widely depending weather,temperature, battery state of charge, and other factors.

    MPPT's are most effective under these conditions:

    Winter, and/or cloudy or hazy days - when the extra power is needed the most.

    Cold weather - solar panels work better at cold temperatures, but without a MPPT we are losing

    most of that. Cold weather is most likely in winter - the time when sun hours are low and you

    need the power to recharge batteries the most. Low battery charge - the lower the state of charge

    in your battery, the more current a MPPT puts into them - another time when the extra power is

    needed the most. You can have both of these conditions at the same time. The Power point

    tracker is a high frequency DC to DC converter. They take the DC input from the solar panels,change it to high frequency AC, and convert it back down to a different DC voltage and current

    to exactly match the panels to batteries. MPPT's operate at high audio frequencies, usually in

    the 20-80 kHz range. Most newer models of MPPT controllers available are Microcontroller

    based. They know when to adjust the output that it is being sent to the battery, and they actually

    shut down for a few microseconds and "look" at the solar panel and battery and make any

    needed adjustments.

  • 8/14/2019 Acc. No. DC 343.pdf

    27/98

    22

    SOLAR PHOTOVOLTAIC CELL

    Simple explanation

    Photons in sunlight hit the solar panel and are absorbed by semiconducting materials,such as

    silicon.Electronics (negatively charged) are knocked loose from their atoms, allowing them to

    flow through the material to produce electricity. Due to the special composition of solar cells,

    the electrons are only allowed to move in a single direction.The complementary positive

    charges that are also created (like bubbles) are called holes and flow in the direction opposite of

    the electrons in a silicon solar panel.An array of solar cells converts solar energy into a usable

    amount of direct (DC) electricity.

    Photogeneration of charge carriers

    When a photons hits a piece of silicon, one of three things can happen:

    1)The photon can pass straight through the silicon this (generally) happens for lower energy

    photon.

    2)The photon can reflect off the surface,

    3)The photon can be absorbed by the silicon, if the photon energy is higher than the silicon band

    gap value.This generates an electron-hole pair and sometimes heat,depending on the band

    structure.

    When a photon is absorbed, its energy is given to an electron in the crystal lattice.Usually this

    electron is in the valence band, and is tightly bound in covalent bonds between neighboring

    atoms, and hence unable to move far. The energy given to it by the photon "excites" it into the

    conduction band,where it is free to move around within the semiconductor. The covalent bond

    that the electron was previously a part of now has one fewer electron this is known as a hole.

    The presence of a missing covalent bond allows the bonded electrons of neighboring atoms to

    move into the "hole," leaving another hole behind, and in this way a hole can move through the

    lattice. Thus, it can be said that photons absorbed in the semiconductor create mobile electron-

    hole pairs

    A photon need only have greater energy than that of the band gap in order to excite an electron

    from the valence band into the conduction band. However, the solar frequency specturm

    approximates a black body spectrum at ~6000 K, and as such, much of the solar radiation

    reaching the Earth is composed of photons with energies greater than the band gap of silicon.

    These higher energy photons will be absorbed by the solar cell, but the difference in energy

  • 8/14/2019 Acc. No. DC 343.pdf

    28/98

    23

    between these photons and the silicon band gap is converted into heat (via lattice vibrations

    called phonons) rather than into usable electrical energy.

    Charge carrier separation

    There are two main modes for charge carrier separation in a solar cell:

    1)driftof carriers, driven by an electrostatic field established across the device.

    2)diffusion of carriers from zones of high carrier concentration to zones of low carrier

    concentration (following a gradient of electrochemical potential).

    In the widely used p-n junction solar cells, the dominant mode of charge carrier separation is by

    drift. However, in non-p-n-junction solar cells (typical of the third generation solar cell research

    such as dye and polymer solar cell), a general electrostatic field has been confirmed to be

    absent, and the dominant mode of separation is via carrier diffusion.

    The p-n junction

    Main articles: semiconductor and p-n junction.

    The most commonly known solar cell is configured as a large-area p-n junction made from

    silicon. As a simplification,one can imagine bringing a layer of n-type silicon into direct contact

    with a layer of p-type silicon.In practice, p-n junctions of silicon solar cells are not made in this

    way, but rather, by diffusing an n-type dopant into one side of a p-type wafer (or vice versa).

    If a piece of p-type silicon is placed in intimate contact with a piece of n-type silicon,then a

    diffusion of electrons occurs from the region of high electron concentration (the n-type side of

    the junction) into the region of low electron concentration (p-type side of the junction). When

    the electrons diffuse across the p-n junction, they recombine with holes on the p-type side. The

    diffusion of carriers does not happen indefinitely however, because of an electric field which is

    created by the imbalance of charge immediately on either side of the junction which this

    diffusion creates. The electric field established across the p-n junction creates a diode that

    promotes charge flow, known as drift current,that opposes and eventually balances out the

    diffusion of electron and holes. This region where electrons and holes have diffused across the

    junction is called the depletion region because it no longer contains any mobile charge carriers.

    It is also known as the "space charge region".

    Connection to an external load

    Ohomic metal-semiconductor contacts are made to both the n-type and p-type sides of the solar

    cell, and the electrodes connected to an external load. Electrons that are created on the n-type

    side, or have been "collected" by the junction and swept onto the n-type side, may travel

    through the wire, power the load, and continue through the wire until they reach the p-type

    semiconductor-metal contact. Here, they recombine with a hole that was either created as an

  • 8/14/2019 Acc. No. DC 343.pdf

    29/98

    24

    electron-hole pair on the p-type side of the solar cell, or are swept across the junction from the

    n-type side after being created there.

    The voltage measured is equal to the difference in the quasi fermi levels of the minority carriers

    i.e. electrons in the p-type portion, and holes in the n-type portion.

    Fig,15 The equivalent circuit of a solar cell

    Fig.16 The schematic symbol of a solar cell

    To understand the electronic behavior of a solar cell, it is useful to create a model which is

    electrically equivalent, and is based on discrete electrical components whose behavior is well

    known. An ideal solar cell may be modelled by a current source in parallel with a diode; in

    practice no solar cell is ideal, so a shunt resistance and a series resistance component are added

    to the model. The resulting equivalent circuit of a solar cell is shown in fig. Also shown, on the

    right,is the schematic representation of a solar cell for use in circuit diagrams.

    Characteristic equation

    From the equivalent circuit it is evident that the current produced by the solar cell is equal to

    that produced by the current source, minus that which flows through the diode, minus that

    which flows through the shunt resistor:

  • 8/14/2019 Acc. No. DC 343.pdf

    30/98

    25

    I=ILIDISH

    where

    I= output current (amperes)

    IL= photogenerated current (amperes)

    ID= diode current (amperes)

    ISH= shunt current (amperes)

    The current through these elements is governed by the voltage across them:

    Vj= V+IRS

    where

    Vj= voltage across both diode and resistorRSH(volts)

    V= voltage across the output terminals (volts)

    I= output current (amperes)

    RS= series resistance ()

    By the Shockley diode equation, the current diverted through the diode is:

    where

    I0= reverse saturation current (amperes)

    n= diode ideality factor (1 for an ideal diode)

    q= elementary charge

    k= Boltzmanns constant

    T= absolute temperature

    For silicon at 25C, volts.

    By Ohms law, the current diverted through the shunt resistor is:

  • 8/14/2019 Acc. No. DC 343.pdf

    31/98

    26

    WhereRSH= shunt resistance

    Substituting these into the first equation produces the characteristic equation of a solar cell,

    which relates solar cell parameters to the output current and voltage:

    An alternative derivation produces an equation similar in appearance but with Von the left-hand

    side. The two alternatives are identites; that is, they yield precisely the same results.

    In principle, given a particular operating voltage Vthe equation may be solved to determine the

    operating currentIat that voltage. However, because the equation involvesIon both sides in a

    transcendental function the equation has no general analytical solution. However, even without

    a solution it is physically instructive. Furthermore, it is easily solved using numerical methods.

    (A general analytical solution to the equation is possible using Lamberts W function, but since

    Lambert's W generally itself must be solved numerically this is a technicality.)

    Since the parameters I0, n, RS, and RSH cannot be measured directly,the most common

    application of the characteristic equation is nonlinear regression to extract the values of these

    parameters on the basis of their combined effect on solar cell behavior.

    Open-circuit voltage and short-circuit current

    When the cell is operated at open circuit, I= 0 and the voltage across the output terminals is

    defined as the open-circuit voltage. Assuming the shunt resistance is high enough to neglect the

    final term of the characteristic equation, the open-circuit voltage VOCis:

    Similarly, when the cell is operated at short circuit, V= 0 and the currentIthrough the terminals

    is defined as the short-circuit current. It can be shown that for a high-quality solar cell (low RS

    andI0, and highRSH) the short-circuit currentISCis:

  • 8/14/2019 Acc. No. DC 343.pdf

    32/98

    27

    Effect of physical size

    The values of I0, RS, and RSH are dependent upon the physical size of the solar cell. In

    comparing otherwise identical cells, a cell with twice the surface area of another will, in

    principle, have double the I0 because it has twice the junction area across which current can

    leak. It will also have half the RSandRSHbecause it has twice the cross-sectional area through

    which current can flow. For this reason, the characteristic equation is frequently written in terms

    of current density, or current produced per unit cell area:

    Where,

    J= current density (amperes/cm2

    )

    JL= photogenerated current density (amperes/cm2)

    Jo= reverse saturation current density (amperes/cm2)

    rS= specific series resistance (-cm2)

    rSH= specific shunt resistance (-cm2)

    This formulation has several advantages. One is that since cell characteristics are referenced to a

    common cross-sectional area they may be compared for cells of different physical dimensions.

    While this is of limited benefit in a manufacturing setting, where all cells tend to be the same

    size, it is useful in research and in comparing cells between manufacturers. Another advantage

    is that the density equation naturally scales the parameter values to similar orders of magnitude,

    which can make numerical extraction of them simpler and more accurate even with naive

    solution methods.

    A practical limitation of this formulation is that as cell sizes shrink certain parasitic effects grow

    in importance and can affect the extracted parameter values. For example, recombination and

    contamination of the junction tend to be greatest at the perimeter of the cell, so very small cellsmay exhibit higher values of J0 or lower values of rSH than larger cells that are otherwise

    identical. In such cases, comparisons between cells must be made cautiously and with these

    effects in mind.

  • 8/14/2019 Acc. No. DC 343.pdf

    33/98

    28

    Cell temperature

    Fig.17 Effect of temperature on the current-voltage characteristics of a solar cell

    Temperature affects the characteristic equation in two ways: directly, via T in the

    exponential term, and indirectly via its effect onI0. (Strictly speaking, temperature affects all of

    the terms, but these two far more significantly than the others.) While increasing Treduces themagnitude of the exponent in the characteristic equation, the value of I0 increases in proportion

    to exp(T). The net effect is to reduce VOC (the open-circuit Voltage) linearly with increasing

    temperature. The magnitude of this reduction is inversely proportional to VOC; that is, cells with

    higher values of VOCsuffer smaller reductions in voltage with increasing temperature. For most

    crystalline silicon solar cells the reduction is about 0.50%/C, though the rate for the highest-

    efficiency crystalline silicon cells is around 0.35%/C. By way of comparison, the rate for

    amorphous silicon solar cells is 0.20-0.30%/C, depending on how the cell is made.

    The amount of photogenerated currentILincreases slightly with increasing temperature because

    of an increase in the number of thermally generated carriers in the cell. This effect is slight,however: about 0.065%/C for crystalline silicon cells and 0.09% for amorphous silicon cells.

    The overall effect of temperature on cell efficiency can be computed using these factors in

    combination with the characteristic equation. However, since the change in voltage is much

    stronger than the change in current, the overall effect on efficiency tends to be similar to that on

    voltage. Most crystalline silicon solar cells decline in efficiency by 0.50%/C and most

    amorphous cells decline by 0.15-0.25%/C. The figure to the right shows I-V curves that might

    typically be seen for a crystalline silicon solar cell at various temperatures.

  • 8/14/2019 Acc. No. DC 343.pdf

    34/98

    29

    Series resistance

    Fig.18 Effect of series resistance on the current-voltage characteristics of a solar cell

    As series resistance increases, the voltage drop between the junction voltage and the terminal

    voltage becomes greater for the same flow of current. The result is that the current-controlled

    portion of the I-V curve begins to sag toward the origin, producing a significant decrease in the

    terminal voltage Vand a slight reduction inISC, the short-circuit current. Very high values of RSwill also produce a significant reduction inISC; in these regimes, series resistance dominates and

    the behavior of the solar cell resembles that of a resistor. These effects are shown for crystalline

    silicon solar cells in the I-V curves displayed in the figure to the right.

    Shunt resistance

    Fig.19 Effect of shunt resistance on the currentvoltage characteristics of a solar cell

    As shunt resistance decreases, the current diverted through the shunt resistor increases for a

    given level of junction voltage. The result is that the voltage-controlled portion of the I-V curvebegins to sag toward the origin, producing a significant decrease in the terminal currentIand a

    slight reduction in VOC. Very low values ofRSH will produce a significant reduction in VOC.

    Much as in the case of a high series resistance, a badly shunted solar cell will take on operating

    characteristics similar to those of a resistor.These effects are shown for crystalline silicon solar

    cells in the I-V curves displayed in the figure to the right.

  • 8/14/2019 Acc. No. DC 343.pdf

    35/98

    30

    Reverse saturation current

    Fig.20 Effect of reverse saturation current on the current-voltage characteristics of a solar cell

    If one assumes infinite shunt resistance, the characteristic equation can be solved for VOC:

    Thus, an increase inI0produces a reduction in VOCproportional to the inverse of the logarithm

    of the increase. This explains mathematically the reason for the reduction in VOCthat

    acompanies increases in temperature described above. The effect of reverse saturation current

    on the I-V curve of a crystalline silicon solar cell are shown in the figure to the right. Physically,

    reverse saturation current is a measure of the "leakage"of carriers across the p-n junction in

    reverse bias. This leakage is a result of carrier recombination in the neutral regions on either

    side of the junction.

    4.4) DC-DC CONVERTER

    Introduction.

    The power switch was the key to practical switching regulators. Prior to the invention of the

    Vertical Metal Oxide Semiconductor (VMOS) power switch, switching supplies were generally

    not practical.The inductor's main function is to limit the current slew rate through the power

    switch. This action limits the otherwise high-peak current that would be limited by the switch

    resistance alone. The key advantage for using an inductor in switching regulators is that an

    A linear regulator uses a resistive voltage drop to regulate the voltage,losing power (voltage

    drop times the current) in the form of heat.A switching regulators inductor does have a voltage

    drop and an associated current but the current is 90 degrees out of phase with the voltage.

    Because of this,the energy is stored and can be recovered in the discharge phase of the

    switching cycle.This results in a much higher efficiency and much less heat.

  • 8/14/2019 Acc. No. DC 343.pdf

    36/98

    31

    What is a Switching Regulator?

    A switching regulator is a circuit that uses a power switch,an inductor,and a diode to transfer

    energy from input to output. The basic components of the switching circuit can be rearranged tofrom a step-down(buck) ,step-up(boost).or an inverter (flyback). These design are shown in fig.

    21,22 ,23 & 24 respectively,where Figures 23 & 24 are the same except for the transformer and

    the diode polarity.Feedback and control circuitry can be carefully nested around these circuits to

    regulate the energy transfer and maintain a constant output within nornmal operating conditions.

    Fig.21 Buck converter topologies

    Fig..22 simple boost converter

    Figure 23. Inverting topology.

  • 8/14/2019 Acc. No. DC 343.pdf

    37/98

    32

    Figure 24.Transformer flyback topology.

    Why Use a Switching Regulator?Switching regulators offer three main advantages compared to a linear regulators. First,switching efficiency can be much better than linear. Second, because less energy is lost in thetransfer smaller components and less thermal management are required. Third, the energy stored

    by an inductor in a switching regulator can be transformed to output voltages that can be greaterthan the input (boost), negative (inverter), or can even be transferred trough a transformer toprovide electrical isolation with respect to the input.Linear regulators provide lower noise and higher bandwidth ,their simplicity can sometimesoffer a less expensive solution. These are the advantages of the linear regulators.

    There are, admittedly, disadvantages with switching regulators.They can be noisy and require

    energy management in the form of a control loop.The solution to these control problems is

    found integrated in modern switching modes controller chips.

    Charge Phase

    A basic boost configuration is depicted in fig.25. Assuming that the switch has been open for a

    long time and that the voltage drop across the diode is negative, the voltage across the capacitor

    is equal to the input voltage. When the switch closes, the input voltage, +V IN, is impressed

    across the inductor and the diode prevents the capacitor from discharging +V OUT to ground.

    Because the input voltage is DC, current through the inductor rises linearly with time at a rate

    proportional to the input voltage divided by the inductance.

  • 8/14/2019 Acc. No. DC 343.pdf

    38/98

    33

    Figure 25. Charging phase: when the switch closes, current ramps up through the inductor.

    Discharge Phase

    Fig.26shows the discharge phase. When the switch opens again, the inductor current continues

    to flow into the rectification diode to charge the output.As the output voltage rises,the slope of

    the current ,di/dt though the inductor reverses. The output voltage rises until equilibrium is

    reached or:

    VL= Ldi/dt

    In other words, the higher the inductor voltage, the faster inductor current drops.

    Fig.26 Discharge phade:when the switch opens,current flows to the load through the rectifying

    diode

    In a steady-state operating condition the average voltage across the inductor over the entire

    switching cycle is zero. This implies that the average current through the inductor is also in

    steady state. This is an important rule governing all inductor-based switching topologies. Taking

    this one step further, we can establish that for a given charge time ton and a given input voltage

    and with the circuit in equilibrium, there is a specific time, tOFF, for an output voltage. Because

  • 8/14/2019 Acc. No. DC 343.pdf

    39/98

    34

    the average inductor voltage in steady state must equal zero, we can calculate for the boost

    circuit.

    VIN tON= tOFF VL

    and because:

    VOUT= VIN+ VL

    We can then establish the relationship:

    VOUT= VIN (1 + tON/tOFF)

    using the relationship for duty cycle (D):

    tON/(tON+ tOFF) = D

    Then for the boost circuit:

    VOUT= VIN/(1-D)

    Similar derivations can be had for the buck circuit:

    VOUT= VIN D

    and for the inverter circuit (flyback):

    VOUT= VIN D/(1-D)

    Introduction to MicrocontrollerAMicrocontroller has a CPU in addition to a fixed amount of RAM,ROM,I/O ports, and a timer

    all on a single chip.In other words,the processors,RAM,ROM,,I/Oports,and timer are all

    embedded together on one chip; therefore, the designer cannot add any external memory, I/O,or

    timer to it.The fixed amount of on-chip ROM,RAM and number of I/O ports in microcontrollers

    makes them ideal for many applications in which cost and space are critical.In manyapplications,for example a TV remote control,there is no need for the computing power of a 486

    or even an 8086 microprocessor.

  • 8/14/2019 Acc. No. DC 343.pdf

    40/98

    35

    Block Diagram of Microcontroller:

    CPU RAM ROM

    I/O Timer Serial COM Port

    Criteria for choosing a microcontroller

    The first and foremost criterion in choosing a microcontroller is that it must the task at hand

    efficiently and cost effectively. In analyzing the needs of a microcontroller-based project,we

    must first see whether an 8-bit,16-bit,or 32-bit microcontroller can best handle the computing

    needs of the task most effective

    Among other considerations in this category are:

    Speed

    Packaging

    Power consumption

    The amount of RAM & ROM chip.

    The number of I/O pins and the timer on the chip.

    How easy to upgrade to higher-performance or lower power-consumption version.

    Cost per unit.

    All these criterion are fulfill by using a AVR ATMEGA8Microcontroller

    Features of AVR ATMEGA8 Microcontroller

    High-performance, Low-power AVR 8-bit MicrocontrollerAdvanced RISC Architecture

    130 Powerful Instructions Most Single-clock Cycle Execution

    32 x 8 General Purpose Working Registers

    Fully Static Operation

    Up to 16 MIPS Throughput at 16 MHz

    On-chip 2-cycle Multiplier

    High Endurance Non-volatile Memory segments

    8K Bytes of In-System Self-programmable Flash program memory

    512 Bytes EEPROM

    1K Byte Internal SRAM

    Write/Erase Cycles: 10,000 Flash/100,000 EEPROM

  • 8/14/2019 Acc. No. DC 343.pdf

    41/98

    36

    Data retention: 20 years at 85C/100 years at 25C(1)

    Optional Boot Code Section with Independent Lock Bits

    In-System Programming by On-chip Boot Program

    True Read-While-Write Operation

    Programming Lock for Software Security

    Peripheral Features

    Two 8-bit Timer/Counters with Separate Prescaler, one Compare Mode

    One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture

    Mode

    Real Time Counter with Separate Oscillator

    Three PWM Channels

    8-channel ADC in TQFP and QFN/MLF package

    Eight Channels 10-bit Accuracy

    6-channel ADC in PDIP package

    Six Channels 10-bit Accuracy

    Byte-oriented Two-wire Serial Interface

    Programmable Serial USART

    Master/Slave SPI Serial Interface

    Programmable Watchdog Timer with Separate On-chip Oscillator

    On-chip Analog Comparator

    Special Microcontroller Features

    Power-on Reset and Programmable Brown-out Detection

    Internal Calibrated RC Oscillator

    External and Internal Interrupt Sources

    Five Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down,

    andStandby

    I/O and Packages

    23 Programmable I/O Lines

    28-lead PDIP, 32-lead TQFP, and 32-pad QFN/MLF

    Operating Voltages

    2.7 - 5.5V (ATmega8L)

    4.5 - 5.5V (ATmega8)

    Speed Grades

  • 8/14/2019 Acc. No. DC 343.pdf

    42/98

    37

    0 - 8 MHz (ATmega8L)

    0 - 16 MHz (ATmega8)

    Power Consumption at 4 Mhz, 3V, 25C

    Active: 3.6 mA

    Idle Mode: 1.0 mA

    Power-down Mode: 0.5 A

    LOAD (BATTERY):

    The current limiting method is required to charged the liead-acid batteries.The charge time of a

    sealed lead-acid battery is 12-16 hours (up to 36 hours for larger capacity batteries). With higher

    charge currents and multi-stage charge methods, the charge time can be reduced to 10 hours or

    less. Lead-acid cannot be fully charged as quickly. It takes about 5 times as long to recharge a

    lead-acid battery to the same level as it does to discharge.

    A multi-stage charger first applies a constant current charge, raising the cell voltage to a presetvoltage. Stage 1 takes about 5 hours and the battery is charged to 70%. During the topping

    charge in Stage 2 that follows, the charge current is gradually reduced as the cell is being

    saturated. The topping charge takes another 5 hours and is essential for the well being of the

    battery. If omitted, the battery would eventually lose the ability to accept a full charge. Full

    charge is attained after the voltage has reached the threshold and the current has dropped to 3%

    of the rated current or has leveled off. Fig. shows the charging characteristics of battery.

    Fig.27 Charging Characteristics of Battery

  • 8/14/2019 Acc. No. DC 343.pdf

    43/98

    38

    CHAPTER 5.HARDWARE DESCRIPTION

  • 8/14/2019 Acc. No. DC 343.pdf

    44/98

    39

    CIRCUIT ANALYSIS & DESCRIPTIONTo track the Maximum power point, a Hardware section is required which consist of differentparts. Each part performs the different function.

    The different hardware parts are:

    Microcontroller

    Buffer

    Opto coupler

    Transistor Amplifier

    Buck converter

    Current to Voltage converter using OP-AMP

    Positive voltage to Negative Voltage Converter

    Micro switch which connected to Port of microcontroller

    LED which connected to Port of microcontroller

    Positive 5V regulated Power Supply

    LCD (Liquid Crystal Display)

    Specification of the MPPT Solar Charge Controller:

    Design for 1Amp Current

    Consider the,Solar Photovoltaic Module Voltage = 25 Volt,

    which is the Input of the Buck Converter so ,Vin = 25V

    Required Voltage for Charging a 12V Battery about 13.5Volt,

    So we consider the Output of the Buck converter,

    Vout = 15Voltand consider the Output current Iout = 1Amp

  • 8/14/2019 Acc. No. DC 343.pdf

    45/98

    40

    Now

    DESIGNING OF BUCK CONVERTER

    Fig.28 Buck converter using IC3524

  • 8/14/2019 Acc. No. DC 343.pdf

    46/98

    41

    Vin = 25 Volt

    Vout = 15Volt

    Iout = 1Amp

    f = 31.25 KHz

    L =( 2.5 x 25 x 15)/31.25 x 1000 x ( 15 + 25 ) x 1

    = 0.75 Mh

    Consider, Vo = 50mV

    Co = 1 x 15 / 0.05 x 31.25 x1000 (15 +25)

    = 240 FNearest available value is 220F, 35V.

    To reduce the ripple component a 0.1 F Non-electrolytic capacitor is connected in parallelwith the electrolytic capacitor.

    Now Enhancement of the Output Current

    Design for 5Amp CurrentVin = 25 Volt

    Vout = 15Volt

    Iout = 5Amp

    f= 31.25 KHz

    L =( 2.5 x 25 x 15)/31.25 x 1000 x ( 15 + 25 ) x 5

    = 0.15mH

    Ripple Voltage

    Vo = 50mV

    Co = 5 x 15 / 0.05 x 31.25 x1000 (15 +25)

    = 1200 FNearest available value is 1000uF, 35V & 220F.These two are connected in parallel to get 1220F

  • 8/14/2019 Acc. No. DC 343.pdf

    47/98

    42

    BLOCK DIAGRAM OF THE CIRCUIT

    SWITCH(micro)LED

    BUFFER

    AVR ATMEGA8 MICROCONTROLLER

    OPTO-COUPLER

    SOLAR PVARRAY

    LOADBUCKCONVETERAMPLIFIER

    LCDDISPLAY

    Fig.29

  • 8/14/2019 Acc. No. DC 343.pdf

    48/98

    43

    CIRCUIT DIAGRAM OF MPPT CHARGE CONTROLLER

    1K

    1N4148

    +5V

    100E

    21

    1000uF

    1

    PD1 3

    +12V

    1

    10E

    1N4148

    +12V

    0.1uF

    10K

    4

    22

    2

    1

    1N4148

    1K

    100nF

    1K,1/2W

    0.1uF

    2

    5PD2

    20

    3

    2 TL084

    -12V

    +5V

    1N4148

    0.uF

    470E

    100uF

    100uF

    6PD3

    9

    4

    3

    1N4148

    3

    SPV

    0.1uF

    VI

    PD4

    10

    5

    +5V

    2.2K

    1K

    +12V

    0.1E

    VO

    +5V

    0.75mH

    PD58

    6

    11

    1N4148

    0.1E

    +5V

    1 3

    TL084

    LM7805

    R17

    PD6

    7

    7

    C4

    1n

    12

    1N4148

    +5v

    2

    +

    ATMEGA

    8

    MI

    CRO

    CONTROLLER

    TC7660

    47K

    PD7

    23

    8

    13

    Batt.

    -12V

    1N4148

    ADC0

    -47K

    PB0

    10uF

    14

    330E

    1K

    10K

    1K

    +5V

    PB1

    ADC1 24

    15

    330E

    5K

    SW Push button

    10K

    10uF

    PB2

    SW Push button

    ADC2 25

    16

    330E

    1K

    47K

    +

    CD4049 BA159

    10K

    10K

    PB3

    ADC3 26

    17

    LCD DISPLAY 16X2

    47K

    10KPC817

    10K

    ADC4 27

    18

    10K

    10K

    +5V

    BD139

    100uF

    10uF

    +5V

    ADC5 28

    19PB4

    10K

    1N4148

    1K

    SW Push button

    IRF9640

    100uH+12v

    0

    .1uF

    PD0 2

    1

    PB5

    Fig.30

  • 8/14/2019 Acc. No. DC 343.pdf

    49/98

    44

    PIN CONFIGURATION OF AVR ATMEGA8 MICROCONTROLLER

    PIN FUNCTION

    PIN 1: PC6- Generic IO pin PC6(Port C6)

    /RESET- Reset Pin for MCU, active at low

    PIN 2: PD0- Generic IO pin PD0 (Port D0)

    PIN 3: PD1- Generic IO pin PD1 (Port D1)

    PIN 4: PD2- Generic IO pin PD2 (Port D2)

    INTO- External interrupt source 0 to the MCU.

    PIN 5: PD3- Generic IO pin PD3 (Port D3)

    INT1- External interrupt source 1 to the MCU.

    PIN 6: PD4- Generic IO pin PD4(Port D4)

    T0- Timer/Counter0 clock sourceXCX- USART external clock

    PIN 7: Vcc Power Supply(+5V)

    PIN 8: GND Common Ground

    PIN 9: PB6- Generic IO pin PB6(Port B6)

    XTAL1-Pin for external clock source (crystal,resonator) for MCU(input) TOSC1-Timer

    Oscillator Pin1-clock source for asynchronous clocking of

  • 8/14/2019 Acc. No. DC 343.pdf

    50/98

    45

    Timer/counter1

    PIN 10: PB7- Generic IO pin PB6(Port B7) XTAL2-Pin for external clock source

    (crystal,resonator) for MCU(inTOSC2-Timer Oscillator Pin2-clock source for asynchronous

    clocking of Timer/counter1

    PIN 11: PD5- Generic IO pin PD5(Port D5) T1-Timer/Counter1 clock source.

    PIN 12: PD6- Generic IO pin PD6(Port D6) N0: AIN0 Analog comparator Positive

    input.When configured as an input and with the internal MOS pull-up resistor switched

    off,thin film also serves as the positive input of the on chip analog comparator.

    PIN 13: PD7- Generic IO pin PD7(Port D6)AIN1: AIN1 Analog comparator Negative input.

    When configured as an input and with the internal MOS pull-up resistor switched off, thin

    film also serves as the negative.

    PIN 14: PB0- Generic IO pin PB0(Port B0)

    ICP1-Timer/Counter1 input capture pin.

    PIN 15: PB1- Generic IO pin PB1(Port B1)

    OC1A-Output Compare matchA output.The pin can serve as an external output for theTimer/Counter1 output CompareA.The pin has to be configured as an output to serve the

    function. The OC1A pin is also the output pin for the PWM mode timer function.

    PIN 16: PB2- Generic IO pin PB2(Port B2)

    /ss-slave select pin for using with SPI.

    OC1A-Output Compare matchB output.The pin can serve as an external output for the

    Timer/Counter1 output CompareB.The pin has to be configured as an output to serve the

    function. The OC1A pin is also the output pin for the PWM mode timer function.

    PIN 17: PB3- Generic IO pin PB3(Port B3)

    OC2-Timer/Counter2 output compare match output. The pin can serve as an external output

    for the timer/counter2 output compare.the pin has to be configured as an output to serve thisfunction.The OC2 pin is also the output pin for the PWM mode timer function.

    PIN 18: PB4- Generic IO pin PB4(Port B4)

    MISO-Data output pin for memory uploading or SPI.

    PIN 19: PB5- Generic IO pin PB5(Port B5)

    SCK-Clock input pin for memory up/downloading or SPI.

    PIN 20: AVCC- Power supply for AD Converter.

    PIN 21: AREF- Reference voltage for AD converter.

    PIN 22: GND- Common Ground.

    PIN 23: PC0- Generic IO pin PC0(Port C0)

    ADC0-Analog to Digital input ADC0.

    PIN 24: PC1- Generic IO pin PC1(Port C1)

    ADC1-Analog to Digital input ADC1.

    PIN 25: PC2- Generic IO pin PC2(Port C2)

    ADC2-Analog to Digital input ADC2.

    PIN 26: PC3- Generic IO pin PC3(Port C3)

  • 8/14/2019 Acc. No. DC 343.pdf

    51/98

  • 8/14/2019 Acc. No. DC 343.pdf

    52/98

    47

    A simplified block diagram of the 8-bit Timer/Counter.

    Fig.31

    The Timer/Counter (TCNT2) and Output Compare Register (OCR2) are 8-bit registers.

    Interrupt request.signals are all visible in the Timer Interrupt Flag Register (TIFR).All interrupts

    are individually masked with the Timer Interrupt Mask Register (TIMSK).

    Definitions:

    Many register and bit references in this document are written in general form. A lower case nreplaces the Timer/Counter number, in this case. However, when using the register or bit

    defines in a program, the precise form must be used (i.e., TCNT2 for accessing Timer/Counter2

    counter value and so on).

  • 8/14/2019 Acc. No. DC 343.pdf

    53/98

    48

    Timer/Counter

    Clock Sources:

    The Timer/Counter can be clocked by an internal synchronous or an external asynchronous

    clock source. The clock source clkT2 is by default equal to the MCU clock, clk I/O. When the

    AS2 bit in the ASSR Register is written to logic one, the clock source is taken from the

    Timer/Counter Oscillator connected to TOSC1 and TOSC2.

    Counter Unit:

    The main part of the 8-bit Timer/Counter is the programmable bi-directional counter unit.

    Counter Unit Block Diagram

    Fig.32

    Signal description (internal signals):

    count Increment or decrement TCNT2 by 1.

    direction Selects between increment and decrement.

    clear Clear TCNT2 (set all bits to zero).

    clkT2 Timer/Counter clock.TOP Signalizes that TCNT2 has reached maximum

    value.

    BOTTOM Signalizes that TCNT2 has reached minimum

    Value (zero)

    Fast PWM Mode:

    The fast Pulse Width Modulation or fast PWM mode (WGM21:0 = 3) provides a high PWM

    waveform generation option. The fast PWM differs from the other PWM option by its single-

    slope operation. The counter counts from BOTTOM to MAX then restarts from BOTTOM. In

    non-inverting Compare Output mode, the Output Compare (OC2) is cleared on the Compare

    Match between TCNT2 and OCR2, and set at BOTTOM.In inverting Compare Output mode,

    the output is set on Compare Match and cleared at BOTTOM.Due to the single-slope operation,

    the operating frequency of the fast PWM mode can be twice as high as the phase correct PWM

    mode that uses dual-slope operation. This high frequency makes the fast PWM mode well

  • 8/14/2019 Acc. No. DC 343.pdf

    54/98

    49

    suited for power regulation, rectification, and DAC applications. High frequency allows

    physically small sized external components (coils, capacitors), and therefore reduces total

    system cost.

    Fast PWM Mode, Timing Diagram

    Fig.33

    This 8-bit PWM is connected to a buffer IC.

    Digital Buffer:

    Output of the NOT gate is the "complement" or inverse of its input signal. For example, when

    its input signal is "HIGH" its output state will NOTbe "HIGH" and when its input signal is

    "LOW" its output state will NOTbe "LOW", it inverts. Another single input logical device used

    a lot in electronic circuits and which is the reverse of the NOT gate is called a Digital Buffer.

    A Digital Buffer is another single input device that does no invert or perform any type of

    logical operation on its input signal as its output exactly matches that of its input signal. In other

    words, its Output equals its Input. It is a "Non-inverting" device and so will give us the Boolean

    expression of: A = Q.

    Then we can define the operation of a single input Digital Buffer as being:

    "If A is true, then Q is true"

    A Digital Buffercan also be made by connecting together two NOT gates as shown below. The

    first will "invert" the input signal A and the second will "re-invert" it back to its original level.

  • 8/14/2019 Acc. No. DC 343.pdf

    55/98

    50

    1 2

    BUFFER

    AA

    1 2AA

    1 2A'

    Fig.34

    Truth Table

    A Q

    0 0

    1 1

    HEX INVERTER IC CD4049 used as a buffer when two inverter are connected i.e

    output of the one inverter is connected to the other that produces the buffer. Buffer is

    used to boost up the PWM signal & also used for High impedance matching at the

    output.

    OPTO-COUPLER

    Output of the Buffer is connected to a Opto-coupler. Opto-coupler is used as a

    isolator. It isolate the digital section from the high voltage power section. This isolator

    is used to save the low voltage digital circuit from the high voltage power circuit.

    PC817 used as a Opto-coupler.

  • 8/14/2019 Acc. No. DC 343.pdf

    56/98

    51

    Theory of Optocoupler

    The optical coupler is a venerable device that offers the design engineer new freedoms in

    designing circuits and systems. Problems such as ground loop isolation,common mode noise

    rejection, power supply transformations, and many more problems can be solved or simplifiedwith the use of an optical coupler.

    Operation is based on the principle of detecting emitted light. The input to the coupler is

    connected to a light emitter and the output is a photodector, the two elements being separated by

    a transparent insulator and housed in a lightexcluding package. There are many types of

    optical couplers; for example, the light source could be an incandescent lamp or a light emitting

    diode (LED). Also,the detector could be photovoltaic cell, photoconductive cell, photodiode,

    phototransistor, or a lightsensitive SCR. By various combinations of emitters and detectors, a

    number of different types of optical couplers could be assembled. Once an emitter and detector

    have been assembled as a coupler, the optical portion is permanently established so that device

    use is only electronic in nature. This eliminates the need for the circuit designer to have

    knowledge of optics.

    COUPLER CHARACTERISTICS

    The PC817 is an optical coupler consisting of a gallium arsenide (GaAs) LED and a silicon

    phototransistor.

    INPUT

    For most applications the basic LED parameters IF and VF are all that are needed to definethe input. Fig.36 shows these forward characteristics, providing the necessary information to

    design the LED drive circuit. Most circuit applications will require a current limiting resistor in

    series with the LED input.

    OUTPUT

    The output of the coupler is the phototransistor. The basic parameters of interest are the

    collector current IC and collector emitter voltageVCE.Figure37 is a curve of VCE(sat) versus

    IC for two different drive level.

    COUPLING

    To fully characterize the coupler, a new parameter, the dc current transfer ratio or coupling

    efficiency () must be defined. This is the ratio of the transistor collector current to diode

    current IC/IF.

  • 8/14/2019 Acc. No. DC 343.pdf

    57/98

    52

    RESPONSE TIME

    The speed is fairly slow compared to switching transistors, but is typical of phototransistors

    because of the large basecollector area. The switching time or bandwidth of the coupler is a

    function of the load resistor RL because of the RLCO time constant where CO is the parallel

    combination of the device and load capacitances.

    Fig.35 Opto-Coupler

    Fig.36Input Characteristic of Opto-Coupler

  • 8/14/2019 Acc. No. DC 343.pdf

    58/98

    53

    Fig.37 Output Characteristic of Opto-Coupler

    AMPLIFIER

    Output of the Opto-coupler is connected to a Transistor Amplifier which is used to amplify

    the DC level of the PWM signal. BD139 power transistor is used as a Amplifier when

    proper biasing is applied to the circuit.

    Circuit Diagram of the Amplifier:

    Opto-coupleroutput

    1K,

    1/2

    W

    2.2K100E

    SPV

    O/P of Amplifier

    Fig.38

    This Amplifier output is used to drive the Gate of MOSFET. So this amplifier is used as a

    driver circuit of the MOSFET.

    MOSFET used as a switch for Buck Converter

  • 8/14/2019 Acc. No. DC 343.pdf

    59/98

    54

    Why we use Buck Converter:We know that for charging a 12Volt battery minimum required voltage is 13.5 Volt, but

    Solar PV Module produces a 25Volt.So to step down the voltage Buck Converter or Step-

    Down converter is required.

    BUCK CONVERTER3.3mH

    IRF 9640MOSFET

    100uF

    0.1uF

    Output ofBuck conve

    1K,1/2 W

    100E

    Amplified PWM

    SPV Voltage

    Fig.39

    Buck Converter:

    In a regulator ,the average output voltage Va,is less than the input voltage,Vs hence the name

    buck, a very popular regulator. The circuit diagram of a buck regulator using a MOSFET.The

    circuit operation can be divided into two modes. Mode 1 begins when MOSFET is switched on

    at t=0. The input current,which rises,flows through filter inductor L, filter capacitor C and loadresistor R.Mode2 begins when MOSFET is switched off at t=t1.The freewheeling diode Dm

    conducts due to energy stored in the inductor and the inductor current continues to flow through

    L,C,load and diode Dm. The inductor Current falls until MOSFET is switched on again in the

    next cycle. The equivalent circuits for the modes of operation are shown in figure.39.The

    waveforms for the voltage & current flows continuously in the inductor L.It is assumed that the

    current rises and falls linearly in practical circuits, the switch has a finite, nonlinear

    resistance.Its effect can generally be negligible in most applications. Depending on the

    switching frequency, filter inductance and capacitance the inductor current could be

    discontinuous.

    The voltage across the inductor L is , in general

    eL = L di/dt

    Assuming that the inductor current rises linearly from I1to I2in time t1,

    Vs Va = L ( I2-I1/t1) = L I/t1

    Or t1 = IL/(Vs- Va)

    and the inductor current falls linearly from I2 to I1 in time t2,

    -Va = - L I/t2

  • 8/14/2019 Acc. No. DC 343.pdf

    60/98

  • 8/14/2019 Acc. No. DC 343.pdf

    61/98

  • 8/14/2019 Acc. No. DC 343.pdf

    62/98

    57

    R2= 10K

    R2/(RI+ R2) x 25 = 10K/(10K + 47K) x 25 V = 4.38V

    This voltage is connected to a ADC port of the ATMEGA8 Microcontroller.

    Similarly, Output of the Buck Converter is required to reduced upto +5V.

    Output of Buck Converter = 15V.

    R1= 22K

    R2= 10K

    R2/(R1+ R2)X15 = 10K/(10K + 22K) x 15 V = 4.68V

    22K

    10K

    Buck Converter O/P

    1N4148

    1N4148

    1K

    +5V

    Fig.41

    Current to Voltage Converter:

    10K

    -5V

    0.1E

    +5V

    10K

    3

    2

    7

    4

    6

    1

    5+

    -

    V+

    V-

    OUT

    OS1

    OS2

    1K

    3

    2

    7

    4

    6

    1

    5+

    -

    V+

    V-

    OUT

    OS1

    OS2

    47K

    12V,7A-h Battery

    O/P of the Buck Converteror

    Solar PV Voltage

    +5V

    -5V

    Fig.42

    It is an Inverting amplifier using Op-Amp TL084.

    If Battery is charged by the 1A Current. We connect a 0.1resistance which is

    connected in series with the Battey. So Maximum Voltage is drpped across 0.1

    is 0.1V.

  • 8/14/2019 Acc. No. DC 343.pdf

    63/98

    58

    Now this Voltage is amplified by using a Inverting amplifier.

    For Inverting Amplifier,

    Vo/Vin = -Rf/Rin

    Vo should be maximum 5V.

    Gain hould be Maximum (5/0.1)=50

    We consider the Rin = 1k

    Rf = 50K

    We consider the 47K resistor because nearest available Value of 50k resistor is 47K.It is

    Inverting amplifier so it produces a -4.7V. To obtain a +4.7V output a similar amplifier is

    designed whose gain is 1. So we consider Rf= Rin=10K.

    So, all the Voltage & Current of a Solar PV Module & Buck Converter are converted into

    +5V.

    Now all the voltage & Current of a Solar PV Module & Buck Converter are connected to

    a ADC Port of a Microcontroller.

    Pin No.23,24,25,26 of a Microcontroller used as a ADC Channel.

    The Micro Switches are connected to a Port D4 & D5 to Set or Reset the Microcontroller.

    Pin No.6,11 of a Microcontroller used as a Port D4 & D5.

    Light Emitting Diode (LED) are connected to a Port B0,B1,B2 to indicate the differentoperating condition.

    Pin No.14,15,16 of a Microcontroller used as a Port B0, B1 & B2.

    Maximum Power Point Tracking (MPPT) Method:

    Maximum Power Point Tracking is performed by using a very advanced method

    (Incremental Conductance Method) which is independent of temperature, other

    atmospheric condition that is used to track the maximum Power Point very quickly.

    Maximum Power Point is tracked by using a microcontroller. So, to track the maximum

    power point, Solar PV Module voltage is connected to a source of the p- channel MOSFET

    and also connected to a ADC of the Microcontroller. Solar PV module Current is also

    converted into a Voltage and is connected to a ADC of the microcontroller.

  • 8/14/2019 Acc. No. DC 343.pdf

    64/98

    59

    Similarly, Buck converter output Voltage is connected to a ADC of the microcontroller.

    The output of the Buck is used to charging a Battery.So the current of the Buck Converter

    is converted to a voltage which is connected to a ADC of the microcontroller.

    For Maximum Power Point tracking Solar PV Module voltage is connected to a Buck

    Converter which is controlled by the duty cycle of the PWM. The PWM is generated from

    the AVR ATMEGA 8 Microcontroller.

    So, to track the Maximum Power Point ,

    For a particular duty cycle of the PWM,

    Measure the

    Solar PV Module Voltage ( Vin1)

    Solar PV Module Current (Iin1)Buck Converter Output Voltage (Vout1)

    Buck Converter Output Current (Iout1)

    Now increase the duty cycle by 1

    Measure the

    Solar PV Module Voltage ( Vin2)

    Solar PV Module Current (Iin2)

    Buck Converter Output Voltage (Vout2)

    Buck Converter Output Current (Iout2)

    Now measure the difference between the Voltage & current to obtain the conductance

    Vin = Vin2 Vin1

    Iin = Iin2 Iin1

    Vout = Vout2 Vout1

    Iout = Iout2 Iout1

    So the Incremental Conductance (S1) = Iin / Vin

    And instanteneous Conductance (S2) = - ( Iin2/ Vin2)

    Then the Maximum Power Point will tracked that means MPPT will performed.

    So to track the Maximum Power Point a Software Programming is required to adjust the

    duty cycle automatically & extract the Maximum Power from the Solar PV Module for

    every change in Voltage & Current of the PV module.

  • 8/14/2019 Acc. No. DC 343.pdf

    65/98

  • 8/14/2019 Acc. No. DC 343.pdf

    66/98

    61

    CHAPTER 6.

    SOFTWARE DESCRIPTION.

  • 8/14/2019 Acc. No. DC 343.pdf

    67/98

    62

    SOFTWARE SECTION

    The Solar Photovoltaic Maximum Power Point Tracking charge Controller is controlled by the

    variation of the duty cycle of the PWM which is used to control the Buck Converter.

    This control is done by the microcontroller. There are different programming language which is

    used in Microcontroller such as Assembly, C language ,Basic etc.

    Here, a special type of Software is used to compile the programmed in microcontroller. Name

    of the Software is AVR BASCOM. In the BASCOM software we can write the program in

    different languages such as Assembly, C language ,Basic etc.

    But in this project Program is written by the AVR BASCOM BASIC language. This language

    is very easy to write and also very easy to debug the error.

    So to write the Software coding, a algorithm is required. Here a special type of algorithm is

    used to track the Maximum Power Point. The Algorithm is Incremental Conductance method.

    This algorithm is independent of temperature, other atmospheric condition.

  • 8/14/2019 Acc. No. DC 343.pdf

    68/98

    63

    DESCRIPTION OF THE ALGORITHM (Incremental Conductance Method):

    Detetc the Solar PV Module Volage V1 & Output Current I1 for a particular duty cycle of the

    PWM.

    Measure the Power P1 =V1xI1.

    Now increase the duty cycle by 1 and measure the Solar Module Voltage V2 & O/P Current I2

    .

    Measure the Power P2 =V2xI2

    Measure V = V2 V1I = I2 I1

    If V = 0 then I = 0

    If I = 0 then output voltage remains the same

    If I 0 & If I > 0 decrease the duty cycle by 1

    If I < 0 increase the duty cycle by 1

    If V0 then I/V = - (I2/ V2)

    If I/V = - (I2/ V2) then output remains same

    If I/V - (I2/ V2) then if I/V > - (I2/ V2)

    Increase the duty cycle by 1

    if I/V < - (I2/ V2) then decrease the duty cycle by 1

  • 8/14/2019 Acc. No. DC 343.pdf

    69/98

    64

    FLOW CHART OF MPPT using (INC)

    YES

    NO

    YES YES

    NO NO

    YES YES

    NO NO

    NO

    Detect

    V(k) &I(k)

    Compute dV & dI

    dV=V(k)-V(k-1)

    dI=I k -I k-1

    START

    dV=0

    Renew V(k) & I(k)

    V(k-1)=V(k)

    I(k-1)=I(k)

    dI/dV

    = -I/V

    dI/dV

    > -I/V

    dI>0

    Decrease O/P

    voltage

    Increase O/P

    Voltage

    Decrease

    O/P Voltage

    dI=0

    O/P Voltage remains

    the same

    Increase O/P

    voltage

    O/P

    Volt.remains

    the same

  • 8/14/2019 Acc. No. DC 343.pdf

    70/98

    65

    Coding of Incremental Conductance Method

    (Using AVR BASCOM BASIC Language)

    '$sim

    $regfile = "m8def.dat"

    $crystal = 8000000

    ' /////////////////////////////////////////////////////////////////////////////////////////////'

    Config Adc = Single , Prescaler = Auto , Reference = Avcc

    Start Adc

    '//////////////////////////////////////////////////////////////////////////////////////////////'

    Dim W1 As Word 'spv voltage1'

    Dim W2 As Word 'o/p current1'

    Dim W3 As Word 'spv voltage2'

    Dim W4 As Word 'o/p current2'

    Dim S1 As Integer 'change in voltage'' 'Dim S2 As Integer 'change in current''

    Dim R1 As Single 'change in conductance'

    Dim R2 As Single 'instanteneous conductance'

    '////////////////////////////////////////////////////////////////////////////////////////////////////////

    Config PortB.3 = Output

    Config Timer2 = Pwm , Prescale = 8 , Pwm = On , Compare Pwm = Clear Up

    '///////////////////////////////////////////////////////////////////////////////////////////////////////////

    Dim Gp As Integer 'duty cycle of Pwm'

    Gp = 1

    Main:

    Compare2 = Gp

    Waitms 200

    B:

    W1 = Getadc(2)

    Waitms 200

    W2 = Getadc(3)

    Waitms 200

    '//////////////////////////////////////////////////////////////////////////////////////////////'

    Gp = Gp + 1 'duty cycle is increased by 1'Compare2 = Gp

    Waitms 200

    Start:

    W3 = Getadc(3)

    Waitms 200

    W4 = Getadc(2)

  • 8/14/2019 Acc. No. DC 343.pdf

    71/98

    66

    '///////////////////////////////////////////////////////////////////////////////////////////'

    S1 = W3 - W1

    S2 = W4 - W2

    '/////////////////////////////////////////////////////////////////////////////////////////

    If S1 = 0 Then

    Goto C

    Else

    Goto D

    End If

    '/////////////////////////////////////////////////////////////////////////////////////'

    C:

    If S2 = 0 Then

    Goto EElse

    Goto F

    End If

    '//////////////////////////////////////////////////////////////////// ///////////////////////

    D:

    R1 = S2 / S1

    R2 = W4 / W3

    '/////////////////////////////////////////////////////////////////////////////////////////

    If R1 = R2 Then

    Goto GElse

    Goto H

    End If

    '/////////////////////////////////////////////////////////////////////////////////////////// '

    E:

    Gp = Gp

    Compare2 = Gp

    Goto End

    F:

    If S2 > 0 Then

    Goto I

    Else

    Goto J

    End If

    '////////////////////////////////////////////////////////////////////'

  • 8/14/2019 Acc. No. DC 343.pdf

    72/98

    67

    G:

    Gp = Gp

    Compare2 = Gp

    Goto End

    H:

    If R1 > R2 Then

    Goto K

    Else

    Goto L

    End If

    '/////////////////////////////////////////////////////////////////////////'

    I:

    Gp = Gp + 1Compare2 = Gp

    If Gp > 200 Then

    Gp = 200

    Compare2 = Gp

    End If

    Goto End

    '/////////////////////////////////////////////////////////////////////////////////////////////////'

    J:

    Gp = Gp - 1

    Compare2 = GpIf Gp = 255 Then

    Gp = 0

    End If

    Goto End

    K:

    Gp = Gp + 1

    Compare2 = Gp

    If Gp > 200 Then

    Gp = 200

    Compare2 = Gp

    End If

    Goto End

    '////////////////////////////////////////////////////////////////////////////////////////////////////////////////////'

  • 8/14/2019 Acc. No. DC 343.pdf

    73/98

    68

    L:

    Gp = Gp - 1

    Compare2 = Gp

    If Gp = 255 Then

    Gp = 0

    End If

    Goto End

    End:

    W3 = W1

    W4 = W2

    Goto Start

    '

  • 8/14/2019 Acc. No. DC 343.pdf

    74/98

    69

    Description of the Algorithm (Modified Incremental Conductance Method):

    Vmax & Imax are the maximum desiarable voltage & Current.

    At First detect the SPV Voltage(Vi1) & SPV Current (Ii1)for a particular Duty Cycle of the

    PWM.

    And detect the Buck Converter Output Voltage (Vb1) & Battery Current (Ib1).

    Now Increase the Duty Cycle by 1.

    Again, detect the SPV Voltage(Vi2) & SPV Current (Ii2).

    And detect the Buck Converter Output Voltage (Vb2) & battery Current (Ib2).

    Now Again Increase the Duty Cycle by 1.

    Detect the SPV Voltage(Vi3) & SPV Current (Ii3).

    And detect the Buck Converter Output Voltage (Vb3) & Battery Current (Ib3).

    Compute the Change in Voltages & Currents.

    dV1=Vb2-Vb1

    dI1=Ib2-Ib1

    dV2= Vb3-Vb2

    dI2=Ib3-Ib2

    Now Compute the Change in Conductance

    S1=dI1/dV1

    S2=dI2/dV2

    If S2>S1 then Duty Cycle is increased by 1

    And similarly, If S2

  • 8/14/2019 Acc. No. DC 343.pdf

    75/98

    70

    ,,,,,

    ,,,

    +

    ,

    +

  • 8/14/2019 Acc. No. DC 343.pdf

    76/98

    71

    Coding of modified Incremental Conductance Method

    '$sim

    $regfile = "m8def.dat"

    $crystal = 8000000

    ' //////////////////////////////////////////////////////////////////////////////////////////////

    Config Adc = Single , Prescaler = Auto , Reference = Avcc

    Start Adc

    '//////////////////////////////////////////////////////////////////////////////////////////////

    Dim Vb1 As Word buck o/p voltage1

    Dim Vb2 As Word buck o/p voltage2

    Dim Vb3 As Word buck o/p voltage3

    Dim Ib1 As Word battery current1

    Dim Ib2 As Word battery current2

    Dim Ib3 As Word battery current3Dim Vmax As Word 'max O/P voltage'

    Dim Imax As Word 'max O/P current'

    Dim Vi As Word 'spv voltage

    Dim Ii As Word spv current

    Dim Wi As Word spv power

    Dim P1 As Word 'change in voltage1'

    Dim P2 As Word 'change in voltage2'

    Dim Q1 As Word 'change in current1'

    Dim Q2 As Word 'change in curent2'

    Dim S1 As Word 'change in conductance1'Dim S2 As Word 'change in conductance2'

    ' ///////////////////////////////////////////////////////////////////////////////////////////////////////

    Config Portb.3 = Output

    Config Timer2 =