Thursday, April 11, 2024

Smart Solar Charger

Solar powered lighting systems are now used in rural as well as urban areas. These systems include solar lanterns, solar home lighting systems, solar streetlights, solar garden lights, solar water heaters and solar power packs. All of them consist of four components: solar photovoltaic (PV) module, rechargeable battery, solar charge controller and load. 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.51E_Test

Here we present the circuit of a PIC microcontroller based solar charger that is highly efficient. This automatic solar charger is built around a PIC16F877A microcontroller. It shows the system status on an LCD and can trickle charge.

Circuit and working

Fig. 1 shows the circuit of a PIC microcontroller based solar charger. In addition to microcontroller PIC16F877A (IC1), it uses regulator 7805 (IC2) and a few discrete components.

PIC16F877A is a powerful microcontroller that provides an ideal solution for hobby and industrial development. It controls battery charging through the solar panel. PIC microcontrollers use Harvard architecture.

Fig. 1: Circuit of PIC microcontroller based solar charger
Fig. 1: Circuit of PIC microcontroller based solar charger

893_Fig_2PIC16F877A is an 8-bit, high-performance RISC CPU with low power consumption. It has 8kB flash, 256 bytes of EEPROM, 368 bytes of RAM, 33 input/output (I/O) pins, 10-bit 8-channel analogue-to-digital converter (ADC), three timers, watchdog timer with its own on-chip R-C oscillator for reliable operation and synchronous I2C interface. The microcontroller can recognise and execute only 35 simple instructions. All the instructions are single-cycle, except branches which are two-cycle instructions.

- Advertisement -

Port pins RB0 through RB7 of the microcontroller are connected to data pins D0 through D7 of the LCD module, respectively. Port pins RD1, RD2 and RD3 are connected to RS (register-select), R/W (read/write) and E (enable) of the LCD, respectively. Preset VR3 is used for contrast control. Switch S1 is used for manual reset. A 4MHz crystal along with two 33pF capacitors provides basic clock frequency to the microcontroller.


Port pins RA0, RA1 and RA2 receive inputs to monitor battery voltage, charge current and solar panel voltage, respectively, to control the overall process and display information on the LCD module. When port pin RA3 goes high, transistor T1 becomes saturated and relay RL1 energises to connect the solar panel to the battery.

- Advertisement -

Regulator 7805 provides regulated 5V to the microcontroller and the LCD module. Fig. 2 shows the pin details of regulator 7805 and transistor BC548.

This solar charger can charge the battery in two modes—boost and trickle. If battery voltage is greater than 12V the battery is charged in trickle mode, whereas if battery voltage is less than 12V it is charged in boost mode. In trickle mode, the battery is charged at discharge rate.

The system also calculates the energy that has been received from the solar panel. This gives an indication of the power that can be harnessed from the Sun.


  1. i have just one qestion if an panel 50w with max 2.5amps is no strong for d1….i think the diode is just for 1 amp and if i use another tip ex…6 amp ultra rectifier diode and the relay change with another contact ex auto tip will damage ? just right now i built this and im not sure i intent to use 100w panel…..thank yo


Unique DIY Projects

Electronics News

Truly Innovative Tech

MOst Popular Videos

Electronics Components