Articles

Charging while the device is on: system load and the power path

A device can run while it charges (sometimes called pass-through charging or load sharing), but where its load connects decides what the charger sees. With the system wired straight to the cell, the load takes its share of the charge current, the charger measures the cell’s current plus the load’s and can’t tell when the cell is full, and a deeply discharged cell gets only what the load leaves of a precharge current that’s often just 10 to 20 percent of the fast-charge current. A power path feeds the system from the input first, through an input current limit, and charges the cell with whatever is left, so the charger measures the cell alone and the product can start on a dead or missing battery. When the load needs more than the input can supply, which on a USB 2.0 port before the device has been configured is 100 mA, the cell makes up the difference and discharges while it’s plugged in.

Those effects explain why a device drains on a weak port, never shows full, or won’t turn on after being left flat. The terms used here (precharge, constant current, constant voltage, termination, safety timer) are defined in How lithium-ion charging works, and the tolerance on each threshold is worked through in the article on charge thresholds. This one is about the load.

The first thing I look for on a charger schematic is where the system load connects, because that one choice changes how every other setting behaves.

Two ways to connect the load

Load on the battery compared with a power pathTwo block diagrams. In the first, the input feeds a charger whose output goes to a single node shared by the cell and the system load, so the charge current divides between them. In the second, the input feeds a power path stage whose output is the system rail; the system runs from that rail, the cell is charged from it through a controlled path, and a battery switch lets the cell supply the rail when the input is missing or too weak.Load on the batteryInputChargerCellSystem loadCharger current =cell current + load currentPower pathInputInput stageinput limitsystem railSystem loadchargerCellSystem fed first;the cell gets what's left,or supplies the rail
Two ways to connect the load. Top: the load sits on the battery, so the charger's current is split between the cell and the load, and the charger can't tell which is which when it decides the charge is finished. Bottom: a power path feeds the system from the input first and charges the cell with what's left through the charger's battery switch, which also lets the cell supply the system when the input can't. In a linear power path the input stage is a current-limited switch and the currents add; in a switching one it's a converter, the rail sits just above the cell, and power is shared.

In the simpler arrangement, the system load shares the charger’s output node with the cell. The charger can only measure what leaves its output: the cell’s current and the load’s together.

In a power path, the input feeds the system rail first, through a stage that limits the input current. The cell connects to the system rail through the charger or a battery switch, and the charger measures the current on the cell’s side. When the input has capacity to spare, the spare charges the cell; when the system needs more than the input can give, the battery switch lets the cell help.

Power paths come in three kinds, and they share the input differently. In a linear power path the input stage is a current-limited switch, the system rail sits near the input voltage, and the currents add: input current is system current plus charge current. In a switching power path (often called narrow voltage DC) the input stage is a converter, the rail sits just above the cell voltage, and the input limit applies at the input voltage, so what’s shared is power, and the charge current can be more than the input limit minus the load. And in a discrete power path, a standalone charger feeds the cell while a MOSFET and a diode select whether the system runs from the input or the cell: the charger still measures the cell alone, but there’s no input current limit for the system, so an overload drags the input down instead of being supplemented from the cell.

Load on the battery Power path
Fast charge The cell gets the charge setting minus the load The cell gets what the input leaves after the load, up to the charge setting (on a switching power path, somewhat more than the input limit minus the load)
Precharge The load subtracts from a small current; the net can be negative The system runs from the input; the cell gets the full precharge current if the input limit covers the system as well
Termination The charger measures cell plus load, so a load near the threshold delays or prevents it The charger measures the cell alone, but many suspend termination while limiting
Safety timer Runs while the load stretches the charge Some chargers slow it while limiting
After termination The load drains the cell to the recharge threshold, then it charges again The system runs from the input and the cell rests
Dead or missing cell The system runs only as far as the cell voltage allows The system runs from the input, within the input limit
Input pulled Nothing to switch The system has to be handed over to the cell

With the load on the cell

One charger datasheet allows the load in parallel with the cell as long as the average system load doesn’t stop the cell charging fully within the safety timer, since the charge current is shared between the two. In constant current that’s simple: with a 500 mA setting and a 150 mA load (example values), the cell charges at 350 mA and that phase takes 500 ÷ 350, about 1.4 times as long. Termination and precharge are where it bites.

Termination with a load drawing through the charger

Take a simple linear charger set to 500 mA, terminating at a tenth of the charge current. Its datasheet puts the threshold at 0.085 to 0.115 of the programmed current, which is 42.5 to 57.5 mA. The cell is a 1 Ah cell (example) whose maker asks for termination at 0.02C to 0.05C, 20 to 50 mA.

The charger stops when its output current, the cell’s taper plus the load, falls below its threshold. Three example loads:

  • With 30 mA of load, it stops when the cell’s own current is 42.5 − 30 = 12.5 mA on a low-threshold unit, up to 57.5 − 30 = 27.5 mA on a high one. That’s at or below the cell maker’s figure, so the charge stays in constant voltage longer than it needs to, but it ends.
  • With 45 mA, units whose threshold lands above 45 mA terminate with the cell taking 0 to 12.5 mA, and units whose threshold lands below it never terminate. Units just above 45 mA barely terminate either, since the taper only approaches zero, so the same design behaves differently across the production run.
  • With 60 mA, the output current never falls below the highest threshold, so no unit terminates.

The rule that falls out: the most the load can draw must sit below the lowest termination threshold, with margin. For the cell’s own current at termination to stay at or above the cell maker’s 20 mA here, the load has to stay under 42.5 − 20 = 22.5 mA. The threshold also moves with the charge current’s own tolerance, which the article on thresholds stacks up.

A charger that never terminates holds the cell at full voltage until a safety timer ends the charge. Without a timer, it holds it there for as long as the product is plugged in, which is the condition that ages a lithium cell fastest. Once a charge does end, the load runs from the cell and pulls it down to the recharge threshold, and the charge starts again. On the same charger the restart is at about 4.05 V, which its datasheet says corresponds to about 80 to 90 percent of capacity. At 30 mA, a 1 Ah cell spends 100 to 200 mAh getting there, so it tops up every 3.3 to 6.7 hours for as long as the product sits on its charger.

Precharge with a load attached

Precharge is where the load does most damage, because the current is small to begin with. The same charger, set to 500 mA, gives 20 to 70 mA in precharge, 45 mA typical, until the cell passes its precharge threshold of 2.8 to 3.0 V. With a 30 mA load on the cell (example), the net current into the cell is 45 − 30 = 15 mA on a typical unit, 70 − 30 = 40 mA on a high one, and 20 − 30 = −10 mA on a low one. On the low unit the cell is discharging while the charger reports that it’s charging.

The charger in this example has no timer in its datasheet, but many chargers run a precharge timer, about half an hour on two of them (28.5 to 31.5 minutes on one, 24 to 36 on another). At the typical 15 mA net, a 30-minute timer gives the cell 15 mA × 0.5 h = 7.5 mAh to reach the threshold. Whether that’s enough depends on the cell and how deeply it was discharged, and no datasheet in the sources gives the charge between the cutoff and the threshold, so measure it on the cell; if it isn’t, the timer faults the charge with the cell still flat. On the low unit, at −10 mA, no timer is long enough. No datasheet in the sources states this case outright; it follows from the arithmetic, and the check on every design with a load on the cell is: the lowest precharge current, minus the most the system can draw with the cell that low, has to be comfortably positive, and the charge it delivers within the precharge timer has to be enough.

The most the system draws then is often not its idle current. As the cell creeps up, the processor may start: it boots, its current jumps, the cell’s terminal voltage falls by that current times the cell’s internal resistance, the supply drops below the processor’s minimum, and it resets. It recovers and boots again, and that loop can hold a cell at the edge of precharge indefinitely. A reset circuit with enough hysteresis, or firmware that checks the cell before doing anything heavy, keeps the product off until the cell can carry it.

How a power path shares the input

With a power path, the input current limit sets the total and the system gets first call on it. One linear power-path charger offers 200 to 1500 mA plus fixed 100 mA and 500 mA USB modes; one switching charger offers 100 to 3250 mA in 50 mA steps.

The limit is a one-sided band, at or below the setting. On the switching charger, a 500 mA setting delivers 440 to 500 mA and a 100 mA setting 85 to 100 mA; another charger’s 500 mA setting gives 450 to 500 mA. Design to the bottom of the band.

When system plus charge current would exceed the limit, the charger turns the charge current down so the rail doesn’t sag (one datasheet calls this dynamic power-path management). When the system alone needs more than the input can give, the charge current is already zero and the cell supplies the difference. That’s supplement mode, and it’s how a device discharges while it’s plugged in.

On a linear power path the arithmetic is plain subtraction: with a 500 mA limit and a 300 mA system, 200 mA at most is left for the cell. On a switching power path it’s power. The band quoted above is from a switching charger, so as an example take a 5 V input, a 3.8 V system rail and 90 percent efficiency (assumed, for the arithmetic): 440 to 500 mA in becomes about 520 to 590 mA at the rail. With example loads and a 2 Ah cell:

  • A system averaging 300 mA, with a charge setting of 1 A, leaves about 220 to 290 mA for the cell, never the 1 A on the schematic. Putting 2 Ah in at that rate takes about 7 to 9 hours (take it as a scale, since the taper changes it).
  • If the system peaks at 700 mA, the cell supplies about 110 to 180 mA during each peak.
  • On the 100 mA setting, 85 to 100 mA in becomes about 100 to 120 mA at the rail, so a product idling at 120 mA with its display on sits between break-even and a drain of about 20 mA from the cell, perhaps with the charge light on. On a linear power path with a 100 mA limit, the same product drains at least 20 mA.

The 100 mA case is real: a USB 2.0 device has to come up drawing no more than one unit load, 100 mA, and may draw 500 mA only once the host has configured it. The article on USB current covers what each port and USB-C advertisement allows.

A charge current set without regard to the port is a common fault: the charge current plus the system load can exceed the 500 mA that a configured USB 2.0 port, or a USB 2.0 Type-C port at Default USB Power, has to supply.

A weak source also has a voltage limit: power-path chargers cut the input current if the input falls to a threshold, 4.35 to 4.63 V on one and 4.27 to 4.53 V on another, which acts like a lower current limit.

Termination and the timer while the charger is limiting

The power path’s main gift is that the charger measures the cell’s current alone; one datasheet says this allows proper termination and lets the system run with a defective or absent battery. The load still affects when termination is allowed. One charger disables termination whenever its thermal loop, power-path loop or input-voltage loop is reducing the charge current; another, while it’s in input current, voltage or thermal regulation. That’s sound, since a current held down by the input isn’t a taper, but a system that keeps the charger at its input limit keeps termination switched off.

The timer has to cover it. The switching charger above runs its safety timer at half rate while it’s regulating, from a 12-hour default, which stretches to 24 hours of real time, so the 7 to 9 hours above fits. A timer that keeps full speed while the charger is limiting, say 5 hours (an example), would end the charge after 5 × 221 ≈ 1,100 mAh at the low end of that example, about 55 percent of a 2 Ah cell: a product plugged in overnight that shows half charged in the morning.

Temperature adds to the load’s effect. When the charger pauses for cell temperature, a load on the cell drains it while plugged in, and a power path keeps the system running from the input. On a linear power path the system’s current also passes through the charger and adds to its heat, which pushes it into thermal regulation sooner, and that suspends termination too.

Charging with the product switched off

With a power path and a cell that “off” disconnects (a shipping mode, or a hardware switch), plugging in powers the system rail as well as the charger, so if every regulator on that rail runs whenever the rail is up, plugging in turns the product on. If “off” leaves the cell connected, the rail is live from the cell anyway, and the regulators need enable control regardless. Decide which you want and make the enable logic do it. With the load on the cell, “off” leaves quiescent current, leakage and dividers on the cell: small for fast charge, but it’s the load in the precharge arithmetic when a flat product is plugged in. And a USB device on a standard port of a sleeping computer may draw no more than 2.5 mA.

The battery-to-system switch

The switch from the cell to the system rail is usually a MOSFET. In a discrete power path, a single MOSFET has a body diode pointing from the cell to the system, so if it’s off when it should be on, the system still runs from the cell through that diode, about 0.7 V below the cell voltage. Integrated battery switches generally block in both directions when off, which is what lets a charger disconnect the cell for shipping or over-discharge.

On one sample board with a discrete switch, the battery-to-system switch was held on only by a weak pull-down resistor, fought by leakage currents, one of which grows with temperature. When the leakage wins, the switch turns off and the system runs through the body diode, and the lost drop brings it to its shutdown voltage with a third or more of the charge still in the cell. Comparing the gate drive with the worst-case leakage at the hottest operating temperature finds it on paper.

Pulling the plug

When the input disappears, the system rail has to move to the cell. An integrated power path does that quickly; a discrete one, with a gate network to charge, can take far longer, and the rail sags in between.

On one sample board, the power path took about 0.3 s to hand over to the cell when USB was unplugged during use, and unless the cell was nearly full, the supply dipped below the processor’s minimum. The device reset and lost what it was doing. The check is the rail voltage during the handover, at the lowest cell voltage the product runs at, against the minimum supply of everything on the rail.

Starting on a dead battery

A power path lets the product boot from the input before the cell has any charge, but within what the input allows at that moment, when it’s least generous. On USB, a product with a dead battery can’t enumerate before it boots, so it’s on the 100 mA a USB 2.0 device gets before configuration. On USB-C, a dead-battery sink has to present its pull-down resistors on both configuration pins and then receives VBUS; how much current it may take depends on what the source advertises, which a sink can read in hardware if its pull-downs are the tighter ±10 percent type. One that uses a voltage clamp instead can’t do USB Power Delivery until it switches to the resistors. Many chargers also detect a Battery Charging 1.2 charging port in hardware, which lets a device draw up to 1.5 A before any firmware runs. One switching charger also limits its own input to 200 mA while the system starts up. Boot current and precharge current have to fit under all of that, and anything that needs more (a radio calibrating, a backlight, a motor homing) has to wait until the firmware has negotiated more or the cell can supplement.

One switching charger opens its battery switch when the cell falls below a threshold, to protect it from over-discharge, and needs an input source to recover. A product built on such a charger won’t run from its cell again until it’s been plugged in, which the user documentation should say.

With the load on the cell, the product can’t start until the cell can carry it: the precharge arithmetic decides whether it gets there, and the boot loop how quickly.

Pulsed loads

Radios, motors and displays draw in bursts. USB’s unit load is an absolute maximum, not an average over time, so a burst that pushes the input over its limit counts even if the average is fine. On a power path, a peak above the input limit comes from the cell, as in the 700 mA example. With a healthy cell that’s invisible. With a dead cell or none, nothing supplies the excess, the rail falls during the burst, and the product can reset on its first transmission after booting from the input. Running without a battery works only for loads inside the input limit, at the bottom of its band.

On termination, one charger’s datasheet warns that transient loads on its battery pin can briefly pull its current-sense signal below the termination level before the real charge current has fallen there, and it filters its termination comparator for 1 ms so they can’t end the charge early. A load that pulses for longer, or a firmware charger that samples the current now and then, can catch the current between pulses or during one and decide differently each time. A firmware charger needs its own rule: the current, or its average over a window chosen against the load’s real pattern, has to stay below the threshold for a set time. On a power path, pulses that push the charger into its input limit suspend termination each time, so the charge can only end in the gaps.

On a discrete charger, where I write the termination logic in firmware, one of the first things I settle is which current the sense resistor actually measures: the cell’s alone, or the cell’s plus everything else on that node.

