Need advise for MPPT solar charger

Thread Starter


Joined Jan 18, 2012
Hello all,

I am trying to make a MPPT solar charger. I have read some articles about MPPT and seen several codes for this. Few things I don't understand, and hope someone knowledgeable may kindly help me.

* The solar panel is rated to 10 watts. Maximum output voltage is 22 volts.
* The battery would be charged, is a 12 volts lead acid battery.
* When the battery voltage reaches at 14.4 volts, it is fully charged.

Say for example, the maximum power point of the solar panel is 18 volts.

To make the battery fully charged (14.4v), I have to supply like 15.4 or 16 volts.

So when the solar panel volt is 18, I have to make it 16v with a buck converter or other dc/dc converter.

Even, when the solar panel voltage is 17, 19, 20, 21 or maximum 22v, I have to adjust pwm for a 16v output to charge the battery.

The articles and codes I read, measure voltage and current of the solar panel to determine power. This way they find the maximum power point of the panel. Here I don't understand why to do this.

May be I shall find that the maximum power point is on 19v instead of 18v. Or it will be 20v, 21v or 22v. Whatever it is, I have to adjust the solar voltage to 16v to charge the battery. Then why sense solar current to find maximum power point?

Shall the solar voltage have to be changed to 17 or any other volts if the MPP is 19v, instead of 18v?

As I understand it is sufficient to convert the voltage to 16v for charging the battery. Saved higher voltages will be converted to current which will help the battery to charge faster. The MPP might be hidden in any of the 18, 19, 20, 21 or 22v. It is not necessary to discover it to charge the battery. To find it the voltage and current are read through ADC, then multiplied to get the power/watt. Why to do this - measuring current? When I need 16v, I have only need to look for higher solar voltage to adjust pwm. I need ADC to determine only voltage.

Well, I understand that so many people who wrote the articles and codes for MPPT charger can't be wrong. So I am making mistake somewhere. Can someone please correct me and explain it?

Thanks a lot.

Best regards.
Last edited:


Joined Oct 8, 2011
MPPT & PWM solar chargers are two different things.Although it is quite likely that some form of PWM is used internally in an MPPT charger.

The concept of MPPT is that the controller continuously "matches" the maximum power from the panel to the battery by DC-DC conversion.Most of the better MPPT chargers also use either three or four step charging,with optional temperature control.

There are a number of different techniques as to how this "Matching" is achieved. You can read to see how this is done.

MPPT controllers are extremely complex and it is unlikely that it is viable to build and program one.
See for previous thread on the matter.

Thread Starter


Joined Jan 18, 2012
Perhaps I was unable to make it clear to you. Take it easy :) and thanks for trying to help. It is not that important for me to must make a MPPT charger. Thanks again.


Joined Sep 9, 2010
Here I don't understand why to do this.
I can't guess what aspect you don't understand, but the idea is rather simple. At a given illumination level, the panel has one and only one point on the I-V curve where power output is maximal. The purpose of MPPT is to adjust the load on the panel so that the maximal point is in fact the operating point. There are all sorts of math algorithms for finding the peak of a curve, and I suppose you're seeing some of them in the MPPT codes.

Thread Starter


Joined Jan 18, 2012
Thank you very much for replying.

I can't guess what aspect you don't understand
Well, if I were going to make a meter to find the maximum power point, then I would need to measure current along with voltage. And then multiply the two results to find the power. But since it is a battery charger, I only need to manipulate voltage to keep it at 16v for charging battery. That means only read solar adc for voltage. If it is higher than 16v, adjust pwm to make it 16v.

Even if I use the current and voltage measuring method to find the MPP, should I not set the voltage to 16v finally? Correct me here please, if I am wrong. This is where I don't understand :confused:. May be the MPP is at 18,19,20 or at higher voltage, I have to reduce that to 16v to charge the battery.

A traditional pseudo code from :

Rich (BB code):
next_pwr = calcPwr(adc_voltage, adc_current);
    case PV_RIGHT :
      if (next_pwr > prev_pwr){incDuty();}
      else if (next_pwr <= prev_pwr){
        voltage_direction = PV_LEFT;}
    case PV_LEFT :
      if(next_pwr >= prev_pwr){decDuty();}
      else if (next_pwr < prev_pwr){
        voltage_direction = PV_RIGHT;}
prev_pwr = next_pwr;
Where, I think it is sufficient to charge the battery with the same efficiency by something like:

Rich (BB code):
SolarVolt = ReadADC 0
BattVolt = ReadADC 1

If BattVolt < 14.4 and SolarVolt > 16 then
Adjust_PWM_To_Make_16v // Reduce the solar voltage. The gained voltage would be converted to current.
Well, I might be wrong. Looking forward for your valuable suggestion.

Best regards.


Joined Mar 14, 2008
For such a small panel, the cost and complexity of an MPPT converter may not be practical. For that I would just use a small buck (or buck/boost) converter to charge the battery, if you want improved efficiency. It won't have as good efficiency as MPPT but it will be much better than just connecting the battery to the panel.

Thread Starter


Joined Jan 18, 2012
Hello wayneh and crutschow,
Thanks. I have posted a long reply which is in the moderation queue. :)

Thank you bertus for the link. Bookmarked.
Last edited: