The program is written in ‘C’ language and compiled using HI-TECH C compiler along with MPLAB to generate the hex code. The generated hex code is burnt into the microcontroller using a suitable programmer with configuration bit settings. The configuration bits are shown in Fig. 2. The program is easy to understand.
Download the PCB and Component Layout PDF: Click Here
Download Source Code: Click Here
A single side PCB for the solar powered home lighting system is shown in Fig. 3 and its component layout in Fig. 4. Assemble the circuit on the provided PCB to save time and minimise any assembly errors. Use IC base for microcontroller IC1. Set VR2, VR3 and VR4 as follows:
- Connect 20V stable external supply at CON1 and adjust VR2 such that you get 5V at pin 2 of microcontroller IC1.
- Connect 15V stable external supply at CON4 and CON5, and adjust VR3 and VR4 such that you get 5V at pins 3 and 5 of IC1. Remove the supplies after setting the potmeters and seal their positions with glue.
Connect two 80W solar panels in parallel to CON1 and an off-the-shelf available 12V battery charger to CON2. Connect two 12V, 80Ah batteries at CON4 and CON5. You can use 12V, 150Ah batteries for better backup, but this will increase the charging time. You need to select the maximum load in such a way that the duration of discharge for the active battery is more than the charging time for the other.
Take 12V LED strips from market to build the LED lights. You can connect strips in parallel to increase the lumens. But ensure that the overall wattage of all the lights is less than the maximum calculated load as mentioned above.
Build these lights with suitable reflector and diffuser, otherwise the light from the LEDs will be focussed and not so pleasant. Connect these LED lights in parallel to CON3.
Switch on the system and you will see ‘solar charger’ message displayed on the first line of the LCD. The LCD will show ‘BATT-1 FULL’ and ‘BATT-2 CHARGING’ to indicate that BATT.1 is delivering power to load and BATT.2 is charging, and vice versa. The LCD display will also indicate the source of charging as ‘SOL.’ for solar and ‘AC’ for battery charger.
To test the circuit for proper functioning, verify 5V power supply at TP1, battery voltages at TP2 and TP3 and solar panel voltage at TP4. All voltages are measured with respect to TP0.
Feel interested? Check out more electronics projects.