Every battery is a galvanic cell built to be portable, and rust is a galvanic cell nobody wanted. Both come down to which metal is oxidized and where the electrons go.
Key idea
A battery stores chemicals that react to push electrons through a circuit; recharging runs the reaction backward with outside power. Corrosion of iron is oxidation of the metal by oxygen in the presence of water. A more active metal (lower $E^\circ$), such as zinc or magnesium, can protect iron by being oxidized in its place.
Why it works
A battery does not hold a supply of electrons; it holds two substances that want to exchange electrons, kept apart so the exchange can happen only through your device. When one of them runs out, the voltage drops. In rusting, one region of the iron acts as an anode ($\mathrm{Fe \to Fe^{2+} + 2e^-}$) and another as a cathode where oxygen is reduced ($\mathrm{O_2 + 4H^+ + 4e^- \to 2H_2O}$); the water film acts as the salt bridge, which is why salt speeds rust. If a more active metal touches the iron, it becomes the anode instead, and the iron is protected.
| Device | Anode | Cathode | Voltage per cell |
|---|---|---|---|
| Alkaline battery | zinc | manganese dioxide | about 1.5 V |
| Lead–acid (car) | lead | lead dioxide, in sulfuric acid | about 2.0 V |
| Lithium-ion | lithium in graphite | a lithium metal oxide | about 3.6–3.7 V |
| Hydrogen fuel cell | $\mathrm{H_2}$ | $\mathrm{O_2}$ | 1.23 V (standard) |
Worked examples
Worked example: A sacrificial anode
Which metals could protect a steel ship's hull as sacrificial anodes: magnesium ($E^\circ = -2.37\ \text{V}$), zinc ($-0.76$), copper ($+0.34$)? Iron is $-0.45\ \text{V}$.
- A protector must be oxidized more easily than iron: lower $E^\circ$.
- Magnesium and zinc qualify. Copper is less active, so attaching copper would make the iron the anode and speed its corrosion.
Answer: Magnesium and zinc.
Worked example: A car battery
A lead–acid cell gives about 2.0 V. How many cells in series make a 12 V car battery?
- Voltages of cells in series add.
- $12\ \text{V} \div 2.0\ \text{V} = 6$ cells.
Answer: Six.
- Galvanizing coats steel with zinc, which protects it even where the coating is scratched.
- Tin plating protects only while unbroken: tin is less active than iron, so a scratch makes the iron corrode faster.
- A fuel cell is a battery fed continuously with fuel; its only product from hydrogen is water.
Common mistake
Thinking a battery stores electricity or electrons. It stores reactants; the electrons it pushes through the circuit come from the anode's oxidation and return to the cathode. Check: a battery is "dead" when its reaction reaches equilibrium, not when it has "run out of electrons."