0% found this document useful (0 votes)
160 views25 pages

Arduino PWM Solar Charge Controller

This document describes the author's design of a solar charge controller using an Arduino. Some key points: 1. The author previously designed energy monitoring systems for off-grid solar systems and won a competition for one design. 2. This document outlines the design of the author's Version 1 Arduino solar charge controller, which uses pulse width modulation (PWM) to efficiently charge batteries from solar panels. 3. The controller senses the voltage from the solar panels and batteries, generates a PWM signal to control charging, and includes displays and protections like short circuit prevention. It is intended to help power homes and charge devices in rural areas not connected to the electrical grid.

Uploaded by

leventtozkoparan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
160 views25 pages

Arduino PWM Solar Charge Controller

This document describes the author's design of a solar charge controller using an Arduino. Some key points: 1. The author previously designed energy monitoring systems for off-grid solar systems and won a competition for one design. 2. This document outlines the design of the author's Version 1 Arduino solar charge controller, which uses pulse width modulation (PWM) to efficiently charge batteries from solar panels. 3. The controller senses the voltage from the solar panels and batteries, generates a PWM signal to control charging, and includes displays and protections like short circuit prevention. It is intended to help power homes and charge devices in rural areas not connected to the electrical grid.

Uploaded by

leventtozkoparan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

instructables

ARDUINO SOLAR CHARGE CONTROLLER (Version-1)

by deba168

[ Play Video ] from that area.So I designed this DIY solar charge
controller to help others as well as for my home.You
In my previous instructables I described the details of can't believe, my home made solar lighting system
energy monitoring of a off grid solar system.I have helps a lot during the recent Cyclone Phailin.
also won the 123D circuits competition for that.You
can see this ARDUINO ENERGY METER. Solar power have the advantage of being less
maintenance and pollution free but their main
Finally I post my new version-3 charge controller.The drawbacks is high fabrication cost, low energy
new version is more efficient and works with MPPT conversion efficiency. Since solar panels still have
algorithm. relatively low conversion efficiency, the overall
system cost can be reduced using a efficient solar
You can find all of my projects on : charge controller which can extract the maximum
https://www.opengreenenergy.com/ possible power from the panel .

You can see it by clicking the following link. What is a Charge Controller ?

ARDUINO MPPT SOLAR CHARGE CONTROLLER A solar charge controller regulates the voltage and
(version-3.0) current coming from your solar panels which is placed
between a solar panel and a battery .It is used to
You can see my version-1 charge controller by maintain the proper charging voltage on the batteries.
clicking the following link. As the input voltage from the solar panel rises, the
charge controller regulates the charge to the batteries
ARDUINO SOLAR CHARGE CONTROLLER ( preventing any over charging.
Version 2.0)
Types of Charge controller :
In solar power system, charge controller is the heart
of the system which was designed to protect the 1.ON OFF
rechargeable battery .In this instructables I will
explain the PWM charge controller. 2. PWM

In India most of the people are living in rural area 3. MPPT


where national grid transmission line is not reached
till now.The existing electric grids are not capable of The most basic charge controller(ON/OFF type)
supplying the electricity need to those poor people.So simply monitors the battery voltage and opens the
renewable energy sources ( photo voltaic panels circuit, stopping the charging, when the battery
and wind-generators) are the best option I think. I voltage rises to a certain level.
know better about the pain of village life as I am also

ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 1


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.

ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 2


https://www.youtube.com/watch?v=4JALf63qNz0

ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 3


Step 1: Parts and Tools Required :

Parts : 4.TRANSISTORS(2N3904 or equivalent NPN


transistors )
1. ARDUINO UNO ( Amazon )
5. RESISTORS (Amazon / 10k ,4.7k,1k,330ohm)
2. 16x2 CHARACTER LCD ( Amazon )
6. CAPACITOR( Amazon / 100uF,35v)
3. MOSFETS (IRF9530, IRF540 or equivalent)

7. DIODE( IN4007 ) 15.6 PIN SCREW TERMINAL

8. ZENER DIODE 11v (1N4741A) 16. SCOTCH MOUNTING SQUARES ( Amazon )

9. LEDS( Amazon / Red and Green) Tools :

10. FUSES ( 5A) AND FUSE HOLDER ( Amazon ) 1. DRILL ( Amazon )

11. BREAD BOARD ( Amazon ) 2. GLUE GUN ( Amazon )

