Thank you ChrisP58.
I know more or less about the curve. For example a panel would generate maximum power at 18v. Obviously it will vary panel to panel. I am telling this just for the discussion.
The pseudo code I earlier posted which is:
Code:
current = adc(pv_current_channel);
voltage = adc(pv_voltage_channel);
battery_voltage=adc(battery_channel);
power_new = current * voltage;
if (power_old >= power_new) {
decrease_duty_cycle ;
else if (power_old < power_new) {
increase_duty_cycle;
}
power_old = power_new;
Please give attention to the lines of the above code
Code:
.....
if (power_old >= power_new) {
decrease_duty_cycle ;
....
It repeats in every 1 second or so to check. Now for example if the sun maintains solar panel volts to 18 for the next 20 minutes (well, it may change, but for now let's say it will not). The PWM duty cycle is decreasing in every cycle - repeats in every 1 second or so .....
So there is a minimum and maximum duty cycle fixed at the beginning of the code. This does like:
if (duty_cycle < prefixed_min_duty_cycle){
duty_cycle = prefixed_min_duty_cycle
}
if (duty_cycle > prefixed_max_duty_cycle){
duty_cycle = prefixed_max_duty_cycle
}
-------------
The sun maintains 18v.
Duty cycle has reached to it's prefixed value within 1 or 2 minutes.
This prefixed duty cycle outputs 14v through buck converter when the input is 18v for approximately next 18 minutes.
The battery also needs 14v to charge.
Now when the sun and panel gives more than 18v, like 20v (considering 20v is not maximum power point), what output voltage should make the buck converter? One may say 16v, and 20-16=4v will be converted to current, which is the gain.
But if I set the buck converter to output 14v, will I not gain 20-14=6v, which is also being converted to current?
Same thing for every solar voltage steps, when it is more than 14v. I would maintain buck output to 14v. Is the gain not similar? If not, what the buck outputs after knowing the maximum or not maximum power point?
Enlighten please
Regards.