Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Battery Backup for a microcontroller

Status
Not open for further replies.

subaruboy

New Member
Hey guys,

First off, this is my first time posting so I hope I'm not in the wrong area.

Now the quesiton:

I need to provide battery backup for a micro controller and I'm having a brain fart.

The power input can accept voltages from 6 to 18V (it has an internal regulator)... currently it's recieving 9 volts that's being regulated off of a 24V supply. Not the most efficient way of doing things but I'm working with what I've got.

Anyhow, the controller is going to be installed in an environment that's going to experience frequent blackouts and I want to have battery backup for it. I'm using an analog IO pin on the controller to sense the supply voltage so when the power goes out the controller goes into low power mode. But I need to connect a battery to the same voltage input that the 9v is going in

I was thinking I could just put diodes on the positive terminals of the 9V regulator output and a 7.2V battery I have, and that would provide a constant source of power for the controller without having to worry about issues due to voltage sources in parallel.

Can I use this simple implementation for battery backup for the controller? I simulated it on PSpice and the circuit reacted as I expected. I just want to be sure.

Thanks for the help all, I look forward to poking around this forum and taking part in the discussions.

Here's a link to a schematic... I used 1k just as a simple load to see what the voltage on the controller would be. I also used D1N4148's because my pspice library didn't have the 1N4001's that I'm using

https://i14.photobucket.com/albums/a308/subaruboy/schematic.jpg
 
Last edited:
"I was thinking I could just put diodes on the positive terminals of the 9V regulator output and a 7.2V battery I have, and that would provide a constant source of power for the controller without having to worry about issues due to voltage sources in parallel.

Can I use this simple implementation for battery backup for the controller? I simulated it on PSpice and the circuit reacted as I expected. I just want to be sure."

That way would work and is a common solution many devices use. However an added item is how will the battery be recharged when needed.

Lefty
 
A little 9V Ni-Cad is actually 7.2V. But it is almost 9V when it is fully charged.
I have a project with it powering 20 very bright LEDs in a bar-graph and it is always being charged from a 9V power supply through a 10 ohms resistor.

The trickle current is low enough not to damage the battery. If the power fails then the battery is there and when the power returns then charging is at a high current at first then it reduces as the battery voltage rises.
It has been running for 2 years and has seen the power supply turned off for dozens of times. A few times the battery was discharged very low (too low).
 
Last edited:
Hey all, thanks for the replies

Leftyretro said:
However an added item is how will the battery be recharged when needed.

Lefty

I have a small "smart" charger designed to recharge the battery, which is a 7.2V 2 cell Li-ion battery, it's about the size of two AA's and is meant for small airplanes.

Anyhow, I planned on connecting the positive side of the charger between the positive battery terminal and the output diode, i figured that way the only potential the charger could see would be that of the battery and it would regulate the battery potential. when the power goes out, the charger shuts off as well because it's AC powered.

I though about putting a diode on the charger output to prevent it from acting as a load on the battery when the power is out, but because it's a smart charger it wouldn't be able to sense the potential of the battery then.

I hope I'm not sounding like an idiot... I'm almost done school, but I'm still very much in that transitional period of trying to apply what i learned in school to real life applications.
 
audioguru said:
A little 9V Ni-Cad is actually 7.2V. But it is almost 9V when it is fully charged.
I have a project with it powering 20 very bright LEDs in a bar-graph and it is always being charged from a 9V power supply through a 10 ohms resistor.

The trickle current is low enough not to damage the battery. If the power fails then the battery is there and when the power returns then charging is at a high current at first then it reduces as the battery voltage rises.
It has been running for 2 years and has seen the power supply turned off for dozens of times. A few times the battery was discharged very low (too low).

9V through 10 ohms is 900 mA... I thought that typical trickle current is around 100mA?
 
subaruboy said:
9V through 10 ohms is 900 mA...
Um. The battery is not a dead short. It is nearly 9V when it is fully charged so the trickle charge current is nearly nothing.

When the battery is nearly dead at about 6V then the current in the resistor is is very high at 300mA which is used to power the circuit and charge the battery. Then the battery gets about 150mA for a few minutes until its voltage rises.

I thought that typical trickle current is around 100mA?
A 9V Ni-Cad has a capacity of only 120mAh and a recommended charging current of only 12mA for 14 hours. They say that a trickle charge current of 12mA won't hurt it but I think it is too high.
 
This is what I do.
**broken link removed** is the capacitor I use.
 

Attachments

  • Bkp.GIF
    Bkp.GIF
    19.5 KB · Views: 869
audioguru said:
Um. The battery is not a dead short. It is nearly 9V when it is fully charged so the trickle charge current is nearly nothing.

When the battery is nearly dead at about 6V then the current in the resistor is is very high at 300mA which is used to power the circuit and charge the battery. Then the battery gets about 150mA for a few minutes until its voltage rises.


A 9V Ni-Cad has a capacity of only 120mAh and a recommended charging current of only 12mA for 14 hours. They say that a trickle charge current of 12mA won't hurt it but I think it is too high.

sorry, hadn't thought about the resistance of the battery
 
If I recall correctly, we started with a circuit with a 9V main supply and a 7.2V Li-ion backup. The Li-ion has a separate charger. Replies have drifted to NiMH and NiCd... can you tell us what you're presently planning?
 
mneary said:
If I recall correctly, we started with a circuit with a 9V main supply and a 7.2V Li-ion backup. The Li-ion has a separate charger. Replies have drifted to NiMH and NiCd... can you tell us what you're presently planning?
**broken link removed**



This is what I have in mind... the battery is a 7.2V Li-ion and the charger is some sort of smart charger, which makes me assume there's some sort of pic or other controller in it that regulates the charge current... again, the 1K is just a load I needed to be able to generate the sim voltages, the microcontroller's terminals connect at the 1K location, and I don't know its equiv impedance
 
The Li-Ion battery is about 8.4V when it is fully charged. When the power fails then the powered circuit has its 8.3V suddenly dropped to 7.7V from the lithium battery in series with the diode, then it keeps dropping until the battery is destroyed by being discharged too low.
The battery might catch on fire when it is discharged too low.
 
audioguru said:
The Li-Ion battery is about 8.4V when it is fully charged. When the power fails then the powered circuit has its 8.3V suddenly dropped to 7.7V from the lithium battery in series with the diode, then it keeps dropping until the battery is destroyed by being discharged too low.
The battery might catch on fire when it is discharged too low.

the battery is I think 1000 mAh (I don't have access to it at the moment so I'm not entirely sure but I think I'm close) and the only draws it will have is any parasitic load from the charger, and an OOPic microcontroller running in power save mode (all operations cease until the AC power returns)... the OOPic can be operated off of a power supply that has a max current of 250 mA at 9V, so that's about 300 mA at 7.2V, and I know the OOPic is never maxing out the 2.25W that the 9V supply can provide, so I'm not worried about discharging the Li-ion battery too low.

The longest the AC power will ever be out is about 4 hours and like I said I have an IO attached to the 9V power supply so as soon as the 9V power supply shuts off the OOPic suspends all operations except for timekeeping, and waits for the power supply to turn back on. The AC power will be available much more often then it will be out, so the battery will always be fully charged when the AC power shuts down

come to think of it, I might put a relay contact across the positive terminal of the charger so that it is disconnected from the battery altogether when the AC power goes out.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top