diy solar

diy solar

Simple home made analog MPPT contoller

Warpspeed

Solar Wizard
Joined
Jun 11, 2021
Messages
1,487
Location
Melbourne, Australia
This caries on from the "Open source microconverter" thread which I am very guilty of hijacking.

What follows is a home project to build a really simple low cost solar mppt controller that does not involve any software or a microcontroller.
This all started as a bit of an experiment, and it has proven to work much better than I expected, it just uses a simple readily available pwm controller chip to maintain a fixed voltage at the solar panels, and charge a battery up to a fixed final charging voltage.

The charging profile is much better suited to a lithium battery rather than to lead acid.

Its a really basic simple no frills solar charge controller, but it has the advantage of being very easy to get going, and would be very simple to fault find and repair. It has proven to work just as well as a commercial perturb and observe software driven charge controller. If there are any differences in measured performance they would be absolutely minimal in practice.

The idea is that the pwm duty cycle is adjusted to increase as the solar voltage increases. That continually adjusts the loading on the solar panels to hold the panel voltage at the maximum power voltage. It works from dawn to full sun in a clear blue sky, and tracks the max power voltage which is set by a potentiometer.

The rating plate voltage on the panel will tell you where to set the optimum voltage to do this. But if you don't know that, its simple to just tweak the voltage up and down while watching the charging current during bulk charge. A definite maximum in charging current will be found, but its more of a very shallow hump than a sharp peak.

While its true that the optimum solar voltage will vary slightly with temperature and insolation, it will never be very far from the voltage on the rating plate.
All a perturb and observe algorithm does is find this peak through searching. If you know where the peak is, you can just set a potentiometer to that voltage and leave it there. The power fall off either side of the cusp of the power hump is absolutely minimal. Far less than i expected.

The other side of this is the output voltage of the solar controller can be set to the required final battery charging voltage. It will bulk charge up to that voltage, then the current will taper back to zero in the usual expected way.

The pwm controller has two proper error amplifiers, which makes it a bit unusual among most other pwm controller chips. Whichever error amplifier requires the greatest reduction in duty cycle takes over control, and crossover is very smooth.

I have had this running for about a month beside a couple of Make Sky Blue commercial perturb and observe controllers, and it appears to be every bit as good in all conditions.

Here is the schematic:
 

Attachments

  • Analog MPPT.jpg
    Analog MPPT.jpg
    181.5 KB · Views: 228
I like your angle with this, I'm tempted to build one myself to do a side-by-side test with a standard MPPT controller to record and compare efficiency. I've always wondered how much a panel's Vmp would actually change with clouds, shading and all the other real-world challenges.

Looking at the schematics it seems to share a lot in common with a normal MPPT system. Most of the cost is in the "buck" circuit for the inductor and capacitors, with the microcontroller managing the perturb algorithm being one of the cheapest parts. So if the cost is slightly less, but so is the efficiency, the value proposition for a circuit like this becomes a challenge.
 
Last edited:
Yes you are quite right. The cost is in the larger power components for the buck converter, and that will not change.
And its also true that these days a two dollar microcontroller is not going to make much difference to a dumb analog PWM control chip.
Not everyone is a software genius, and a totally hardware approach offers some advantages to the less confident.

What first attracted me to this, was that the whole concept had never been tried before (as far as I know) and I just wanted to test the whole idea mainly just out of curiosity. It seemed so simple and so obvious an idea, I just had to try it !
I think my biggest surprise was how non critical the actual solar voltage adjustment is. There is a definite maximum, but its not at all what I expected.

There is one interesting advantage from this I have since discovered, that I had not anticipated.
While bulk charging, the solar panel voltage is very tightly regulated.
It only begins to rise once the battery crosses over from bulk charging to absorb, and surplus solar power becomes available.
It would then be possible to connect up a second similar solar controller to the SAME solar panels with its solar voltage set a couple of volts higher.

This will do nothing, until there is surplus solar power that the first controller cannot use.
Its then possible to divert all the surplus available power to a different second application on a priority basis.
Charging a second battery perhaps, and that might be at a very different battery voltage to the main battery !
Or perhaps a solar hot water heater, or something else.

This priority power diversion cannot work with a perturb and observe algorithm controller, the two controllers would most likely fight each other, and there is no real way of anticipating what might happen.
But two of these analog controllers do work together wonderfully well for surplus power diversion.
 
