Electricity/6 min exploration

How does a home battery decide when to charge and discharge?

A home battery follows a dispatch rule, not a clock.

Solar serves the house first and the surplus charges the pack; time-of-use mode charges overnight and discharges at the evening peak; backup mode holds charge until the grid fails. A battery management system guards every cell, and an inverter converts between DC and AC.

How does a home battery decide when to store energy and when to release it?

3D model

Explore the model and follow its moving parts.

Read the full explanation ↓
Drag to rotate · Pinch or Ctrl-scroll to zoom · Select a part
Assembly view
Battery rule

What to remember

The battery's kilowatt-hour capacity sets how long it can run the house; its inverter's kilowatt rating sets how fast energy can move. The management system decides which rule to follow, counts charge because LFP voltage is flat, and opens the contactor before the cells are damaged.

A full 10 kWh battery with a 5 kW inverter runs a 4 kW evening load during an outage. The backup reserve is set to 20%. Roughly how long can it power the house?

Follow the explanation

Back to the model ↑

How the parts work together

  1. Watch one day of energy flow

    The whole system sits on one garage wall: solar array on the left, utility pole beyond it, battery cabinet and inverter on the wall, house on the right. At 10:00 on a clear day the panels are producing, the house needs less than they make, and the surplus pulses flow into the pack. The two ratings do different jobs here: 5 kW of inverter power sets how fast energy moves, while 10 kWh of stored charge sets how much of it the pack can hold. Press play and watch the stored-charge curve climb toward full.

  2. Inside the pack: every cell is watched

    Open the cabinet. Each module is 16 prismatic cells in series, bridged cell to cell by copper strips. One sense wire lands on every strip tap and runs to the battery management board, so the BMS sees all 32 cells. LFP voltage is nearly the same from 20% to 80% stored, so the board cannot read charge from voltage — it counts charge in and out instead. Near full charge the highest cells would drift, and the BMS bleeds them through shunt resistors: watch cells 5 and 12 glow while charging above 80%. The pack's main lead passes through the contactor, whose sliding bar can pull away from the lugs to disconnect the pack entirely.

  3. Cut the grid and ride out the evening

    A storm: the grid drops out and the evening peak hits 4 kW. With no solar left, the house runs entirely from the pack — blue pulses flow in from the inverter while the amber discharge grows. Set the reserve to 5% and press play: stored charge slides down toward the BMS protection floor. When it arrives, the contactor opens, the windows go dark and the readout says under-voltage lockout. The pack stays isolated until solar production returns after sunrise, the BMS closes the contactor, and charging resumes. The house went dark not because the 5 kW inverter was too small, but because the 9.5 usable kilowatt-hours (about 9.1 kWh after losses) ran out.

The main parts

Wall cabinet
The weatherproof enclosure bolted to the wall. Its front cover comes off to reveal the modules, and its LED strip shows stored charge. Dimensions are authored teaching values.
LFP battery modules
Two stacked modules of 16 prismatic cells in series: 3.2 V per cell makes 102.4 V across the pack and 10 kWh of stored energy. Copper series strips join every cell terminal.
Battery management system
The BMS measures each cell through sense wires, tracks stored charge by counting it (the LFP voltage curve is flat), and bleeds the highest cells through shunt resistors while charging.
Pack contactor
The electromechanical switch in the pack's main lead. Its sliding bar bridges both lug blocks when closed; the BMS retracts it at the under-voltage protection floor, isolating the pack until a charge source returns.
Hybrid inverter
Converts the pack's DC to household AC and back. Inside, four switch modules form an H-bridge that alternates in complementary pairs through a filter inductor. Its battery leg is limited to 5 kW and runs at 96% efficiency each way.
Solar array
Two ground-mounted panels feeding the inverter through a protected cable run. Their output follows the sun's bell curve between 06:00 and 18:00.
Grid connection
The utility pole, service drop, meter and house panel. Power flows either way: imported at night, exported at noon. Turn the grid control off to simulate an outage.
House loads
An overnight base with a morning bump and an evening peak. Window glow tracks how much demand is actually served, and goes dark when the battery is exhausted during an outage.
Cables & conduit
A DC pair from the cabinet gland to the inverter, an AC conduit up to the panel and meter, and the overhead service drop. Moving pulses ride alongside each cable as flow cues, colour-coded by source and direction.

Questions worth exploring

What is the difference between a battery's kWh and kW ratings?

Kilowatt-hours measure stored energy: how much electricity the pack holds. Kilowatts measure power: how fast it can move. A 10 kWh pack on a 5 kW inverter can run a 4 kW load for about 1.9 hours from 80% usable charge, but could never supply 8 kW at once regardless of how full it is. EIA's storage explainer defines exactly these two capacity ratings for storage systems.

U.S. EIA · Energy storage for electricity generation (power versus energy capacity ratings; storage uses and net losses)OpenStax · University Physics Volume 2, §9.5 Electrical Energy and Power (P = dE/dt and the kilowatt-hour)

What does a battery management system actually do?

The BMS measures the voltage of every cell (or parallel group), watches temperature, and keeps the pack inside its safe operating envelope. Because LFP cells have a flat voltage plateau, it tracks stored charge by counting current in and out rather than reading voltage. It passively balances cells by bleeding the highest ones through switchable shunt resistors, and it manages the string contactor, an electromechanical switch that disconnects the pack on a critical fault such as deep under-voltage.

U.S. DOE / Sandia · Energy Storage Handbook, Ch. 3 Lithium-Ion Batteries, §2.1.3 (modules, BMS balancing, contactors; LFP chemistry and flat voltage)Wikipedia · Lithium iron phosphate battery (nominal 3.2 V cell, 3.60–3.65 V charge, 2.5 V floor) and Tesla Powerwall (13.5 kWh / 5 kW residential scale)

How does the inverter connect a DC battery to the AC grid?

A power conversion system called an inverter exchanges power bidirectionally between the pack's DC port and the household AC. Inside, four switches form an H-bridge that toggles in complementary pairs, synthesizing AC through a filter. When grid-tied it runs grid-following control, tracking the grid's phase and frequency and injecting commanded power; it can also reverse to charge the pack, including from cheap overnight grid power in a time-of-use rule.

U.S. DOE / Sandia · Energy Storage Handbook, Ch. 13 Power Conversion Systems (bidirectional inverters, H-bridge, grid-following control)

Why do home batteries use lithium iron phosphate cells?

LFP cathodes are olivine-structured and use no cobalt or nickel, which makes cells cheaper and more thermally stable: the strong phosphorus-oxygen bond does not release oxygen during degradation, so LFP dominates stationary storage where low cost and safety matter more than the energy density an electric car needs. The trade-off is a flat discharge voltage, which makes state of charge hard to read from voltage and pushes the BMS to coulomb counting.

U.S. DOE / Sandia · Energy Storage Handbook, Ch. 3 Lithium-Ion Batteries, §2.1.3 (modules, BMS balancing, contactors; LFP chemistry and flat voltage)Wikipedia · Lithium iron phosphate battery (nominal 3.2 V cell, 3.60–3.65 V charge, 2.5 V floor) and Tesla Powerwall (13.5 kWh / 5 kW residential scale)

One discovery leads to another.

ElectricityHow a transformer changes voltageEnergyInside a Pelton turbineElectricityHow does an LED make light?ElectricityHow does a solar panel work?