Magnetism, Induction and Inductance
A relay clicks off and the microcontroller that drove it resets. The cause is not software: when the current in the relay's coil was cut, the coil produced a voltage spike of hundreds of volts for a microsecond. That is induction at work, the same physics that runs every transformer, motor and generator. This lesson refreshes magnetic fields, forces on currents, Faraday's and Lenz's laws and inductance, with the numbers that matter on a bench. For depth see the school lessons on the field of a straight wire, the force on a current, Faraday's law and Lenz's law.
Magnetic field and force
Currents make magnetic fields. The flux density is measured in tesla (T); useful reference values are the Earth's field (about at mid latitudes), a fridge magnet (a few mT at its surface) and a strong neodymium magnet (several tenths of a tesla at its surface). A long straight wire with current makes circles of field around it:
A wire of length carrying at an angle to a field feels a force
which is how motors and loudspeakers turn current into motion. The lab uses its default values: , , at , so , pushing the wire up. Sweep and watch follow .
Flux, Faraday and Lenz
The magnetic flux through a loop of area is (in webers, ), where is the angle between the field and the loop's normal. When the flux through a coil of turns changes, an emf appears:
The minus sign is Lenz's law: the induced current opposes the change that caused it. Push a magnet's N pole into a coil and the coil's near end becomes an N pole, pushing back. The lab shows the flux and the emf; try "slow" and "fast" and different turn counts. Faster motion means a larger , so a larger but shorter pulse; doubling doubles the emf.
Inductance
A coil's own current makes flux through its own turns. The ratio is the inductance, in henries:
For a long air-cored solenoid of turns, length and cross-section , ; a magnetic core multiplies it by its relative permeability (hundreds to thousands for ferrite and iron), until the core saturates.
The middle formula is the one that resets microcontrollers. An inductor's current cannot change instantly: try to stop it in a short time and becomes very large. A relay coil switched off by a transistor sees its voltage spike until something breaks down. The cure is a flyback diode across the coil, which gives the current a path to decay slowly.
Worked example: the relay spike
Given: a relay coil with and on ; the transistor cuts the current in about . Find: the coil current, its stored energy and the voltage that the switching would try to produce without a diode. Solve:
Check: . In reality the voltage never reaches 5 kV: the transistor breaks down at its rated voltage (often 40 to 60 V) and absorbs the 125 µJ, which can destroy it over many cycles, and the fast edge couples into nearby wiring. With the diode, the voltage stays one diode drop (about 0.7 V) above 12 V and the current decays with .
Fields and inductors in Python
import numpy as np
mu0 = 4e-7 * np.pi
for I, r in [(10, 0.01), (10, 0.10), (1, 0.01)]:
B = mu0 * I / (2 * np.pi * r)
print(f"wire {I:2d} A at {r*100:4.0f} cm: B = {B*1e6:7.1f} uT ({B/50e-6:5.2f} x Earth's field)")
# air-cored solenoid: 200 turns, 2 cm long, 5 mm radius
N, length, radius = 200, 0.02, 0.005
L = mu0 * N**2 * np.pi * radius**2 / length
print(f"solenoid L = {L*1e6:.0f} uH")
Lr, Rr, V = 0.100, 240.0, 12.0
I = V / Rr
print(f"relay: I = {I*1e3:.0f} mA, W = {0.5*Lr*I**2*1e6:.0f} uJ, tau = L/R = {Lr/Rr*1e3:.2f} ms")wire 10 A at 1 cm: B = 200.0 uT ( 4.00 x Earth's field)
wire 10 A at 10 cm: B = 20.0 uT ( 0.40 x Earth's field)
wire 1 A at 1 cm: B = 20.0 uT ( 0.40 x Earth's field)
solenoid L = 197 uH
relay: I = 50 mA, W = 125 uJ, tau = L/R = 0.42 ms
Since 2019 is a measured constant (, CODATA 2022), equal to within a part in , so the old value is fine for engineering. The solenoid figure uses the long-solenoid formula; a coil only twice as long as its diameter really has roughly 20 % less (Nagaoka's correction). A 10 A cable a centimetre from a compass or magnetometer gives four times the Earth's field, which is why sensor boards keep power wiring away from them, and why the two conductors of a supply cable are run together: their opposite fields almost cancel.
Guided lab: induction with a small coil
Hand calculation. A coil of turns and radius sees a magnet whose flux through each turn rises from 0 to about in : . Pull it out at the same speed and the sign reverses.
Simulation. The induction lab above uses a similar coil; compare its emf peaks for "slow" and "fast" at the same , then halve .
What you would measure. Connect a coil of a few hundred turns (a small spool of enamelled wire, or a 12 V relay coil) directly to a multimeter on the 200 mV DC range, or better to an oscilloscope at 50 mV/div and 100 ms/div. Move a small neodymium magnet in and out by hand. Expect pulses of tens to a few hundred millivolts, opposite in sign for in and out, larger for faster motion. A hand-held magnet's speed is not repeatable, so expect 20 to 50 % scatter between pulses; the sign pattern is the reliable result. For the flyback effect, drive a 12 V relay from a current-limited bench supply (12 V, 100 mA limit) through a switch, with the scope across the coil: with the diode fitted, the turn-off shows only a small overshoot.
Hazards and safe setup: do not touch the coil's terminals while switching it without a diode (a sharp but low-energy sting is possible); neodymium magnets pinch fingers and wipe cards, so keep them apart and away from pacemakers; nothing here comes near mains.
Pitfalls
- Confusing and : flux is field times area; a big field through a tiny loop gives little flux.
- Forgetting Lenz's sign: the induced current always opposes the change.
- Switching inductive loads without a path for the current: relays, solenoids and motors need a flyback diode or snubber.
- Assuming is constant: iron- and ferrite-cored inductors lose inductance as they saturate at high current.
Practice
- Find at from a wire carrying .
- A 50-turn coil's flux per turn falls from to 0 in . Find the average emf.
- How much energy does a inductor store at ?
Answer
- .
- .
- .
Test yourself
The field of a long straight wire at distance is proportional to…
Lenz's law says that the induced current…
- always flows clockwise
- opposes the change in flux that produced it
- is always zero in copper
- adds to the change in flux
Why is a diode placed across a relay coil?
- To make the relay faster to switch on
- To give the coil current a path when the switch opens, limiting the voltage spike
- To rectify AC
- To light up when the relay is on
Doubling the number of turns of an air-cored solenoid (same length and area) multiplies its inductance by…
- 2
- 4
- 0.5
- 1