I'm looking into designing a power supply for an RPi that can take both USB and battery at the same time, but only pull power from one of the sources. I'm not quite sure how to go about it, I was thinking of using some mosfet switching circuitry but when simulating I was getting some pretty large voltage drops across the Fet temrinals.
My other solution was just having both input power supplies go through a diode and into a buck/boost converter that outputs 5v. I'd really like to keep it as efficient as possible, and couldn't find much online regarding multiple power input switching, so any help or pointing in the right direction would be great. I'd also like to avoid having the battery draining when it's connected to power, so would rather a switching circuit that turned off the other power supply.