12.PERFORATED BOARD ( Amazon ) 3.HOBBY KNIFE ( Amazon )

13. JUMPER WIRES ( Amazon ) 4. SOLDERING IRON ( Amazon )

14. PROJECT BOX

ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 4


Step 2: Charge Controller Circuit

I divide the entire charge controller circuit in to 6 sections for better understanding

1.Voltage sensing

2. PWM signal generation

3. MOSFET switching and driver

4.Filter and protection

5. Display and Indication

6. LOAD On/OFF

ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 5


Step 3: Voltage Sensors

The main sensors in the charge controller is voltage let panel voltage = 9V during bright sunlight
sensors which can easily implemented by using a
voltage divider circuit.We have to sense voltage R1=10k and R2=4.7 k
coming from solar panel and the battery voltage.
solar_volt =4.7/(10+4.7)*9.0=2.877v
As the ARDUINO analog pin input voltage is
restricted to 5V, I designed the voltage divider in such let the battery voltage is 7V
a way that the output voltage from it should be less
than 5V.I used a 5W (Voc=10v)solar panel and a 6v bat_volt = 4.7/(10+4.7)*7.0=2.238v
and5.5Ah SLA battery for storing the power .So I
have to step down both the voltage to lower than 5V.I Both the voltages from voltage dividers are lower than
used R1=10k and R2 =4.7K in sensing both the 5v and suitable for ARDUINO analog pin
voltages(solar panel voltage and battery voltage). The
value of R1 and R2 can be lower one but the problem ADC Calibration :
is that when resistance is low higher current flow
through it as a result large amount of power (P = lets take a example :
I^2R) dissipated in the form of heat. So different
resistance value can be chosen but care should be actual volt/divider output= 3.127
taken to minimize the power loss across the 2.43 V is eqv to 520 ADC
resistance.
1 is eqv to .004673V
I have designed this charge controller for my
requirement(6V battery and 5w,6V solar panel),for Use this method to calibrate the sensor.
higher voltage you have to change the divider
resistors value.For choosing the right resistors you ARDUINO CODE :
can also use a online calculator
for(int i=0;i<150;i++)
In code I have named the variable "solar_volt " for { sample1+=analogRead(A0); //read the input voltage
voltage from the solar panel and "bat_volt "for battery from solar panel
voltage.
sample2+=analogRead(A1); // read the battery
Vout=R2/(R1+R2)*V voltage

delay(2); solar_volt=(sample1*4.673* 3.127)/1000;

} bat_volt=(sample2*4.673* 3.127)/1000;

sample1=sample1/150; For ADC calibration refer my previous instructables


where I have explained in depth .
sample2=sample2/150;

ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 6


Step 4: Pwm Signal Generation :

ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 7


PWM (pulse width modulation) is a tecnique by which analogWrite() function.
we simply control a digital output signal by switching
it on and off very quickly, by varying the width of the As Analog output pin is 8bit we can get maximum
on/off duration, it will give the effect of varying the 2^8=256 or a range of values between 0 to 255.
output voltage.
Sending the value 255, to the LED input produces
Vout = Ton/(Ton+Toff)*Vin 100% duty-cycle, which results in full power on a
PWM pin.
Time period (T)=Ton+Toff Sending the minimum value 0, to the LED input
produces 0% duty-cycle, which results in no power on
So Vout=Ton/T*Vin a PWM pin.

Where Ton/(Ton+Toff) *100 or Ton /T *100 is called In Arduino there are 6 PWM pins (3,5,6,9,10 and 11)
Duty Cycle
I used pin 6 (timer 0) for generating the PWM signal.
See the above examples graph (I have taken from Arduino Clock has maximum frequency of 16MHz,this
Arduino website) for better understanding. can be reduce by using the prescaler. By default
Arduino PWM pin have prescaler = 64.
PWM enables a digital output to provide a range of
different power levels, similar to that of an analog So in pin -6 ,I will get a PWM of frequency 976.5625
output. Hz by default.But this frequency is quite high for
battery charging.So I decided to reduce this
The best example is fading a LED with different light frequency to a lower one( 61.035Hz ) by choosing the
intensity.This can be done by arduino, using the prescaler value 1024.

