I know there are ways to create a simple auto-selector using a mosfet and op-amp, or even simpler using just Diodes, but is it possible to have this work:

enter image description here

The mosfet is P-Channel so floating gate will flow the battery current while high will (or should) stop it. The Diode should prevent the 3v battery voltage from oscillating the gate open and shut when the USB cable is not plugged in. In other words when the USB cable is plugged in, 5v will suddenly flow to the gate which will stop the battery supply but allow the 5v through the diode to go to the main VCC line.

The battery is 3.7v (LiPo) and USB is 5v as expected. I realize this is a perfect candidate for just using ORing Diodes but I'm trying to understand why this technique would (or would not) work. In that light please be explicit as possible in your explanations (I am not a university educated EE so my theory is not great).

[Edit] Corrected "N-Channel" to "P-Channel" as schematic shows and was intended. [Edit] Changed image to reflect LiPo voltage (3.7v, not 3.3v).

  • 1
    \$\begingroup\$ Battery symbol is inverted. \$\endgroup\$
    – Russell McMahon
    Jan 25, 2013 at 3:10
  • \$\begingroup\$ V_LiPo is 3.0V - 4.2V (or lower) and circuit must work for all valid Vin. (That's not a comment on this cct - just a requirement). \$\endgroup\$
    – Russell McMahon
    Jan 25, 2013 at 3:16

1 Answer 1


No, it won't work that way.

First of all, you say N-channel, but the symbol in your schematic is a P-channel MOSFET. Look at how the body diode is pointed — it won't stop anything.

Even if it really is an N-channel device, the gate would have to be driven well above (Vth, to be specific) above the source in order to turn it on. No enhancement-mode FET will pass current (except through the body diode) with a "floating" gate.

Now, if you take your P-channel device and swap the drain and source terminals in your schematic, and add a resistor (100K or so) from the gate to ground, you'll have something that does something close to what you want. When the external power source is not present, the resistor will pull the gate to ground, relative to the source terminal at +3.3V, and the transistor will turn on. When the external power source is present, the gate will be driven to +5V, which will cut off the transistor, and the circuit will receive power through your external diode (but it won't be regulated to 3.3V).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.