I have this circuit, which I expect will protect my primary cell from USB voltage and my USB port from being powered by the battery.
My logic is;
- D2 will stop anything flowing out of the USB port from the rest of the system
- When USB 5V is present, the PMOS (Q1) will be turned off regardless of if the battery is in place and restrict flow to the battery terminals.
- When the USB 5V is not present the PMOS will be on, allowing current to flow from the battery.
- C2 will provide a small amount of charge to handle power loss situations (looking at it now I think I'll increase R3 to restrict discharge back out through the USB port in a power loss scenario).
Is this a sensible circuit?