23-02-2013, 01:03 PM
Microcontroller Based Solar Charge Controller Project
Microcontroller Based Solar Charge.PDF (Size: 119.03 KB / Downloads: 231)
What is Solar Charge Controller?
As Wikipedia said “A charge controller, charge regulator or battery regulator limits the rate
at which electric current is added to or drawn from electric batteries. It prevents overcharging and
may prevent against overvoltage, which can reduce battery performance or lifespan, and may pose a
safety risk. It may also prevent completely draining ("deep discharging") a battery, or perform
controlled discharges, depending on the battery technology, to protect battery life. The terms
"charge controller" or "charge regulator" may refer to either a stand-alone device, or to control
circuitry integrated within a battery pack, battery-powered device, or battery recharger.”
In simple words, Solar Charge controller is a device, which controls the battery charging from
solar cell and also controls the battery drain by load. The simple Solar Charge controller checks the
battery whether it requires charging and if yes it checks the availability of solar power and starts
charging the battery. Whenever controller found that the battery has reached the full charging
voltage lavels, it then stops the charging from solar cell. On the other hand, when it found no solar
power available then it assumes that it is night time and switch on the load. It keeps on the load until
the battery reached to its minimum voltage levels to prevent the battery dip-discharge.
Simultaneously Charge controller also gives the indications like battery dip-discharge, load on,
charging on etc.
What is the function of a microcontroller in Solar Charge Controller?
· Measures Solar Cell Voltage.
· Measures Battery Voltage.
· Decides when to start battery charging.
· Decides when to stop battery charging.
· Decides when to switch on the load.
· Decides when to switch odd the load.
· Give indications with the help of led for –
Battery Dip Discharge.
Battery OK.
Charging going on.
Load is On/Off.
Which microcontroller is suitable for the job?
Although any microcontroller with sufficient I/O is suitable for the job but for most suitable
microcontroller to chose, we have to keep in mind the following things.
· Should have at least two analog I/O for measurement of Solar and Battery Voltage.
Otherwise we have to add extra AD converter for the job and it will increase the complexity
of the circuits and cost.
· Should have at least two digital I/O, capable of switching High Current MOSFET for battery
charging and load.
For More Products Visit Our Website:
Page 2 of 5 AMATEUR WORLD world of amateur electronics
· Should have at least three digital I/O capable of driving direct LEDs, otherwise we have to
add extra LED driver for the purpose.
· Should have minimum circuit requirements for its self operation to cut down the cost.
Keeping in the mind all above things, we have found AVR and Microchip variants of 8-bit controllers
can do these jobs very well. So we decide to go for ATMEGA8 (which is AVR variant) microcontroller
for this project.
Schematic Diagram of hardware circuits:
Schematic Descriptions:
· IC1 is ATMEGA8. For minimum circuits operation it requires only one 10K Resistor (R14) at
reset pin. It has got no crystal as we will use its internal RC Oscillator. L1, L2, L3 are three
LEDs for event indication and as ATMEGA8 can directly drive LEDs we have added only
current limiting resistors of 330 Ohm.
· LM7805 (IC2) voltage regulator is there to produce 5V to supply ATMEGA8.
· Q3 and Q4, these two small NPN transistors are there to drive two MOSFET, Q1 and Q2
respectively.
· SB540 (D1) is a Scotty Diode, which will prevent the battery being drain at night time.
· R16 and R15 forms a voltage divider to measure Solar Cell Voltage as because
microcontroller can only measure maximum +5V directly. Zener diode D4 (5V1) is to prevent
For More Products Visit Our Website:
Page 3 of 5 AMATEUR WORLD world of amateur electronics
any accidental over voltage. Similarly there are R8, R9 and D2 for measurement of Battery
Voltage.
· We have added two potentiometer R1 and R2 for easy adjustment of Battery High Voltage
(at which charging will stop) and Battery Low Voltage (at which charging will starts and Load
will be off). These two POTS are optional but it adds the flexibility of the system as with
these two POT, user can alter the battery settings at their will.
Software Basic:
As microcontroller software works as sequential basis, it will perform these steps
sequentially.
1. Power On, RESET
2. Define Input / Output of the ports
3. Setup ADC for measurement
4. Start ADC Module
5. Measure ADC2, ADC3, ADC4, ADC5. ADC2 for ‘Solar Voltage’, ADC3 for ‘Battery High Set’,
ADC4 for ‘Battery Low Set’ and ADC5 for ‘Battery Voltage’
6. If ‘Battery Voltage’ < ‘Battery High Set’ and ‘Solar Voltage’ > ‘Battery Voltage’ then
a. Switch ON Battery Charging
b. Switch ON Charging LED
c. Switch OFF Load
d. Switch OFF Battery High LED
7. If ‘Battery Voltage’ > or = ‘Battery High Set’ then
a. Switch OFF Battery Charging
b. Switch OFF Charging LED
c. Switch OFF Load
d. Switch ON Battery High LED
8. If ‘Solar Voltage’ < ‘Battery Voltage’ then
a. Switch OFF Battery Charging
b. Switch OFF Charging LED
c. Switch ON Load
9. If ‘Battery Voltage’ < or = ‘Battery Low Set’ then
a. Switch OFF Load
b. Switch ON Battery Low LED
10. If ‘Battery Voltage’ > ‘Battery Low Set’ then
a. Switch OFF battery Low LED
11. Go to Step 5.