The Core Physics: What the Magnetic Field on a Coil Actually Does

The magnetic field on a coil is the concentrated cylindrical region of magnetic flux generated when direct or alternating current flows through wound conductive wire, creating a magnetomotive force measured in ampere-turns. In a real circuit, this field converts electrical energy into mechanical work (like pulling a relay armature) or opposes changes in current (inductive kickback), fundamentally altering the circuit's impedance and physical behavior.

Makers frequently confuse magnetic field strength (H, measured in Amperes per meter) with magnetic flux density (B, measured in Teslas). This leads to the dangerous assumption that doubling the current will always double the pulling force, completely ignoring the nonlinear saturation limits of the iron core. Once the core saturates, pushing more current just generates heat, not more magnetic pull.

The Water Analogy (Used Once): Think of magnetomotive force (ampere-turns) like water pressure pushing through a pipe, and the core's magnetic reluctance like the pipe's diameter. If you stuff too much water (flux) through a narrow pipe (a saturated iron core), the pressure (current) spikes, but the flow rate (magnetic pull) barely increases.

The Math That Matters: Ampere-Turns and Flux Density

To design or troubleshoot a coil, you need to calculate the Magnetomotive Force (MMF) and the resulting Flux Density (B). Let's walk through a real numeric example for a DIY 12V solenoid lock you might wind on your bench.

  • Wire: 28 AWG enameled copper magnet wire.
  • Total Resistance: 24 ohms (measured with a multimeter).
  • Supply Voltage: 12V DC.
  • Current (I): 12V / 24Ω = 0.5 Amps.
  • Turns (N): 400 turns wound tightly around a 20mm (0.02m) mild steel core.

Step 1: Calculate Magnetomotive Force (MMF)
MMF = N × I = 400 × 0.5 = 200 Ampere-turns.

Step 2: Calculate Magnetic Field Strength (H)
H = MMF / Length = 200 / 0.02m = 10,000 A/m.

Step 3: Calculate Magnetic Flux Density (B)
Assuming the mild steel core has a relative permeability (μr) of 500 before saturation, and the permeability of free space (μ0) is 4π × 10^-7 T·m/A:
B = μ0 × μr × H = (1.256 × 10^-6) × 500 × 10,000 = 0.628 Tesla.

This 0.628 T flux density is strong enough to pull a steel armature firmly, but it sits safely below the ~1.5 T saturation point of mild steel. If we had doubled the current to 1.0A, the math would suggest 1.256 T, but in reality, the core would begin to saturate, the inductance would drop, and the coil would draw massive current without proportionally increasing the mechanical pull.

Where You Meet This in Practice

You interact with the magnetic field on a coil every time you switch a load or filter a power supply. Here is how the physics translates to real-world components:

Component Core Material Typical MMF Range Primary Function of the Magnetic Field
Electromechanical Relay (e.g., Omron G5V-2) Soft Iron / Silicon Steel 50 - 200 Ampere-turns Generates mechanical pull to close contacts.
Solenoid Valve (Water/Air) Stainless Steel / Iron 200 - 1000 Ampere-turns Overcomes spring tension to lift a plunger.
Power Inductor (Buck Converter) Ferrite or Powdered Iron Varies by load current Stores energy in the field to smooth DC output.
Stepper Motor Stator Laminated Silicon Steel High (per phase) Creates rotating magnetic poles to align the rotor.

Bench War Story: When Inductive Kickback Melts Your Driver

Theory is clean; the workbench is not. Here is a scenario that highlights what happens when you ignore the collapsing magnetic field on a coil.

The Setup: I was driving a custom-wound 5V relay coil (built to fit an Omron G5V-2 footprint but wound for a higher-current contactor) using an ESP32-WROOM-32. The GPIO pin drove the base of a standard 2N2222 BJT, which switched the coil's ground path. I forgot to solder a flyback diode across the coil terminals.

The Numbers: The coil resistance measured 5 ohms. At 5V, the steady-state current was 1A. The 2N2222 is rated for 600mA continuous, but I rationalized that the relay would only be pulsed for 50 milliseconds, so thermal limits wouldn't be reached.

The Outcome: On the first two actuations, the relay clicked perfectly. On the third actuation, the 2N2222 failed short-circuit. The ESP32 immediately threw a brownout reset, and GPIO 23 was permanently bricked, stuck outputting 1.8V.

What Went Wrong: I ignored the physics of the collapsing field. When the BJT turned off, the current through the coil dropped from 1A to 0A in microseconds. The collapsing magnetic field on the coil induced a massive reverse voltage spike ($V = -L \frac{di}{dt}$). This spike easily exceeded 80V, far surpassing the 2N2222's $V_{CEO}$ breakdown voltage of 30V. The BJT suffered avalanche breakdown and failed short, sending 5V directly backward through the base-emitter junction and into the 3.3V ESP32 GPIO pin, frying the silicon. As detailed in standard electromagnetism texts, the energy stored in the magnetic field must have somewhere to go when the circuit opens.

Design Rules for Winding and Driving Coils

To keep your microcontrollers alive and your coils pulling reliably, follow these strict bench rules:

  1. Always Install a Flyback Diode: Place a standard 1N4007 (or a faster Schottky like 1N5819 for high-speed PWM) in reverse bias across the coil terminals. This gives the collapsing magnetic field a safe path to dissipate its stored energy.
  2. Respect the Driver's Continuous and Peak Ratings: Never size your switching transistor based solely on steady-state current. Check the Safe Operating Area (SOA) graph in the datasheet for inductive load switching.
  3. Check Core Saturation Before Adding Turns: If your solenoid feels weak, don't just double the voltage. Calculate the flux density. If you are near 1.5 Tesla on a steel core, you need a physically larger core or a different material, not more current.
  4. Use a Snubber for AC Coils: For AC contactors, a diode will cause a fault. Use an RC snubber network (e.g., 100Ω resistor in series with a 0.1µF X2 rated capacitor) across the coil to suppress arcs and protect triac drivers.
Safety Warning: When testing large contactor coils or high-voltage relay boards, always de-energize the circuit, lock out the breaker, and verify the absence of voltage with a CAT III rated multimeter before probing the coil terminals. The stored magnetic energy in large inductors can deliver a lethal shock if discharged through the human body.

Frequently Asked Questions

Does AC or DC create a stronger magnetic field on a coil?

For a given RMS voltage, DC generally creates a stronger, more consistent static magnetic field because AC current is constantly crossing zero and is limited by the coil's inductive reactance ($X_L = 2\pi fL$), not just its DC resistance. However, AC is used in transformers and AC motors specifically because the changing field is required to induce voltage in secondary windings or create rotating torque.

How do I measure the magnetic field on a coil with a multimeter?

You cannot directly measure Teslas or Ampere-turns with a standard multimeter. You can measure the coil's resistance to calculate the current, and use a Hall-effect sensor module (like the DRV5053 connected to an Arduino ADC) to measure the actual flux density at the pole face. For more on sensor integration, electronics-tutorials.ws provides excellent primers on magnetic field sensing.

Why does my coil get hot even when it's holding a relay closed?

A coil gets hot due to $I^2R$ (copper) losses. Even when the armature is fully pulled in and the air gap is zero (which lowers the magnetic reluctance and requires less MMF to hold), the current is still limited only by the wire's DC resistance. To prevent overheating in continuous-duty solenoids, designers use a 'pull-in' high voltage to generate the initial strong magnetic field, then drop to a lower 'hold' voltage via PWM or a series resistor once the armature closes.