How to convert 12v-15v input to 9v?
You're overcomplicating this.

And most comments/answer focus on getting 9V while you do not need 9 V !!

The reason for this is that you ask "How to convert 12v-15v input to 9v?" while your real question is: "How can I charge a 9 V NiCd/NiMh battery from 12 - 15 V ?"

So I think you just want to charge a 9 V NiCd or NiMh battery from a 12 V - 15 V source.

You think you would need 9 V to charge the batteries but the truth is you don't need 9 V !!

Luckily NiCd and NiMh batteries are extremely easy to charge. As long as you charge them with a small current.

This is the circuit you need:







simulate this circuit &ndash; Schematic created using CircuitLab

The "challenge" is to properly calculate the value of Rcharge.
It is common to charge these NiCd or NiMh batteries with C/10 so for the
160 mAh battery that means 16 mA and for the 300 mAh it means 30 mA.

Lets stick with that 16 mA, you can charge the 300 mAh battery with 16 mA as well, it will just take longer.

Your power source provides maximum 15 V DC so that leavs 15 V - 9 V = 6 V across R charge.

Enter Ohm's law: 6 V / 16 mA = 375 ohms. These are hard to find but  390 ohms is close enough and easy to buy.

To charge the 300 mAh battery you can also place 2 of these 390 ohm resistors in parallel, then you'd get close to 30 mA, which is perfect for that battery.