A very simple battery charger for miniature batteries can be made using electronic diagram below.
This flow charger charging current only when the cells are properly connected to the connection terminals.
This charger is actually a constant current source built with T2, it provides a load current of 50 mA. Constant current source works on the principle known: Zener diode and LED maintain constant voltage base of T2, so the resistance R3 and the voltage is constant. Since the current through R3 is not changed, and T2's collector current flowing through the battery is constant.
Safety against the incorrect connection consists of T1, D1 and R1. If the battery is connected properly, then switch transistor T1 in conduction state due to the remaining battery power. Then connects T1 constant current source T2 signaling charging by LED lighting.
The wrong connection of the battery transistor T1 remains locked and the LED does not light. This is indicative that the battery must be connected backwards.
This circuit is so dimensioned that they can be loaded simultaneously four NiCd batteries connected in series.