CONSTANT CURRENT Circuit
This variable constant current circuit may be fine-tuned to just about any value from a couple of milliamp to approximately 500mA - this is exactly the boundary of the 2N2222 transistor.
The circuit can even be named a current-limiting circuit which is perfect in a table power source to put a stop to the circuit you are assessing from becoming spoiled.
Roughly 4v is decreased through the regulator and 1.25v across the current-limiting area, as a result the input voltage (source) needs to be 5.25v above the preferred output voltage. Presume you would like to charge 4 Ni-Cad cells. Hook up these to the outcome and alter the 500 ohm pot until eventually the expected charge-current is attained.
The battery charger will probably at this point charge 1, 2, 3 or 4 cells at the matching current. However you should always make sure to switch off the charger well before the cells are totally charged since the circuit is not going to sense this and over-charge the cells.
The LM 317 3-pin regulator might want to be heatsinked.
This circuit is good for the LM group of regulator since they possess a voltage differential of 1.25v between "adj" and "out" leads.
7805 regulators could be used nonetheless the losses in the 2N2222 is going to be four x bigger as the voltage through it will likely be 5v.