As the sources of conventional energy deplete day by day, resorting to alternative
sources of energy like solar and wind energy has become need of the hour. Solar-powered
lighting systems are already available in rural as well as urban areas. These include solar
lanterns, solar home lighting systems, solar streetlights, solar garden lights and solar
power packs. All of them consist of four components: solar photovoltaic module,
rechargeable battery, solar charge controller and load. In the solar-powered lighting
system, the solar charge controller plays an important role as the system‘s overall success
depends mainly on it. It is considered as an indispensable link between the solar panel,
battery and load.
2. A solar charge controller is one of the key components of a solar panel system
within a battery. Their main job is to act as a charge regulator for the electricity
going into the battery bank from a solar array. Batteries with these buffers are
protected from overcharging and over-draining. They direct electricity from
the solar panels to the battery. It tells the solar panel system when to turn on or
off the charging. As a result, the batteries will not be damaged.
This unit performs 4 major functions:
Charges the battery.
It gives an indication when the battery is fully charged.
Monitors the battery voltage and when it is minimum, cuts off the supply
to the load switch to remove the load connection.
In case of overload, the load switch is in off condition ensuring the load
is cut off from the battery supply.
In the solar-powered lighting system, the solar charge controller plays an
important role as the system’s overall success depends mainly on it. It is
considered as an indispensable link between the solar panel, battery and load.
6. Automatic dusk-to-dawn operation of the load
Built-in digital voltmeter (0V-20V range)
Parallel- or shunt-type regulation
Overcharge protection
System status display on LCD
Deep-discharge protection
Low battery lock
Charging current changes to ‘pulsed’ at full charge
Low current consumption
Highly efficient design based on microcontroller
Suitable for 10-40W solar panels for 10A load
7. Microcontroller is powered up with 5V regulated DC supply from the battery. Once the
microcontroller is powered ON, it continuously monitors the battery voltage with the
help of ADC. A potential divider connected at the pin 2 of the ADC with resistor
arrangement, scale down the voltage from 0V-20V to 0V-05V. Then these values are
accordingly displayed on LCD display.
This circuit is implemented with a parallel regulation technique which allows the
charging current to flow into the battery and once the battery is fully charged it stops
charging. By making this charging as pulsed, wasting of current as heat is reduced to
keep the battery topped-up.
Microcontroller continuously gets the input signals from dusk to dawn sensor and based
on this input, it switches the load or charging relay. When this sensor gives the input to
microcontroller upon solar voltage presence, then microcontroller drives the LCD to
display the message as charging. Once battery is fully charged (reaches to 14V), then
microcontroller interrupts the charging by energizing the relay through the MOSFET. At
this time, microcontroller starts 5 minute timer and displays the message as Battery Full.
After the timer elapsed, the relay reconnects the battery to solar panel. By this way solar
charging current is pulsed as long as the solar voltage is present.
Whenever the solar panel voltage falls below the zener diode voltage of the dusk-to-
dawn sensor, then microcontroller receives it and activates the load through MOSFET
and accordingly displays the message as Load ON. Similarly, when the voltage falls
below the 10V of the dusk-to-dawn sensor then microcontroller turns OFF the load
through this MOSFET.
By this way solar charging system charges the battery as well as protects the battery and
loads from over and under voltages.
8. Flow-chart of the source program
The source program for the project is written in Assembly language and assembled using Metalink’s
ASM51 assembler, which is freely available on the Internet for download. It is well commented for
easy understanding and works as per the flow-chart shown in figure below. The hex file ‘solar.hex’
is to be burnt into the microcontroller.
10. OCF BIT FLAGS.0 ; OVER CHARGE FLAG
LBF BIT FLAGS.1 ; LOW BATT FLAG
CSEG
ORG 0000H
JMP MAIN
ORG 000BH ; Timer Interrupt0
JMP COUNTDOWN
MAIN: MOV SP, #50H
MOV P3, #0FFH
MOV P1,#0FFH
CLR CHG_RL
CLR LD_RL
LCALL PWR_DELAY
LCALL INIT
SETB CLK
SETB DO
SETB CS
SETB DYI
MOV VAL1, #00H
MOV VAL2, #00H
MOV VAL3, #00H
MOV FLAGS, #00H
LOADCHAR: MOV BUF, #40H
LCALL CMD
MOV DPTR, #RCHARG
REP:
CLR A
MOVC A,@A+DPTR
JZ SCREEN1
MOV BUF, A
11. LCALL DAT
INC DPTR
SJMP HERE
NEXT: MOV BUF, #0C0H
LCALL CMD
MOV DPTR, #MSG2
HERE1: CLR A
MOVC A,@A+DPTR
JZ OVER
MOV BUF, A
LCALL DAT
INC DPTR
SJMP HERE1
OVER: LCALL ONE_SEC_DELAY
LCALL ONE_SEC_DELAY
LCALL CLEAR
MOV BUF, #0C0H
LCALL CMD
MOV DPTR, #MSG7
HERE2: CLR A
MOVC A,@A+DPTR
JZ CONVERT
MOV BUF, A
LCALL DAT
INC DPTR
SJMP HERE2
CONVERT: LCALL DELAY
CLR CS ; INITIATE CONVERSION
SETB CLK
CLR CLK ; FIRST CLOCK
SETB CLK
12. CLR CLK ; SECOND CLOCK
MOV A, #00H ; CLEAR A
MOV R5, #08H ; 8 CLOCK PULSES
AGAIN: MOV C, DO
RLC A
SETB CLK
CLR CLK
DJNZ R5, AGAIN
SETB CS
MOV ADC_VAL, A
MOV B, #79D
MUL AB ; PRODUCT IN AB
MOV R1, B ; HIGH BYTE IN B
MOV R2, A ; LOW BYTE IN A
LCALL HEX2BCD
MOV VAL1, R7
MOV VAL2, R6
MOV VAL3, R5
LCALL SENDVAL2LCD
CHECK: JNB LBF, CHECK2 ; SEE IF ANY FLAGS ARE SET,
I , e LOW BATT FLAG OR BATTFULL FLAG
JB DYI, CONVERT
CHECK2: JNB OCF, PROCEED
JB DYI, NIGHT
SJMP CONVERT
PROCEED: JB DYI, NIGHT
CLR LD_RL ; OFF LOAD
CLR LBF ; CLEAR LOW BATT FLAG
MOV A, VAL2 ; SEE IF BATT.IS FULL
XRL A, #04H
13. JZ FULLCHG
CLR CHG_RL ; CONNECT BATT. TO PANEL
MOV DPTR, #MSG4 ; DISPLAY CHARGING MSG
MOV IMG, #00H
LCALL SENDSTAT2LCD
LJMP CONVERT
FULLCHG: SETB OCF ; SET OVERCHARGE FLAG
SETB CHG_RL ; DISCONNECT BATT.FROM PANEL
MOV TH0, #03CH ; START 5 MIN TIMER HERE
MOV TL0, #0B0H ; DISCONNECT BATT FROM PANEL
MOV CNT1, #200D
MOV CNT2, #30D
SETB ET0
SETB TR0
SETB EA
MOV DPTR, #MSG5 ; DISPLAY BATT.FULL MSG
MOV IMG, #01H
LCALL SENDSTAT2LCD
LJMP CONVERT
NIGHT: CLR CHG_RL ; RECONNECT BATT. TO PANEL
CLR TR0 ; STOP TIMER0 INCASE ITS RUNNING
CLR OCF ; CLEAR OVER CHARGE FLAG
SETB LD_RL ; CONNECT LOAD TO BATT.
MOV A, VAL1
XRL A, #00H
JZ LOWBAT
MOV DPTR, #MSG3 ; DISPLAY LOAD ON MSG
MOV IMG, #02H
LCALL SENDSTAT2LCD
LJMP CONVERT
14. LOWBAT: SETB LBF
CLR LD_RL ; DISCONNECT LOAD FROM BATT.
MOV DPTR, #MSG6 ; DISPLAY LOAD OFF MSG
MOV IMG, #03H
LCALL SENDSTAT2LCD
LJMP CONVERT
SENDVAL2LCD: MOV BUF, #0C7H
LCALL CMD
MOV A, VAL1
ORL A, #30H
MOV BUF, A
LCALL DAT
MOV A, VAL2
ORL A, #30H
MOV BUF, A
LCALL DAT
MOV BUF, #'.'
LCALL DAT
MOV A, VAL3
ORL A, #30H
MOV BUF, A
LCALL DAT
RET
SENDSTAT2LCD:
MOV BUF, #080H
LCALL CMD
HERE3: CLR A
MOVC A,@A+DPTR
JZ PICT
MOV BUF, A
LCALL DAT
15. INC DPTR
SJMP HERE3
PICT: MOV BUF, #0CEH
LCALL CMD
MOV BUF, IMG
LCALL DAT
BACK:
RET
;********************************
; TIMER0 ISR (5 MINUTES TIMER)
;********************************
COUNTDOWN: CLR TR0
MOV TH0, #03CH
MOV TL0, #0B0H
SETB TR0
DJNZ CNT1, BACK2
MOV CNT1, #200D
DJNZ CNT2, BACK2
CLR TR0 ; OFF 5 MIN TIMER
CLR ET0
CLR OCF ; CLEAR OVER CHARGE FLAG
CLR CHG_RL ; RE-CONNECT BATT TO PANEL
BACK2: RETI
Hex2BCD: MOV R3, #00D
MOV R4, #00D
MOV R5, #00D
MOV R6, #00D
MOV R7, #00D
ACALL H2B
RET
H2B: MOV B, #10D
MOV A, R2
DIV AB
MOV R3, B ;
16. MOV B, #10 ; R7, R6, R5, R4, R3
DIV AB
MOV R4, B
MOV R5, A
CJNE R1, #00H, HIGH_BYTE ; CHECK FOR HIGH BYTE
SJMP ENDD
HIGH_BYTE: MOV A, #6
ADD A, R3
MOV B, #10
DIV AB
MOV R3, B
ADD A, #5
ADD A, R4
MOV B, #10
DIV AB
MOV R4, B
ADD A, #2
ADD A, R5
MOV B, #10
DIV AB
MOV R5, B
CJNE R6, #00D, ADD_IT
SJMP CONTINUE
ADD_IT: ADD A, R6
CONTINUE: MOV R6, A
DJNZ R1, HIGH_BYTE
MOV B, #10D
MOV A, R6
DIV AB
MOV R6, B
MOV R7, A
17. ENDD: RET
ONE_SEC_DELAY: MOV R0, #10D ; One second delay routine
RZ3: MOV R1, #100D
RZ1: MOV R2, #250D
RZ2: NOP
NOP
DJNZ R2, RZ2
DJNZ R1, RZ1
DJNZ R0, RZ3
RET
PWR_DELAY:; 15 mSec DELAY FOR LCD TO INTIALIZE AFTER POWER-ON
MOV R4, #100D
H2: MOV R3, #250D
H1: DJNZ R3, H1
DJNZ R4, H2
RET;******LCD SUBROUTINES********
CMD: PUSH ACC ; SAVE ACCUMULATOR
SETB EN
CLR RS ; SELECT SEND COMMAND
MOV A, BUF ; PUT DATA BYTE IN ACC
MOV C, ACC.4 ; LOAD HIGH NIBBLE ON DATA BUS
MOV DB4, C ; ONE BIT AT A TIME USING...
MOV C, ACC.5 ; BIT MOVE OPERATOINS
MOV DB5, C
MOV C, ACC.6
MOV DB6, C
MOV C, ACC.7
MOV DB7, C
CLR EN
NOP
SETB EN ; PULSE THE ENABLE LINE
MOV C, ACC.0 ; SIMILARLY, LOAD LOW NIBBLE
18. MOV DB4, C
MOV C, ACC.1
MOV DB5, C
MOV C, ACC.2
MOV DB6, C
MOV C, ACC.3
MOV DB7, C
CLR EN
NOP
SETB EN ; PULSE THE ENABLE LINENOP
LCALL MSDELAY
POP ACC
RET;******LCD SUBROUTINES******
CLEAR: MOV BUF, #01H
LCALL CMD
RET;******LCD SUBROUTINES*******
DDELAY: MOV R5, #41D ; 4.1 mS DELAY
QT2: MOV R6, #50D
QT1: DJNZ R6, QT1
DJNZ R5, QT2
RET;******LCD SUBROUTINES*******
MSDELAY: MOV R5, #26D
QT22: MOV R6, #50D
QT11: DJNZ R6, QT11
DJNZ R5, QT22
RET;******LCD SUBROUTINES*******
INIT: MOV BUF, #30H ; FUNCTION SET -DATA BITS, LINES, FONTS
LCALL CMD
ACALL DDELAY ; INITIAL DELAY 4.1MSEC
MOV BUF, #30H ; FUNCTION SET - DATA BITS, LINES, FONTS
19. LCALL CMD
ACALL DDELAY ; INITIAL DELAY 4.1MSEC
MOV BUF, #30H ; FUNCTION SET-DATA BITS, LINES, FONTS
LCALL CMD
ACALL DDELAY ; INITIAL DELAY 4.1MSEC
MOV BUF, #28H ; 2 LINES 5X7, 4-BIT MODE
LCALL CMD
MOV BUF, #0CH ; DISPLAY ON
LCALL CMD
MOV BUF, #01H ; CLEAR DISPLAY, HOME CURSOR
LCALL CMD
MOV BUF, #06H ; SET ENTRY MODE
LCALL CMD ; INCREMENT CURSOR RIGHT, NO SHIFT
RET
ORG 0320H
MSG1: DB ' SOLAR CHARGE ', 00H
MSG2: DB ' DIPESH, SHRIPAL ', 00H
MSG3: DB ' LOADON ', 00H
MSG4: DB ' CHARGING ', 00H
MSG5: DB ' BATTERY FULL ', 00H
MSG6: DB ' BAT.LOW-LOAD OFF', 00H
MSG7: DB ' Volts: ', 00H
ORG 0400H
20. RCHARG: DB 04D, 31D, 17D, 31D, 17D, 31D, 17D, 31D ; CHARGING
DB 04D, 31D, 31D, 31D, 31D, 31D, 31D, 31D ; FULL
DB 31D, 31D, 14D, 04D, 04D, 14D, 31D, 31D ; LOAD
DB 04D, 31D, 17D, 17D, 17D, 17D, 17D, 31D ; LOW BATT
DB 31D, 31D, 31D, 31D, 31D, 31D, 31D, 31D
DB 31D, 31D, 31D, 31D, 31D, 31D, 31D, 31D
DB 31D, 31D, 31D, 31D, 31D, 31D, 31D, 31D
DB 031D, 31D, 31D, 31D, 31D, 31D, 31D, 31D, 00H
END
APPLICATIONS:-
These include solar lanterns, solar home lighting systems, solar streetlights, solar garden lights
and solar power packs
A charge controller for a wind-electric or hydro-electric system must protect batteries from
overcharge, just a PV controller
It can also be used in automobiles to increase their battery life.
It can be also used a supplement for the inverter to control battery charging etc.
Coast guard navigation
Off-grid and grid –connected homes
Railroad signaling
Satellites and space station
Outdoor lighting‘s
Telecommunication and water pumping etc.
21. ADVANTAGES:-
Salient and low maintenance
Solid states with no moving parts
High-quality powers
Life times of 20 to 30 year
Flexible and reliable
Modular and expandable
LIMITATIONS:-
Large initial setup is required to supply high rating solar energy supplies.
Solar panels are costlier and its bulkiness increases to have large power suppliesof dc.
Solar panels are very delicate and a slight mishandling may lead to destruction of solar cells
which are embedded in solar panels
CONCLUSION
By using the technique of microcontroller based solar charger we can accurately control the voltage
of solar Charger. It is automatic control the load, not need to control manually and it is reduce the
damages of battery due to over charging.