user69193: I have a small project I am working on that accepts power from either a 5v DC power source or a USB power source.
Now, I know that both of the power sources are effectively 5v. I have measured the power on both with my meter and can see that the USB supply is at 5.4 and the DC supply is at 5.01v.
I would like to be able to build something that switches over to the USB supply when the cable is connected. However, I have never done this before. I have taken a look around on Google already and have read some things about P Channel MosFETs and PowerPath controllers - but I am a little confused as to whether the two incoming voltages I have are suitable for this?
Would someone be able to give me a little advice on this at all?
Cheers,
Rafa

user20245: Consider copying the Arduino Uno reference design.  This is part of that schematic showing the MOSFET used to turn on / off the USB power when the barrel jack power source is active:


69193: <p>I have a small project I am working on that accepts power from either a 5v DC power source or a USB power source.</p>
<p>Now, I know that both of the power sources are effectively 5v. I have measured the power on both with my meter and can see that the USB supply is at 5.4 and the DC supply is at 5.01v.</p>
<p>I would like to be able to build something that switches over to the USB supply when the cable is connected. However, I have never done this before. I have taken a look around on Google already and have read some things about P Channel MosFETs and PowerPath controllers - but I am a little confused as to whether the two incoming voltages I have are suitable for this?</p>
<p>Would someone be able to give me a little advice on this at all?</p>
<p>Cheers,</p>
<p>Rafa</p>
 20245: <p>Consider copying the <a href="https://www.arduino.cc/en/uploads/Main/arduino-uno-schematic.pdf" rel="nofollow noreferrer">Arduino Uno reference design</a>.  This is part of that schematic showing the MOSFET used to turn on / off the USB power when the barrel jack power source is active:</p>
<p><a href="https://i.stack.imgur.com/ypgzv.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ypgzv.jpg" alt="enter image description here" /></a></p>
