P channel mosfet as a switch different setups for USB and battery switching
This circuit should give the full 5V on its output when the 5V power supply is connected at the cost of about 1mA idle supply current when it's operating on battery.







simulate this circuit &ndash; Schematic created using CircuitLab

The circuit compares the voltage of the power supply to that of the battery. If the power supply has a higher voltage than the battery, it switches on M1, otherwise it switches on M2.