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’soverall success depends mainly on it. It is considered as an indispensable link between the solar panel, battery and load.

The microcontroller-based solar charge controller described here has the following features:

  1. Automatic dusk-to-dawn operation of the load.
  2. Built-in digital voltmeter (0V-20V range)
  3. Parallel- or shunt-type regulation
  4. Overcharge protection
  5. System status display on LCD
  6. Deep-discharge protection
  7. Low battery lock
  8. Charging current changes to ‘pulsed’ at full charge
  9. Low current consumption
  10. Highly efficient design based on microcontroller
  11. Suitable for 10-40W solar panels for 10A load
Fig.1:Circuit of microcontroller-based solar charger


The circuit of the solar charge controller is shown in Fig.1. It comprises microcontroller AT89C2051, serial analogue-to-digital converter ADC0831, optocoupler MCT2E, regulator 7805, MOSFETs BS170 and IRF540N, transistor BC547, LCD and a few discrete components. Component description is given below.

Microcontroller. Microcontroller AT89C2051 is the heart of the circuit. It is a low-voltage, high-performance, 8-bit microcontroller that features 2 kB of Flash, 128 bytes of RAM, 15 input/ output (I/O) lines, two 16-bit timers/ counters, a five-vector two-level interrupt architecture, a full-duplex serial port, a precision analogue comparator, on-chip oscillator and clock circuitry. A 12MHz crystal is used for providing the basic clock frequency. All I/O pins are reset to ‘1’ as soon as RST pin goes high. Holding RST pin high for two machine cycles, while the oscillator is running, resets the device. Power-on reset is derived from resistor R1 and capacitor C4. Switch S2 is used for manual reset.

Serial ADC. The microcontroller monitors the battery voltage with the help of an analogue-to-digital converter. The ADC0831 is an 8-bit successive approximation analogueto- digital converter with a serial I/O and very low conversion time of typically 32 μs. The differential analogue voltage input allows increase of the common-mode rejection and offsetting of the analogue zero input voltage. In addition, the voltage reference input can be adjusted to allow encoding of any smaller analogue voltage span to the full eight bits of resolution. It is available in an 8-pin PDIP package and can be interfaced to the microcontroller with only three wires.


  1. I make this project display show in LCD but i attached solar panel don’t show charging status on LCD any buddy help me for this issue. Thank you

  2. Please make complete connections and then only you should attach your solar panel in the circuit. Some people faced problems because of incomplete connection or mcu is not programmed correctly.

  3. Hello,
    this project is interesting and thanks for it
    i am doing similar project but i am using PWM to control the charging the battery
    guys any one know where i can find a circuit that used PWM to charge a battery

  4. I have make the circuit in proteus and burn the hex file in the controller. But the LCD Showing garbage.. please help

    • Hello
      Thank you for your excellent site and topics that are of great help for me and most of those who read electronic
      But we have fault in the circuit schematic and pcb is part of relay, for example, are not correct in pcb and we dont have D1 in pcb
      Please input the correct pcb

  5. hello there,

    can anyone help me with the correct PCB? is the schematic is correct? then where to connect solar panel’s negative, D1 and relay? actually after connecting solar panel’s negative, D1 (one pin on PCB and other with RL1 thru a hookup wire) and relay as per PCB, Relay do get operated but there is NO ground given to negative of solar panel. The status message on the LCD (line 1) “BAT.LOW-LOAD OFF” doesn’t go and never comes on “Charging..” status rather it do show the Battery Voltage. Someone please help me on this issue. Thank you.

    • We have not received any complaints on the PCB as well as schematic so far. Diode D1 is not shown on the PCB because it has to be connected externally. The negative terminal of solar panel should be connected to any ground rail on the PCB. Make sure transistors T1 and T2 and ADC chip are working properly. Check the battery level is above 10V. If all these things are working well and as per explained in the text, you will not get the message “BAT.LOW-LOAD-OFF” on the LCD. Sometimes the data in the MCU may get corrupted, so you may try it by re loading the program.

  6. Hello Admin
    i m facing same issue like kanu.You can tell me this issue for mcu is not programmed correctly . plz send me correct hex file for this project.i m checked all connection its perfect connected. My email ThnQ


Please enter your comment!
Please enter your name here