There are two charge circuits shown below. The first circuit I designed is precise but not so easy to build because of its many parts, the second (LED circuit) is what I use today.
Theory of operation of the 6-LED circuit:
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 charging 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.
All NiMH batteries will be damaged and their service life will be severely shortened if you trickle charge or do not stop charging at a precise cutoff voltage.
All NiMH batteries must be fully charged to be serviceable. Truth: If the cutoff voltage of a charger is set to low, then the charger cannot force current into to the battery to charge it, if it is set very much too high(>10.5V), it might damage the battery. I have charged 9V batteries of this type to a voltage limit of 10.5V and left them at this level in this other charger circuit that I built even for weeks and the batteries were still functioning well after 2-3 years of service.
The proof of a pudding is in it's tasting.
I have been using the 6-LED charger circuit for more than 8-years to charge my two NiMH 9V batteries and they are both still giving great service.