Go Down

Topic: Switching power supplies? (Read 1 time) previous topic - next topic


I'm designing a circuit where I need the ability to switch between power from USB or a battery using a small slide switch. The switch has a fairly low power rating, hence the potential divider on its common terminal. The other terminals are connected to the gate pins of a dual channel MOSFET. From there, the 9V supply is regulated, and both outputs connect to the 5V rail. The attached schematic should clarify everything.

I think this will work, but is there an easier or better way to do it?


Sep 03, 2012, 07:23 pm Last Edit: Sep 03, 2012, 07:25 pm by sdturner Reason: 1
No this will not work.

If they are N Channel FETs, they will only turn on when the gate is a few volts above the source and they are wired backwards. There is an inherent body diode that conducts when the source is higher than the drain.

For high side switching you want P Channel FETs. In that case the transistor turns on when the gate is a few volts LOWER than the source. You have it wired correctly (assuming the drains go to your circuit) but you need to pull the gates up to the supply they are switching (VBUS and 9V respectively) and you need to switch the gate to ground. Make sure the FET can handle 9V gate voltage (probably it can) and then it will work.

The simplest solution is to get a switch rated for the power you need.



I think you're probably right. Using a small switch was an effort to save space, but overall this will end up using more. I'll find a new switch.

Thanks for your help, Steve!


Sep 04, 2012, 01:06 am Last Edit: Sep 04, 2012, 01:12 am by roryc Reason: 1
Apologies for the double post.

Out of interest, I tried making the changes you suggested. Hopefully the MOSFET is correct now, I see I'd managed to wire it backwards earlier. I'm using two voltage dividers to ensure that each gate voltage remains below its corresponding drain voltage. Just to be clear, S2 is a DPDT switch and JP2 is the battery connection.

Does this look any better?


High side switching can't be done with n-channel MOSFETs - your circuit is a source-follower which drop some volts (depending on the MOSFETs in question and the current drawn), and dissipate significant power.  The MOSFETs are not really switches in this configuration, they are current amplifiers (with vast gain).  In particular when running from the USB 5V the output cannot be anything like 5V, which presumably was the point.

Do high-side switching with P-channel MOSFETs, or low-side switching with N-channel MOSFETs (low side switching is problematical as there is no common ground between the supply and the load).
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]


Sep 04, 2012, 01:50 am Last Edit: Sep 04, 2012, 02:29 am by Rory C Reason: 1
It sounds like I need to read up on MOSFETs. But it sounds like you're saying that if I use a P-channel MOSFET and swap the source and drain connections, the circuit is correct?

Edit: I went ahead and did some research, and I see why the P-channel FET is required now. Wired properly, it seems like it would indeed work in the above configuration. Thanks for the help, Mark.


Keep the following in mind when working with FETs:

  • FETs are off when the Gate and Source are the same voltage (or close)

  • N Channel FETs turn on when the Gate is higher than the Source

  • P Channel FETs turn on when the Gate is lower than the Source

  • N-CHannel FETs have a Body Diode that conducts from Source to Drain (Source usually is connected to ground)

  • P-CHannel FETs have a Body Diode that conducts from Drain to Source (Source usually is connected to power)

This is not all-encompasing, but it will help avoid the most basic errors. Many FETs these days are "Logic Level" meaning they will be fully on when the G-S voltage is around 3V or more. Some FETs, especially older parts, require more voltage to turn on.



That's really helpful, thanks Steve. I'd rushed into using a MOSFET under the impression that it simply acted as a switch, but evidently it's not that simple. Asking here has really cleared things up though.

Go Up