Note : I used this frequency because I found that register we can set the proper prescaler.
maximum PWM charge controller available in the
market have frequency 25/50/100Hz. I don't have Are you thinking it is difficult ? No its very very simple
much expertise in this field.If any one have good just place the single line code given bellow in your
expertise in battery charging ,please comments about program's void setup() part.Everything is done.I check
the right frequency selection for PWM .So that I will this by testing the fade example code given in
modify my code. Arduino IDE,it will generate 61Hz.

How to change the Arduino PWM frequncy : TCCR0B = TCCR0B & 0b11111000 | 0x05 ; //
prescaling 1024
You can adjust the PWM frequency by changing a
register value.The register associated with this is For more details to set the PWM frequency click here
TCCR0B.

By selecting three Clock Select Bits of TCCR0B

ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 8


Step 5: How to Choose MOSFETs:

In my charge controller I used two MOSFETs one is current rating @ 125deg Cel.
for controlling the power flow from solar panel to
battery and other is to drive the load.When I started 4. RDS(on) :
working with MOSFET ,little bit confused how to
select a right one.After reading so many forum I found When a MOSFET is "on," it acts as a variable resistor
that it is so easy.I think any one can choose the determined by the RDS(on) that changes with
MOSFET by using few guidelines.These are the few temperature with a power dissipation calculated by
important parameters which you will need during Iload2 x RDS(on). So choose a MOSFET with
choosing a right MOSFET. smaller value of RDS(on).

Note : 5. Thermal Loss:

I designed the charge controller as per my It can be found from datasheets : the maximum
requirement ,you have to choose the MOSFETs junction temperature and the thermal resistance from
according to your system requirement.The charge junction-to-ambient for the package. The device's
controller rating is mostly depends on MOSFET junction temperature is equal to the maximum
rating.So choose carefully. ambient temperature plus the product of the thermal
resistance and the power dissipation (Junction
Temperature = Maximum Ambient Temperature +
ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 9
Temperature = Maximum Ambient Temperature +
1. N or p channel : (Thermal Resistance x Power Dissipation) ).

when a MOSFET is connected to ground and the load 6. Gate Threshold Voltage VGS(th) :
is connected to supply voltage, it is considered to be
a low-side switch. In a low-side switch, an n-channel This is the minimum voltage required between the
device is used.In my charge controller I used IRF 540 gate and source terminals to turn the MOSFET on. It
for driving the load. will need more than this to turn it fully on.

A high-side switch is used when the MOSFET is 7. Switching Loss :


connected to the supply voltage and the load is
connected to ground. A p-channel MOSFET is Charging and discharging the gate capacitance(Cgs)
usually used in this topology .I used IRF 9530 as the contributes to the switching losses. This loss also
main switching MOSFET for PWM. depends on the switching frequency.Losses
increased with higher switching frequency and gate to
See the schematics how load is connected in both source capacitance.
the cases.
Apart from this , there are several other parameters
2. Drain Source Voltage Vds : you have to consider for a good design.For us I think
it is sufficient.
When the MOSFET is turned off, the whole supply
voltage will be measurable across it, so this rating For more details on how to choose a right MOSFET
should be larger than your supply voltage to provide click here
sufficient protection so that the MOSFET does not
fail. The maximum voltage a MOSFET can handle Power MOSFET has limitations operation in terms of
varies with temperature. voltage, current and power dissipation. The power
MOSFET current rating is related with the heat
3.Continuous Drain Current Ids : dissipated in the devices. This rating will be take in
consideration for designing appropriate circuit to
This is the amount of current the MOSFET can protect power MOSFET against high voltage and
handle.You need to simply select the device that can current, thus cause heat generation.
handle the maximum amount of current including
surges or "peaks".Current rating also decreases with I used a p-channel MOSFET (IRF9530) for switching
rise in temperature. between solar panel and battery and a n-channel
MOSFET (IRF540) for load.
So keep sufficient margin in Ids.It is better to take

For higher rated system you have to choose the


MOSFET accordingly.

ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 10


Step 6: MOSFET Drivers

What is a MOSFET driver : conducting state; and may transiently support both a
high voltage and conduct a high current.
A gate driver is a power amplifier that accepts a low- Consequently, when gate current is applied to a
power input from a micro controller and produces a transistor to cause it to switch, a certain amount of
high-current drive input for the gate of a high-power heat is generated which can, in some cases, be
MOSFET. enough to destroy the transistor. Therefore, it is
necessary to keep the switching time as short as
why you need a MOSFET driver : possible, so as to minimize switching loss

MOSFETs have a large stray capacitance between Therefore the circuit that drives the gate terminal
the gate and the other terminals,which must be should be capable of supplying a reasonable current
charged or discharged each time the MOSFET is so the stray capacitance can be charged up as
switched on or off. As a transistor requires a quickly as possible. The best way to do this is to use
particular gate voltage in order to switch on, the gate a dedicated MOSFET driver .
capacitor must be charged to at least the required
gate voltage for the transistor to be switched on. There are dedicated chip available in the market for
Similarly, to switch the transistor off, this charge must MOSFET driving but it is costly.I used a simple
be dissipated, i.e. the gate capacitor must be MOSFET driver by using a NPN general purpose
discharged. transistor.I used 2N3904 but you can use any general
purpose transistors like 2N2222 or BC547 etc.
When a transistor is switched on or off, it does not
immediately switch from a non-conducting to a

ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 11


Step 7: Filter and Protection :

Filter : Protection to over current :

The capacitor(C1) used after the solar panel at the Two fuses F1 and F2 are used for over current
input side is used as filter which removes any protection.One is at the incoming side i.e after the
unwanted ripple/noise signal. solar panel and other is before the load. I forgot to
show in the first schematics.
I used a 100uF, 35V.
Refer my updated schematics where I put the fuses.
Optional :
PV panel reverse current :
You can also put a capacitor in the load side also.For
a better voltage sensor you can use a 0.1uF ceramic During night battery voltage is higher in compare to
capacitor across the R2 and R6. solar panel voltage(0 V).So power can be flow in the
reverse direction .This avoided by using a diode(D1)
Protection : after the solar panel.

Protections are provided in the charge controller to Auto Load Disconnection :


protect against extreme and abnormal operating
condition. To avoid deep discharging of battery ,auto load
disconnection scheme is implemented through the
In commercial charge controller there are so many software.When the battery voltage is falls below a
protection.But in my charge controller all are not certain voltage (6.2V)load is automatically
included. disconnected.

Following protection are used : Overcharge protection :

Over Voltage Protection: Over charge protection is given to improve the battery
life and prevent from overheating .When the battery
During lightening and thundering over voltage occurs voltage is greater than the fully charged voltage(7.2v)
in the system.To protect the system a zener diode is ,it is disconnected from the solar panel to avoid
used. further charging.This is also implemented through the
software.
I used a 11V zener diode as my solar panel open
circuit voltage is 10v. When the voltage is more than
11v ,it will provide the ground path to the surges.

ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 12


Step 8: Display and Indication

System status display on LCD: Potentiometer

A 16X2 char LCD is used for monitoring solar panel 4. RS -> Arduino pin 12
voltage and battery voltage.It also show the % of
charge. 5. RW -> Arduino pin 11

When the battery condition is dead it will display 6. E -> Arduino pin 10
:"BATTERY IS DEAD!!" and when battery is
discharged it will display "BAT DISCHARGED.." 7. D0 -> Arduino - Not Connected

LED indication on system condition : 8. D1 -> Arduino - Not Connected

2 LEDS (RED,GREEN) are used for indicating the 9. D2 -> Arduino - Not Connected
system condition RED LED will glow when battery is
discharged 10. D3 -> Arduino - Not Connected

( < 6.2 V) GREEN LED will glow when fully charged 11. D4 -> Arduino pin 5
(> =7.2 V) and will blink during charging.
12. D5 -> Arduino pin 4
When battery voltage is less than 6.2V but greater
than 6V RED LED will glow indicating battery is 13. D6 -> Arduino pin 3
discharged and GREEN LED will blink indicating
battery is charging. 14. D7 -> Arduino pin 2

LCD -> Arduino 15. A -> Arduino Pin 13 + Resistor (Backlight power)

1. VSS -> Arduino GND 16. K -> Arduino GND (Backlight ground)

2. VDD -> Arduino +5v If you need more information about LCD interfacing
click here
3. VO -> Arduino GND pin + Resistor or

ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 13


Step 9: How the Charge Controller Works :

Lets starts to understand the schematics given If you want to use a relay instead of MOSFET Q2 you
above: can.The schematics -2 is given for relay connection.

