V1 forms a square wave oscillator, D1 and D2, coupling this square to supply 12-V battery to reach more than 20 VDC. If this is not necessary, S1 can be left open. Q1 form a current regulator to determine the charge level of rechargeable batteries. R4 is taken from a table or can be activated with a rotary selector switch.