Author Topic: switching power sources with mosfets  (Read 5678 times)

0 Members and 1 Guest are viewing this topic.

Offline ToBeFrankTopic starter

  • Regular Contributor
  • *
  • Posts: 234
  • Country: us
switching power sources with mosfets
« on: January 30, 2011, 07:56:44 pm »
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?
« Last Edit: January 30, 2011, 11:22:48 pm by ToBeFrank »
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 18017
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: switching power sources with mosfets
« Reply #1 on: January 30, 2011, 08:11:55 pm »
err how are you switching between sources ? they are both triggered from the same input ?
« Last Edit: January 30, 2011, 08:14:15 pm by Simon »
 

Offline ToBeFrankTopic starter

  • Regular Contributor
  • *
  • Posts: 234
  • Country: us
Re: switching power sources with mosfets
« Reply #2 on: January 30, 2011, 08:59:50 pm »
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.
« Last Edit: January 30, 2011, 09:03:08 pm by ToBeFrank »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19897
  • Country: gb
  • 0999
Re: switching power sources with mosfets
« Reply #3 on: January 30, 2011, 09:10:36 pm »
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.
 

Offline armandas

  • Frequent Contributor
  • **
  • Posts: 336
  • Country: jp
    • My projects
Re: switching power sources with mosfets
« Reply #4 on: January 30, 2011, 09:12:23 pm »
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.
 

Offline ToBeFrankTopic starter

  • Regular Contributor
  • *
  • Posts: 234
  • Country: us
Re: switching power sources with mosfets
« Reply #5 on: January 30, 2011, 09:21:55 pm »
A pull-down on the 8V might be a good idea.

What 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: Hero999
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.

I 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: armandas
If the 8V source is disconnected, the gate of P-type MOSFET will be floating.

The pull-down as suggested by Hero999 would fix this, correct?

Quote from: armandas
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.

I 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?
« Last Edit: January 30, 2011, 09:24:05 pm by ToBeFrank »
 

Offline armandas

  • Frequent Contributor
  • **
  • Posts: 336
  • Country: jp
    • My projects
Re: switching power sources with mosfets
« Reply #6 on: January 30, 2011, 09:30:13 pm »
What 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.

You want a large'ish value so that current through it is small. Maybe 10k.

The pull-down as suggested by Hero999 would fix this, correct?

Yes.

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

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

Offline ToBeFrankTopic starter

  • Regular Contributor
  • *
  • Posts: 234
  • Country: us
Re: switching power sources with mosfets
« Reply #7 on: January 30, 2011, 09:41:30 pm »
I 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.

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

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19897
  • Country: gb
  • 0999
Re: switching power sources with mosfets
« Reply #8 on: January 30, 2011, 10:00:14 pm »
I 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.

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

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

I 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.
No, 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.
 

Offline ToBeFrankTopic starter

  • Regular Contributor
  • *
  • Posts: 234
  • Country: us
Re: switching power sources with mosfets
« Reply #9 on: January 30, 2011, 10:06:18 pm »
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.

Ah, 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.
 

Offline ToBeFrankTopic starter

  • Regular Contributor
  • *
  • Posts: 234
  • Country: us
Re: switching power sources with mosfets
« Reply #10 on: January 30, 2011, 11:24:11 pm »
I have corrected the attached schematic. Provided I use the correct N-MOSFET, I can be somewhat confident this will work?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf