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.

Finally I post my new version-3 charge controller.The new version is more efficient and works with MPPT algorithm.

You can see it by clicking the following link.


You can see my version-1 charge controller by clicking the following link.


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 259Next »
AlberA13 days ago

How hard is it to build one... for person that have just worked with arduino and stuff like this for 1 month. Will i have to calculate stuff or do i just need to follow your steps.

the_mini_guy11 months ago
amazing detail. I will defiantly build one. quick question. is this design ok for wind turbine charging?

Wind turbine chargers usually have a dump load circuit. That is for when the batteries are fully charged or the turbine is supplying more than the load, it dumps the power into a power resistor or heater to keep the turbine from over speeding. It might not be necessary if the turbine regulates its own speed, but usually putting the power to use like in heating water is preferred to just letting the turbine idle.

brilliant. thanks for the share. I built the vertical axis wind turbine yesterday and next week I will commence playing withe the motor and charging circuit. I will inlude your comments into my design and post an Instructable in due time.

Which motor used in wind turbine


deba168 (author)  the_mini_guy11 months ago

I think it should work..wind turbine input must be connected in parallel to solar panel

But I never tested it,you can of luck

merra10 months ago

hye. I've made the solar charge controller circuit. but the problem is when the solar is disconnected, the circuit still reads the solar voltage. it is supposed to be 0 V. Couldn't seem to find what the problem is. can you help? thank you.

vish r merra20 days ago

Hey U need to ground analog pin after removing solar panel .

Analog pin in ardiuno needs closed path.

deba168 (author)  merra10 months ago

Place the diode D1 in between MOSFET Q1 and battery .It serve the same purpose as before .I think it will work.If it works then tell that any one facing the same problem can rectify.

merra deba16810 months ago

the diode has been placed, but nothing happened. diode D1 at the input after solar don't have to be changed right? just add the same diode between the battery and mosfet is it? or is it something to do with the coding?

I am doing the same project but I am going to use a 50 watt solar panel so is it ok to use this circuit?

Hi if I were to use a 5v solar panel and a 7v rechargeable battery... What do I need to consider for the circuit... How do I get the correct resistance value for the voltage sensor?..

hye..can you guide me on how to design this controller to have both solar panel and electrical supply (ac) as the input?

sir why does the code doesnt work with my arduino uno?can you give the code for the 12v system?thanks in advance sir

deba168 (author)  anthony.pablo21 month ago

I have made a charge controller which is suitable for both 6V and 12V.

You can see it from the link bellow.

deba168 (author)  anthony.pablo21 month ago
(removed by author or community request)

sir is the code for arduino uno and arduino nano differ from each other?cause my lcd is a 16x2 while the version 2 is 20x4

The driver doesn't work.
I've tried to connect pin D2 to base of BJT,tried 2N3904 and 2N2222,either works.
But if connected pin D2 to MOSFET directly,it works.

The voltage of D2 is 5V while the program outputed it as digital high.But drops into 0.6V while connected to base of BJT.
I guess that's reason since 0.6V is less than Vbe.But my resistors are same as picture shows.I even tried smaller resistor,not working.
If I connect Vcc via R1 to base of BJT,it also drops into 0.6V and not working.
If connect Vcc to base of BJT directly,arduino got a shortcut.

Please give me some advice.

deba168 (author)  zhaoyou.huang.91 month ago

The driver works for me.The output from the driver is complement of the arduino signal.If you send 5V (HIGH) from arduino you will get 0V (LOW) at output.

sanusername1 month ago

Great work sir

i am working on the similar project but i need to convert the 6V dc output from this circuit to the ac current (with at least 1A rating)

Please guide me how can i do that (which inverter or circuit to use )

deba168 (author)  sanusername1 month ago

Thanks :)

You have to use a inverter for converting DC to AC.

AymanS21 month ago

guys can anybody tell me where to go if i want to build a solar charge controller but for a bigger system 12V 100Ah batteries

deba168 (author)  AymanS21 month ago

You can look into my version-2 controller.It is for bigger system.

JimC61 month ago
Can i use a 10 watt solar panel in this solar charge controller?
deba168 (author)  JimC61 month ago
emlaabs made it!1 month ago

here its not hooked up to the the panel, battery, or a load but it works! Nice tutorial, Thanks a bunch!!

deba168 (author)  emlaabs1 month ago

Hey congrats :)

Thanks for sharing the pics.

Monitor the energy production of a wind turbine with GREEN POWER METER :

Hi I'm Building the same project but I need to use a 4 by 20 lcd display and it has to display vols, current, pwr, enrgy and temperature. Can you advice me on that? By the way can i use a small solar panel?

deba168 (author)  imran.pancrazio1 month ago

Hey I have made my version -2 charge controller which have same feature what you are planning.

premal.tailor3 months ago

Hi, I am trying to connect a solar inverter to the load end of the charge controller circuit that you have designed, however connecting to the positive and negative terminals does not turn on the inverter. Any advice would be appreciated!

Specifically, is there a way to have a load budgeting function, with an inverter connected to each of the mosfets instead of directly to the battery?

deba168 (author)  premal.tailor2 months ago
Yes you can implement it.You have to modify the code and load MOSFET.
Good idea :)
deba168 (author)  premal.tailor2 months ago

Sorry for the late reply.

The load terminal will only activate when it is night.If you connect the load during day it will not work.To activate through out the whole day you have to modify the code.

If you want to connect the inverter directly to the load termina,l be sure that the load MOSFET has capability to giving the peak current drawn by the inverter.

Hey could you help me with solar micro inverter means what could be the steps to make the project?

deba168 (author)  trivedichandresh42 months ago

Sorry I don't have much knowledge on micro inverter.

Still now not tried :)

nnur12 months ago

If the battery is rated at 12V, and the supply is 21-25V, won't the high supply voltage damage the battery? At 100% duty cycle, the full 21-25V goes into the battery, right? So the full 25V is going into charging the 12V rated battery, or is the supply voltage needed to reduced to 12V?

I would love an answer because I am afraid of doing it if it'll damage the battery. Thank you!

deba168 (author)  nnur12 months ago

No it will not damage your battery. When the solar panel connect to battery it pulls the solar panel voltage to battery voltage. You can try without worrying. Best of luck.

sabah_s282 months ago

what about during discharging, will there be any problem faced?

1-40 of 259Next »