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
-
1You might get a useful response here, but this sounds like something that would be better asked on electronics.stackexchange.comtimemage– timemage2020年11月26日 14:25:12 +00:00Commented Nov 26, 2020 at 14:25
-
Just a side note: 5.4V on a USB supply is outside of specs. It should be 5.25V maximum.StarCat– StarCat2020年11月26日 16:16:54 +00:00Commented Nov 26, 2020 at 16:16
1 Answer 1
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:
-
actually, just the part of picture containing mosfet on the left would suffice.Tirdad the Whitehand– Tirdad the Whitehand2020年12月26日 20:47:02 +00:00Commented Dec 26, 2020 at 20:47
-
1It's more of a personal preference, but I never liked it when someone post a bit of a schematic and a key net name (in this case "+5V") is missing the source of the signal. That's why when I copied the schematic I included the 5 volt regulator on the right.st2000– st20002020年12月27日 18:53:44 +00:00Commented Dec 27, 2020 at 18:53