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.

Fig. 4: Component layout for the PCB
Fig. 4: Component layout for the PCB

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:

  1. Connect 20V stable external supply at CON1 and adjust VR2 such that you get 5V at pin 2 of microcontroller IC1.
  2. 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.


  1. Call me @ +91-94800 51739 – have a simple solution to this. I have CC which does all of this work using one chip and is cost effective upto 150W systems. willing to support on OEM basis.

  2. Dear kiran please mail me on [email protected] about charging circuit details. I am interested in this my mobile no is 9422368409 at pune. If you call me between 10.30 t0 05.00 it will be convenient for me because sometimes my mobile goes out of range. Thans a lot.

  3. hello can you share details of solar lighting panel for street light with led light on same case assembley.
    i required few things
    1. single line diagram
    2. drawing
    3. and detailed component list with there ratings

  4. Hello
    This is an amazing idea and I want to pursue it as my minor project. I’m an electrical engineering student. Can I please get some references or detailed elaboration for the same so that I can implement it successfully.

  5. Hi, Thanks for these details.
    Do you have any load calculation means how much arrey current how many LEDs with wattage we can connect to this circuit.


Please enter your comment!
Please enter your name here