Magnetic physics is the branch of electromagnetism that defines how moving electric charges generate magnetic fields and how those fields exert forces on nearby conductors and magnetic materials. In a real circuit or installation, magnetic physics dictates inductor saturation limits, transformer core losses, motor starting torque, and the mandatory grouping of AC conductors to prevent conduit heating. Makers and apprentices commonly confuse magnetic flux (the total field lines, measured in Webers) with magnetic flux density (the concentration of those lines, measured in Teslas or Gauss). Think of magnetic flux as the total number of cars on a highway, while flux density is the number of cars packed into a single lane; confusing the two leads to undersized transformer cores or instantly saturated power inductors.

The Core Rules of Magnetic Physics in Circuits

At the bench, you rarely need to solve Maxwell's equations, but you do need a firm grasp on Ampere's Law and Faraday's Law of Induction. Ampere's Law tells us that any current flowing through a wire generates a concentric magnetic field around it. This is the foundational principle behind electromagnets, relay coils, and the current transformers inside your clamp meter. Faraday's Law is the reverse: a changing magnetic field intersecting a conductor induces a voltage across it. This is how generators produce power and how switching power supplies transfer energy.

Key Constants & Units:
Magnetic Flux ($\Phi$) = Webers (Wb)
Flux Density ($B$) = Teslas (T) or Gauss (1 T = 10,000 Gauss)
Magnetomotive Force (MMF) = Ampere-turns (At)
Permeability of Free Space ($\mu_0$) = $4\pi \times 10^{-7}$ H/m

When designing magnetics, the material's permeability ($\mu$) is your most critical variable. Air has a low permeability, meaning it resists magnetic fields. Ferrite and laminated silicon steel have high permeability, acting as 'highways' that channel and concentrate magnetic flux. However, these materials have a hard limit known as the saturation flux density ($B_{sat}$). Once a core saturates, its permeability drops to that of air, inductance collapses, and current spikes uncontrollably—a frequent cause of blown MOSFETs in DIY buck converters.

Worked Example: Calculating Inductor Energy and Core Saturation

Let's look at a realistic scenario: you are designing a 12V-to-5V buck converter and need to select an output inductor. You have a standard Coilcraft-style 47µH shielded power inductor with a manganese-zinc ferrite core.

Given Parameters:

  • Inductance ($L$): 47 µH ($47 \times 10^{-6}$ H)
  • Number of Turns ($N$): 15
  • Core Cross-Sectional Area ($A_e$): 1.2 cm² ($1.2 \times 10^{-4}$ m²)
  • Saturation Flux Density ($B_{sat}$): 0.35 T (typical for MnZn ferrite at 100°C)

Step 1: Calculate the Saturation Current ($I_{sat}$)
We use the fundamental magnetics equation: $L \cdot I = N \cdot B \cdot A_e$. Rearranging to solve for current at the saturation limit:

$$I_{sat} = \frac{B_{sat} \cdot A_e \cdot N}{L}$$

$$I_{sat} = \frac{0.35 \cdot (1.2 \times 10^{-4}) \cdot 15}{47 \times 10^{-6}}$$

$$I_{sat} = \frac{0.00063}{0.000047} \approx 13.4 \text{ Amps}$$

If your peak switching current exceeds 13.4A, the core saturates. The inductor stops acting like an inductor and becomes a low-resistance wire, likely destroying your switching IC.

Step 2: Calculate Maximum Stored Energy
Just before saturation, the energy stored in the magnetic field is:

$$E = \frac{1}{2} L I^2 = 0.5 \cdot (47 \times 10^{-6}) \cdot (13.4)^2 \approx 4.22 \text{ millijoules}$$

Bench Tip: Always derate your $B_{sat}$ target by at least 20% in your calculations. Ferrite cores lose permeability as they heat up, and a core that holds 13.4A at 25°C might saturate at 11A when running hot inside an enclosed project box.

Where You Meet Magnetic Physics in Practice

Magnetic physics isn't just for component design; it governs safety and signal integrity on the jobsite and at the workbench.

1. AC Conductor Grouping and Eddy Currents
In AC wiring, current alternates direction 60 times a second (in North America), creating a constantly collapsing and expanding magnetic field. According to NEC Article 300.3(B) and 300.20, all circuit conductors (hot, neutral, and equipment ground) must be routed in the same metallic conduit. Because the currents in the hot and neutral are equal and opposite, their magnetic fields cancel each other out. If you separate them into different metal conduits, the uncanceled alternating magnetic field induces eddy currents in the steel conduit. This turns the conduit into an induction heater, which can melt wire insulation and start a fire.

2. EMI and PCB Trace Routing
When debugging an ESP32 or Arduino, you might notice ADC readings jumping wildly when a nearby relay clicks. This is magnetic coupling. The relay coil generates a massive $di/dt$ (change in current over time) spike when switched off. This changing magnetic field cuts across your high-impedance analog sensor traces, inducing a voltage spike (Faraday's Law). The fix isn't just software averaging; it's physical: route analog traces away from relay coils, use twisted-pair wires for sensor signals to cancel induced noise, and add a reverse-biased flyback diode across the relay coil to suppress the magnetic collapse.

3. Motor Cogging and Detent Torque
If you've ever spun a disconnected stepper motor or BLDC motor by hand, you feel a 'notchy' resistance. This is cogging torque, caused by the permanent magnets on the rotor seeking the lowest-reluctance path through the stator's steel teeth. Understanding this magnetic detent is crucial when designing 3D printer extruders or CNC routers, as it dictates the microstepping resolution you need in your motor drivers (like the TMC2209) to achieve smooth motion.

Magnetic Physics FAQ: Real-World Bench and Jobsite Questions

How does magnetic physics affect wire ampacity in steel conduit?

Beyond the eddy current heating mentioned above, magnetic physics causes the proximity effect and skin effect. In large AC feeders (like 4/0 AWG THHN), the alternating magnetic field from adjacent wires forces the electrons to crowd toward the outer skin of the conductor. This effectively reduces the cross-sectional area the current can use, increasing the wire's AC resistance compared to its DC resistance. This is why the NEC requires strict derating of ampacity when bundling multiple current-carrying conductors in a single raceway—the magnetic interaction literally makes the wires run hotter.

Why do my ESP32 ADC readings jump when a relay switches nearby?

This is Faraday's Law of Induction in action. When the relay coil is de-energized, the magnetic field collapses rapidly ($di/dt$ is very high). This changing magnetic flux cuts across the loop formed by your sensor wiring and the ESP32 ground plane, inducing a transient voltage spike. To fix this, install a 1N4007 flyback diode directly across the relay coil terminals (cathode to positive) to provide a path for the collapsing magnetic energy, and keep high-current switching loops physically separated from low-voltage analog traces.

What is the difference between hard and soft magnetic materials in electronics?

It comes down to the hysteresis loop and coercivity. Hard magnetic materials (like neodymium or alnico) have high coercivity; once magnetized, they retain their magnetic field and are used to make permanent magnets for motors and speakers. Soft magnetic materials (like silicon steel or ferrite) have low coercivity; they magnetize and demagnetize easily with minimal energy loss. You use soft materials for transformer cores and inductors where the magnetic field must reverse thousands of times per second without generating excessive heat. For a deep dive into material properties, the All About Circuits textbook on magnetism provides excellent baseline theory.

Can I put a neodymium magnet directly on my PCB to hold a sensor?

Proceed with extreme caution. Neodymium magnets generate intense localized flux densities (often exceeding 1.0 Tesla at the surface). If placed directly on a PCB, this static magnetic field can trigger nearby reed switches, saturate the cores of small signal transformers, and induce Hall effect voltage offsets in current-sense ICs or unshielded inductors. If you must use a magnet for mechanical retention, keep it at least 15-20mm away from sensitive analog components and use a steel keeper plate to contain the magnetic flux lines.