Instructables

ARDUINO SOLAR CHARGE CONTROLLER (PWM)

FeaturedContest WinnerContest Winner
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(6/12/24v and 5A) 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 131Next »
iman28aban2 days 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)  iman28aban2 days 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)  supermarioprof2 days 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.

ASCAS10 days 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)  ASCAS10 days 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 deba1689 days 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)  ASCAS8 days 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)  ASCAS10 days ago

Sure ..we can make a better version :)

BLR_RAVI1 month 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_RAVI1 month 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.

deba..i am talking about the float charge...when you make pwm as 10% ..in float ..the output voltage will be ..10/100x10 volts=1volt...then how can it float charge a 6volt battery..

Hello, I want to make AC Solar Panel. I wish to connect Solar panels to input of inverter and get 220v AC at the output to power fans or lights. Is there any way to achieve it? Please guide me.

deba168 (author)  Ravundra Pardeshi22 days ago

Yes u can connect your solar panel directly to any inverter it will work.But just keep in mind to maintain appropriate voltage range.The output of the solar panel is not a fixed voltage tarher it varies according to the sun light.

So you can use a charge controller to control the voltage.

sorry, I have forgotten to mention that I don't want to use battery anywhere.

deba168 (author)  Ravundra Pardeshi20 days ago

Though I have not tried yet, but I think if you connect the charge controller out put to the inverter instead of battery,it will work.

Thanks Deba

raveltan2421 days ago

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

raveltan2422 days ago

sir @deba168, i just want to ask, i try to compile and upload your code in my aceduino but there is a red text appearing when i finished the uploading of the code.. can you help with this sir??here is the image

Untitled.jpg
deba168 (author)  raveltan2422 days ago

There are several reason for getting the highlited error.The most common is COM port.

Go through the following link ,I think you will fix your problem.

http://www.instructables.com/id/A-solution-to-avrdude-stk500getsync-not-in-syn/

thank you very much sir. i did it now and it runs! thank you sir

Untitled.jpg
joly khan1 month ago

I am designing solar charge controller for 12V battery.Charge controller is DC-DC step up inductor less converter in which BJT switches used.This charge controller output should be fixed at 14V i.e. battery charging at constant voltage.I need assistance in this design,can you guide

deba168 (author)  joly khan22 days ago

Sorry I am not getting your question.Can you please describe in details.

alv00129 days 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?

Congratulations!!! for winning double contests :) and all the best for the third one :).

deba168 (author)  Tarun Upadhyaya1 month ago

Thank you tarun bhai..

ornokst1 month ago

dear dada...finally I made your circuit...but one problem ...solar charge indicator in LCD never been 0.00... it always had shown some quantities even I disconnect solar panel's contacts....what can I do now? please inform me...

thanks again

orno

deba168 (author)  ornokst1 month ago

wow..

Place the diode D1 in between mosfet Q1 and battery .( instead of before Q1).

I think it will work..

Wow... congratulations... you are a double winner :)

deba168 (author)  Tarun Upadhyaya1 month ago

thanks

one winner and one finalist..

Oh.. Right.. They have chosen 23 finalists. Fingers crossed :D
ornokst1 month ago

MR. deba...I'm so much interested on your project but I burnt my circuit last night....It'll be great pleasure if U submit a youtube video about circuit components connection .....thank you very much.

deba168 (author)  ornokst1 month ago

thanks for your interest..

I am very sad to know that your circuit burnt..

I am sorry, I don't have any video for step by step connection.To make the video I have to remake everything.Try everything on a breadboard first.

All the best..

jgluch1 month ago
First of all, great instructable. I just had a quick question. Do you run all of the common grounds in the circuit (including the battery, load, solar panel) to the ground on the arduino? Or just a common bus? Or are the LEDs the only thing connected to arduino ground? Thanks
deba168 (author)  jgluch1 month ago

thanks for your appreciation..

I connected all the grounding together including LED.

strewfold2 months ago

thank so much..

if i use, the input PV with 10wp, and i use battrai 12v 6Ah,

what the component i have to change, ?

i use the output (load) for power amplifier which need 12v input...

deba168 (author)  strewfold1 month ago

Just change the resistor of two voltage dividers .

I think no need to change other components.

deba168 (author)  strewfold1 month ago

Please see my recent comment for 12V system.I think it will be helpful for you.

deba168 (author)  strewfold2 months ago

please go through the comments section

I have already explained for a 12v system.

strewfold deba1682 months ago

thanks..for best answer...

:-)

1-40 of 131Next »