# Regulating a battery

#### Swarly88

Joined Nov 12, 2018
25
Greetings,

I am having difficulty understanding the concept of voltage regulation with a battery, specifically with an LM317 (datasheet enclosed below). I understand how the differential voltage must be maintained at a certain threshold in relation to the available input and the desired output - I'm assuming due to the internal voltage drop of the LM317 itself, which is 2-3V. However, my frustration comes from how the output can be maintained if the battery will be depleted over time with use. For example, I have a 7.2V NiHM RC car battery and I want it to generate at least 5.5V to power a microcontroller. In accordance with the equation in the datasheet, I can achieve that with a 3k ohm and a 10k ohm resistor for R1 and R2, respectively. How does it know to maintain that given the input voltage from the battery would deplete over time?

http://www.ti.com/lit/ds/slvs044x/slvs044x.pdf

#### MrChips

Joined Oct 2, 2009
21,815
A linear voltage regulator does not need to know the input voltage. It will regulate the output voltage so long as the minimum drop-out voltage (or overhead) is maintained. A linear voltage regulator uses a pass transistor which acts like a voltage controlled resistor. The value of the resistance is adjusted to maintain the desired output voltage using a linear feedback circuit. The excess voltage (Vin - Vout) and hence power has to be wasted as heat by the pass transistor.

A buck-boost switching regulator does not need a similar overhead and is much more energy efficient than a linear regulator.

#### crutschow

Joined Mar 14, 2008
25,367
An LM317 is not likely to give 5.5V from a 7.2V, since that's only a 1.7V difference.

There are series regulators with lower drop-out voltages, such as the LM1117, which can operate to about a 1.1V differential at low currents (see graph from data sheet below).
That will allow a regulated 5.5V output down to a battery voltage of about 6.6V.
See LTspice simulation below.
As you can see, the output drops out of regulation at a battery voltage of near 6.6V.

Note that the minimum output current for regulation of the LM1117 is 5mA, so you don't want R2 to be greater than 250 ohms to maintain regulation with no other output load.

Last edited:

#### ci139

Joined Jul 11, 2016
1,696
the concept of voltage regulation with a battery,
If you think of the websites you likely have been visiting , then there is usually something as CC-CV charging profile.

If you try to understand the reason behind you'll realize

1) -- that at the beginning the battery/cell voltage is "fast" increasing (as is the capacitor charging near ±0V)
2) -- that at the end of charging the cell voltage is "slowly" changing (as is the capacitor charging near Vs)
3.a) -- that the battery internal resistance is way lower than that of the absolute of any wall supply (e.g. supply voltage drop at low resistance load )
3.b) -- that the terminal voltage of your supply is thus drawn near the terminal voltage of your battery

• thus - you basically charge your battery with current (Wikipedia "Ampere" Definition , Wikipedia "Ampere_hour")
• the - trickle/topping charge using CV is only possible with CV -- because the battery voltage near "charged" remains "constant" . . . and because it still does slightly increase e.g. -- the more full it gets the lesser the CV current will get

#### crutschow

Joined Mar 14, 2008
25,367
then there is usually something as CC-CV charging profile.