In my previous instructables I described the details of energy monitoring of a off grid solar system.I have also won the 123D circuits competition for that.You can see this ARDUINO ENERGY METER.

Please vote for me.....

In solar power system, charge controller is the heart of the system which was designed to protect the rechargeable battery .In this instructables I will explain the PWM charge controller.

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.

Solar power have the advantage of being less maintenance and pollution free but their main drawbacks is high fabrication cost, low energy conversion efficiency. Since solar panels still have relatively low conversion efficiency, the overall system cost can be reduced using a efficient solar charge controller which can extract the maximum possible power from the panel .

What is a Charge Controller ?

A solar charge controller regulates the voltage and current coming from your solar panels which is placed between a solar panel and a battery .It is used to maintain the proper charging voltage on the batteries. As the input voltage from the solar panel rises, the charge controller regulates the charge to the batteries preventing any over charging.

Types of Charge controller :


2. PWM


The most basic charge controller(ON/OFF type) simply monitors the battery voltage and opens the circuit, stopping the charging, when the battery voltage rises to a certain level.

Among the 3 charge controllers MPPT have highest efficiency but it is costly and need complex circuits and algorithm.As a beginner hobbyist like me I think PWM charge controller is best for us which is treated as the first significant advance in solar battery charging.

What is PWM:

Pulse Width Modulation (PWM) is the most effective means to achieve constant voltage battery charging by adjusting the duty ratio of the switches ( MOSFET ). In PWM charge controller, the current from the solar panel tapers according to the battery’s condition and recharging needs. When a battery voltage reaches the regulation set point, the PWM algorithm slowly reduces the charging current to avoid heating and gassing of the battery, yet the charging continues to return the maximum amount of energy to the battery in the shortest time.

Advantages of PWM charge controller :

1. Higher charging efficiency

2. Longer battery life

3. Reduce battery over heating

4. Minimizes stress on the battery

5. Ability to desulfate a battery.

This charge controller can be used for :

1. Charging the batteries used in solar home system

2. Solar lantern in rural area

3. Cell phone charging

I think I have described a lot about the background of the charge controller.let starts to make the controller.

Like my earlier instructables I used ARDUINO as the micro controller which include on-chip PWM and ADC.

Remove these adsRemove these ads by Signing Up
1-40 of 198Next »
4-tech3 days ago

Nice project/work Debu ,

I want to know how much runtime u get when circuit is on load. How much time it takes to charge the battery. I am developing the same project. So i want to know whats the runtime and wattage rating of your circuit when turned on


Pratik .R. Bhagat

Hi sir,,

my solar panel readings are : Voc between (15 to 20 voltage) & Isc (1 to 2 A). and i want to charge 12V battery .

so can i use your software for this readings , Please told me if i need any changes.

please give me full calculation . Please reply me on my email: & and i need your contact number for help..

Thank you ...

deba168 (author)  mohammadkhan3 days ago

My software not work for this.Wait for few days more.I will post the updated version of my controller which is suitable for you.

deba168 (author) 5 days ago

I am now upgrading my charge controller.The new version has automatic battery voltage selection for 6/12 v .Automatically charge setpoint according to the battery.No need to change any hardware as well as software for 6V or a 12 V system.Solar panel up to 100w/12v can be used.

I will post the details soon.Thanks to all for your support and motivation for this .

That is going to be great. Thanks.

I have breadboarded the PWM solar battery charger controller and it is functioning. Once I get it into an enclosure I will post a picture of the completed unit. I placed D1 as called for in the schematic. Then I read in the comments about moving it between Q1 and the battery. I am
going to move the it (D1) between Q1 and battery as suggested and see what
change that will make. Thanks deba168 for designing the system and posting such a very good Instructable.


wow.whenever you complete post the pics.

Adjust the brightness of lcd by adjusting the backlight resistance.So that it looks good.

raveltan243 months ago

sir can you indicate what is the number of pwm? cause my aceduino has pwm1, pwm3, pwm5,pwm7,pwm9.

deba168 used pin 6 (timer 0) for generating the PWM signal.

ASCAS made it!2 months ago

Thank for the project! I finally finished my small scale solar conversion project. I removed the LCD to conserve electricity.


BTW, congrats on the home-automation contest! :D


Using the quick connect speaker jacks was a good idea. I used that on my 7805 5v reg power supply too! Good work!

deba168 (author)  ASCAS2 months ago


Hey its looking nice :)

jurgemeyer21 days ago

How about if im using a 12v 7.2Ah Battery, and Solar Panel 15W Voc 21.6V what i change in the hardware?

deba168 (author)  jurgemeyer19 days ago

Please follow the old comments

sir can you make a pcb layout in eagle?

deba168 (author)  jurgemeyer13 days ago

I am also interested to make the PCB but I have not much experience on making PCB.If any one in this community make ,please share it.

may i see a another picture of your board?

deba168 (author)  jurgemeyer11 days ago

Which board you are talking ??

the charge controller board not the arduino

deba168 (author)  jurgemeyer11 days ago

I posted all the pics.No additional pics.

why i can't see a capacitor on your video? tia

deba168 (author)  jurgemeyer21 days ago

Voltage divider for solar panel :

Input voltage: 21V to 25V (no load)
R1: 15k ohm or 150k
R2: 2.5k ohm or 25k

Output: 3.571 which is less than 5V

Voltage divider for battery :

Input voltage: nearly 14 to 15V ( for a fully charged battery)

R1: 15k ohm or 150k
R2: 4.7k ohm or 47k
Output voltage: 3.579

I suggest to use 150/25 or 150/47 combination as power loss (I2R loss) in this case is less, but you will still get the same output from the divider.You can also choose any other value near to it.

Other than voltage dividers the other parts are now suitable for me?

deba168 (author)  jurgemeyer17 days ago

Yah other parts are suitable for you.

thanks i post a picture tomorrow.

sir does the 12v system uses 12v battery?thanks i advance

deba168 (author)  anthony.pablo213 days ago

Ya 12v sytem uses 12V battery.

logit66714 days ago

What about a 240 watt panel charging 2 12v lead cell Truck batts

37.4 volts ocv

deba168 (author)  logit66714 days ago

It will not work.Simply damaged due to excess current.This controller is designed for small rating solar panel.Yours is too large.

What about upscaling the components

deba168 (author)  logit66714 days ago

you can upscale the following components



Voltage divider resistors

Along with the hardware you have to modify the software also.

Hi! Can this be used for wind turbine?

deba168 (author)  kulas.aidele16 days ago

No..For wind turbine it need a dummy load.

Hi! Can this be used for wind turbine?

Hi, can this circuit be modified to redirect the current from the solar panel to a dummy load during the "off state" of the PWM to prevent damage to the solar panel?

deba168 (author)  julian.dabbs16 days ago

You can modify it.

henryx717 days ago

Hey I plan on using your plans for a school project, I was wondering if there was anyway to power the Arduino from the battery being charged. Would you just use a voltage divider on the battery to convert it to, lets say, 9v and plug that into the DC power jack?

deba168 (author)  henryx717 days ago

You can power the arduino by taping it from the battery being charged.The best way is use a 7805 voltage regulator and connect the 5V out put from it to dc jack provided in the arduino.

You can refer the following link.

hi, Really cool project n very instructables, nice!!

Anyway, i’ve made the 12v system version on my project
board, but i have problem with voltage sensing display on the LCD and also
percentage of charged. Didnt match with the real value

Is “2.43v is eqv to 520 ADC” part constant formula ? is it also suitable if i use different voltage divider resistance value (for 12v sys)with

1-40 of 198Next »