I think it's a great concept. My only issue is the asynchronous buck. Your 96V battery keeps losses low but my 24V setup is another story. Efficiency drops off quite a bit on my MSB's as the solar rises. I see that maeaculpa is looking at a synchronous buck for the MSB. I might have to merge the 2 designs.
 
There is another theoretical advantage of a fixed voltage system. Under certain circumstances (like shading) a string of panels can develop more than one local maximum on their I-V output curves. Less sophisticated MPPT algorithms can get stuck on one of these lower local maximums, which reduces the output substantially for long periods. Better MPPT systems make broader observations to ensure this doesn't happen, but it's hard to know if this ever occurs or if avoidance of this scenario is even a feature of most MPPT controllers.

This wouldn't happen on a fixed voltage system.

I do wonder how the I-V curve changes for long strings of panels. Given the cumulative voltage, I think this would mean greater variations from the Vmp, potentially making fixed voltage less efficient as the string size increases.

I'd still love to test this as if we're only talking <10% efficiency difference, it's just splitting hairs.
 
I think it's a great concept. My only issue is the asynchronous buck. Your 96V battery keeps losses low but my 24V setup is another story. Efficiency drops off quite a bit on my MSB's as the solar rises. I see that maeaculpa is looking at a synchronous buck for the MSB. I might have to merge the 2 designs.
My first proof of concept attempt at this was to keep everything as simple as possible.
My application here was for one series string of four, charging a 100v lithium battery, and the diode losses were not terrifyingly large.
But you are quite right, an active synchronous buck regulator would be vastly better at lower voltages and at higher current.

You need to be very careful though using a synchronous buck converter to charge a battery.
The lower mosfet can pull current backwards through the choke and the whole thing then becomes a bi directional boost converter !

Synchronous buck regulators work fine driving a passive load, but charging a battery is a very different thing.
Its certainly possible, and is done all the time, but you need to be aware of the problem, and that does complicate the whole thing.
Something I wished to avoid for my very simple first prototype.

This also needs a series diode on the solar side because otherwise battery voltage reaches the solar panels at night producing a very slight but measurable battery discharge.

All these problems can be overcome, but can probably be just ignored for a first experimental test.
 
There is another theoretical advantage of a fixed voltage system. Under certain circumstances (like shading) a string of panels can develop more than one local maximum on their I-V output curves. Less sophisticated MPPT algorithms can get stuck on one of these lower local maximums, which reduces the output substantially for long periods. Better MPPT systems make broader observations to ensure this doesn't happen, but it's hard to know if this ever occurs or if avoidance of this scenario is even a feature of most MPPT controllers.

This wouldn't happen on a fixed voltage system.

I do wonder how the I-V curve changes for long strings of panels. Given the cumulative voltage, I think this would mean greater variations from the Vmp, potentially making fixed voltage less efficient as the string size increases.

I'd still love to test this as if we're only talking <10% efficiency difference, it's just splitting hairs.
I am sure there is still a great deal still to be learned, but initial results here have been very encouraging.

This system responds super fast to passing clouds, and as you say, it cannot be easily fooled by false peaks.
 
Sometimes you don't need to reinvent the wheel. I find these 110-220VAC 12V10A LED power supplies handy and super cheap. I get them for under $10 shipped on ebay auction. They will run down to below 60VDC and produce 85% of power. A small modification will get them to adjust up to the 14.4V range so they could be connected to a 12V PWM charge controller. Or just set them to a float voltage and use in parallel with your charge controller to get another 120W for each added supply. I use one to keep the battery maintained over winter. Adding a fixed minimum panel voltage is just a few parts extra. They have a 180W version which is similar. Over that power range the input is a voltage doubler unsuitable for lower DC voltages.
12V10ALEDsupplys.jpg
 
Sometimes you don't need to reinvent the wheel. I find these 110-220VAC 12V10A LED power supplies handy and super cheap. I get them for under $10 shipped on ebay auction. They will run down to below 60VDC and produce 85% of power. A small modification will get them to adjust up to the 14.4V range so they could be connected to a 12V PWM charge controller. Or just set them to a float voltage and use in parallel with your charge controller to get another 120W for each added supply. I use one to keep the battery maintained over winter. Adding a fixed minimum panel voltage is just a few parts extra. They have a 180W version which is similar. Over that power range the input is a voltage doubler unsuitable for lower DC voltages.
View attachment 114428
I don't think this is the same thing? Warpspeed's idea was to create a buck converter that would keep both the panels and the battery at a constant maximum voltage. This only does the battery.
 
