The rather precise voltage of each RED LEDs are added together to set the correct voltage to charge the battery, the red LEDs have the correct voltage and other colors, green or yellow or blue LEDs certainly do not. This charger does not care whether you connect this to an unregulated or regulated power supply, so long as the power supply is working, it regulates the voltage and current.
If you have a volt meter you power up this circuit and connect it to a charged NiMH 9V bat and you can measure the voltage at the battery or at the emitter of the power NPN transistor with just a 1k load connected, and you should read between 9 and 10.5 volts, and this is right in the range to charge the battery to full capacity without over voltage. The current itself is limited by the gain of the transistor, and a low gain 1w power transistor (with low beta) is preferred that can handle 25V or more.
If you want to gild the rose:
If somehow you compulsively think you need to have to so precisely control everything in life, you may want to fine tune this circuit according to the discarded wallwart power supply of your choice and to fit the Beta characteristics of your luck in winning the current gain lottery of the BD139 transistor:
Calibration Procedure:
(1)Replace the 100K fixed resistor with a 68K resistor in series with a 50K tiny pot connected as a rheostat. Apply wallwart voltage to the circuit and using a 1-ohm resistor as a current shunt in series with your discharged 9V NiMH batter, adj. the 50k pot for 14 to 28mA, whichever level you think you like. I have mine trimmed to 20 mA...a compromise between the two extremes.
(2)Replace the 10K fixed resistor with a 20K pot in series with a 1k resistor. Now, with a 10k ohm load at the emitter of the BD139(no battery connected), adj. the Max full charge cutoff (output) voltage to 9.3V or whatever else arbitrary voltage you might think will please you and the almighty god of NiMH batteries.
Once you've set these values you can remove the adj. pots and insert the closest value of a fixed resistor or two to match their actual resistance setting...pots are too expensive and handy to keep around the experimenter's shop, why sentence them to a life of neglect???
Myths: All NiMH batteries cannot be trickle charged after cut off voltage or charge completed voltage has been reached.
A circuit needs to be complicated to work well.
A simple circuit cannot work as well as a very sophisticated and elegant design.
A NiMH battery such as 9V 150mA type must only be charged so as to achieve a precise voltage at a precise current.
A 9V NiMH battery will be damaged by "float charging". Truth: if the charger current limit of the "float charger" is set to the correct charging current and float voltage, then the float charger automatically switches mode from constant current to float charge as the cutoff voltage is reached.
The proof of a pudding is in it's tasting.
I have been using this charger for 8-years for my two NiMH 9V batteries and they are both still giving great service.