---
title: Batteries and the Nernst equation
heading: How a cell's voltage depends on concentration, state of charge and temperature, and where its reversible heat comes from
eyebrow: B11 · Lesson 32 · Batteries
xp: 40
---

::: hook
Lesson 30 turned a reaction's Gibbs free energy into a cell voltage, $E = -\frac{\Delta G}{nF}$. A real battery's voltage isn't a single number, though: a lithium-ion cell slides from 4.2 V to 3.0 V as it discharges, while a lithium iron phosphate cell sits almost flat at 3.4 V for most of its charge, and both change slightly with temperature. All of that is chemical potential. A lithium electrode is a lattice of sites that fill up, and its statistics are the same ones lesson 16 used for donors and lesson 17 for adsorbed molecules.
:::

::: play
- The curve is a lithium electrode's open-circuit voltage against its lithium fraction x, from a lattice-gas model. Discharging fills the electrode, moving right.
- With no interaction between lithium ions (W = 0), the voltage falls smoothly by $\frac{kT}{e}\ln\frac{x}{1 - x}$.
- Make the interaction attractive (W > 0). Past W = 2kT = 0.052 eV the curve turns back on itself: the electrode splits into lithium-rich and lithium-poor phases, and the real voltage is a flat plateau.
:::

```sim plot
view: graph
x: x = 0.01..0.99
y: V = 3.2..3.7
slider: W = -0.05..0.1 step 0.005 = 0.03 eV
plot: 3.45 - (0.025852*ln(x/(1 - x)) + W*(1 - 2*x)) | label: open-circuit voltage, V | samples: 400
readout: slope at half charge, V = 2*W - 0.103408 | digits: 3
```

::: predict
## A cell's voltage is $E = E^\circ - \frac{RT}{nF}\ln Q$. At 25 °C, by how much does a one-electron cell's voltage change when Q changes tenfold?

- [ ] 25.7 mV
- [x] 59.2 mV
- [ ] 118 mV
- [ ] 1 V

::: reveal
59.2 mV: $\frac{RT}{F}\ln10 = 0.02569 \times 2.303$. That's the Nernst slope, the same 59 mV per decade that sets a pH electrode's response and, at body temperature, 61.5 mV per decade across a nerve membrane. With two electrons it halves to 29.6 mV.
:::
:::

::: nameit
## The Nernst equation

A reaction's Gibbs energy depends on the concentrations of what takes part, through each species' chemical potential $\mu = \mu^\circ + RT\ln a$, where a is its activity (concentration relative to a standard, or partial pressure in bar). So the cell voltage is

$$E = E^\circ - \frac{RT}{nF}\ln Q,$$

where Q is the ratio of products' to reactants' activities, each raised to its count in the reaction. At 25 °C, $\frac{RT}{F}\ln10$ = 59.2 mV. A **concentration cell**, the same electrode in two solutions, gives $\frac{RT}{nF}\ln\frac{c_1}{c_2}$ from concentration alone.

## Voltage and state of charge

In a lithium-ion cell, lithium ions slide into sites in a host crystal. If the ions don't interact, an electrode a fraction x full is a lattice gas, and lesson 17's site statistics give its chemical potential $\mu = \varepsilon + kT\ln\frac{x}{1 - x}$. The cell voltage against a lithium metal electrode is

$$V = E_0 - \frac{1}{e}\left[kT\ln\frac{x}{1 - x} + W(1 - 2x)\right],$$

where W adds a regular-solution interaction between ions. With W > 2kT the free energy has two minima and the electrode separates into two phases (lesson 35 treats such mixtures in alloys); while they coexist, μ is pinned and the voltage is flat. Lithium iron phosphate behaves this way, which makes its state of charge hard to read from voltage.

## Temperature and reversible heat

Since $\frac{\partial\Delta G}{\partial T} = -\Delta S$, the open-circuit voltage changes with temperature as $\frac{dE}{dT} = \frac{\Delta S}{nF}$, typically a fraction of a millivolt per kelvin. Running the reaction at current I exchanges heat $IT\frac{dE}{dT}$ with the surroundings, in one direction on discharge and the other on charge. This **reversible heat** adds to the irreversible Joule heat $I^2R$ from the cell's internal resistance.

