Technology Remaking the World

Solar panel charge controller using Arduino.


Solar Panel Battery Charge Controller Switching Circuit

by Lewis Loflin

Above: Fig. 1 Schematic of solar panel charge controller using Arduino and a P-channel MOSFET.

  
  

Here I will address the use of a P-channel MOSFET switch in the above Arduino solar panel charge control circuit. Note Q2 and Q4

Previous designs:

video here


Battery Charger block diagram.
Fig. 2 Battery Charger block diagram.


Let us begin with the block diagram in Fig. 2. We have a solar panel with internal blocking diode, some kind of switching circuit, and the battery to be charged. An inverter converts the battery DC to AC.

The battery voltage is monitored by a controller that turns on the switch circuit to charge, off when the battery is charged.

P-channel MOSFET switch circuit.
Fig. 3 P-channel MOSFET switch circuit.


Fig. 3 illustrates the charger switch circuit. Q2 in a 2N2222 bipolar transistor while Q4 is a MOSFET. there are two test points to monitored by the voltage control circuit, in this case an Arduino microcontroller.

The advantage of a MOSFET over a bipolar transistor is low drain-source on resistance and high current capacity.

MOSFET battery charge control circuit turned on.
Fig. 4 MOSFET battery charge control circuit turned on.


In Fig. 4 Arduino produces a HIGH to the Q2 base circuit turning on Q2. The collector of Q2 switches the gate of Q4 to 0.5V turning on Q4 charging the battery.

There is an issue that must be addressed - the Vgs rating of Q4. With most MOSFETs this limits voltage across the 10K resistor. In this case at 12-17V this is no problem.

MOSFET battery charge control circuit Vgs too high damages MOSFET.
Fig. 5 MOSFET battery charge control circuit Vgs too high damages MOSFET.


This is not the case with a 24-volt or 48-volt system. The circuit as is will destroy the MOSFET.

Zener diode protect MOSFET gate-source circuit.
Fig. 6 Zener diode protect MOSFET gate-source circuit.


The addition of a 12-volt Zener diode between Q2 collector and Q4 gate. This divides the 24-volts between the 10K resistor and the Zener. For a 48-volt charging system use a 36-volt Zener.

Alternate Zener diode protect MOSFET gate-source circuit.
Fig. 7 Alternate Zener diode protection of MOSFET gate-source circuit.


Fig. 7 illustrates an alternative Zener diode connection.

Videos:
My YouTube Videos on Electronics
Introduction to the Arduino Microcontroller
Part 1: Programming Arduino Output
Part 2: Programming Arduino Input
Part 3: Arduino Analog to Digital Conversion
Part 4: Using Arduino Pulse-Width-Modulation
Repost Arduino AC Power Control