Simple MPPT Solar Charger - Page 1
Forum section: electronics / general

author: Mr Evil
author_rank: Regular Contributor
timestamp: January 19, 2020, 08:13:50 pm
content: This is an attempt to implement solar MPPT as simply as possible, to give me a better understanding of how well it works. It's related to thesupercapacitor balancer I mentioned here recently. Here's the circuit:It consists of a hysteretic buck converter built around comparator U2, which works by switching on Q1 when the panel voltage is above the reference voltage, then switching Q1 off when the panel voltage falls below it. By setting the reference voltage appropriately, this keeps it around the maximum power point. The microcontroller sets the reference voltage. It implements the "open voltage" method of MPPT, so at regular intervals it turns the comparator off to allow the panel voltage to rise to its open circuit voltage, measures that, and then sets the reference voltage to a proportion (0.8x) of it.PCB layout:Here it is connected to a solar panel and a supercapacitor bank:And an oscilloscope trace of the panel voltage (blue), Q1 gate voltage (red), and comparator SHDN pin voltage (green), showing what happens when the microcontroller measures Voc.I took a few measurements to work out the efficiency. Unfortunately there's not much light at this time of year, so the nominally 5W solar panel won't produce anywhere near that.Voc 18.2VIsc 6.1mAVin 13.6VIin 5.55mAPin 75.5mWVout 4.45VIout 14.6mAPout 65.0mWEfficiency 86%The solar panel has a specified Vmpp of 17.2V, which is what it should be in very bright sunlight. If there was no MPPT and it just operated at a fixed 17.2V to match the nominal value, it would only be possible to extract about 40mW from the panel now, so using MPPT performs better by quite a bit. If there wasn't even a DC-DC converter and the panel was connected directly to the supercapacitor bank, it would only be able to extract 27mW.Source code for the PIC12F1571 microcontroller is attached.There'sa longer description on my website.

author: fourtytwo42
author_rank: Super Contributor
timestamp: January 20, 2020, 09:35:09 am
content: Without a means to measure panel current you cannot Track the panel maximum power point hence the circuit is NOT MPPT IMOP.

author: Mr Evil
author_rank: Regular Contributor
timestamp: January 20, 2020, 05:11:15 pm
content: I feel like that's a philosophical problem. It doesn't measure power, instead assuming that the MPP is a function of open circuit voltage, which is only mostly true. Measuring current and using that to calculate power is more accurate, but it's still only an indirect measurement, e.g. if you use a series sense resistor you're assuming that current is a function of the voltage across the resistor, which is also only mostly true, as temperature coefficient and noise can upset things. There's also the problem of local maxima with multiple cells - as far as I know, the "current sweep" method is the only one that's guaranteed to find the true maximum.In the end, I would say that since my circuit moves the power point towards where it believes the maximum power point is, it does indeed track the maximum power point. There's also plenty of literature that describes the open voltage method as MPPT.

author: ahbushnell
author_rank: Frequent Contributor
timestamp: January 20, 2020, 10:29:48 pm
content: Quote from: Mr Evil on January 20, 2020, 05:11:15 pmThat's a poor comparison. Assuming you have the specifications on the resistor then ohms law is your friend.

author: kernels
author_rank: Newbie
timestamp: January 21, 2020, 03:57:13 am
content: Just out of interest, what is the relationship between the maximum-power-point and the panel open circuit voltage ?

author: Mr Evil
author_rank: Regular Contributor
timestamp: January 21, 2020, 04:53:56 pm
content: Quote from: ahbushnell on January 20, 2020, 10:29:48 pmThe point is that if something is imperfect at performing a function, that doesn't mean that itisn'tperforming that function. The behaviour of resistors is usually very accurately described by Ohm's law, but it's never perfect, and sometimes a lot out.Quote from: kernels on January 21, 2020, 03:57:13 amIt's supposed to be a constant ratio. I measured the V-I curve of the panel I used at a few levels of illumination last year, and it seemed to hold true. I haven't read anything about under what conditions it stops being true - maybe panel aging or temperature affect it.

author: David Hess
author_rank: Super Contributor
timestamp: January 21, 2020, 06:16:36 pm
content: Quote from: fourtytwo42 on January 20, 2020, 09:35:09 amIt tracks somewhat close however and is better than nothing. Measuring the output current would be better and deliver close to ideal results.

author: fourtytwo42
author_rank: Super Contributor
timestamp: January 21, 2020, 07:08:13 pm
content: Quote from: Mr Evil on January 21, 2020, 04:53:56 pmHow can that be as a proportion of the difference is determined by load current acting upon the panels internal resistance ?If your read any panels specification and any written material on the technology you would know there are myrad reasons why it is not true that there is a fixed ratio between VOC & VMPP.What I am disputing here is your use of the term MPPT, you are not measuring the actual panel power so how can you claim to be tracking it ?It might help if you stated what the panel power was and what the panels technology is ?

author: fourtytwo42
author_rank: Super Contributor
timestamp: January 21, 2020, 07:09:37 pm
content: Quote from: David Hess on January 21, 2020, 06:16:36 pmHow close ?

author: kernels
author_rank: Newbie
timestamp: January 21, 2020, 08:56:24 pm
content: Quote from: Mr Evil on January 21, 2020, 04:53:56 pmThat's pretty cool, and certainly easier than doing inline current measurement, although I guess it is a specific solution rather than general, so your ratio for panel A might not work for panel B. As mentioned above, it might still be better than nothing, even on an unknown panel.

author: Mr Evil
author_rank: Regular Contributor
timestamp: January 22, 2020, 05:46:40 pm
content: Quote from: fourtytwo42 on January 21, 2020, 07:08:13 pmI don't know enough to be able to tell you how it works, but it does.Quote from: fourtytwo42 on January 21, 2020, 07:08:13 pmIf Voc is proportional to Vmpp, then measuring one is as good as measuring the other.Quote from: fourtytwo42 on January 21, 2020, 07:08:13 pmI did mention the nominal power in the OP: 5W, and polysilicon. Despite the pitiful power output figures I posted above, it will produce something resembling its spec - I didn't write down exactly how much, but I think it was about 4W in summer sun.

author: fourtytwo42
author_rank: Super Contributor
timestamp: January 23, 2020, 10:53:49 am
content: Quote from: Mr Evil on January 22, 2020, 05:46:40 pmLet me assure you that Vmpp is NOT proportional to Voc, however if you have persuaded yourself that in your specific case there is enough of a relationship for your setup to work to your satisfaction then so be it but please don't confuse people by asserting that your empirical measurements are true in the general sense.Quote from: Mr Evil on January 22, 2020, 05:46:40 pmAhh I am sorry I missed that, perhaps this is a 6 or 12V panel ? I assume it doesn't have any shading diodes so the chances of a multi-hump mpp curve is small and a simple slope climber would work well. It is seriously very easy to add current sensing in the negative PV lead with a low value resistor and differential op-amp (r-r input & output) then simply multiply the panel current & voltage in software. Alternately you could use a hall effect current sensor but they tend to be an expensive solution.

author: Mr Evil
author_rank: Regular Contributor
timestamp: January 23, 2020, 05:09:44 pm
content: Quote from: fourtytwo42 on January 23, 2020, 10:53:49 amIt would be helpful of you to updatethe Wikipedia article on MPPTto say that the open voltage method doesn't work as MPPT.

author: fourtytwo42
author_rank: Super Contributor
timestamp: January 23, 2020, 08:30:37 pm
content: I don't think it needs updating, you just have to read it carefully and understand the subject.I quote " If the output voltage is held constant,there is no attempt to track the maximum power point, so it is not a maximum power point tracking technique" and "The controller then resumes operation with the voltage controlled at a fixed ratio, such as 0.76, of the open-circuit voltage VOC. This is usually a value which has been determined to be the maximum power point, either empirically or based on modelling, for expected operating conditions" in fact if you look at the graphs in the article it is further blatantly obvious Vmpp is not related to Voc by a fixed ratio.You should widen your reading considerably beyond Wiki as it is not an absolute reference, the specifications of your panel might help if you can obtain them (it's not just generic Asian), if not something similar by a recognized manufacturer with real spec sheets may at least give you some ideas.The gain to be made by true MPPT is entirely local, in that it depends how wide your various operating parameters are and how far out your empirical results are from dynamic operating conditions as well as simple things like your voltage reference stability. The point of MPPT is that it is adaptive and avoids most if not all errors caused by parameter drift anywhere, but only if implemented correctly.There are millions of users out there of items such as charge controllers claiming to be MPPT that are NOT, so you are not alone by any means, it has unfortunately become an overused and much misunderstood buzzword so if the opportunity arises I try to correct it

