# choosing the right power adapter for LM317 regulator for battery charging

I looked at the standard LM317 setup at http://www.learningaboutelectronics.com/Articles/LM317-voltage-regulator (where the center of a voltage divider is connected to the adj pin and the inputs and outputs each have their own ripple filter capacitors).

What fooled me was when I used a 12VDC adapter to power my charger circuit, the voltage reading from the voltmeter was 18VDC even though the label on the adapter is 12VDC.

I used the same LM317 setup to try to achieve roughly 7.5V (but my R1 is 330 ohms and R2 is 1800 ohms and both are 1W) but when I used my 12V adapter, the measured output voltage was 10.5V which makes me think I'll explode my batteries since I'm charging two at a time and each one is 3.6V nicd.

I then proceed to read http://www.apogeekits.com/power_adapter_selection.htm and it states that my circuit must use the same current the adapter must provide (800mA) in order for the true voltage to be read from the adapter.

It also states that the adapter I have is unregulated. Rather than me trying to find (expensive) regulated adapters, is there a way I can alter the simple LM317 circuit or even change from one adapter to another so I can see 7.5V at the regulator output? or can I keep my existing setup and increase some resistors?

Eventually I'll have a complex circuit and for the most part, the maximum current consumption for the output elements will be in the order of milliamps.

This is the initial question to the charger I made:

What causes the opamp to become warm in this charger? [question updated]

but I made a new post because my problem now is directed to the power supply.

• Can you explain why you have the LM317's voltage divider connected between IN and ADJ instead of the much more common OUT and ADJ configuration? Commented Apr 5, 2017 at 15:19
• First and foremost: DON"T TRY TO CHARGE A NIMH WITH A CONSTANT VOLTAGE. Don't even think about it. Commented Apr 5, 2017 at 15:43
• brhans, I must have copied something wrong. my design has the resistor of the voltage divider connected between out and adj. And why not charge it with a constant voltage?
– user143136
Commented Apr 5, 2017 at 15:48
• NiCd and NiMH cells are about 1.25 volts, not 3.6 volts. 3.6 volt cells are probably Li(something), which require great care when charging - else they may catch fire. Commented Apr 5, 2017 at 15:57
• "And why not charge it with a constant voltage?" Because you'll slam the battery with whatever the current limit is on the regulator. You don't do float voltages on NiMH (or NiCd, for that matter). Do some research. Commented Apr 5, 2017 at 20:30