Measuring the battery, not the rail

With a power path and the input plugged in, the system rail isn’t at the cell’s voltage: on a linear power path it sits near the input voltage, and on a switching one just above the cell or at the charger’s minimum system voltage.

On one sample board, the battery measurement was wired to the switched system rail. On USB it read the USB voltage, showed no charge progress, and the firmware’s low-battery cutoff had nothing real behind it.

Measure on the cell’s side of the battery switch. That puts the divider on the cell permanently.

On another sample board, the battery-sense divider drew about 20 µA from the cell with the product switched off. That’s 0.48 mAh a day, about 86 mAh over six months, enough to take a small unprotected cell below its safe recharge level on a shelf. A divider switched at its top end fixes it, as long as the ADC pin stays inside the processor’s supply at the highest cell voltage.

On one sample board, the firmware’s low-battery cutoff read the cell while the product drew its heaviest current, so the drop across the cell’s internal resistance made it look emptier than it was and the product shut down early. How to read charge from voltage is covered in the article on battery percentage.

Is it bad to use a device while it charges?

With a power path, mostly not: the system runs from the input and the cell charges with what’s left, and its charge ends properly. The costs are indirect. A product that stays docked keeps its cell near full for long periods, and a product working hard while it charges warms the cell, and both age it. With the load on the cell, add the top-up cycles and the termination problems above.

Power states to check

Most of these faults show up in a state the bench test never visited. A table of every state, with what should be on in each, finds them:

State What should be on Check
Shipped The cell and its protection Total drain, dividers included, over the longest storage; what wakes the product
Off, unplugged The cell and the power-button circuit Leakage of everything on the cell; nothing half-powered through a protection diode
Plugged in, off Input and charger; the system rail only if you want it Does plugging in turn the product on? Does the charger charge with the processor off? No line from the input feeding the unpowered processor
Running and charging Everything Load plus charge current against the bottom of the input limit; termination at the worst load; timer against the slowest charge
Brown-out Nothing until the cell can carry the load Reset hysteresis keeps it off instead of rebooting in a loop; plugged in on a dead cell, it boots from the input or waits
Charger fault The system from the input, if there’s a power path What the user sees; with the load on the cell, the load now drains it while plugged in
Blank or crashed processor Whatever the charger does on its defaults Defaults safe for this cell; the product can be programmed on a dead cell
Input pulled while running The system, from the cell Rail voltage during the handover at the lowest running cell voltage
Docked and full The system from the input; the cell resting How often it tops up; the cell’s temperature in the product
No cell, or protection open The system from the input, within its limit Boots and runs without a cell, or refuses cleanly; status shows it
Host asleep The device at no more than 2.5 mA Charging stops or the device suspends; nothing browns out

Back-powering in the plugged-in-but-off state is easy to miss: a charger status pin or input-sense line driven from USB can feed an unpowered processor through its input protection diodes and half-power it. There’s a sample-board case in what to check before you order an AI-designed board. Walk every combination of plugged sources, host and debug connector.

The blank-processor row matters most on chargers configured over a serial bus, which run on their defaults until the firmware does: on one, charging is enabled by default; on another, the default fast-charge timer is 12 hours. The default charge current and voltage matter most: three serial-bus chargers read power up at a 4.208 V charge voltage and about 2 A of charge current, several times what a small cell may take. Two such chargers have a watchdog, 40 s by default, that the firmware has to keep servicing; when it expires, two of them return to their default mode and reset their registers to defaults, apart from the input limit and a couple of others. A product shipped blank, or whose firmware crashes mid-charge, charges on those defaults, so they have to be safe for the cell, and the protection that matters can’t depend on firmware at all. The article on custom chargers covers what stays in hardware.

If your product has to run, charge and start from flat on one small input and you’d like the load and the power path worked through against the datasheets, get in touch.

All articles

Have a project in mind?

Based in southern Indiana. Working with clients anywhere, including companies across the Midwest.