In circuit battery charging with constant current

Thread Starter

Frakk

Joined Jul 6, 2009
40
I have a microcontroller clock project that would use 4 AA or AAA batteries as a backup in case the supply is removed.

I have an idea to use a LM317 with a constant current through the batteries, and connecting the AVR supply across the battery also. The batteries would act as a voltage regulator and obsorb the current not used by the uC. Would this approach work? Is there a better way to do this with the least amount of components?

Thanks in advance.
 
I have a microcontroller clock project that would use 4 AA or AAA batteries as a backup in case the supply is removed.
In case you're talking about primary (non-rechargeable) batteries, then the answer is a firm no. You'll either drain them (okay, but useless) or charge them (which is dangerous).

Just try something like what I attached. Diodes will prevent current from going where it's not supposed to. You also need to make sure supply remains the primary power supply.
 

Attachments

Last edited:

Thread Starter

Frakk

Joined Jul 6, 2009
40
Sorry, I meant rechargable batteries. They need to be charged when the supply is connected. Would it work as I described? Or is there a better way with as few components as possible?
 

THE_RB

Joined Feb 11, 2008
5,438
Yep. Use Eduard's circuit, but put a resistor across the top cap. This will slowly charge the batteries (over 24 or 48 hours) when the power is conencted.
 

MikeML

Joined Oct 2, 2009
5,444
I have a microcontroller clock project that would use 4 AA or AAA batteries as a backup in case the supply is removed.

I have an idea to use a LM317 with a constant current through the batteries, and connecting the AVR supply across the battery also. The batteries would act as a voltage regulator and obsorb the current not used by the uC. Would this approach work? Is there a better way to do this with the least amount of components?

Thanks in advance.
Really bad idea! Constant current will ruin the batteries in a few days. You really need to limit the terminal voltage that the batteries will get up to. The "float" voltage depends on battery chemistry.

Frankly, the best strategy is to use non-rechargable Alkaline AAs with a diode isolating circuit such that no current is drawn from the batteries unless the AC power fails. That way, the battery is used only for the duration of the power failure. If there are no power failures, the batteries can last ~10 years.
 

Thread Starter

Frakk

Joined Jul 6, 2009
40
Thank you for the replies! The constant current would be about 1/10C to 1/20C which should be safe for charging over longer periods. I will definietly consider the Alkaline AA batteries as well.
 

rjenkins

Joined Nov 6, 2005
1,013
For permanent float charge you need to be down to 1/50C or less. At that, no voltage limiting is needed and the batteries will last just about forever.

(I had some salvaged NiCd button cells backing up a home-made alarm clock for over 20 years. They still had decent capacity when I scrapped the clock.)
 

Thread Starter

Frakk

Joined Jul 6, 2009
40
Thanks again!

The reason I thought about the constant current approach is because 5V is not that much when charging 4x1.2V batteries.
Would it be OK just to use a 5V supply and connect the batteries across it? That way the batteries would be charged to 1.25V/cell. I know it wouldn't be ideal to charge NiMH cells only to 1.25V and they will not last as long as charged fully.

What do you think of this approach?
 

THE_RB

Joined Feb 11, 2008
5,438
That's what i was saying, use a resistor to float the batteries to 5v. Or even 5v minus a diode drop. This is a common system in commercial stuff with battery backup. The batteries don't need to be fully charged, they just need to be reliable (ie they don't get destroyed from too much current over too long a time).

Most backup situations only need to supply very low currents for a few hours or less. And most are quite happy with long battery charge time like 48 hours to recover the charge. You don't need a sophisticated system!
 

Thread Starter

Frakk

Joined Jul 6, 2009
40
Thank you!:)

I was looking for the cap in the diagram but didn't find it... I know I know it was the diode:)
 
Top