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:
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).