A simple battery charger that disconnects the battery when charge voltage reaches its nominal voltage and reconnects when battery voltage falls below a predefined level, can be designed using this circuit diagram.
A fraction of the battery voltage is taken from the voltage divider R1-R2-R3-R4 and
compare with a reference voltage with the help of IC2b. As long as the battery voltage is 0 V. The input current of AO produces a small voltage drop on R5, so IC2c pass in "0". Therefore, the relay remains disengaged.
When connecting a battery, low residual voltage provide switch of IC2c, diodes D4 and D5 are reverse biased, a voltage reference applied to the noninverting input of IC2d and relay is activated. In these conditions, the battery charge until its voltage reaches the nominal level.
When the battery voltage falls below the voltage established by P1, IC2b switch again and reapply the battery charge voltage.
Calibration is performed with a voltmeter connected to the output of IC2a, then P2 is adjusted, to obtain an indication of 3.45 V. Further, P1 rotates in the direction of maximum resistance. Replace battery with a stabilized power supply and set output voltage at 6V (6V position S1) or 12V (S1 in position 12 V), which is the voltage when charge is interrupted and adjust P1 until the relay works.