There are a few proven ways to let a device run from USB when present and fall back to the battery when not—without browning out the system or back-feeding the USB port. Below are the common architectures, when to use each, and practical schematics.
0) First decide your requirements
-
Priority: Usually USB (5 V) → highest; Battery → backup
-
Battery type: Single-cell Li-ion/Li-Po is most common
-
System load: Peak/average current, inrush on plug-in
-
USB type: Micro-B vs USB-C (need CC resistors / current limits)
-
Protections: OVP/UVLO, reverse-current block, short-circuit, ESD
-
Features: “Load sharing” (supply the system while charging), shipping-mode, power-good signal, OTG/boost?
1) Quick & dirty: two Schottky diodes (OR-ing)
How it works: The higher source wins through a diode; the other is reverse-biased.
Pros
-
Cheapest, simplest, tiny BOM
-
No control logic needed
Cons
-
Wastes headroom: each diode drops ~0.25–0.45 V → heat + lower system voltage
-
No true reverse-current blocking into the “losing” source at 0 V
-
Marginal if system needs tight 5 V or high current
Use if: ultra-low cost, light loads, and you can tolerate the drop.
2) Ideal-diode OR-ing with P-MOSFETs (lossless “diodes”)
How it works: A P-MOSFET oriented so its body diode allows forward flow; a controller drives the gate to keep only milliohms of drop and blocks reverse current.
Controller IC options (examples): ideal-diode or power-path controllers (e.g., LTC4412/4413 family, TI LM66100/LM66200, etc.).
RDS(on) of the FET sets loss; choose a logic-level P-FET with low RDS(on) at your worst-case VGS.
Pros
-
Very low drop (tens of mV), higher efficiency, less heat
-
True reverse-current blocking and smooth handover
-
Scales to higher current easily
Cons
-
Slightly higher BOM cost/complexity than two diodes
-
Need correct FET orientation and stable gate drive
Use if: efficiency matters, moderate–high current, tighter voltage budget.
3) Power-MUX / Autoswitch IC (one-chip decision maker)
How it works: A dedicated power multiplexer picks the active source by priority and handles inrush, reverse blocking, and fault protection.
Typical devices (examples): TI TPS2113A/TPS2121, ADI/LTC power-path controllers, etc.
Pros
-
Cleanest solution: prioritization (USB first), fast-swap, current limit, inrush control
-
Often includes power-good and fault pins for the MCU
-
Minimal design risk
Cons
-
Highest IC cost among the three
-
Still need upstream ESD/OVP and layout care
Use if: you want robustness, surge control, explicit priority, and minimal tuning.
4) Charger with “Power-Path / Load-Sharing” built-in
For single-cell Li-ion, pick a linear or switching charger that exposes a “SYSTEM” pin separate from the “BAT” pin. When USB is present, the system runs from the input while the battery charges; if USB is removed, it seamlessly falls back to the battery.
Charger IC examples (features vary): MCP73871, TI BQ2407x/BQ24195 families, etc.
Look for terms like Power-Path, Dynamic Power Management (DPM), Input current limit, Ship-mode.
Pros
-
One chip handles charge + source selection + load sharing
-
Input current limit respects USB (100 mA/500 mA/Type-C)
-
Often provides status/PG pins and battery temperature monitoring (NTC)
Cons
-
You’re tied to that charger’s limits (charge current, thermal)
-
Switching versions need careful layout (inductors)
Use if: you have a Li-ion/Li-Po and want the most integrated solution with seamless behavior.
Practical design notes (applies to any approach)
USB front-end
-
Protection: Polyfuse (e.g., 0.5–1.5 A), ESD diode (USB D+ / D− and VBUS), TVS on VBUS.
-
Type-C basics: If you only sink 5 V/Default current, place Rd on both CC pins. For 1.5 A/3 A, you must negotiate or use a source-advertised current (don’t assume 3 A!).
-
Input current limit: Set charger or MUX ILIM ≤ allowed USB current (Default 500 mA for 2.0 unless negotiated; 900 mA for 3.0; Type-C default 500–900 mA/1.5 A/3 A per advertisement/PD).
Inrush & hot-plug
-
Add soft-start / dV/dt control (often built-in to MUX ICs).
-
Place a bulk input cap (e.g., 10–47 µF) close to the MUX/charger IN; 0.1 µF nearby for HF.
Reverse current & back-feed
-
Ensure the chosen method blocks reverse current into USB and into the battery when appropriate.
-
Ideal-diode/MUX/charger power-path solutions handle this; plain diodes do not block into 0 V sources unless oriented correctly.
System brown-out immunity
-
Add adequate output capacitance on SYSTEM_V (e.g., 22–100 µF) to ride through switchover.
-
If your load has large step currents, consider a post-regulator (buck or LDO with good PSRR).
Battery safety
-
Use NTC sensing if supported; set charge current within the cell’s spec.
-
Add ship-mode (load switch or the charger’s ship-FET) to drop quiescent drain during storage.
Measuring source presence
-
Use the MUX/charger’s PG pin or a resistor divider to an MCU ADC to know when USB is present.
Minimal reference schematics
A) Power-path charger (recommended for single-cell Li-ion)
B) Ideal-diode + separate charger (if you already have a favorite charger)
C) Power MUX in front, single charger tied to battery
(Choose topology so the charger always has valid input and you don’t “charge from the battery”. Many power-path chargers already solve this more elegantly—hence A.)
Quick chooser
Scenario | Best fit |
---|---|
Lowest cost, tiny load, voltage drop OK | Dual Schottky OR-ing |
Efficiency + low drop, moderate/high current | Ideal-diode P-FET(s) (with controller) |
Robust priority, ILIM, inrush control | Power-MUX IC |
Single-cell Li-ion, seamless “runs while charging” | Charger with Power-Path/Load-Sharing |
Common pitfalls to avoid
-
Assuming USB-C can always supply 3 A without CC/PD negotiation.
-
Forgetting reverse-current blocking, causing battery to back-feed VBUS.
-
Insufficient inrush control, tripping port or browning out MCU on plug-in.
-
Placing large power traces without solid ground return → ringing/EMI.
-
Skipping layout guidance from the IC datasheet (thermal and sense routing).