author: Mr Evil
author_rank: Regular Contributor
timestamp: January 23, 2020, 09:25:20 pm
content: Quote from: fourtytwo42 on January 23, 2020, 08:30:37 pmYou're misreading that. If I might reproduce quotes from the same section, with different emphasis: "The term "constant voltage" in MPP tracking is used to describe different techniques by different authors,one in which the output voltage is regulated to a constant value under all conditionsandone in which the output voltage is regulated based on a constant ratio to the measured open circuit voltage (VOC). " and "If the output voltage is held constant, there is no attempt to track the maximum power point".So, when it says that "it is not a maximum power point tracking technique", it is referring to the first technique, not the second. If the second one is also not MPPT, then you should correct it.Please don't assume that I have read only Wikipedia either.

author: fourtytwo42
author_rank: Super Contributor
timestamp: January 24, 2020, 08:53:19 am
content: I concede I misread the article and had not fully understood the measurement of Voc, I can verify this work with my own models and indeed there is some relationship between the two however it does not seem to account for I2R losses in the panels but it does account for temperature and of course insolation level. I am sorry to have apparently assumed your system was simply fixed input voltage. It is a pleasure to learn something new each day, thank you for your enlightenmentI have changed the plot to one anotated with the Vmpp/Voc ratio's for my particular panels showung a remarkable correspondance, food for thought indeed.[ Specified attachment is not available ]

author: Mr Evil
author_rank: Regular Contributor
timestamp: January 24, 2020, 01:40:44 pm
content: No problem! Thanks for taking the time to do some measurements.

author: f4eru
author_rank: Super Contributor
timestamp: January 24, 2020, 09:18:43 pm
content: interesting concept.Yeah, could work, but it has some disadvantages:- EMC is probably pretty bad, sending modulation back to the panel- dead times mean some loss and modulation of the output- no current control to the output ?- no frequency control : difficult to optimize- needs fitting to the panel and wiring characteristicsAlso, if this is directly a charger, aka, a current source, why measure the output voltage ?if this is driving a charger circuit with a constant voltage, it might oscillate, or not work, because most chargers assume they are regulating the power, so they must be powered by a constant voltage with no limit under their maximum. This would simply defeat the point of a MPPT.What I would do :- use a classical arch, simpler to control- put a shunt, non-amplified is good enough- use a uC with a 12 bit A/D instead of 10 bit, like a EFM8BB <- measures better small shunt voltages- use PWM to generate the gate drive, with a bipolar gate buffer

author: Mr Evil
author_rank: Regular Contributor
timestamp: January 25, 2020, 12:15:56 am
content: All good points. A couple of things:Quote from: f4eru on January 24, 2020, 09:18:43 pmAs it is, the maximum output current is limited by the panel power and the resistance of the inductor + output wiring. Not exactly good practice, but it should remain within all the components' maximums.Quote from: f4eru on January 24, 2020, 09:18:43 pmIt's connected to a string of 4 supercapacitors, so it needs to stop once it reaches their maximum of 10.8V. I was considering following those with a battery charger to make a power bank, but now I've changed my mind and I think I'll use this to power a big solar light, which makes things easier because then it's only either charging or discharging, never both.

author: NiHaoMike
author_rank: Super Contributor
timestamp: January 25, 2020, 01:20:45 pm
content: Quote from: f4eru on January 24, 2020, 09:18:43 pmIf you have a microcontroller measuring the input and output voltages and controlling the duty cycle, you can program it to recheck the open circuit voltage at very infrequent intervals (minutes) or when there's a big change in input voltage given the same duty cycle.

author: f4eru
author_rank: Super Contributor
timestamp: January 26, 2020, 03:51:26 pm
content: Sure.But why ?