Power is coming from the solar panel through the How Software Works :
diode(D1). A zener diode (D2) is placed at the input
terminal to suppress the over voltage. Capacitor C1 is At first the charge controller will check the solar panel
used to remove any unwanted noise/spikes.Then the voltage and compare it with battery voltage ,If it is
voltage divider(R1 and R2) is used to sense the solar greater then the Arduino will starts sending pulse
panel voltage.The out put from the voltage divider width modulation(PWM) signals to the mosfet(Q1) in
goes to Arduino analog pin A0. order to charge the battery .When the solar panel
voltage was below the battery voltage ,this pwm
The power coming from the solar panel can't goes signals will not send by Arduino .
directly to battery until the Mosfet(Q1) is On.The
switching of the mosfet is done by a PWM signal from Then next the micro controller will check the battery
Arduino pin-6.Transistor T1 and associated voltage ,if the battery voltage was below 6.96 v volts
resistance R4 is used for driving the Mosfet(Q1).The then the battery will be charged in boost mode ,that
resistor R3 is used as a pull up resistor for gate.When mean the battery will be charged with maximum
the Mosfet is On power goes to battery and charging amperage ,this boost mode of charging will be done
process starts. by sending pulse width modulation signals with 95%
duty cycle .
The second voltage divider circuit (R5 and R6) is
used for sensing the battery voltage.The output of when the battery voltage reaches above 6.96V the
voltage divider goes to Arduino analog pin A1. charging mode will turn as absorption mode from
boost mode ,this was done by changing the duty
The second Mosfet Q2 is used to drive the load and cycle from 95 % to 10%.This absorption mode will
second transistor T2 is used for driving the Mosfet. keep the battery fully charged.
During night load will automatically turned on by
turning the MosfetQ2 on and will removed when A pulse will be send to the load mosfet(Q2) to enable
battery voltage is low or day time. the load during night ,if the battery was too low and
reaches to 6.2v volts then in order to prevent deep
Fuses F1 and F2 are used for over current protection. discharge of the battery ,the load will disconnected.

LED1(RED) and LED2(GREEN) are hooked to digital The arduino code can be Download from my GitHub
pin 7 and 8 of the Arduino for indication.The resistor Account
R7 and R8 are used for limiting the current goes to
LEDs. ARDUINO-SOLAR-CHARGE-CONTROLLER-V-1

ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 14


Download
http://www.instructables.com/ORIG/FOH/I8JQ/HUXTMTK7/FOHI8JQHUXTMTK7.txt

Step 10: Solder the Circuit

After testing the circuit on a bread board,solder everything on a perforated board.

* clean the copper part of board

* place the components suitably

* Hold it by using a vice

* solder one by one as per schematics

* trim the long legs of all components

* solder 6 wires for terminal connections.(2 for solar panel input,2 for battery and 2 for load)

ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 15


ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 16
Step 11: Make the Final Product (CHARGE CONTROLLER)

After making the controller on a perforated board 8. Put the ARDUINO and Controller inside the box
place everything in a project box.I did not have any side by side.
project box,so used a plastic box found in my kitchen.
9. Put a 9V battery just side to the arduino for
1 . Mark the size of LCD by a marker or pencil powering it.I used SCOTCH mounting squares for
holding .
2. Cut it by a hobby knife. I used my leatherman ES4
which was given by Instructables. 10.Connect the jumper wires appropriately and test it

3. Make 2 holes by a drill just below the LCD for Note : put heat shrink or any other insulation tap at all
inserting 2 LEDS.I used my DREMEL 3000 for the bare conductors.
drilling.
Congratulation !!! now the charge controller is ready
4 . Hold the 6 pin connector and mark the screw for charging the battery.
holes ,drill on the marked portion.
I request viewers to give suggestion for
5.Drill a big hole for mounting the fuse.solder two improvement.If you find any mistake please raise it in
wires for connection with the controller. comment section so that I will rectify it.Any one can
modify my code,but please send a copy to me also.
6. Drill few holes on the side wall of the project box I have described the two major part of the off grid
for ventilation. solar system(energy meter,charge controller),only
one thing left i.e inverter part.In future if possible I will
7. Place the LCD,LEDs and connector in their write on it.just follow me for further updates.
place.Then glue it by a hot glue gun.I used my
DREMEL glue gun. Thank you for reading my instructables.

ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 17


ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 18
ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 19
ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 20
hello sir i am also doing the same proeject but there is some modification like i should use 230v
suplly also means whenever the solar battery gets low then automaticaly battery should get charge
from the 230v supply using dc converter. so i am not getting how switch automaticaly from solar to
supply if you suggest me or if you give some details it will be very helpfull for me
I made it