## Capacity

Each electron carries F = 96 485 C per mole, so an electrode material of molar mass M that takes one lithium per formula unit holds $\frac{F}{M}$ coulombs per gram: 372 mAh/g for graphite (per C₆), 274 mAh/g for LiCoO₂ and 170 mAh/g for LiFePO₄. Multiplying charge by voltage gives energy.
:::

::: example
## A Daniell cell (Zn | Zn²⁺ || Cu²⁺ | Cu, E° = 1.10 V, two electrons) has 1 M zinc ions and 0.01 M copper ions at 25 °C. What's its voltage?

::: solution
1. **Reaction quotient.** The reaction is Zn + Cu²⁺ → Zn²⁺ + Cu, so
   $$\begin{aligned} Q &= \frac{[\text{Zn}^{2+}]}{[\text{Cu}^{2+}]} \\ &= 100 \end{aligned}$$
2. **Nernst equation.**
   $$\begin{aligned} E &= 1.10 - \frac{0.02569}{2}\ln100 \\ &= 1.10 - 0.0592 \\ &= 1.041\ \text{V} \end{aligned}$$
3. **What the shortage costs.** Starving the cell of copper ions costs 59 mV: two decades at 29.6 mV each. As a cell discharges, its reactants deplete and its products build up, and this logarithm is part of why its voltage sags.

**Answer:** the cell gives 1.041 V.
:::
:::

::: example
## A lithium-ion cell has $\frac{dE}{dT}$ = −0.1 mV/K at its present state of charge and 50 mΩ of internal resistance. Discharging at 2 A at 298 K, how much reversible and Joule heat does it make?

::: solution
1. **Reaction entropy.**
   $$\begin{aligned} \Delta S &= nF\frac{dE}{dT} \\ &= 96\,485 \times (-10^{-4}) \\ &= -9.65\ \text{J/(mol·K)} \end{aligned}$$
2. **Reversible heat on discharge.**
   $$\begin{aligned} -IT\frac{dE}{dT} &= -2 \times 298 \times (-10^{-4}) \\ &= 0.060\ \text{W} \end{aligned}$$
3. **Joule heat.**
   $$\begin{aligned} I^2R &= 4 \times 0.05 \\ &= 0.20\ \text{W} \end{aligned}$$
   so 0.26 W in all.
4. **On charge.** At 2 A the reversible term reverses sign and absorbs 0.06 W, leaving 0.14 W.
5. **Why thermal models track it.** The entropic term can dominate at low currents and changes sign with state of charge, which is why battery thermal models carry dE/dT as a table.

**Answer:** on discharge the cell makes 0.060 W of reversible heat and 0.20 W of Joule heat, 0.26 W in all.
:::
:::

::: example
## A lithium electrode behaves as a lattice gas with $E_0$ = 3.45 V. What's its voltage at 10%, 50% and 90% lithium filling with no interaction, and with an attractive interaction W = 0.08 eV?

::: solution
1. **No interaction, x = 0.1.** At 300 K (kT = 25.85 meV),
   $$\begin{aligned} E &= 3.45 - 0.02585\ln\frac{0.1}{0.9} \\ &= 3.507\ \text{V} \end{aligned}$$
2. **No interaction, x = 0.5 and 0.9.** The voltages are 3.450 V and 3.393 V: a smooth, gently sloping curve.
3. **With W = 0.08 eV.** The voltages are 3.443, 3.450 and 3.457 V: the curve now rises through the middle, which can't be stable.
4. **Phase separation.** W exceeds 2kT, so between the spinodal points x = 0.20 and 0.80 the uniform electrode is unstable, and it splits into two phases at a single voltage. That flat plateau is what LiFePO₄ shows.

**Answer:** with no interaction, 3.507, 3.450 and 3.393 V; with W = 0.08 eV, 3.443, 3.450 and 3.457 V, and the electrode splits into two phases on a flat plateau.
:::
:::

