Instructables user deba168 is an electrical engineer based in India. He posted a tutorial to solve a common problem in his country:
In India most of the people are living in rural area where national grid transmission line is not reached till now.The existing electric grids are not capable of supplying the electricity need to those poor people. So renewable energy sources (photo voltaic panels and wind-generators) are the best option I think. I know better about the pain of village life as I am also from that area. So I designed this DIY solar charge controller to help others as well as for my home.You can’t believe, my home made solar lighting system helps a lot during the recent Cyclone Phailin.
He then made a charge controller running on the Arduino Uno and with an important task: to protect the rechargeable battery of photovoltaic systems. It regulates the voltage and current coming from the solar panels and it’s placed between a solar panel and its battery . It is used to maintain the proper charging voltage on the batteries so as the input voltage from the solar panel rises, the charge controller regulates it, preventing any over charging. It works on the principle of PWM which improves efficiency of the solar PV systems.
You can follow all the steps on his page but first take a look at the video: