This simple and low cost battery charger uses a single transistor as a constant current source. The voltage across the pair of 1N4148 diodes biases the base of the BD140 medium power transistor. The base-emitter voltage of the transistor and the forward voltage drop across the diodes are relatively stable. The charging current is approximately 15mA or 45mA with the switch closed. This suits most 1.5V and 9V rechargeable batteries.
The transformer should have a secondary rating of 12V ac at 0.5amp