switching power sources with mosfets - Page 1
Forum section: electronics / beginners

author: ToBeFrank
author_rank: Regular Contributor
timestamp: January 30, 2011, 07:56:44 pm
content: Hello everyone. First, I apologize in advance if this is a really stupid question. I'm a software guy attempting to build my own pcb. I have two +5V power sources that I want to switch between. I also have a +8V source that is used to determine which power source to use. I've put together a circuit (attached) using mosfets, and I'd like to know if it will work, if there are any pitfalls, etc. If I understand correctly, if I pick mosfets with small RDSon values, the voltage drop through either mosfet should be minimal?

author: Simon
author_rank: Unknown
timestamp: January 30, 2011, 08:11:55 pm
content: err how are you switching between sources ? they are both triggered from the same input ?

author: ToBeFrank
author_rank: Regular Contributor
timestamp: January 30, 2011, 08:59:50 pm
content: I updated the attached schematic to be more representative of what I'm trying to do. The idea is if the external +8V is connected, I'll get power from it. If it is not connected, but the secondary source is connected, I'll get power from the secondary source. If both are connected, I'll get power from the external +8V.EDIT: I should mention I'm trying to do this as cheaply as possible with as few components as possible. The ICs that do this for me are fairly expensive, which is why I'm trying not to use one.

author: Zero999
author_rank: Super Contributor
timestamp: January 30, 2011, 09:10:36 pm
content: A pull-down on the 8V might be a good idea.The N-MOSFET needs to be able to pass the required current when gate voltage is only 3V. If you can't find a suitable device, you could use P-channel and connect the gate to 0V using an NPN BJT when the 5V is on.

author: armandas
author_rank: Frequent Contributor
timestamp: January 30, 2011, 09:12:23 pm
content: I see two problems with your design:If the 8V source is disconnected, the gate of P-type MOSFET will be floating.N-type MOSFETs are normally used to connect the load to ground, not to power. Since you have a higher gate voltage, this might work, but.. Maybe you can leave the N-MOSFET out altogether and rely on disconnecting the 5V source.

author: ToBeFrank
author_rank: Regular Contributor
timestamp: January 30, 2011, 09:21:55 pm
content: Quote from: Hero999 on January 30, 2011, 09:10:36 pmWhat would be a good value for this? I assume it has to be higher than the effective resistance of the rest of my circuit? I don't know if I could calculate that.Quote from: Hero999I think you may have read my schematic wrong. The gate voltage is +8V. If not, I don't understand why I need to worry about a 3V gate voltage. If you could explain I'd appreciate it.Quote from: armandasThe pull-down as suggested by Hero999 would fix this, correct?Quote from: armandasI tried this at first. The problem is when connecting the secondary source for power (+8V disconnected), I end up with 3.7V at the P MOSFET gate. That results in a .6V voltage drop through the MOSFET. The 4.4V is not enough to run my micro.EDIT: Hmm, would the pull-down on the +8V fix this last problem?

author: armandas
author_rank: Frequent Contributor
timestamp: January 30, 2011, 09:30:13 pm
content: Quote from: ToBeFrank on January 30, 2011, 09:21:55 pmYou want a large'ish value so that current through it is small. Maybe 10k.Quote from: ToBeFrank on January 30, 2011, 09:21:55 pmYes.Quote from: ToBeFrank on January 30, 2011, 09:21:55 pmI don't see how you can get 3.7V at the gate. Maybe you could put a Schottky diode on the output of the 7805.

author: ToBeFrank
author_rank: Regular Contributor
timestamp: January 30, 2011, 09:41:30 pm
content: Quote from: armandas on January 30, 2011, 09:30:13 pmI was confused by this as well. I'm assuming the 5V going into the out pin of the 7805 comes out the in pin as 3.7V, which then goes to the P MOSFET gate? I started looking at the MOSFET for the 7805 because I can't use a diode. The micro I'm using has a minimum power supply of 4.5V. It does not have brown-out detection so I have a reset micro that holds the micro in reset if the power supply falls to 4.5-4.75V. I can't have more than a .25V voltage drop.

author: Zero999
author_rank: Super Contributor
timestamp: January 30, 2011, 10:00:14 pm
content: Quote from: ToBeFrank on January 30, 2011, 09:41:30 pmIt makes sense to me.When the 8V is disconnected the gate of the P-MOSFET is weakly pulled towards 0V by the internal circuitry of the LM7805.Quote from: ToBeFrank on January 30, 2011, 09:21:55 pmNo, I've read your schematic correctly.The input voltage is 8V, the output voltage is 5V, the gate of the N-MOSFET is connected to 8V input and the source to 5V so the gate voltage is only 3V. If the MOSFET has too higher threshold voltage to pass the required current, it will have a high voltage drop.

author: ToBeFrank
author_rank: Regular Contributor
timestamp: January 30, 2011, 10:06:18 pm
content: Quote from: Hero999 on January 30, 2011, 10:00:14 pmAh, ok. I misunderstood "gate voltage". The N-MOSFET I'm looking at has a RDSon of 34-48mOhms at 2.5V and 65-91mOhms at 1.8V so I should be ok.

author: ToBeFrank
author_rank: Regular Contributor
timestamp: January 30, 2011, 11:24:11 pm
content: I have corrected the attached schematic. Provided I use the correct N-MOSFET, I can be somewhat confident this will work?