did you use the N type or P Channel MOSFET


9530 P channel
540 N channel
Hi may i use battery litium ion ?

can anybody tell me how the arduino is powered ? is it by the solar pannel ? or by the battery ? or
by an other source of energy ?
r u measuring the battery terminal voltage when load is off or when load is on...And if you r
measuring it when load is on ,the voltage drop due to load ll not b affected the terminal voltage of
battery ? . and if you are switching load is off during day time can i use same program to use load
in day time and night time
hii, we are making a project on solar charge controller just wanted to know what were the power
ratings of your solar panel that u used in ur project. ??
Dear Deba,
PWM controller is design for 12V battery changing or any other type.Please,help me to design 12V
system with relevant circuit components.
strange ? i heard that bulk mode is leaving the solar directly connected to the battery solar will act
as current source and will strongly recharge
till specific voltage then switch to absorption where pwm takes place this time current will be
monitored once current draw fallen to pre-detremined level the controller will go to the last stage
which is float just keeping battery voltage at so lower cartain level
how ever your circuit is sort of always "pwm"???
THANKS
Hello deba168. I foud your project in google and i want try to build this controller. Can you please
send me software for arduino?
If you missed it. There is a text file that has the complete code that can be copied directly into the
IDE program software to create the program file.
I almost missed it myself.
hello sir.
can i have the schematic using relay instead using irf540
great project with a wonderful experience

can this circuit charge my 12 volt batteries


No.
You can follow my v-2.0 which is for 12V battery.

ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 21


https://www.instructables.com/id/ARDUINO-SOLAR-CHAR...
Sir deba168 can you send me your code at [email protected] you!
how much watt is your solar panel?
can i use the battery and it still charging from the solar panel
Yes you can

sir can you please mention the ratings of the components that u have used in the above
images,can you post a video of it,would be useful for my project
and I forget to mention 2 bjt and there number is 2n2222 and normal diode

sir i find no lcd panel for displaying the result and whats the rating
of the small battery and solar panel that you have used sir.
sorry I didn't post a video because I an not so good in video making and if you face any difficulty
the maker of the project explain the project more than perfect you can ask him and you can ask Me
also any time
best regards
here's the photos

Dear Deba168:
thanks a lot for this good work.........but still have some confusion about one thing ...concerning the
circuit schematics...relating to measuring the voltages of solar charger and battery...The time that
MOSFET is ON,the voltage will be nearly the same on charger and Battery even if you start to
charge the battery from low voltage level...so how could you measure the battery voltage while
MOSFET is ON???
I was thinking about that issue alot..and i thought that you might measure the voltage of battery in
zero period of the input PWM signal but is this time enough to make battery return to its actual
voltage level...???
thanks
hello pz i need the full codes........can u plz send it on [email protected]........
Hello! Please, can you send me the code?
My mail: [email protected] thanks from Argentina!
great stuff maen!!

plz send me full source code my mail id is [email protected]


What kind of battery are you charging? It doesn't need constant
current in addition to constant voltage?
hi sir, can you explain how you determine the state of charge of the battery while charging pls.
thank you
Can i use 12 V, 3 watt Solar Panel
Yes you can use it.But need some modification in voltage divider.
You can see my V-2 charge controller

ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 22


Hi, Nice project,
wonder why does the charging from 50% becone 25% so easily, considering that the load has just
activated in a short while, (or you trim the video?)
thanks,
JAson
Big fan of your Solar Chargers projects.
I want to start with them version by version so I'm beginning with version 1.
being a mechanical engineer, my grasp over electronics and electricity is still less than perfect.

will this version work with higher or lower MPPT PV voltages?


say, 17 Volts or 6 Volts?
and what's the governing factor determining the MAX voltage and MAX current of the project other
than the component's allowed specs?
Thank you for sharing your work
How can I modify this for a 12v system? Also, can I replace that IRF540 at the end with a relay?

