Author Topic: Power Switching Circuit  (Read 5201 times)

0 Members and 1 Guest are viewing this topic.

Offline unknowndomainTopic starter

  • Regular Contributor
  • *
  • Posts: 63
  • Country: gb
    • Blog
Power Switching Circuit
« on: March 07, 2014, 10:38:11 pm »
I am working on a project where I want, like the Arduino to be able to switch between two different power supplies, one will be a 9V wall wart, and the other a 9V battery. I would prefer to be able to do this without using a mechanical switch.

I looked into it and most of the stuff I find is about battery charging which I don't need. I found somewhere that you might need a Power MOSFET but I don't really understand the theory of operation.

Any hints would be appreciated!
 

Offline Phaedrus

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: us
Re: Power Switching Circuit
« Reply #1 on: March 07, 2014, 11:06:27 pm »
Get two power fets rated for 20-50% higher than the current you need and appropriate voltage. Try and get one with a logic level gate. Otherwise you may need another transistor to drive it.

Connect the source of one to your first power source, and the source of the other fet to your other power source. Connect the drains together, with a fairly large capacitor. Connect the gates (through another transistor if necessary) to your Arduino. Turn one off, then turn the other on <1ms later.
"More quotes have been misattributed to Albert Einstein than to any other famous person."
- Albert Einstein
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: Power Switching Circuit
« Reply #2 on: March 07, 2014, 11:08:24 pm »
Do you want to switch to the plugpack as soon as its connected, or in software choose between the 2?

if the first then you can look into a power OR'ing controller (a little IC that is made for this purpose)

if the second, using an analog switch with a logic level input, there are plenty out there with normally open and normally closed positions, though an optoisolated one / pair may be more practical as not many analog switches like there inputs higher than there supply voltage,
 

Offline unknowndomainTopic starter

  • Regular Contributor
  • *
  • Posts: 63
  • Country: gb
    • Blog
Re: Power Switching Circuit
« Reply #3 on: March 08, 2014, 09:57:56 pm »
@rerouter I want it to switch automatically between the two with preference to the plugpack.

@phaedrus

Would the ST STP36NF06L be suitable?

What rating of capacitor would you have, and what do you mean through another transistor?

Finally, I've drawn a circuit below does this look right?

 

Offline ecat

  • Frequent Contributor
  • **
  • Posts: 296
  • Country: gb
Re: Power Switching Circuit
« Reply #4 on: March 08, 2014, 10:17:05 pm »
Many power sockets have a inbuilt switch arrangement which is open when a power plug is plugged in and closed when the power plug is removed, hence the socket has three terminals.

If you are happy to have the battery disconnect whenever the power plug is inserted, arrange the battery supply to feed through this switch and Bob's your uncle.

A more complex solution is only necessary if you need the battery to take over when the power pack is off but the plug is still inserted. In this case a single FET is needed ? (I suck at electronics)
 

Offline unknowndomainTopic starter

  • Regular Contributor
  • *
  • Posts: 63
  • Country: gb
    • Blog
Re: Power Switching Circuit
« Reply #5 on: March 08, 2014, 10:19:22 pm »
@ecat you are right, but its on the outter, which means I would have to have centre negative, which isn't standard. I'd prefer to do something electronic.
 

Offline Phaedrus

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: us
Re: Power Switching Circuit
« Reply #6 on: March 09, 2014, 03:55:11 am »
@rerouter I want it to switch automatically between the two with preference to the plugpack.

@phaedrus

Would the ST STP36NF06L be suitable?

What rating of capacitor would you have, and what do you mean through another transistor?

Finally, I've drawn a circuit below does this look right?



Not quite. I'll draw it for you.
"More quotes have been misattributed to Albert Einstein than to any other famous person."
- Albert Einstein
 

Offline unknowndomainTopic starter

  • Regular Contributor
  • *
  • Posts: 63
  • Country: gb
    • Blog
Re: Power Switching Circuit
« Reply #7 on: March 09, 2014, 04:27:41 am »
@rerouter I want it to switch automatically between the two with preference to the plugpack.

@phaedrus

Would the ST STP36NF06L be suitable?

What rating of capacitor would you have, and what do you mean through another transistor?

Finally, I've drawn a circuit below does this look right?



Not quite. I'll draw it for you.

That would be nice, thanks!
 

Offline Phaedrus

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: us
Re: Power Switching Circuit
« Reply #8 on: March 09, 2014, 04:49:36 am »


This is assuming your MOSFETs have logic-level gates. If they don't you'll need another pair of NPN or PNP transistors to drive the gates fully.

Maybe 16V or 25V 2200uF for the cap. The cap will give you a bit of "hold-up time" to stop you from losing power during the switch-over. As long as you switch in less than 1ms and it's less than, I'd say 25mA.
« Last Edit: March 09, 2014, 04:56:50 am by Phaedrus »
"More quotes have been misattributed to Albert Einstein than to any other famous person."
- Albert Einstein
 

Offline electronics man

  • Frequent Contributor
  • **
  • Posts: 686
  • Country: gb
Re: Power Switching Circuit
« Reply #9 on: March 09, 2014, 12:44:30 pm »
why dont you just use a relay with a mosfet to drive it.
follow me on twitter @get_your_byte
 

Offline unknowndomainTopic starter

  • Regular Contributor
  • *
  • Posts: 63
  • Country: gb
    • Blog
Re: Power Switching Circuit
« Reply #10 on: March 09, 2014, 03:11:29 pm »
@phaedrus I don't understand the drawing entirely... what is are the two IO things on the right hand side?
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7765
  • Country: de
  • A qualified hobbyist ;)
Re: Power Switching Circuit
« Reply #11 on: March 09, 2014, 03:44:56 pm »
If you don't mind a small voltage drop you could try the solution with two diodes, or-ing the power inputs.
« Last Edit: March 09, 2014, 04:40:42 pm by madires »
 

Offline Phaedrus

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: us
Re: Power Switching Circuit
« Reply #12 on: March 09, 2014, 04:35:21 pm »
Those would be IO (input/output) pins on your Arduino or other MCU, which you would program so that the one controlling the Vbatt mosfet is high when you want to run on battery; then when you want to switch to the adapter you pull the Vbatt mosfet low, turning it off, and within about 1ms drive the Vcc mosfet high, allowing power from your adapter to power your chip.

Diodes would be simpler, but the 0.6V drop is inefficient. Relays are also a viable solution, but in this circuit would work similarly to mosfets, so it's kind of moot.



I'm getting the impression that you don't know much about electronics.
"More quotes have been misattributed to Albert Einstein than to any other famous person."
- Albert Einstein
 

Offline lapm

  • Frequent Contributor
  • **
  • Posts: 564
  • Country: fi
Re: Power Switching Circuit
« Reply #13 on: March 09, 2014, 04:46:22 pm »
Personally i would got with two schotky diode solution and not worry about witch one is used. Unless there is some special circumstance we need to know about.
Electronics, Linux, Programming, Science... im interested all of it...
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf