I've been gently scouring the Internet for a while looking and thinking about a power selection circuit after someone asked, then I came up to a problem:
Lots of boards give options for powering over USB or a barrel jack and therefore need a way to switch between: Arduino uses the op-amp as a comparator to switch a mosfet, but is it possible to use a mosfet just off the power rails or with single other transistors? The project I'm working on has quite tricky space and cost restraints so adding a op-amp seems kind of overkill.
I've thought of using diodes to simply give priority however I feel there must be a neater way...
Ideally I'd like to be able to draw about 300mA from the sources without anything getting too hot or magic-blue-smokey.
I tried a fairly simple solution on a circuit simulator of using a "self-on" mosfet (Source and gate connected) on the dominant barrel rail and a p-channel with gate connected to barrel rail as well on the USB rail. I don't really know enough about MOSFETs to tell if this was working and the circuit sim. seemed to basically function with no components...
Thanks in advanced for your help, I'm sorry to ask such a newbish question but the answer alludes me...