It was just a stock picture showing the supply. I've been doing the same thing for years. I have operated them as minimum panel voltage maintainers. With only a hundred watts on a sizeable array being used as a booster it is hardly necessary on such a small supply. But, keeping the panels above a minimum is just a couple extra parts. One control board could operate several of these supplies in parallel. It saves trying to source inductors. Almost my entire system is fixed panel voltage regulation. I bought a MSB just to see how everything worked in parallel with a standard MPPT. MSB gets lost a lot in my intense shade. I had to have a circuit to disconnect the panels when it got lost.
 
Last edited:
My idea is just a suggestion of a different way to put together the control system.

You still require a buck converter, and repurposing an existing buck converter board off something else might be clever and low cost way to do that.
 
I had a 1KW array which was a different voltage used three of the 72V to 12V 15A buck converters that at one time cost $7.50 shipped. One was the master and the other two were followers keeping the panels at a fixed point. Those panels were too much trouble taking out each year and they weren't really needed. The MSB has an irritating quirk that seems to be an industry standard as I have seen it on my six other controllers I've picked up. I have a 150W soldering gun and when I release the trigger, the battery voltage climbs to over 16V ten seconds later putting the inverter at fault. It is some kluge they all think is necessary to solve some issue. And I know it is due to my minimal battery. But really, can't they put a clawback in for over voltage. That inverter is only for the fridge and shed which powers off when fridge is finished.

TI has a chip they call MPPT which is only fixed point. In the fine print there is a note of how to add a thermistor to the external voltage divider for thermal tracking. Thermal tracking is an accepted form of MPPT. I added it to my designs so it would track closer to a parallel MPPT CC. I have a 4X4 inch sheet metal painted black to simulate conditions the panels might see. Someone using my design in AU just attached the sensor to his metal roof. He said it tracks closely to his GTI. Even a sensor reading ambient temp provides compensation. In microprocessor design, the panel itself can provide temperature. Just nice to have things automatic when there can be wide temperature swings.
 
This caries on from the "Open source microconverter" thread which I am very guilty of hijacking.

What follows is a home project to build a really simple low cost solar mppt controller that does not involve any software or a microcontroller.
This all started as a bit of an experiment, and it has proven to work much better than I expected, it just uses a simple readily available pwm controller chip to maintain a fixed voltage at the solar panels, and charge a battery up to a fixed final charging voltage.

The charging profile is much better suited to a lithium battery rather than to lead acid.

Its a really basic simple no frills solar charge controller, but it has the advantage of being very easy to get going, and would be very simple to fault find and repair. It has proven to work just as well as a commercial perturb and observe software driven charge controller. If there are any differences in measured performance they would be absolutely minimal in practice.

The idea is that the pwm duty cycle is adjusted to increase as the solar voltage increases. That continually adjusts the loading on the solar panels to hold the panel voltage at the maximum power voltage. It works from dawn to full sun in a clear blue sky, and tracks the max power voltage which is set by a potentiometer.

The rating plate voltage on the panel will tell you where to set the optimum voltage to do this. But if you don't know that, its simple to just tweak the voltage up and down while watching the charging current during bulk charge. A definite maximum in charging current will be found, but its more of a very shallow hump than a sharp peak.

While its true that the optimum solar voltage will vary slightly with temperature and insolation, it will never be very far from the voltage on the rating plate.
All a perturb and observe algorithm does is find this peak through searching. If you know where the peak is, you can just set a potentiometer to that voltage and leave it there. The power fall off either side of the cusp of the power hump is absolutely minimal. Far less than i expected.

The other side of this is the output voltage of the solar controller can be set to the required final battery charging voltage. It will bulk charge up to that voltage, then the current will taper back to zero in the usual expected way.

The pwm controller has two proper error amplifiers, which makes it a bit unusual among most other pwm controller chips. Whichever error amplifier requires the greatest reduction in duty cycle takes over control, and crossover is very smooth.

I have had this running for about a month beside a couple of Make Sky Blue commercial perturb and observe controllers, and it appears to be every bit as good in all conditions.

Here is the schematic:
Hi. I'm trying to build this circuit, but could I know what is Sm-12.
Thanks.
 
