A charge controller is an essential part of nearly all power systems that charge batteries, whether the power source is PV, wind, hydro, fuel, or utility grid. Its purpose is to keep your batteries properly fed and safe for the long term.
The basic functions of a controller are quite simple. Charge controllers block reverse current and prevent battery overcharge. Some controllers also prevent battery overdischarge, protect from electrical overload, and/or display battery status and the flow of power. Let's examine each function individually.
Blocking Reverse Current
Photovoltaic panels work by pumping current through your battery in one direction. At night, the panels may pass a bit of current in the reverse direction, causing a slight discharge from the battery. (Our term "battery" represents either a single battery or bank of batteries.) The potential loss is minor, but it is easy to prevent. Some types of wind and hydro generators also draw reverse current when they stop (most do not except under fault conditions).
In most controllers, charge current passes through a semiconductor (a transistor) which acts like a valve to control the current. It is called a "semiconductor" because it passes current only in one direction. It prevents reverse current without any extra effort or cost.
In some controllers, an electromagnetic coil opens and closes a mechanical switch. This is called a relay. (You can hear it click on and off.) The relay switches off at night, to block reverse current.
If you are using a PV array only to trickle-charge a battery (a very small array relative to the size of the battery), then you may not need a charge controller. This is a rare application. An example is a tiny maintenance module that prevents battery discharge in a parked vehicle but will not support significant loads. You can install a simple diode in that case, to block reverse current. A diode used for this purpose is called a "blocking diode."