Smart solar charge controller using microcontroller

Smart solar charge controller using microcontroller is designed to charge batteries in a effect way so that it life time can be increased. Pulse width modulation technique is used to charge battery in effect way.PIC microcontroller is used to generate PWM. Liquid crystal digital display is used to show valued of charging current of battery, solar panel voltage, battery voltage and load current. PIC microcontroller is used to display to read all these analog values of voltage and current. Protection is also introduced through programming technique so that in case of excess in current, solar charge controller will stop working. It can handle up to 10 ampere i.e. it is 10 Ampere solar charge controller.




A solar charge controller as it name suggests is used to control flow of charge from solar panels towards batteries. It basically used to determine the rate of flow of charge into battery. It is a kind of regulator which avoid battery from over voltage or overcharging.

Why we need of solar charge controller :

Use of batteries with solar panels is usually not good. So to avoid failure of batteries before time solar charge controller is used. For example you have a 12 volt battery and you want to charge it with 12 volt solar panel. 12 volt solar panel outputs 17-20 volt. So these 17-20 volt may damage battery due to over charging, because batteries maximum charging voltage is usually between 13.5-14 volt. To avoid this issue we need to develop a regulator which can control flow of charge from solar panel towards battery. Solar charge controller is used for this purpose. In this project, I have used PWM control to avoid overcharging.

PWM charge controller :

There are many techniques used to make solar charge controller. But In this project I have used PWM (pule width modulation control technique. In coming articles, I will also write article on latest technique use in solar charge controllers” Maximum power point tracking”. To get into about this MPPT article subscribe to my blog my your email to get info about MPPT charge controller in your inbox. Coming back to PWM charge controller, PWM  charge controller used a semiconductor device like MOSFET, IGBT as a switch to control the flow of charge into battery by changing the duty cycle. Duty cycle ratio changes from maximum value to minimum value as battery charging reaches minimum to maximum value.

If you don’t know about what is duty cycle and what is varying duty cycle.I suggest you to go through following article before reading this article further.

What Pulse width modulation and duty cycle ?

Circuit Description :

Solar panel and battery voltage measurement :

Difference amplifier is used to measure solar panel voltage and voltage divider is used to measure battery voltage with the help of analog to digital converter of pic microcontroller. But now the question come into mind, why voltage divider is not used to measure voltage of solar panel. There are two reasons :




1) Because solar panel voltage keep fluctuating according to intensity of light

2) Because we are charging battery with respect to negative terminal of solar panel.

To know more about how measure voltage using pic microcontroller go through following article :

Voltage measurement using pic microcontroller 
MOSFET as a switch and MOSFET driver :

IRF3205 is used as a switch to vary duty cycle according to amount of change in battery.Totem pole is used a MOSFET driver to drive mosfet irf3205.

To know more about working and circuit diagram of this project watch following video.


Smart solar charge controller tutorial by bilalmalikuet

Complete PCB of project :

Complete PCB layout of smart solar charger controller using pic microcontroller is shown below :

PCB layout of smart solar charger controller using pic microcontroller

PCB layout of smart solar charger controller using pic microcontroller

Complete PCB design of of smart solar charger controller using pic microcontroller :
Top view :
PCB design of smart solar charger controller using pic microcontroller

PCB design of smart solar charger controller using pic microcontroller

Front view :
front view PCB design of smart solar charger controller using pic microcontroller

front view PCB design of smart solar charger controller using pic microcontroller

If you like this article, kindly Don’t forget to share it with your friends on social media. Good luck for your project.  I recommend you to write your own code for this project. But if you want to purcahse code smart solar charge controller contact me at bilalmalikuet@gmail.com

24 Comments

  1. idreesmuhamed October 9, 2014
  2. huzaizie October 20, 2014
  3. rewaa November 7, 2014
  4. JAMES OBIALOR December 1, 2014
  5. Mehmood December 9, 2014
  6. siddharth dutta January 21, 2015
  7. mostafa nada February 3, 2015
  8. Ramin February 5, 2015
  9. majid March 12, 2015
  10. Farooq Ahmed Malik March 18, 2015
  11. Farooq Ahmed Malik March 18, 2015
  12. MOKMAS April 8, 2015
    • BILAL Malik April 8, 2015
  13. eli duhon April 14, 2015
  14. Sang Sangkam August 28, 2015
    • BILAL Malik August 28, 2015
  15. raihan August 21, 2016
  16. chandra prakash October 7, 2016
  17. ali November 23, 2016
  18. Madhura December 5, 2016
  19. uzeyir January 17, 2017

Add Comment

Subscribe to our blog to get updates in your email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,194 other subscribers