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.

Explore Circuits and Projects Explore Videos and Tutorials

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.

8-Digit Code Lock for Appliance Switching

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.