Close
0%
0%

ARDUINO MPPT SOLAR CHARGE CONTROLLER

An Arduino based Solar MPPT charge controller.

Similar projects worth following
In India most of the people are living in rural areas,400 million people that are currently have no access to electricity.Despite India being the world's 5th largest energy producer,the existing electric grids are not capable of supplying the electricity need to those poor people.
So the need for clean, affordable alternatives is obvious.Solar power have the advantage of being less maintenance and pollution free.
To provide basic need of electricity and improve the socio-economic positions of rural people, I started this project from basic lighting system and a simple PWM solar charge Controller in March-2014.The feedback was incredible on Instructables. After working over one year to improve the controller, I have landed up in this stage.This project is on MPPT solar charge controller which can charge a commonly used 12V lead acid battery from a solar panel.This is more sophisticated,30 to 40 % more efficient and have several advantages over the other charge controllers.



MPPT stands for Maximum Power Point Tracking. MPPT charge controllers used for extracting maximum available power from PV module under certain conditions.The Maximum Power Point Tracker (MPPT) circuit is based around a synchronous buck converter circuit.It steps the higher solar panel voltage down to the charging voltage of the battery. The Arduino tries to maximize the watts input from the solar panel by controlling the duty cycle to keep the solar panel operating at its Maximum Power Point.

You can find more details on MPPT here

Algorithm :



The Maximum Power Tracker uses an iterative approach to finding this constantly changing MPP. This iterative method is called Perterb and Observe or hill climbing algorithm.To achieve MPPT, the controller adjusts the voltage by a small amount from the solar panel and measures power, if the power increases, further adjustments in the direction are tried until power no longer increases.

The voltage to the solar panel is increased initially, if the output power increase, the voltage is continually increased until the output power starts decreasing. Once the output power starts decreasing, the voltage to the solar panel decreased until maximum power is reached. This process is continued until the MPPT is attained. This result is an oscillation of the output power around the MPP.

Specification of version-3 charge controller :

1.Based on MPPT algorithm

2. LED indication for the state of charge

3. 20x4 character LCD display for displaying voltages,current,power etc

4. Overvoltage / Lightning protection

5. Reverse power flow protection

6. Short Circuit and Over load protection

7. Wi Fi data logging

8.USB port for Charging Smart Phone /Gadgets

Electrical specifications :

1.Rated Voltage= 12V

2.Maximum current = 5A

3.Maximum load current =10A

4. In put Voltage = Solar panel with Open circuit voltage from 12 to 25V

5.Solar panel power = 50W

  • 1 × Arduino Nano Atmega328P based Microcontroller
  • 3 × Current Sensor ACS712 hall effect Current Sensor
  • 2 × LM2596 module DC-DC Buck Converter module
  • 1 × ESP8266 WiFi SOP module
  • 1 × 20x4 char LCD display Yellow Serial 2C/TWI 2004 20X4 Character LCD Module Display

View all 49 components

  • Battery Temperature and Charging Voltage Compensation

    Open Green Energy09/16/2015 at 09:45 0 comments

    All chemical reactions are affected by temperature. Battery charging is also an electrochemical reaction, so it too is affected by temperature. As the battery gets warmer, the gassing increases. As the battery gets colder,it becomes more resistant to charging. So battery charging voltages should be corrected based on battery temperature. This adjustment is referred to as temperature compensation, a charging feature that helps ensure that a battery is neither undercharged nor overcharged regardless of battery temperature.

    Using normal target voltages to charge a battery that is colder than approximately 25ºC (77ºF) will result in an undercharged battery, which will deliver lower performance, reduced life and a higher life cycle cost. Applying normal target voltages to a battery that is hotter than 25ºC may result in an overcharged battery. This condition could lead to the drying out of VRLA battery cells. With flooded cells, the result will be excessive outgassing, increased battery maintenance in the form of more frequent watering and reduced battery life due to thermal stress. In fact, some battery manufacturers and charger manufacturers recommend not charging a battery that is 50ºC (122ºF) or hotter.

    Temperature Sensor :

    To monitor the battery temperature a DS18B20 1-Wire digital temperature sensor from Maxim IC will be used. It can measures temperatures from -55°C to +125°C. Fahrenheit equivalent is -67°F to +257°F with ±0.5°C accuracy.

    We choose a waterproofed version of the DS18B20 Temperature sensor. It is quite handy to measure something far away, or in wet conditions.

    You can see it here

    You can see the Data Sheet

    Temperature Compensation Formula:

    minus 0.018 volts per degree Celsius

    Example :

    1. Let the battery temperature is 0 degC and float voltage is 13.8V ( STC : at 25degC )

    Compensation Required = ( 0 - 25) * ( - 0.018 ) = + 0.45V

    Compensated Float Voltage = 13.8 + 0.45 = 14.25 V

    2. Let the battery temperature is 35 degC and float voltage is 13.8V ( STC : at 25degC )

    Compensation Required = ( 35 - 25) * ( - 0.018 ) = - 0.18V

    Compensated Float Voltage = 13.8 - 0.18= 13.62 V

    So cold batteries ( example-1) require a higher charge voltage in order to push current into the battery plates and electrolyte, and warmer batteries( example-2 ) require a lower charge voltage to eliminate potential damage to valve regulated lead acid (VRLA) cells and reduce unnecessary gassing if flooded cells are used.

    Reference : http://solarprofessional.com

  • Software requirements for MPPT controller V3.1

    Open Green Energy08/30/2015 at 15:06 2 comments

    Software requirements for MPPT controller V3.1

    Draft by Keith Hungerford, updated 12th September 2015

    Charging states

    The charger operates in one of several charging states, depending on the sunlight level.

    Charger OFF state

    At nil or low sunlight levels, as indicated by solar voltage below battery voltage + 0.5 Volts, the charger state is OFF.

    Transition from the OFF state occurs when

    a) if battery voltage is greater than 11.5 volts and solar voltage rises above battery voltage + 0.5 Volts

    b) if battery voltage is less than 11.5 volts and solar voltage rises above 12.5 volts.

    When either of these voltage conditions is met the charger goes into one of the following states:

    i) Float state if the battery voltage is greater than the Float voltage;

    ii) Boost state if the battery voltage is less than the Float voltage and the Boost time since the last night time is less than [1 hour];

    iii) Bulk state if the battery voltage is less than the Float voltage and the Boost time since the last night time is greater than [1 hour]

    In all 3 cases initially the controller will use the DCM charging algorithm.

    Boost DCM and Bulk DCM states

    When in the Boost DCM or Bulk DCM state, the charger can go to OFF state if the solar voltage falls below (battery voltage + 0.5 Volts).

    The charger can go to Boost CCM or Bulk CCM state if the Solar Power rises above 10% of the rated power.

    The charger can go to the Float state if Battery voltage rises above Float.

    The charger can go from Boost DCM to Bulk DCM if the Boost time since the last night is greater than Boost duration.

    Boost CCM and Bulk CCM states

    When in the Boost CCM or Bulk CCM state the charger can go to Boost DCM or Bulk DCM if the Solar Power falls below 10% of rated power.

    • The charger can go from Boost CCM to Bulk CCM if the Boost time since the last night is greater than Boost duration


    Float state

    The float state is functionally the same as Bulk state when the battery voltage reaches Float.

    When in Float state the charger keeps just sufficient current flowing to the battery to maintain the battery voltage at Float.

    Charging algorithms


    CCM algorithm

    Continuous Current Mode (CCM) applies when the available solar power is more than 10% of the rated power (strictly, when the current in the inductor always flows towards the battery, but this is difficult to measure directly in the software so we use the power level as a proxy estimate).

    In this mode, the PWM period is set at 12 microseconds. The PWM duty cycle is set either at a value that achieves maximum power, or to meet the charging voltage required by the battery (see battery management conditions below). When it is required to reduce the charging rate so as to limit the battery voltage, the PWM duty is reduced, thereby increasing the panel voltage above the maximum power point and reducing the current accordingly.

    The Fast PWM mode of the Arduino is used to generate this PWM. The PWM period of 12 microseconds is 192 clock cycles at 16 MHz. The PWM period is divided into a Panel Connect phase followed by an Earth Connect phase. The length of the Panel Connect phase is controlled by PWM Duty.

    When maximising power, the power level is measured approximately every 0.5 milliseconds and is compared to the previous power level measurement. The PWM duty cycle is changed up or down by 1 CPU clock cycle after every measurement. After the first measurement, the PWM duty cycle is increased. On subsequent measurements, if the power level is increased or is the same as the previous measurement, the PWM duty cycle is changed in the same direction as in the previous cycle. If the power level is decreased from the previous cycle, the PWM duty cycle is changed to go in the opposite direction to that in the previous cycle.

    When tracking the allowable battery voltage, the battery voltage is measured approximately every 0.5 milliseconds and is compared to the target value. If the new value is within +0.1 volts of the target value, the PWM duty is left unchanged. If the new value is...

    Read more »

  • Overview of Version-3.1

    Open Green Energy08/30/2015 at 14:50 7 comments

    After lot testing we observed that MOSFET ( Q3 ) in ver-3.0 design is burning repeatedly.We tried to modify the existing software but not find any satisfactory result.

    The other problem was that MOSFET Q1 ( in V-3.0) conduct even when there is no solar input.

    To solve the above problems and enhance the power handling capability we are modifying both the hardware and software.This is named as Version-3.1 Charge Controller.This version have 3 options.

    1. 5 Amp version :

    T94-26 toroid, 48 turns of AWG20 wire to give 135 uH (it takes almost 1.5m of wire)

    Q1, Q2 and Q3 all pairs of IRFZ44N MOSFETs (6 in all).

    C1 will be 3 * 220 uF low ESR capacitors in parallel,

    C2 will be a single 220 uF low ESR capacitor

    Single ACS712 on the panel side as per version 3.0

    2. 8 Amp version :

    T106-26 toroid wound with 23 turns of a compound wire made from 3 strands of AWG20 wire twisted together to give 47 uH (this takes about 3.1 m of wire).

    Q2 will be a pair of FDP150N10A MOSFETs in parallel.

    C1 will be 5 * 220 uF low ESR capacitors in parallel,
    C2 will be a single 220 uF low ESR capacitor

    Two ACS712, one on the panel side as per version 3.0 and one in series with the battery.

    3 10 Amp version :

    T130-26 toroid wound with 23 turns of a compound wire made from 4 strands of AWG18 wire twisted together to give 41 uH (this takes about 4.5 m of wire).

    Q2 will be a pair of FDP150N10A MOSFETs in parallel.
    C1 will be 6 * 220 uF low ESR capacitors in parallel,
    C2 will be 2 * 220 uF low ESR capacitors in parallel.

    Three ACS712, one on the panel side as per version 3.0, one in series with the battery and one in series with the load.

    Here is a rough sketch for V-3.1

    You can download the complete schematic from here

    We are working on new PCB for V-3.1 Here is the sample of one

    The drive circuitry (common to all 3 versions) will use 3 separate IR2104 driver chips, one for each of Q1, Q2 and Q3. We drive the Q1 and Q2 drivers from pin D9 and HO1 and HO2, and drive Q3 from pin D10 and LO3.

    In driver chips 1 and 2, pins IN and SD are driven in parallel by Arduino output pin D9. In the case of driver 1 (for Q1) there is a low pass RC filter in series, with a time constant of about 1 ms. Driver 2 is driven directly (as in the current circuit, but probably with a slightly higher series resistor to allow more current for the Q1 driver and its RC filter).

    In driver chip 3, IN is driven by D9 and SD is driven by D10.

    The purpose of using separate drivers for Q2 and Q3 is to enable us to switch Q3 OFF to operate in Asynchronous mode at low current levels when the controller will be in DCM (Discontinuous Current Mode). There may be a better way to do this but in the short time we have available this is a simple option and easy and reliable to implement.

    All 3 versions should have LCD displays, WiFi, LED indicators (maybe with a more fancy coding scheme to separately indicate DCM and CCM).

    All 3 versions should be able to cope with either 18 V or 30 V panels, and use algorithms that stop them burning out if the panel can produce more current than the rating allows. This can all be done auto-detect.

    All the components exposed to panel voltage need to be rated for at least 40 V (in particular C1 and our buck converter to generate 12V for the drivers and to power the control electronics.

  • Overview of MPPT algorithm modelling

    Open Green Energy08/26/2015 at 07:29 0 comments

    Panel model consists of a simple step-wise linear model of a solar panel.See the above figure.

    1. Constant Current : up to 18 volts

    2. Constant Power : between 18 and 19 volts

    3. Power decline linearly to zero : between 19 and 21 volts

    4. Zero Current and Power : above 21 volts

    In the spread sheet attached below there are 5 MPPT models.Here is some brief description on each.

    1. MPPT model 1 implements the logic flow chart as shown in above figure

    2. MPPT model 2 implements the same logic flow chart with a declining panel power.

    3. MPPT model 3 implements the algorithm used in the Arduino software. It is easy to adjust it for fixed or variable panel power and for various starting conditions.

    4. MPPT model 4 is the same as Model 3 except that it used “<=” rather than “<” for the power test.

    5. MPPT model 5 is the functionally the same as Model 4. It uses three branches on the power comparison to the previous iteration, which has the same result as the comparison in Model 4. The main difference is it uses the equivalent of the integer arithmetic used in the Arduino for calculation of PWM duty cycles.

    Models 1 to 3 all exhibit similar characteristics, as follows:

    They all converge satisfactorily when given a high PWM starting point (above the MPP) or a lower one with a derived voltage less than the maximum cut-off voltage of the panel (in the model, 21 V).

    None of them work at all when given a low PWM starting point with a derived voltage above the maximum cut-off voltage.

    The MPPT model 4 corrects this last problem by constantly increasing the PWM (ie decreasing the derived voltage) in the case of equal (ie zero) power. It will always find the MPP of the panel model no matter what starting point is used. It may take more steps than provided in the examples, but it always converges.

    MPPT model 4 also sweeps the total maximum power area.

    To clarify this: Models 1 to 3 when converged all oscillate at the top or bottom edge of the MPP area, depending on whether they approached it from above or below.

    It seems desirable for the tracking to sweep the whole MPP area, irrespective of which direction the approach came. This would better deal with cases where the power curve had local flat spots for some reason. Model 4 does this.

    MPPT Model 5 provides a tool for exploring the effect of integer arithmetic on the PWM calculations and the resultant voltages and currents.

    Integer arithmetic in PWM calculations :


    At the hardware level, the current software uses Timer1 to produce the PWM signal at a 20 microsecond period.20 microseconds is 320 clock cycles of the Arduino clock (which is 16 MHz, ie with a period of 62.5 ns).Because the Timer1 library uses the “Phase and Frequency correct” PWM mode of Timer1, which counts both up and down, the setting of the TOP level (which defines the 20 microsecond period) is 160. The PWM duty can be changed in units of 2 clock cycles, or 125 ns.The integer calculation of PWM runs like this (using the current software):The MPPT code uses a 16 bit integer variable “pwm” to manage the duty cycle. It runs from 0 to 100 to represent 0 to 100% duty cycle, and can be stepped up or down by 1 unit (ie 1%) in each pass through the MPPT algorithm. The Timer1 library accepts PWM duty parameter in the form of a 16 bit integer variable which runs between 0 and 1023 to represent duty cycle as a fraction of 1024.

    I will use an example to illustrate how the calculations run.

    As an example we start with a desired PWM duty cycle of 70%, that is the integer “pwm” has a value of 70. To convert this to an integer between 0 and 1023 to pass to the Timer1 library, the software multiplies pwm (70) by 1023 (giving 71610.The MPPT code then divides this number by 100 giving 716, which it passes to the Timer1 library. Note that 716 / 1024 = 0.6992188..., which is a small amount less than the 70% we started out with.

    Note that even if we had multiplied the original 70 by 1024, it would...

    Read more »

  • Quarter Final Video

    Open Green Energy08/15/2015 at 19:43 0 comments

  • Keith Presentation

    Open Green Energy08/13/2015 at 12:30 0 comments

    keith.hungerford ( team member ) from Australia, who is one of the major contributor to this project.He has experimented a lot on this project.After my request he made this nice video explaining the efficiency,losses at various load,how DCM will take care at low load condition, about the MPPT v4 controller and writing of a new Arduino TimerOne library to handle our requirement.

    These are the loss analysis curves at different load condition.

    At 100 Watt :

    At 80 Watt :

    At 1 watt :


    In the 100% ( 100W ) graph, the optimum PWM period is 14 microseconds, at which period the decrease in the core loss is balanced by the increase in the switching and capacitive drive loss. When Keith checked, he found that the capacitive drive losses are so nearly equal to the switching losses that the curves fully overlap and you cannot see the capacitive loss curve. It is more clear at 80% ( 80W ) load where both curves are visible.

    As the load decreases, the resistive losses decrease and the relative influence of these period-dependent losses increases, but the pattern remains the same. In the MOSFETS, the importance of the switching losses decreases with decreasing load, since there is less current flowing and therefore a reduced amount of charge to be absorbed, even though the voltage excursion is unchanged. The capacitive losses come to dominate. Because the switching losses are less, the optimum PWM period decreases with decreasing load. At 10% load it is down to 11 microseconds.

    However the difference between the total loss at 11 microseconds and 14 microseconds is only 5% of the loss, so a single PWM period of around 14 microseconds is quite efficient SO LONG AS THE CONTROLLER IS IN CCM.

    Somewhere below the 10 % load point, but above the 5% load point, the controller goes into DCM. That is, there is not enough current flowing out of the panel to make the current in the inductor always flow in the same direction.

    His design assumption in this spreadsheet is that the controller algorithms explicitly support DCM. That is, they switch off Q3 at the time that the current would start flowing "backwards". So now, in DCM, the controller has 3 phases within the PWM period. There is the phase when current flows from the panel via Q2 through the inductor, and increases. there is the phase when current flows from Earth via Q3 through the inductor, and decrease. Then there is the Null phase when no current flows through the inductor.

    This Null phase is a good one as far as losses in the inductor and MOSFETs are concerned - there is no current and so no loss. However C1 is receiving all of the current from the panels, and C2 is delivering all of the current to the battery or load. This creates extra voltage ripple at the panels, and at the battery/load.

    So long as the voltage ripple at the panels and battery/load is within reasonable limits, in DCM it is better to have a much longer PWM period. Hence the appearance of very long PWM periods at very low load levels. The length of the PWM period is mainly limited by the voltage ripple tolerable at the battery, and the reduction in efficiency of the panel caused by the ripple there.

  • Finished the Soldering

    Open Green Energy08/12/2015 at 03:22 3 comments

    Purchased all the missing components and started to solder it on PCB.After few hours of work, everything is soldered.I have tested auxiliary power circuitry,everything works fine.The next task is to test the charging circuit.I will update it soon.

  • Soldering the Components on PCB

    Open Green Energy08/12/2015 at 03:09 0 comments

    Today I soldered most of the components on the new PCB.But few components are not available in my stock.So I can't solder them.I will solder the remaining components after buying it from my local shop.

    The following components are missing

    1.Fuse Holder

    2.TVS Diodes

    3.5.1V Zener Diode

    4.USB Port

  • Improvement in LCD Display Function

    Open Green Energy08/11/2015 at 15:57 1 comment

    The LCD display functionality is improved.The above video shows the simulation to test the modified software.

    These are the improvements

    1. Dynamic battery status in battery icon.Earlier it was always showing about half full .Now it changes according to the battery SOC, just like in cell phone.

    2. Removing the long if else statement for displaying the battery SOC. Now used a math function to do the job.

    3. Adding a spinner icon to show the charger is running.It stops when program stuck up.

    Code before Modification :

    void lcd_display()
    {
      back_light_pin_State = digitalRead(BACK_LIGHT_PIN);
      if (back_light_pin_State == HIGH)
      {
        time = millis();                        // If any of the buttons are pressed, save the time in millis to "time"
      }
     
     lcd.setCursor(0, 0);
     lcd.print("SOL");
     lcd.setCursor(4, 0);
     lcd.write(1);
     lcd.setCursor(0, 1);
     lcd.print(sol_volts);
     lcd.print("V"); 
     lcd.setCursor(0, 2);
     lcd.print(sol_amps);
     lcd.print("A");  
     lcd.setCursor(0, 3);
     lcd.print(sol_watts);
     lcd.print("W "); 
     lcd.setCursor(8, 0);
     lcd.print("BAT");
     lcd.setCursor(12, 0);
     lcd.write(2);
     lcd.setCursor(8, 1);
     lcd.print(bat_volts);
     lcd.setCursor(8,2);
     
     if (charger_state == on) 
     lcd.print("on");
     else if (charger_state == off)
     lcd.print("off");
     else if (charger_state == bulk)
     lcd.print("bulk");
     else if (charger_state == bat_float)
     lcd.print("float");
    
     
     //-----------------------------------------------------------
     //--------------------Battery State Of Charge ---------------
     //-----------------------------------------------------------
     lcd.setCursor(8,3);
     if ( bat_volts >= 12.7)
     lcd.print( "100%");
     else if (bat_volts >= 12.5 && bat_volts < 12.7)
     lcd.print( "90%");
     else if (bat_volts >= 12.42 && bat_volts < 12.5)
     lcd.print( "80%");
     else if (bat_volts >= 12.32 && bat_volts < 12.42)
     lcd.print( "70%");
     else if (bat_volts >= 12.2 && bat_volts < 12.32)
     lcd.print( "60%");
     else if (bat_volts >= 12.06 && bat_volts < 12.2)
     lcd.print( "50%");
     else if (bat_volts >= 11.90 && bat_volts < 12.06)
     lcd.print( "40%");
     else if (bat_volts >= 11.75 && bat_volts < 11.90)
     lcd.print( "30%");
     else if (bat_volts >= 11.58 && bat_volts < 11.75)
     lcd.print( "20%");
     else if (bat_volts >= 11.31 && bat_volts < 11.58)
     lcd.print( "10%");
     else if (bat_volts < 11.3)
     lcd.print( "0%");
     
    //--------------------------------------------------------------------- 
    //------------------Duty Cycle-----------------------------------------
    //---------------------------------------------------------------------
     lcd.setCursor(15,0);
     lcd.print("PWM");
     lcd.setCursor(19,0);
     lcd.write(3);
     lcd.setCursor(15,1);
     lcd.print(pwm); 
     lcd.print("%");
     //----------------------------------------------------------------------
     //------------------------Load Status-----------------------------------
     //----------------------------------------------------------------------
     lcd.setCursor(15,2);
     lcd.print("Load");
     lcd.setCursor(15,3);
     if (load_status == 1)
     {
        lcd.print("On");
     }
     else
     {
       lcd.print("Off");
     }
     backLight_timer();                      // call the backlight timer function in every loop 
    }
    
    void backLight_timer(){
      if((millis() - time) <= 15000) // if it's been less than the 15 secs, turn the backlight on
          lcd.backlight();           // finish with backlight on  
      else 
          lcd.noBacklight();         // if it's been more than 15 secs, turn the backlight off
    }

    Code After Modification :

    void lcd_display()
    {
      static bool current_backlight_state = -1;
      back_light_pin_State = digitalRead(BACK_LIGHT_PIN);
      if (current_backlight_state != back_light_pin_State) {
        current_backlight_state = back_light_pin_State;
        if (back_light_pin_State == HIGH)
          lcd.backlight();// finish with backlight on
        else
          lcd.noBacklight();
      }
    
      if (back_light_pin_State == HIGH)
      {
        time = millis();                        // If any of the buttons are pressed, save the time in millis to "time"
      }
     
     lcd.setCursor(0, 1);
     lcd.print(sol_volts);
     lcd.print("V ");
     lcd.setCursor(0, 2);
     lcd.print(sol_amps);
     lcd.print("A");  
     lcd.setCursor(0, 3);
     lcd.print(sol_watts);
     lcd.print(...
    Read more »

  • PCB Arrived

    Open Green Energy08/11/2015 at 15:27 1 comment

    On 4th August 2015, I received the PCB from fab house.It is manufactured locally at PCB Power.The board are looking really nice.The size of the board is 12.5mm x 10mm.

    This is 3D out look of the board after soldering the components.

View all 14 project logs

View all instructions

Enjoy this project?

Share

Discussions

mr.jb wrote 05/15/2015 at 14:06 point

  Are you sure? yes | no

brucedurant wrote 04/30/2015 at 20:04 point

The thing I'm trying to get my head round is how does this take maximum power from the panel. Essentially to get maximum power out we need to present the panel with an impedance that matches its MPP. The circuit presents two separate states to the PV firstly with the Q2 On you are sending energy to the L1/C2 combination/load/battery. This represents one impedance across the cells and you can measure the current & voltage flowing. Now when Q2 is OFF if the panel voltage is above that of C1 then C1 will charge or if it is lower then C1 will try to discharge through the cells. Either way that is a different impedance from the ON condition. The real problem I have with this is that the cells are not capable of averaging these two conditions out they are solid state devices that will instantaneously see either the ON or the OFF impedance not the average. I would have thought that you need some sort of carefully designed low pass 'T' network including another 2 inductors either side of C1 between the current sensor and the Q2.

  Are you sure? yes | no

keith.hungerford wrote 05/30/2015 at 12:41 point

Hi brucedurant, You may not have seen my previous post where I raised the question of the sizing of capacitor C1. I have now done the sums and the situation is fairly clear, and I think it answers your question. The sequence is as follows:

I want to assume the controller is in a quasi-stable position with a mean panel voltage of 18 volts and PWM timing of 14 microseconds where Q2 is ON, and 6 microseconds where Q2 is OFF. The mean panel current is 5.55 Amps (so power is 18 * 5.55 = 99.9 Watts). The mean current through L1 is 5.55 * 20/14 = 7.93 Amps at a voltage of 12 Volts, giving a power into the battery/load of 95.14 Watts. The difference between the panel power and the battery/load power is a few percent which is for losses in the controller. I have no basis for this specific figure, but it seems reasonable and is consistent with other DC-DC converters of this type. It also makes some of the values whole numbers which makes the arithmetic a bit easier to follow - see below.

When Q2 is OFF, the panel is generating current which flows into C1. At the instant Q2 switches OFF the panel voltage will be 17.85 volts. Over the following 6 microseconds the panel voltage rises a total of 0.3 volts, ending at 18.15 volts. If you put 5.55 amps into a 110 microfarad capacitor (C1, C5 and C6 in parallel) for 6 microseconds you get V=It/C = 5.55 * 6 / 110   = 0.3 volts. 

Now Q2 switches ON, and for the next 14 microseconds the current through L1 (which is 7.93 Amps) comes from a combination of 5.55 Amps from the panel and 2.38 Amps from C1,C5, C6. Again, we have V = It/C = 2.38 *14/110 = 0.3 volts. So the panel voltage ends up back at 17.85 Volts, ready for the next cycle to start. 

The panel sees a ripple voltage with a peak to peak value of 0.3 volts around its maximum power point of 18 Volts. There will be a corresponding variation in the panel current, but it is quite small, probably of the order of 40 milliamps either side of the mean of 5.55 Amps. Use of the average figure has no material affect on the above calculation.

Does this clarify how this works for you?

  Are you sure? yes | no

Gorky wrote 03/18/2015 at 02:10 point

Just what I was researching around. Great project. Thanks

  Are you sure? yes | no

Open Green Energy wrote 03/18/2015 at 02:54 point

My pleasure :)

  Are you sure? yes | no

davedarko wrote 03/17/2015 at 18:17 point

awesome documentation,  thank you for sharing!

  Are you sure? yes | no

Michael C wrote 03/17/2015 at 14:15 point

wow, what a nicely done project. functional, useful, And well documented! great work, putting a small intelligent board to full use.

thanks, saving this one for future need.

  Are you sure? yes | no

Open Green Energy wrote 03/17/2015 at 17:15 point

Thank You :)

  Are you sure? yes | no

mr.jb wrote 03/17/2015 at 11:23 point

It is very similar to "Arduino Peak Power Tracker Solar Charger"

http://web.archive.org/web/20130430163911/http://www.timnolan.com/index.php?page=arduino-ppt-solar-charger

I think charging single cell LiFePO4 batteries could be of interest for you..since it will increase lifespan of battery ( but still be cheap solution ). LiFePO4 fully charged is 3.6V perfect for most led application. ( no need for buck conversion ..just PWM  )

LED driver

http://flashlightwiki.com/AVR_Drivers

LiFePO4 will also allow you have more demanding applications like soldering. High current is no big deal....

LiFePo4 has long shelf life and >2000 cycles ..sometimes >7000 cycles for brands like  A123 www.batteryspace.com/prod-specs/6610_1.pdf

. ( Ordinary li-ion has just 4-5 years shelf life )

  Are you sure? yes | no

davedarko wrote 03/17/2015 at 14:12 point

This is probably why he thanks Tim Nolan on step 40 of his instructables page :) Once again I've learned more about the art of charging batteries and using solar power. Thanks to you, guys! 

  Are you sure? yes | no

Open Green Energy wrote 03/17/2015 at 17:16 point

You are right.I have learned a lot from Tim Nolan.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates