Chester, UK
Offline
Sr. Member
Karma: 2
Posts: 489
Trying to return the love to none logic level MOSFETS
|
 |
« on: January 12, 2010, 10:35:44 am » |
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)
Online
Brattain Member
Karma: 277
Posts: 25541
Solder is electric glue
|
 |
« Reply #1 on: January 12, 2010, 10:46:17 am » |
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
Sr. Member
Karma: 2
Posts: 489
Trying to return the love to none logic level MOSFETS
|
 |
« Reply #2 on: January 12, 2010, 10:51:18 am » |
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)
Online
Brattain Member
Karma: 277
Posts: 25541
Solder is electric glue
|
 |
« Reply #3 on: January 12, 2010, 11:05:06 am » |
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
Sr. Member
Karma: 2
Posts: 489
Trying to return the love to none logic level MOSFETS
|
 |
« Reply #4 on: January 12, 2010, 11:07:56 am » |
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
Sr. Member
Karma: 2
Posts: 489
Trying to return the love to none logic level MOSFETS
|
 |
« Reply #5 on: January 12, 2010, 11:17:48 am » |
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
Sr. Member
Karma: 2
Posts: 489
Trying to return the love to none logic level MOSFETS
|
 |
« Reply #6 on: January 12, 2010, 11:18:33 am » |
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
Newbie
Karma: 0
Posts: 25
Arduino rocks
|
 |
« Reply #7 on: January 21, 2010, 08:40:02 am » |
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
Sr. Member
Karma: 1
Posts: 290
(:-)
|
 |
« Reply #8 on: January 21, 2010, 08:45:58 am » |
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
Sr. Member
Karma: 2
Posts: 489
Trying to return the love to none logic level MOSFETS
|
 |
« Reply #9 on: January 22, 2010, 07:02:30 am » |
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
Newbie
Karma: 0
Posts: 8
Arduino rocks
|
 |
« Reply #10 on: August 19, 2010, 12:01:59 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Sr. Member
Karma: 0
Posts: 318
Arduino rocks
|
 |
« Reply #11 on: August 19, 2010, 01:33:39 pm » |
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
Full Member
Karma: 0
Posts: 129
Batteries? We don't need no steenking batteries!
|
 |
« Reply #12 on: August 20, 2010, 12:14:32 am » |
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
|
|
|
|
|
|