Go Down

Topic: Circuit to swap to battery power (Read 2211 times) previous topic - next topic

daveg360

I'm trying to design a circuit that automatically switches power to battery when mains supply (wall wart) is cut.  I'd rather not use relays.  I have in my head an idea of using a npn controlling a pnp but I can't make it work in practice.  Someone must have done this before?
If your system involves lethal voltages/life critical/flamable elements - you probably shouldn't need to ask.
The Arduino != PC.

Grumpy_Mike

#1
Jan 12, 2010, 04:46 pm Last Edit: Jan 12, 2010, 04:47 pm by Grumpy_Mike Reason: 1
Look at the Duemilanove schematic. They do that on there with the USB / DC input connector.

http://www.arduino.cc/en/uploads/Main/arduino-duemilanove-schematic.pdf

daveg360

Thanks Mike - looks a little more complicated than I hoped.  Would there be any harm in connecting a 12v lead acid to my circuit permanently via a diode?  I'm using a regulated 12v psu and the battery is on permanent trickle charge (obviously not if the power is cut and battery backup is required)
If your system involves lethal voltages/life critical/flamable elements - you probably shouldn't need to ask.
The Arduino != PC.

Grumpy_Mike

Sounds like a plan.
Can't see anything wrong with that.
If the power is cut then is there a diode in line with the PSU to prevent the battery discharging through that?


daveg360

If your system involves lethal voltages/life critical/flamable elements - you probably shouldn't need to ask.
The Arduino != PC.

daveg360

Hmm my circuit simulator reckons that they'll share the load during normal operation. Which will interfere with charging normal charging....  
If your system involves lethal voltages/life critical/flamable elements - you probably shouldn't need to ask.
The Arduino != PC.

daveg360

I think I can fudge it by putting 2 diodes on battery side to bring the voltage lower than the PSU.
If your system involves lethal voltages/life critical/flamable elements - you probably shouldn't need to ask.
The Arduino != PC.

Sweeduino

Sorry to disturb your conversation but I'm following it with great interrest. Could you supply some type of schematic for me to understand it better?

wortelsoft

#8
Jan 21, 2010, 02:45 pm Last Edit: Jan 22, 2010, 09:48 am by wortelsoft Reason: 1
Quote
Sorry to disturb your conversation


ROFL

edit:

Didn't want to be rude in any way.

daveg360

I'm still not sure what to do with this.  If I connect a battery in parallel with a psu - under normal conditions, will the battery share the load with the psu?  I guess that as the battery has a slightly higher voltage than my supply it will.  I can make it work in simulation by putting a extra diode in the circuit to reduce the battery voltage to less than the psu output.  This seems to stop the current flow.  Is this correct?
If your system involves lethal voltages/life critical/flamable elements - you probably shouldn't need to ask.
The Arduino != PC.

moonunit

Hello.

Have you had any luck with this? I am looking to do the exact same thing. I plan on running a project from mains, but I would like a battery to step in an power everything if there is an outage.

It would be extra great if the mains power kept the battery charged as well. :)

Thanks.

ill_switch

I designed a circuit to do this (though with NiMH batteries), had the PCB made, bought the parts, but never assembled or tested it. Here is that thread:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1269960867

Drmn4ea

This sounds like something that can be done with a P-channel MOSFET. Think of it as a transistor* that turns ON when its gate (base) is grounded and OFF when brought near its drain voltage. Tie the gate to the wall-wart input and a pull-down resistor to ground, it should cut off the battery supply whenever the wall wart voltage rises to near the battery voltage or above.

*Unlike a transistor though, the gate of a MOSFET is essentially an insulated capacitor plate and won't transfer any charge to its source/drain (unless something goes seriously wrong!). Also, it won't incur the 0.7V or so diode voltage drop that a transistor does.

Go Up