Electronic – Power supply or-ing with ideal diodes – priorities

battery-operatedpower supplyusb

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.

Best Answer

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.

Related Topic