Pages: [1]   Go Down
Author Topic: Circuit to swap to battery power  (Read 1885 times)
0 Members and 1 Guest are viewing this topic.
Chester, UK
Offline Offline
Sr. Member
****
Karma: 2
Posts: 489
Trying to return the love to none logic level MOSFETS
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

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

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33374
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: January 12, 2010, 10:47:36 am by Grumpy_Mike » Logged

Chester, UK
Offline Offline
Sr. Member
****
Karma: 2
Posts: 489
Trying to return the love to none logic level MOSFETS
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
Logged

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

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33374
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

Logged

Chester, UK
Offline Offline
Sr. Member
****
Karma: 2
Posts: 489
Trying to return the love to none logic level MOSFETS
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ooh good point.

Cheers Mike
Logged

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

Chester, UK
Offline Offline
Sr. Member
****
Karma: 2
Posts: 489
Trying to return the love to none logic level MOSFETS
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmm my circuit simulator reckons that they'll share the load during normal operation. Which will interfere with charging normal charging....  
Logged

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

Chester, UK
Offline Offline
Sr. Member
****
Karma: 2
Posts: 489
Trying to return the love to none logic level MOSFETS
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think I can fudge it by putting 2 diodes on battery side to bring the voltage lower than the PSU.
Logged

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

Sweden
Offline Offline
Newbie
*
Karma: 0
Posts: 27
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Netherlands
Offline Offline
Sr. Member
****
Karma: 1
Posts: 290
(:-)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Sorry to disturb your conversation

ROFL

edit:

Didn't want to be rude in any way.
« Last Edit: January 22, 2010, 03:48:01 am by wortelsoft » Logged

Chester, UK
Offline Offline
Sr. Member
****
Karma: 2
Posts: 489
Trying to return the love to none logic level MOSFETS
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley

Thanks.
Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 318
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Boston, MA
Offline Offline
Full Member
***
Karma: 0
Posts: 129
Batteries? We don't need no steenking batteries!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: