Electronic – Automatic switching between external 5V and USB bus power supplies

powerswitchingusb

I'm designing a USB device which can either be powered by USB or an external 5V power supply.

When an external 5V power supply is present, the device should be powered solely by this external supply. Otherwise, the device should be powered by the USB bus. In other words, the external supply should always be prioritized, regardless of voltage level compared to Vbus. This rules out solutions based on diode-ORing.

Furthermore, the device will potentially consume quite a bit of power (several amps), so a solution based on MOSFETs would be preferred. When drawing a lot of power, the external supply is required.

So far I've found only one IC which seems to do what I want, the LTC4417. However it's rather expensive and supports up to three supplies, which is more than I need. Does anyone know of other simpler (cheaper?) ICs?

I've come up with the circuit below which appears to work in simulation, but I'm not sure it will work in practice. For instance, is it possible to get an inrush current from Vbus to Vext during the transition period? Does anyone know of a simpler circuit to safely switch between the two power supplies?

power switch circuit

Best Answer

Please check this circuit (I have not simulated this and used some random mosfets).

CASE I: VBUS-ON EXT5V-OFF: OUTPUT voltage = VBUS - Vf (Forward diode drop of D1, select D1 with low Vf). R1 will pull Gate node of Q2 and Q3 to OUTPUT voltage and turns them OFF , no power will flow to EXT5V.

OUTPUT ~ VBUS

CASE II: VBUS-OFF EXT5V-ON: OUTPUT voltage = EXT5V - Q2 and Q3 drop due to Rdson. Voltage at R2 turns off Q4 and turns on Q1. Q1 pulls Q2 and Q3 Gate nodes to GND potential and turns them ON. D1 blocks power flow to VBUS.

OUTPUT ~ EXT5V

CASE III: VBUS,EXT5V-ON OR Plugging EXT5V after VBUS: In this scenario circuit will prioritise EXT5V over VBUS. Potential at R2 will shutdown VBUS path and Turns on Q2-Q3 path.

OUTPUT ~ EXT5V

enter image description here