sir i want........whenever 6 volt battery voltage coming to 2.5 volt reference, automatically cut off the
load...and that load automatically connect with regulated dc supply coming from 230 volt ac....by
using arduino.....plz help me
sir i have a 12v 2w solar panel (2 nos) and a 12v 4.5 Ah battery what modifications has to be made
in the code and what changes in the hardware?can you please upload the arduino.ino file of your
program.
@deba sir can u kindly upload the sketch or hex file of this project.will be highly useful.please
reply.
Arduino: 1.6.7 (Windows 8), Board: "Arduino/Genuino Uno"
sketch_feb25a:188: error: redefinition of 'float sample1'
float sample1=0; // reading from Arduino pin A0
^
sketch_feb25a:13: error: 'float sample1' previously defined here
float sample1=0; // reading from Arduino pin A0
^
sketch_feb25a:189: error: redefinition of 'float sample2'
float sample2=0; // reading from Arduino pin A1
^
sketch_feb25a:14: error: 'float sample2' previously defined here
float sample2=0; // reading from Arduino pin A1
^
sketch_feb25a:190: error: redefinition of 'int pwm'
int pwm=6; // pwm out put to mosfet
^
sketch_feb25a:15: error: 'int pwm' previously defined here
int pwm=6; // pwm out put to mosfet
^

ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 23


sketch_feb25a:191: error: redefinition of 'int load'
int load=9; //load is connected to pin-9
^
sketch_feb25a:16: error: 'int load' previously defined here
int load=9; //load is connected to pin-9
^
sketch_feb25a:192: error: redefinition of 'int charged_percent'
int charged_percent =0;
^
sketch_feb25a:17: error: 'int charged_percent' previously defined here
int charged_percent =0;
^
sketch_feb25a:193: error: redefinition of 'LiquidCrystal lcd'
LiquidCrystal lcd(12,11, 10, 5, 4, 3, 2);
^
sketch_feb25a:18: error: 'LiquidCrystal lcd' previously declared here
LiquidCrystal lcd(12,11, 10, 5, 4, 3, 2);
^
sketch_feb25a:194: error: redefinition of 'int backLight'
int backLight = 13; // pin 13 will control the backlight
^
sketch_feb25a:19: error: 'int backLight' previously defined here
int backLight = 13; // pin 13 will control the backlight
^
sketch_feb25a:195: error: redefinition of 'int RED'
int RED=7; // To indicate discharged condition of battery
^
sketch_feb25a:20: error: 'int RED' previously defined here
int RED=7; // To indicate discharged condition of battery
^
sketch_feb25a:196: error: redefinition of 'int GREEN'
int GREEN=8; // for charging and battery fully charged
^
sketch_feb25a:21: error: 'int GREEN' previously defined here
int GREEN=8; // for charging and battery fully charged
^
C:\Users\USER\AppData\Local\Temp\arduino_a67ec9a0b0bd091968e1d217eda8e9ec\sketch_feb25a.ino:
In function 'void setup()':
sketch_feb25a:198: error: redefinition of 'void setup()'
void setup()
ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 24
^
sketch_feb25a:23: error: 'void setup()' previously defined here
void setup()
^
C:\Users\USER\AppData\Local\Temp\arduino_a67ec9a0b0bd091968e1d217eda8e9ec\sketch_feb25a.ino:
In function 'void loop()':
sketch_feb25a:215: error: redefinition of 'void loop()'
void loop()
^
sketch_feb25a:40: error: 'void loop()' previously defined here
void loop()
^
exit status 1
redefinition of 'float sample1'
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences. these types of error are coming pllzz see to it.
hii i m working on same project but code is not working some re-declaration problem is coming

can some one reply pls


kindly reply soon if possible
@ deba 168: sir i have a 12v 2w solar panel (2 nos) and a 12v 4.5 Ah
battery what modifications has to be made in the code and what changes
in the hardware?
Yes a forget the lcd a Norma lcd
And you need a 5W (Voc=10v)solar panel and a 6v and5.5Ah SLA battery for storing the power
And a fuse and a 11v Zeneca diode
As I said before the maker explain every thing
hi i have been searching for a answer to this a question and i found some information and i would
like to say if it right deal.
first thing why you dont just use a mosfet without transistor i think the answer is the current that
comes from the micro-controller is not enough to turn the mosfet on and off at a high frequency but
how know its not enough i search in the data sheet and found a lot of things but non of them give
me the wanted answer
second:
why you use a mosfet for controlling PWM why you don't just use a transistor
at first mosfet depend on voltage not current but i use transistor with mosfet if i need to turn on/off
mosfet with voltage greater than 5 volt see this link http://www.gammon.com.au/motors

ARDUINO SOLAR CHARGE CONTROLLER (Version-1): Page 25

You might also like