Now a days the most advance solar charge controller are Maximum Power Point Tracking (MPPT). These controllers are more expensive than the PWM charge controllers, but it has several advantages in compare to. The MPPT charge controllers are used for extracting the maximum available power from solar panels for charging battery under certain conditions.
Of corse, you can buy one because to build one require some basic knowledge of electronics.
MPPT circuit is based around a synchronous buck converter circuit.
I shall not insist upon it. There are lot of knowledge on this site. A good job was made by Julian Ilett, who put a lot of youtube tutorials waiting for you.

First you can try one of that kind of converters and after a little encouragement and success you cant start an new project if you don`t keep reading the last one of these:

– Tim Nolan web archive page, with folowing link

Arduino powered solar battery charger

Arduino solar charge controller

Arduino based MPPT solar charger controller

I thanks to all of them for sharing their knowledge. The first one is Tim Nolan who initiated this adventure. And I think you will not be the last who will try.
Now I can not tell you “Abandon all hope, ye who enter here.” but will not be so easy and you may try that just one more time in your life.
All of these enthusiasts was inspired me to build one, and finish this project.

In this page deba168 wrote on 29.07.2016: “I am no more working on this project due to some issues. This controller is not working.

I think you wrong. Your project is living. Look at here. I have nothing to complain. I just made some little changes, et voila…

In the next image are the waveforms of input signals for the MOSFET`s and the output signal :

oscilloscope

The waveforms are for 5V/div amplitude and 5 us/div timebase.

And this is the image of my functional MPPT Solar Charger powered by an Mono Crystalline Silicon PV Module, with a maximum power of 50W (maximum 21,5V / 3,5A) , for charging a 12 V lead acid battery:


The Arduino code is from from MPPT solar charger build around Tim Nolans open source MPPT solar prototype project updated by Debiasish Dutta in his website, that I made a couple of changes:

And this is the final project image:

final                                    contact this number for the code  +2348106009848