Tuesday 6 May 2014

Boost MPPT Charger Details (1)

So, meanwhile fresh in my mind, I'd better document how the software works. Following flow chart is the simplified version of my Boost MPPT charger Arduino Uno code:


Would I code this differently? Of course! But, the code as-is, works well. It has been tested with me trying to break it to find bugs. After various testing, this code has been fine tuned. For example, 5000 cycle times for the PWM. Too little, causing the MPPT tracking stuck in lower power, no idea why. Too large, not good for the speed of MPPT tracking. Plugging in and out battery meanwhile the sun is full shining was also tested (to make sure the code handles overvoltage, etc etc).

If I have more time, I would code using Arduino PWM in-built feature next time. I've just found out (after all of this), that I can change the PWM frequency. Heck, the more I spend time on this project, the more things I find can be improved.

What testings did I do? In brief:

Accuracy of MPPT tracking:
Very well, thank you very much. I did this by temporarily breaking the connection and reconnect the solar panel with another DC-DC converter. I noted down the power consumption of the input in-line power meter, immediately prior the converter becomes unstable, and compare this against my Arduino-Uno Boost MPPT charger input power consumption. Very close indeed. I should be honest, the test wasn't very scientific, as I only tested 2 points, i.e. at 30W and at 55W.

Efficiency of the charger:
as noted before, at least 87%. But, this is only true for power consumption above 17-ish Watt. Below this, the efficiency drops significantly (due to various reasons beyond the scope of today's blog :) ). At 3W, it's only 40% efficient. Note though, I need to repeat this efficiency test to get more accurate results. As the input power figure does jump around +/-1W due to the Perturb and Observe algorithm. I need to slow down the MPPT tracking to get the efficiency figure correctly. Why jumping around that much? Well, see next point.

Resolution of the MPPT tracking:
In theory, at 17V input, with 270uH, and 1us resolution of the 'onTime', I only can increase or decrease panel current by 63mA at a time (+/- 1W at 17V). Calculation as follow:


As stated in previous point, in practice, the input power does jump around +/- 1W at 17-ish panel voltage. Nice to see practice and theory agrees with each other.

8 comments:

home Stay said...

mau tanya dong master, itu bagian algoritma yang "Turn On and Off MOSFET with following duty cycle onTime offTime(constant of 10us) Do this for 5000 cycles"
itu kenapa harus konstan 10us y?
trs kenapa hrs dilakukan selama 5000 cycle?
mohon penjelasannya master, terima kasih sebelumnya..

Rusdy said...

Soalnya Arduino Uno kan cuman bisa turn on and off kurang lebih 1 mikrosecond. Kalo terlalu sebentar (off cuman 1 mikrosecond), duty cyclenya jadi terbatas banget (karena on-time cuman sekitar 1 mikrosecond). Kalo terlalu lama, frekuensinya jadi rendah banget.

By the way, ini posting yang lama, jadi pake kode yang baru aja, jauh lebih tokcer!

Chris said...

Hi,

I'm working a buck converter for my MPPT. I have a ~27V Solar panel charging a 12V battery. I'm trying to follow the charge controller from thesolarexpert.com. However, I can't find the buck programming, and that's where I'm lacking. Any info or ideas you can give me?

Rusdy said...

Hi Chris, you can use mine. Works as well for buck. Link: https://drive.google.com/file/d/0B_hfpbysZDTNMmZCUzVfSG95azA/edit?usp=sharing

Chris said...

Would you mind emailing me? I have a few questions about the code.

Rusdy said...

Would love to! But I don't have your email :( . My email: rusdy dot simano at gmail dot com

Unknown said...

my panel is 250watt whick is connected to the Buck converter with MPPT controller.When i used battery(12v 25AH) as a load it will not take desired power

so my first question is what type of load i have to use which is cheaper and take 100w power?

second question is what is the simplest way to check MPPT is working or not?

Bambang said...
This comment has been removed by the author.