An electromagnet is a type of magnet in which the magnetic field is produced by an electric current flowing through a wire coil, typically wrapped around a ferromagnetic core, allowing the magnetic force to be turned on, off, or varied by controlling the current. When you introduce an electromagnet into a real circuit, it fundamentally changes the load profile: it acts as an inductive load that stores energy in a magnetic field, draws an inrush current to establish that field, and generates a high-voltage reverse polarity spike (inductive kickback) the moment the circuit is broken.
The Core Physics: Ampere-Turns and Magnetic Flux
In physics and electrical engineering, the strength of an electromagnet is not measured merely by the current flowing through it, but by the Magnetomotive Force (MMF). MMF is the product of the current (I) and the number of turns of wire (N), expressed in Ampere-turns (At).
The magnetic field strength (H) inside the coil is the MMF divided by the magnetic path length (l):
H = (N × I) / l
However, H only tells us the magnetizing force. To find the actual magnetic flux density (B)—the measurable pulling force measured in Tesla (T)—we must multiply H by the permeability (μ) of the core material:
B = μ × H
This is where the core material matters immensely. Air has a relative permeability (μr) of 1. Electrical steel (silicon steel), commonly used in transformer and contactor cores, has a relative permeability of roughly 4,000. This means wrapping your coil around an iron core multiplies the magnetic flux density by 4,000 compared to an air-core coil of the exact same dimensions and current.
According to All About Circuits, this relationship holds true until the core reaches magnetic saturation. For most electrical steels, saturation occurs between 1.6 and 2.0 Tesla. Beyond this point, increasing the current yields almost zero increase in pulling force, and the excess energy is wasted entirely as heat.
Worked Numeric Example: Sizing a 12V DC Solenoid Coil
Let's move from abstract physics to the workbench. Suppose you are designing a 12V DC intermittent-duty solenoid to pull a mechanical latch. You need 500 Ampere-turns to generate enough force to close the 2mm air gap. Your bobbin has a window area that perfectly accommodates 1,000 turns of 28 AWG enameled copper wire.
Step 1: Calculate Required Current
Using the MMF formula (MMF = N × I):
500 At = 1,000 turns × I
I = 0.5 Amps (500 mA)
Step 2: Determine Required Resistance
Using Ohm's Law (R = V / I) for our 12V supply:
R = 12V / 0.5A = 24 Ω
Step 3: Calculate Wire Length
According to standard AWG tables, 28 AWG solid copper wire has a resistance of approximately 0.213 Ω per meter at 20°C.
Length = Total Resistance / Resistance per meter
Length = 24 Ω / 0.213 Ω/m = 112.6 meters
Step 4: Verify Physical Fit and Thermal Limits
If we have 1,000 turns and 112.6 meters of wire, the average circumference per turn is 11.26 cm (a coil diameter of about 3.5 cm). This fits our physical bobbin design.
The power dissipation is P = V × I = 12V × 0.5A = 6 Watts. For an intermittent-duty solenoid (energized for less than 3 seconds at a time), 6W is easily managed without exceeding the 155°C limit of Class F insulation. If this were a continuous-duty relay, we would need to increase the turn count with thinner wire (e.g., 32 AWG) to raise the resistance and lower the holding current.
Where You Meet This in Practice: Relays, Contactors, and Motors
You interact with electromagnets constantly in both residential wiring and electronics design. Here is where the physics translates to hardware:
- Relays and Contactors: The 'coil' rated on the side of a Schneider Electric or Omron contactor is an electromagnet. When energized, it pulls an iron armature that physically closes the high-current line/load contacts.
- Maglocks (Magnetic Locks): Used in commercial access control, these are massive, continuous-duty electromagnets. A standard 12V/24V maglock might draw 500mA and generate 1,200 lbs of holding force. They are designed to be 'fail-safe'—they unlock when power is cut.
- Electric Motors: The stator windings in an AC induction motor or a BLDC (Brushless DC) motor are rotating electromagnets. The drive circuitry sequentially energizes these coils to create a rotating magnetic field that drags the rotor along with it.
Because an electromagnet stores energy in its magnetic field, breaking the circuit causes the field to collapse rapidly. Faraday's Law of Induction dictates that this rapid change in current (di/dt) will induce a massive voltage spike of reverse polarity. In a 12V DC relay coil, this spike can easily exceed 100V, instantly destroying a driving transistor or an ESP32 GPIO pin. Always place a flyback diode (like a 1N4007) in reverse parallel across the coil, or use a TVS diode for faster drop-out times in high-speed contactors.
Common Confusions: Electromagnets vs. Permanent Magnets vs. Inductors
The most common mistake among junior engineers and hobbyists is confusing an electromagnet with an inductor. Physically, they are often identical: copper wire wrapped around a core. The difference lies entirely in their engineering intent.
An inductor is designed to keep its magnetic flux contained within the core. Its purpose is to oppose changes in current (filtering, energy storage in switch-mode power supplies). You want minimal magnetic radiation and high inductance.
An electromagnet is designed to project its magnetic flux across an air gap to do mechanical work. The core is often open-ended (like a horseshoe or a solenoid tube) specifically to force the magnetic field lines out into the surrounding space to attract an armature.
Similarly, people confuse them with permanent magnets (like Neodymium N52). A permanent magnet relies on the quantum-level alignment of electron spins within the material's domains. An electromagnet relies on the macroscopic movement of free electrons through a conductor. You can turn off an electromagnet; you cannot turn off a permanent magnet without heating it past its Curie temperature.
Frequently Asked Questions
What is the exact definition of electromagnet in physics terms?
In strict physics terms, an electromagnet is a device that converts electrical energy into magnetic potential energy via Ampere's Law, utilizing a current-carrying conductor to generate a controllable magnetic field, which is typically concentrated and amplified by a high-permeability ferromagnetic core to perform mechanical work across an air gap.
How does an electromagnet affect a DC circuit when switched off?
When switched off, the collapsing magnetic field induces a reverse electromotive force (back-EMF). This creates a high-voltage transient spike that attempts to maintain the current flow. Without a snubber circuit or flyback diode, this spike will arc across mechanical switch contacts (causing pitting and degradation) or cause avalanche breakdown in solid-state switching components like MOSFETs and BJTs.
Why do electromagnets use iron cores instead of aluminum or wood?
Iron and silicon steel are ferromagnetic materials with high relative permeability (μr > 1000). They provide a low-reluctance path that concentrates and amplifies the magnetic flux lines. Aluminum is paramagnetic (permeability nearly identical to air) and wood is diamagnetic; neither will amplify the magnetic field, resulting in an incredibly weak magnet that wastes most of its electrical energy as heat.
Can an electromagnet work on alternating current (AC)?
Yes, AC electromagnets are widely used in industrial contactors and AC solenoid valves. However, because AC current passes through zero 120 times a second (on a 60Hz grid), the magnetic pull drops to zero twice per cycle, causing severe mechanical chatter. To prevent this, AC electromagnets feature a 'shading coil' (a copper ring embedded in the pole face) which creates a secondary, phase-shifted magnetic field that maintains holding force during the zero-crossings. For deeper reading on AC magnetic circuits, refer to Electronics Tutorials.






