Electromagnetism

Transformer

Two coupled coils — V₂/V₁ = N₂/N₁, the device that makes power grids possible

A transformer is two coils wrapped around a common iron core. AC voltage in primary creates oscillating magnetic flux in the core, inducing voltage in the secondary. Voltage ratio = turn ratio: V₂/V₁ = N₂/N₁. Steps voltage up or down. Without transformers, the modern AC power grid wouldn't work — electricity couldn't be transmitted efficiently over long distances.

  • Voltage ratioV₂/V₁ = N₂/N₁
  • Current ratio (ideal)I₂/I₁ = N₁/N₂ (inverse of voltage)
  • Power conserved (ideal)P₁ = P₂ → V₁·I₁ = V₂·I₂
  • Real efficiency95-99% for power transformers
  • Step-upN₂ > N₁; raises voltage, lowers current
  • Step-downN₂ < N₁; lowers voltage, raises current

Interactive visualization

Press play, or step through manually. The visualization is yours to drive — try it before reading on.

Open visualization fullscreen ↗

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

How transformers work

Two coils share a magnetic core (typically iron):

  • Primary (N₁ turns) — connected to AC source.
  • Secondary (N₂ turns) — provides AC output.
  • Iron core couples them magnetically.

AC current in primary creates oscillating flux Φ in the core. By Faraday's law, this flux through secondary induces voltage:

V₁ = -N₁ · dΦ/dt
V₂ = -N₂ · dΦ/dt

Ratio:

V₂ / V₁ = N₂ / N₁

Voltage and current ratios

QuantityRatio
VoltageV₂/V₁ = N₂/N₁ (turn ratio)
Current (ideal)I₂/I₁ = N₁/N₂ (inverse)
PowerV₁·I₁ = V₂·I₂ (conserved, ideal)
ImpedanceZ₂/Z₁ = (N₂/N₁)² (squared)

Real-world examples

UseV₁V₂Turn ratio
USA power generation22 kV765 kV (transmission)1:35 step-up
Power plant to grid765 kV765 kV (already up)1:1 (just isolation)
Transmission to distribution765 kV13.8 kV55:1 step-down
Pole-mounted (US)13.8 kV240 V (split phase)57:1 step-down
Phone charger (transformer-based)120 V5 V (after rectification)~24:1
Doorbell transformer120 V16-24 V~5-7:1
Tube guitar amp output~4 kV16, 8, or 4 Ω matching~hundreds:1

JavaScript — transformer calculations

// Voltage ratio
function transformer(V_primary, N_primary, N_secondary) {
  return V_primary * N_secondary / N_primary;
}

// 120V primary, 100 turns, secondary 1000 turns
console.log(`Step-up to: ${transformer(120, 100, 1000)} V`);  // 1200 V

// 12000V primary, 100 turns, secondary 10 turns
console.log(`Step-down to: ${transformer(12000, 100, 10)} V`);  // 1200 V

// Current ratio (ideal)
function transformerCurrent(I_primary, N_primary, N_secondary) {
  return I_primary * N_primary / N_secondary;
}

// Power conservation check
function transformerPowerCheck(V1, I1, V2, I2) {
  return Math.abs(V1*I1 - V2*I2) < 0.01 * V1*I1;  // within 1%
}

// Impedance transformation
function transformerImpedance(Z_load, N_primary, N_secondary) {
  // Reflected impedance on primary side: Z_p = Z_load · (N_p/N_s)²
  return Z_load * (N_primary / N_secondary) * (N_primary / N_secondary);
}

// 8 Ω speaker, 4kV primary tube amp, with 100:8 transformer
console.log(`8Ω reflected: ${transformerImpedance(8, 100, 8)} Ω`); // 1250 Ω

// Transmission loss reduction via voltage step-up
function transmissionLoss(P_load, V, R) {
  return Math.pow(P_load / V, 2) * R;
}

// 1 MW over 100 km of wire (R ~ 10 Ω)
const loss_120 = transmissionLoss(1e6, 120, 10);
const loss_12k = transmissionLoss(1e6, 12000, 10);
const loss_120k = transmissionLoss(1e6, 120000, 10);

