A charge controller or charging circuit has the task of technically implementing the charging method for charging batteries. The different types of accumulators also require different charging methods. In current concepts, this is achieved by power electronics, while older charge controllers in motor vehicles with DC alternators also work electromechanically. They had switching coils, similar to relays, as well as switching contacts, one of which disconnected the battery when the alternator was stationary (reverse current switch) and the other controlled the excitation current of the alternator by switching it on and off. The tasks of the charge controller or a charging circuit are:
- Prevention of overcharging, for example in the lead-acid battery and the lithium-ion battery, by limiting the charging voltage
- Limitation of the charging current, partly depending on the state of charge and/or the temperature
- More complex charge controllers sometimes use several parameters for charge control: Temperature, Voltage, Capacity, Time, Charging current
Complex charge controllers can be realized with a microprocessor or a special charge IC. These charging circuits contain all the control and protection functions required for the respective type of batteries, and in some cases they do not require external power electronic components. Some of them have inputs for evaluating temperature sensors installed in lithium batteries, for example. Such controllers are sometimes able to detect the connected battery, diagnose any errors and adjust the charging parameters accordingly. For example, after the end of the actual charging process, it is possible to switch to a trickle charge mode to compensate for the self-discharge of the connected battery and thus enable storage without loss of charge.

Image credit: https://blog.voltaicsystems.com/lithium-ion-charge-controller/
---
In some cases, electronic circuits are integrated into lithium-ion batteries that monitor their end-of-charge voltage and deep discharge voltage. They are usually not referred to as charge controllers and should not be used as the sole control elements. They serve to protect the battery from destruction.
Charge controllers in mobile devices or in chargers have a very different technical level. Depending on the type, batteries are differently sensitive to treatment errors. Accordingly, charge controllers take into account different numbers of parameters (end-of-charge voltage, deep discharge, max. charging current, temperature, battery type). The technical design ranges from a current-limiting series resistor and a time limitation to the measurement of battery parameters (differential internal resistance, source voltage, temperature) during charging. Furthermore, battery status and type can be recorded to avoid overcharging and exceeding the charging current/temperature.
Charge controllers for this purpose are available as electronic assemblies that often contain a special integrated circuit or even a microcontroller. Some devices/assemblies for battery management are also able to discharge batteries in a monitored manner in order to determine their capacity or to condition them.