::: check
kind: parts
given: n = 1 | 2; r = 0.01 | 10 | 1000; T = 298 | 330

## A cell reaction moves {n} electrons per formula unit, at {T} K, with its reaction quotient Q = {r}.

::: part
answer: 8.314462618*T/(n*96485.33212)*ln(r)*1000
unit: mV
tolerance: 0.5%

### By how much does that lower the voltage from E°?

::: misses
- [8.314462618*T/(n*96485.33212)*log(r)*1000] Use the natural log, or multiply log₁₀ by 2.303.
- [any] $\frac{RT}{nF}\ln Q$.
:::
:::

::: part
answer: 8.314462618*T/(n*96485.33212)*ln(10)*1000
unit: mV
tolerance: 0.5%

### How much does the voltage change per decade of Q?

::: misses
- [any] $\frac{RT}{nF}\ln10$.
:::
:::
:::

::: check
given: c = 10 | 1000; n = 2 | 3; T = 298 | 310
answer: 8.314462618*T/(n*96485.33212)*ln(c)*1000
unit: mV
tolerance: 0.5%

## A concentration cell has the same electrode in two solutions whose concentrations differ {c}-fold, with {n} electrons per ion, at {T} K. What voltage does it give?

::: right
Right. $\frac{RT}{nF}\ln\frac{c_1}{c_2}$, with no chemistry other than dilution.
:::

::: misses
- [8.314462618*T/96485.33212*ln(c)*1000] Divide by the number of electrons per ion.
- [any] Nernst with $E^\circ$ = 0.
:::
:::

::: check
given: I = 1 | 5; d = -0.4 | -0.1 | 0.2; T = 298 | 318
answer: -I*T*d*0.001
unit: W
tolerance: 0.5%

## A cell with $\frac{dE}{dT}$ = {d} mV/K discharges at {I} A and {T} K. How much reversible heat does it release (negative if it absorbs)?

::: right
Right. $-IT\frac{dE}{dT}$ on discharge.
:::

::: misses
- [I*T*d*0.001] Check the sign: a negative dE/dT means the reaction's entropy falls, so discharge releases heat.
- [any] $Q_{rev} = -IT\frac{dE}{dT}$.
:::
:::

::: check
given: n = 2 | 3; d = -0.4 | 0.3
answer: n*96485.33212*d*0.001
unit: J/(mol·K)
tolerance: 0.5%

## A cell moving {n} electrons per formula unit has $\frac{dE}{dT}$ = {d} mV/K. What's the reaction's entropy change?

::: right
Right. $\Delta S = nF\frac{dE}{dT}$.
:::

::: misses
- [96485.33212*d*0.001] Multiply by the number of electrons.
- [any] $\Delta S = nF\frac{dE}{dT}$.
:::
:::

::: check
kind: parts
given: x = 0.1 | 0.3 | 0.8; E = 3.4 | 4

## A lattice-gas electrode with $E_0$ = {E} V is a fraction {x} full of lithium, at 300 K (kT = 25.85 meV).

::: part
answer: E - 0.025852*ln(x/(1 - x))
unit: V
tolerance: 0.1%

### What's its voltage with no interaction?

::: misses
- [E + 0.025852*ln(x/(1 - x))] Filling the electrode raises lithium's chemical potential, which lowers the cell voltage.
- [any] $E_0 - \frac{kT}{e}\ln\frac{x}{1 - x}$.
:::
:::

::: part
answer: E - 0.025852*ln(x/(1 - x)) - 0.03*(1 - 2*x)
unit: V
tolerance: 0.1%

### What is it with an interaction W = 0.03 eV?

::: misses
- [any] Subtract $\frac{W(1 - 2x)}{e}$ too.
:::
:::
:::

::: check
kind: choice

## Why does a lithium iron phosphate cell hold a nearly flat voltage over most of its charge?