console.log(`@120V: ${(loss_120/1e6).toFixed(0)} MW lost (${(loss_120/1e4).toFixed(0)}× more than load!)`);
console.log(`@12kV: ${(loss_12k/1000).toFixed(0)} kW`);   // Reasonable
console.log(`@120kV: ${(loss_120k/1000).toFixed(2)} kW`); // Tiny

// Real transformer efficiency
function realPowerOut(V_in, I_in, efficiency) {
  return V_in * I_in * efficiency;
}

// 99% efficient 100 W transformer
console.log(`100W input, 99% eff: ${realPowerOut(120, 100/120, 0.99).toFixed(0)} W out`); // 99 W

// LRC time constant for primary current rise
function transformerStartup(L, R) {
  return L / R;  // τ for current to reach ~63% of final
}

Where transformers matter

  • Power grid. Multiple stages of step-up at generation; step-down at distribution and end use.
  • Power supplies. Convert 120/240V wall power to lower DC voltages for electronics.
  • Audio. Tube amplifiers use output transformers to match tube impedance to speaker impedance.
  • Welding. Welding transformers step down voltage and step up current dramatically (low V, high I produces arc).
  • Isolation. Some transformers exist to isolate circuits (1:1 ratio) — for safety, noise reduction.
  • RF and communications. Impedance matching, balanced-to-unbalanced (balun).
  • Voltage measurement. Measurement transformers (CT, PT) step down high-voltage signals to safe levels for meters.

Common mistakes

  • Trying with DC. Doesn't work — needs alternating flux. Use DC-DC converters for DC voltage change.
  • Forgetting current ratio is INVERSE. Step-up voltage → step-DOWN current. Easy to flip.
  • Treating as 100% efficient. Real losses ~1-5% in modern transformers. Significant for large industrial units.
  • Mismatched current rating. Each side has max current rating; exceed and the transformer overheats.
  • Ignoring impedance transformation. Z scales as turn ratio SQUARED. Important for audio amp output stages and RF impedance matching.
  • Confusing turn ratio with voltage ratio in non-ideal cases. For ideal transformer, V₂/V₁ = N₂/N₁ exactly. Real transformers have small deviations under load.

Frequently asked questions

How does a transformer work?

Two coils wound on a common iron core. AC current in primary creates oscillating magnetic flux in the core. This flux passes through the secondary coil, inducing AC voltage there (Faraday's law). Voltage ratio equals turn ratio: V₂/V₁ = N₂/N₁. Iron core concentrates flux so almost all primary's flux reaches secondary.

Why does a transformer NOT work for DC?

Faraday's law requires CHANGING flux. DC creates a static B field — no change → no induced EMF in secondary. AC continuously varies, producing continuous induction. For DC voltage transformation, use switching converters (DC-DC) that toggle current rapidly.

Why is power conserved (V₁·I₁ = V₂·I₂)?

Energy conservation. In an ideal transformer (no losses), power going IN must equal power coming OUT. So if you step up voltage, you step DOWN current proportionally. Step-up gives high voltage, low current. Step-down gives low voltage, high current. P stays the same.

Why is high-voltage transmission so important?

Power loss in wires is I²R. For fixed power P = VI, higher V means lower I means much less I²R loss. From local 120 V, transformers step up to ~400 kV for long-distance transmission. At each substation, step down for distribution. Without transformers, transmission losses would be enormous.

What are real-world losses in transformers?

Three main losses: (1) Copper losses (I²R in coil windings) — improved by thicker wire. (2) Core losses (eddy currents and hysteresis in iron) — minimized via laminated cores and special alloys (silicon steel, amorphous metal). (3) Stray flux (some flux escapes core). Modern transformers achieve 98-99.5% efficiency.

What's a center-tapped transformer?

Secondary coil with three terminals — two ends and one in the middle. Used to provide both positive and negative DC after rectification — common in audio amps. Two output halves at +V and -V relative to the center tap (often grounded).

Can transformers be used with high frequencies?

Yes. Higher frequency requires LESS iron in the core (since flux changes faster) — that's why switch-mode power supplies use small ferrite cores at 50-500 kHz. Audio transformers use audio-frequency design (20 Hz - 20 kHz). RF transformers use ferrite cores at MHz to GHz.