This circuit was obtained from an Elektor magazine from the 90s. The circuit is to protect batteries while charging.