Address

Author Topic: Creating a battery backup circuit?  (Read 5518 times)

ThantiK

  • FamiLAB Member
  • Full Member
  • *
  • Posts: 237
  • Resident 3D printer guru.
    • View Profile
Creating a battery backup circuit?
« on: June 10, 2012, 07:10:02 PM »
Anyone have any info to get me started?  The Mintyboost puts out all the current, with a near-perfect voltage I need for the RaspberryPi Ian lent me.  I'd like to setup a wall-wart to power the mintyboost, but also 2 D-cell batteries for backup if the power goes out.  How do I go about doing this without frying the batteries?  Do I need a microcontroller to detect power and swap over?  Or is there some trick I can use with diodes maybe?

Matt

  • Secretary
  • Full Member
  • ***
  • Posts: 186
    • View Profile
Re: Creating a battery backup circuit?
« Reply #1 on: June 11, 2012, 09:53:36 AM »
A pair of diodes should do the trick. You could get away with just one but a second will help prevent back-feeding the power supply from the battery when it's off (may or may not be an issue). The idea is that as long as your power supply voltage does not dip below one diode drop of the battery voltage then the diode will not conduct. This will keep the battery effectively disconnected from the circuit. If the power supply goes offline the voltage difference between the power supply rail and the battery will exceed the diode forward voltage and it will conduct. Here's a link to a simple schematic that shows how this works. Just ignore the 100 Ohm 10W resistor. That is only there for charging the battery with a 120mA trickle charge. This is fine for lead acid batteries but should never be attempted with litium ion batteries.


http://4sqrp.com/resource/10m_beacon/battery_backup.jpg


D2 is doing the switching. As long as voltage is being supplied from the wall supply, and that voltage does not drop more than ~0.7V below the battery voltage, then it will not conduct.


D1 prevents backfeeding the wall wart power supply when running on battery power.


A rectifier diode should be used for this purpose (although, your voltages and currents are so low you could probably get away with any kind of diode). A 1N4001 should be more than adequate and also give you up to 50V of reverse polarity protection.


-Matt

ThantiK

  • FamiLAB Member
  • Full Member
  • *
  • Posts: 237
  • Resident 3D printer guru.
    • View Profile
Re: Creating a battery backup circuit?
« Reply #2 on: June 11, 2012, 10:18:03 AM »
Thanks Matt - I figured it'd be something simple, I've just never done any kind of circuit like this.


What _would_ be a good type of battery to trickle charge like that?  NiMH?  I've yet to test how long two D batteries will power an idle Raspberry Pi, but recharging them when the power resumes isn't a bad idea.  NiMH batteries are "rechargable", and typically only put out 1.2v  So instead of 2 1.5v and a forward drop of 0.7v with that diode, I can probably do 3 1.2v with that 0.7v drop which puts me right at 2.9v.  If I can trickle-charge the batteries like that circuit does, that would be great.


Wikipedia seems to suggest it's alright:
Quote
The simplest way to safely charge a NiMH cell is with a fixed low current, with or without a timer. Most manufacturers claim that overcharging is safe at very low currents, below 0.1 C (where C is the current equivalent to the capacity of the battery divided by one hour).
« Last Edit: June 11, 2012, 10:29:30 AM by ThantiK »

Matt

  • Secretary
  • Full Member
  • ***
  • Posts: 186
    • View Profile
Re: Creating a battery backup circuit?
« Reply #3 on: June 11, 2012, 12:43:16 PM »
Yeah, NiMH or even NiCad would work. Heck, you could even get a small SLA battery depending on how much protection you want. Although I would think a lower current would be safer to avoid battery damage. Something like 0.05C.
-Matt