Last edited:
What I call the SM-12 is one of those Chinese two dollar 120/240v to 12v dc isolated power supplies advertised on e-bay.
They are actually the guts out of a standard dc wall pack that the Chinese manufacture by the millions.
https://www.ebay.com.au/itm/302088719078

These small circuit boards are produced by many different companies in China, but the external board dimensions are all exactly the same. These fit into plastic housings to suit the very different wall plugs in every country in the world. They are rated at 12v 450mA output, and run from ac input voltages from 80v (minimum voltage in Japan) to 265v (maximum voltage in Australia). They also run directly from a dc input voltage of from typically around 30 to 35 volts up to 400 volts dc.

The very first ones I ever bought had SM-12 printed on them, but others purchased since have different type numbers or nothing at all printed on them. Available from many suppliers on e-bay and Ali in various dc output voltages. These have excellent voltage regulation and are short circuit proof. Very cheap, reliable, and robust. Ideal for solar projects at 48v or above. I now use these in just about every project.

They are sometimes described as being buck regulators, but they definitely are not.
They are all fully (transformer) isolated for full mains voltage between input and output.
Easily recognizable from a picture for what they are.

The specification says 80v ac minimum or 100v dc minimum. That is true only if you need the full 450mA output.

They work down to much lower dc minimum input voltages than that, and depending on the manufacturer or batch, they vary quite a lot for minimum start up voltage. Once started up, they keep running down to even lower input voltages.

We are usually only powering a bit of CMOS, some opamps, or maybe an isolated mosfet gate driver, requiring only a very few milliamps, so these supplies will be running almost at zero load.
As a result, they are quite usable down to much lower dc input voltages than the specification suggests.
 
Last edited:
Here is a picture of my version two circuit board in the final stages of completion, showing the two small SM-12 power supplies in the middle.

I used plug in screw terminal blocks, which makes it very easy to swap in another board or change mosfets very quickly, without needing to use a soldering iron to do it.

The choke is a standard off the shelf 15 amp commercial light dimmer choke. I bought a whole bunch of them many years ago for another project.

While its certainly possible to wind your own, the heavy solid copper wire required is not that user friendly, and its just not possible to make something that turns out as neatly as a commercial machine wound product.

The whole thing will eventually bolt onto a 3mm aluminium plate to hold it all together and provide a heat sink.
I plan to buy a long length of 3mm x 100mm flat bar, and just saw it up into suitable lengths for each controller.

The electrolytics are hugely oversized, but I have a lot of those here too, so that is what I used.
The whole thing is based around parts I already have here.
Its big and clunky for what it does, but it certainly works very well !!
 

Attachments

  • 2022-10-25_0001.jpg
    2022-10-25_0001.jpg
    1,003.4 KB · Views: 91
Thanks. I was also wondering if these would work with 12v panels and batteries though?
 
Not as it now is.

Those SM-12 power supplies need at least 35 volts dc input to start working, and a Shottky diode would be much better at lower voltages than the fast recovery diode I used. The whole circuit would need some significant changes to work down at 12v.

The circuit as drawn, is really more suitable for a higher voltage battery, and high to very high solar input voltage.
 
Hmmm I was wondering though if I replaced the sm-12s with a 12v linear regulator. Thanks
 
The SM-12 dc output is fully isolated from the dc input.
A linear regulator shares a common ground between input and output.
Isolation is definitely a requirement for the mosfet gate driver supply, which is why there are two separate 12v supplies.

The TL494 can work directly from between 7v and 40v (42v absolute max).
For a 12v or maybe even a 24v system it would work directly from the dc solar input voltage, and would not require an SM-12.
The SM-12 is only required for a 48v system or anything higher than 48v.
Here is the datasheet for the TL494:
https://pdf1.alldatasheet.com/datasheet-pdf/view/5775/MOTOROLA/TL494.html

You will still need to arrange for a 12v isolated dc supply for the mosfet gate driver, and that should be possible.
Also use a suitably rated Shottky diode for the buck regulator.

Twelve volt operation is certainly possible, but it will require some changes from my original circuit.
* Remove PS1 and run the TL494 direct from the solar dc input voltage (as long as that is below 40v max).
* Replace PS2 with a suitable fully isolated 12v supply that will work over your solar input voltage range.
* Use a suitably rated Shottky diode and mosfets.
 
  • Like
Reactions: Ace
In that case a optocoupler with a 12v regulator would work I guess? Anyway thanks a lot for the advice. Will give an update once I finish building the circuit.
 
Back
Top