My PCB can be supplied by internal LiPo, USB or via an external supply through a data connector that also carries power. Right now, I have the power inputs or-ed with LM66100's.

I'd like to prioritise the supply options as follows: USB > EXT > Battery. The LM66100s always switch to the highest voltage, so that makes USB highest priority. However, the external supply can come from a battery in the other device as well, and so it can be lower than the internal battery's voltage. Since the battery there is larger than the internal one, it should always be prioritised above the internal battery.

I have never designed such a priority switch, so I'd like to ask for pointers as to how to achieve this prioritization.

Some data as requested: The battery voltage (and external supply) is from standard LiPo 1S batteries, so let's say between 3.5V and 4.2V. Current is 500mA max.

  • 1
    \$\begingroup\$ I would avoid re-inventing the wheel, there are chips that do exactly what you want like the TPS2113, where you can set priorities and even current limits. \$\endgroup\$
    – Ron Beyer
    Commented Apr 20, 2020 at 13:49
  • \$\begingroup\$ What valid voltage supply ranges do you have for the batteries and what load current is taken by the target circuit. \$\endgroup\$
    – Andy aka
    Commented Apr 20, 2020 at 14:43
  • \$\begingroup\$ I updated the specs as requested. \$\endgroup\$
    – Crazor
    Commented Apr 21, 2020 at 7:45
  • \$\begingroup\$ @RonBeyer For switching two sources, I agree. I use the TPS2113 in another application, and it's great. For this applicaton, my homebrewed solution outlined in the answer below is cheap, compact and does everything I need, without having more than one ideal diode in the important path from battery to the system. And on top of that, I have digital status outputs to tell the CPU what power supply is currently active. \$\endgroup\$
    – Crazor
    Commented May 6, 2021 at 13:22

1 Answer 1


So let me try to describe what I’ve come up with. First of all, here’s an overview of the functionality of the LM66100: It compares the voltage at the !CE pin to VIN. If the voltage at !CE is higher than at VIN, the LM66100 disables its VOUT. If the voltage at the !CE pin is lower than VIN, it switches VIN through to VOUT via its internal MOSFET. Additionally, the ST pin outputs the status of the device: When the device is turned on, ST is High-Z, when the device is off, ST is pulled low.

Now to the reasoning behind my circuit:

3-input supply priority scheme

  1. The !CE series resistors R19, R21, R23 are current-limiting resistors in case of reversed polarity, as recommended by the data sheet

  2. Let’s start with VBAT=4V, VEXT=0V, USB_VBUS = 0V. Since U5’s and U6’s ST are low, U7’s !CE is low and VINT is powered through U7 by VBAT.

  3. Now VEXT comes on with 4.2V (it’s maximum). Since U6’s !CE is driven low by U5 via R25, VINT is powered through U6 by VEXT. U6’s ST goes HIGH-Z, U5’s ST is still low, weakly pulling U6’s and U7’s !CE low. But VEXT is pulling U7’s !CE high via D6 and R18, so U7 turns off and VBAT is disconnected from VINT. Diode D6 prevents VEXT from back-driving USB_VBUS.

  4. Now USB_VBUS comes on (5V). VEXT can never drive U5’s !CE pin to a higher voltage than USB_VBUS, so U4 turns on and connects VINT to USB_VBUS. U5 lets go of it’s ST output, and also, U6’s !CE is driven high by USB_VBUS via D5, R17 and R21, and with U6’s !CE now being higher than it’s VIN, it disconnects VBAT from VINT. Diode D6 prevents USB_VBUS back-driving VEXT via R22 and R23.

This is proven to work in my application now, so I removed my feedback request and updated the schematic.

  • \$\begingroup\$ Is this scheme works correctly? I search the same solution for my case. \$\endgroup\$
    – Urfin
    Commented May 6, 2021 at 7:28
  • \$\begingroup\$ This works fine. The schematic is missing a diode or two though, right before the VINs of the top two LM66100s. Makes sense when you stop thinking about „ideal diodes“ as diodes, but as what they really contain between VIN and VOUT: FETs. Since those are „two-way“, there are paths for latching behaviour without the mentioned diodes. \$\endgroup\$
    – Crazor
    Commented May 6, 2021 at 7:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.