- [ ] Its internal resistance is very low
- [x] Its electrode is a mixture of two phases whose proportions change while lithium's chemical potential stays fixed
- [ ] Iron atoms buffer the voltage
- [ ] Its lithium ions don't interact

::: right
Right. Like water boiling at a fixed temperature, two coexisting phases pin the chemical potential, so the voltage stays flat until one phase is used up.
:::

::: misses
- [1] Resistance affects the voltage under load, not the open-circuit curve.
- [3] It's the phase coexistence of the lithium-rich and lithium-poor phases that matters.
- [4] Without interactions the voltage would slope smoothly, as $\ln\frac{x}{1 - x}$.
:::
:::

::: check
kind: parts
given: R = 20 | 80; I = 1 | 10

## A 3.7 V cell has {R} mΩ of internal resistance and delivers {I} A.

::: part
answer: 3.7 - I*R/1000
unit: V
tolerance: 0.5%

### What's its terminal voltage?

::: misses
- [3.7 + I*R/1000] On discharge the internal drop subtracts.
- [any] $E - IR$.
:::
:::

::: part
answer: I^2*R/1000
unit: W
tolerance: 0.5%

### How much Joule heat does it make?

::: misses
- [any] $I^2R$.
:::
:::
:::

::: check
given: M = 72.06 | 97.87 | 157.76
answer: 96485.33212/M/3.6
unit: mAh/g
tolerance: 0.5%

## An electrode material of molar mass {M} g/mol takes one lithium (one electron) per formula unit. What's its theoretical capacity?

::: right
Right. $\frac{F}{M}$ coulombs per gram, divided by 3.6 C per mAh.
:::

::: misses
- [96485.33212/M] That's coulombs per gram; convert to mAh (3.6 C each).
- [any] $\frac{F}{3.6M}$ mAh/g.
:::
:::

::: check
kind: derivation
vars: x = 0.01..0.99, W = -0.1..0.1, T = 250..350

## A lattice-gas electrode a fraction x full, with interaction W (eV), at T (K).

::: step
answer: W*x*(1 - x) + 0.00008617333*T*(x*ln(x) + (1 - x)*ln(1 - x))

### What's the free energy of mixing per site, in eV?
:::

::: step
answer: W*(1 - 2*x) + 0.00008617333*T*ln(x/(1 - x))

### Differentiate: what's lithium's chemical potential (relative to ε), in eV?
:::

::: step
answer: -2*W + 0.00008617333*T/(x*(1 - x))

### What's its slope with respect to x?
:::

::: right
Right. The slope goes negative near x = ½ once W > 2kT: the uniform electrode is unstable and splits into two phases.
:::
:::

::: explain
## Why does a battery's voltage fall as it discharges, even with no current flowing?

::: model
The open-circuit voltage measures the difference in chemical potential of the moving species (electrons and the ions that go with them) between the two electrodes. As the cell discharges, ions leave one electrode and fill sites in the other. Filling sites raises the chemical potential there, by $kT\ln\frac{x}{1 - x}$ for a simple lattice gas, and emptying the other lowers it, so the difference, and the voltage, shrinks. In Nernst's terms, products build up and reactants deplete, so $\ln Q$ grows. Interactions between the ions reshape the curve, and when they're strong enough to split the electrode into two phases the voltage stays flat until one phase is used up.
:::
:::

::: practice

::: check
given: n = 1 | 2; r = 0.1 | 100; T = 298 | 310
answer: 8.314462618*T/(n*96485.33212)*ln(r)*1000
unit: mV
tolerance: 0.5%

## Nernst shift, n = {n}, Q = {r}, {T} K?

::: misses
- [any] $\frac{RT}{nF}\ln Q$.
:::
:::

::: check
given: x = 0.2 | 0.6 | 0.95; E = 3.5 | 3.9
answer: E - 0.025852*ln(x/(1 - x))
unit: V
tolerance: 0.1%

## Lattice-gas voltage at filling {x}, $E_0$ = {E} V, 300 K?

::: misses
- [any] $E_0 - \frac{kT}{e}\ln\frac{x}{1 - x}$.
:::
:::
:::
