Instructables
Picture of ARDUINO SOLAR CHARGE CONTROLLER (PWM)
Presentation1.jpg
534398599d29c92a1d000022.jpg
536998d1f92ea14de2000012.jpg
534397e09d29c92a1d000020.jpg

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 :

1.ON OFF

2. PWM

3. MPPT

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 159Next »
jurgemeyer5 days ago

who can make a shield for arduino like this? I need help :(

what is your problem?

can i see your work? do you have a own diagram?

My circuit is same Deba168

only

Place the diode 1n4007 in between MOSFET Q1 and battery.

how about if im using a 20w solar panel and 12v battery? what a modification that i change?

What is your panel voltage and battery cycle use voltage ?

example;

panel voltage: 18.5

cycle use : 14.4

You should read reviews

/*

Alv001 Code modify

My solar battery generated about 18.5 V. Three parallel connected 12V 7Ah batteries.
My sketch modifications for 12V system:
..............
if ((solar_volt> bat_volt) && (bat_volt <= 6.96 * 2))
{
analogWrite (PWM, 242.25); / / @ 95% duty / / Boost charging / / most of the charging done here
}
else if ((solar_volt> bat_volt) && (bat_volt> 6.96 * 2) && (bat_volt <= 7.2 * 2))
{
analogWrite (PWM, 25.5); / / 10% duty / / float charging
}
..............
Battery charging voltage of 16-17V. It's too much! When working in this mode, the battery life is very limited.
I changed the sketch as follows:
................
if ((solar_volt> bat_volt) && (bat_volt <= 6.96 * 2))
{
analogWrite (PWM, 15); / / @ 5.9% duty / / Boost charging / / most of the charging done here
}
else if ((solar_volt> bat_volt) && (bat_volt> 6.96 * 2) && (bat_volt <= 7.2 * 2))
{
analogWrite (PWM, 10); / / 3.9% duty / / float charging
}
.................
Now max battery charging voltage 14.5V. In this mode batteries will working live longer.

/*

etc.

hi, Really cool project very instructables, nice!!

I want to connect inverter(100W)------->ırf540 output İs this a problem?

How is the output signal to battery terminal ? İs it a pwm (square wave)? 6.4V-0 pwm

thanks advance

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
it?

deba168 (author)  chrismarshal2513 days ago

No it is not a fixed formula..

The best way to learn this is,make a voltage divider and measure the out put voltage by a multimeter then connect this to any analog pin of arduino. read the value in serial monitor.

Compare this analog pin value with the multimeter reading.

like multimeter reading say 2.43V and Serial monitor reading is 520.

Thank you very much Deba, it works :)

but i'm still wondering one thing

about "charge controller can be used for (6/12/24v and 5A)"

according to the datasheet from diode 1N4007, its maximum
average forward rectified current is 1 A, how come this diode can be capable
for delivering 5 A

would u please give explanation about that Deba?

Thanks in advance,

deba168 (author)  chrismarshal257 days ago

OOPS..

You notice the right point.Thank you for noticing the mistake.

You have to replace the diode with a higher rating.

Please upload few pics of your controller and share if you have made any modification.

Enjoy :) :)

alv0012 months ago

My solar battery generated about 18.5 V. Three parallel connected 12V 7Ah batteries.
My sketch modifications for 12V system:
..............
if ((solar_volt> bat_volt) && (bat_volt <= 6.96 * 2))
{
analogWrite (PWM, 242.25); / / @ 95% duty / / Boost charging / / most of the charging done here
}
else if ((solar_volt> bat_volt) && (bat_volt> 6.96 * 2) && (bat_volt <= 7.2 * 2))
{
analogWrite (PWM, 25.5); / / 10% duty / / float charging
}
..............
Battery charging voltage of 16-17V. It's too much! When working in this mode, the battery life is very limited.
I changed the sketch as follows:
................
if ((solar_volt> bat_volt) && (bat_volt <= 6.96 * 2))
{
analogWrite (PWM, 15); / / @ 5.9% duty / / Boost charging / / most of the charging done here
}
else if ((solar_volt> bat_volt) && (bat_volt> 6.96 * 2) && (bat_volt <= 7.2 * 2))
{
analogWrite (PWM, 10); / / 3.9% duty / / float charging
}
.................
Now max battery charging voltage 14.5V. In this mode batteries will working live longer.
What is the battery charging voltage on your system?

ChứcN alv00128 days ago

i have system same to you. 20w solar panel, 21V Voc, 12V 5Ah battery. Can i use your code for my system

alv001 ChứcN27 days ago

yes, of course

sir alv001, i have system same to you. 30w solar panel, 500w inverter, 12V 17Ah battery. Can i use your code for my system too?

sir alv001, i have system same to you. 30w solar panel, 500w inverter, 12V 17Ah battery. Can i use your code for my system too?

ChứcN alv00127 days ago

Could you please tell me change hardware!

Thank you in advance!

raveltan2417 days ago

sir deba, i'm trying to control an inverter w/c output is 220v and my solar panel is 30w and my battery is 14.9v max charge, can you give sir an edited version of your solar charge controller that can handle this 220v load. please reply sir deba

ChứcN28 days ago

HI! Could you help me for my solar system, i use 12V 5A battery, 20W solar panel. I use your schematic is ok?

Thanks in advance!

deba168 (author)  ChứcN28 days ago

My pleasure ..

You have to modify both in code as well as hardware..

Go through the comments I have explained for 12V system.

parth_bhat28 days ago

hi,

am planning to make this project. but my use for this project is really very different.

i want to power 2 net boxes 5v and 9v respectively .

and i want it running 24X7 with the 2X6v battery and one 10v solar pannel and one 5v solar pannel.

so can you please suggest me what modifications do i need to make in your project so that it can be used for this purpose.

regards

Parth Y. Temkar

Moncer08.1 month ago

Hello! In this scheme, as the load may be a board arduino uno ??Thanx

ASCAS made it!1 month 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

a.jpgb.jpgc.jpgd.jpg
deba168 (author)  ASCAS1 month ago

thanks.

Hey its looking nice :)

volthaus1 month ago

What are you using for the load? Did you build it? I'll be starting to put this together soon with a 27v portable panel.
Thank you.

deba168 (author)  volthaus1 month ago

I used led light for load.Yes I have build it.If you made this please share pics or any modification.

if my solar panel open circuit voltage is 22v i can change a diode maybe for 25v zener diode?

deba168 (author)  richard.cornejo.3151 month ago

Yes you can use it ..It is used for over voltage protection.If the voltage is more than 25v then it will grounded.

and now, can i connect 2 145watts solar panels in the same charger?, i will put 2 zener diodes? o it will grounded?

iman28aban1 month ago

I just have read this "mini solar power energy system" very enthusiastically and as an electronic engineering student I would say it's amazing, it contributed me a lot. congratulation to you, this is a cutting edge and breaking the ice...

I'm interested in DC-DC buck and boost converters and more in designing inverters and will be very glade to help you if you want.

I hope I can give you a something in return for this step by step tutorial.

god bless you man!

iman28aban@gmail.com

deba168 (author)  iman28aban1 month ago

Thank you so much..

I want to make a arduino based pure sine wave inverter .can you help me ?

Hi deba168!

very nice, simple and clean explanation for your instructable!

I'm working on an Arduino YUN based anemometer and your instrctions are very useful!

There's
one thing I would like to know, indeed. I use a 6V battery but I would
like to use a 22V peak voltage solar panel, since this is what I've got.

I
made the circuit on a breadboard and it seems to work fine but these
days the sun is not so shiny, so I'm not so sure... If I measure the
voltage on the solar panel during charge I can see 7.25V, while the
battery is 6.59V (discharged, ok!). The difference, well, across the
diode. That's ok.
So, the battery forces the panel to work at
(battery voltage + diode drop), is it right? if so, using a 22V peak
voltage solar panel shouldn't be a good idea for 6V charging because
its MaximumPowerPoint (MPP) is around 15V, so far from 6V.
So, the question: which solar panel is best fitting? the one with MPP near battery voltage?

And,
second question: if I use, however, a higher peak voltage panel, the
only things I need to pay attention to are the maximum current flowing
and the voltage drop across the diode? is this right?

deba168 (author)  supermarioprof1 month ago

As per my knowledge I think 22 volt peak solar panel is not good for charging the 6V battery.You are right when a 22V panel is used the current delivered by it is more but the problem is that it charges the battery very quickly.Lead acid battery chemistry is not suitable for quick charging.

Another option is step down the solar panel voltage by using a voltage regulator or a buck converter.But all these involves losses in the system.So your overall efficiency will be reduced.

I request you to use a solar panel with peak voltage 10 to 12 v.

ASCAS2 months ago

Hey friend! Want to do a collaboration together of a revamped version? Recently, we bought a $90 - 150W solar panel for our grandparents. The original plan was to buy a charge controller but your brilliant tutorial inspired me to design & build one. What do you think? :D

deba168 (author)  ASCAS2 months ago

We can combine my energy meter and chargee controller together.. Instead of using a 16x 2 char LCD we can use a 20x4 char LCD for display..

ASCAS deba1682 months ago

Great idea! I'll go to the shop and buy some parts. In the meantime, I'll design a PCB for the whole controller. BTW, if I were to use a 150W - 22v solar panel, should I regulate the voltage by lowering it? Is the 22v pulse safe for the 12v?

deba168 (author)  ASCAS2 months ago

No I think it will not create any problem..

Angelo see what I am thinking for the new version lcd display :)

IMG_20140721_203042.jpg
deba168 (author)  ASCAS2 months ago

Sure ..we can make a better version :)

BLR_RAVI3 months ago
deba..just some doubt..solar panel is a current controlled device...so if we select the solar cell which can give 10%of battery ah...then we only need a comparator to stop charging once the battery is fully charged..another oscillator comparator just float charging...it is very cheap..then why so much complicated circuit??also in pwm we are just reducing the voltage ...but how we control current precisely ...?
deba168 (author)  BLR_RAVI3 months ago

what you are talking is known as on off charge controller. But in pwm charging it improves the battery life due to less stress and sulphation.In my case corrunet is not controlled precisely if you need then use a lm317 regulator after the pwm output.

1-40 of 159Next »