An electromagnet is a temporary magnet created by running electrical current through a wire coil, whereas a permanent magnet generates a persistent magnetic field from its intrinsic atomic alignment without needing external power. While both produce identical magnetic flux lines (measured in Teslas or Gauss), how they generate, control, and dissipate that field completely changes how you must design the driving circuit. People commonly confuse the source of the magnetism with the field itself, assuming electromagnets behave fundamentally differently in a magnetic circuit. In reality, a 1.2 Tesla field from an N52 neodymium magnet and a 1.2 Tesla field from an energized copper coil will attract the same steel armature with the exact same force. The difference lies entirely in the electrical domain: permanent magnets are passive mechanical components, while electromagnets are active electrical loads that demand wire sizing, thermal management, and transient voltage protection.
The Core Physics: Current vs. Atomic Alignment
Permanent magnets (like neodymium-iron-boron or ceramic ferrite) rely on ferromagnetic domains locked into alignment during manufacturing. Once magnetized, they require zero energy input to maintain their field, though they can be permanently demagnetized if heated past their Curie temperature or subjected to a strong opposing external field.
Electromagnets rely on Ampere’s Law: moving electrical charge creates a magnetic field. By wrapping a conductive wire into a coil and passing direct current (DC) through it, the individual magnetic fields of each loop sum together. Inserting a ferromagnetic core (like 1018 low-carbon steel) multiplies this field strength by thousands of times due to the core's high magnetic permeability. You can read more about the foundational physics of electromagnetism and Ampere's Law via Georgia State University's HyperPhysics.
Worked Example: Sizing a 12V DC Holding Electromagnet
To understand the electrical reality of electromagnets, let's design a simple 12V DC electromagnet intended to hold a 50 lb (222 N) steel plate. The strength of an electromagnet is determined by its Ampere-turns (At), which is the current multiplied by the number of wire loops.
Design Parameters:
- Target: 1,000 Ampere-turns for sufficient holding force on a 2-inch square iron core.
- Power Supply: 12V DC.
- Wire: 24 AWG enameled copper wire (magnet wire).
- Core dimensions: 2-inch square, meaning the mean length per turn is roughly 8 inches (accounting for the build-up of the coil, let's use 10 inches or 0.833 ft per turn to be safe).
The Math:
First, we choose our turn count. Let's wrap 500 turns.
Total wire length = 500 turns × 0.833 ft/turn = 416.5 ft.
The resistance of 24 AWG copper is roughly 25.67 mΩ/ft at 20°C.
Total Resistance (R) = 416.5 ft × 0.02567 Ω/ft = 10.69 Ω.
Using Ohm's Law, the steady-state current (I) is:
I = V / R = 12V / 10.69 Ω = 1.12 A.
Total Ampere-turns = 1.12 A × 500 turns = 560 At.
Wait, this is below our 1,000 At target. To fix this without changing the power supply, we must reduce the resistance by using thicker wire or fewer turns of a thicker gauge. Let's switch to 20 AWG wire (10.15 mΩ/ft) and wrap 400 turns.
Recalculation with 20 AWG:
- Length = 400 turns × 0.833 ft = 333.2 ft.
- Resistance = 333.2 ft × 0.01015 Ω/ft = 3.38 Ω.
- Current = 12V / 3.38 Ω = 3.55 A.
- Ampere-turns = 3.55 A × 400 turns = 1,420 At. (Target achieved).
Where You Meet This in Practice
In electrical and electronics work, you rarely build raw electromagnets from scratch; instead, you integrate them as pre-built components. Understanding that these are inductive loads dictates how you wire and protect them.
- Relays and Contactors: The coil is an electromagnet that pulls a spring-loaded armature to close high-current contacts. When wiring a contactor coil to a PLC output, you must install a surge suppression module (RC snubber or diode) to prevent the PLC's output transistor from failing.
- Solenoid Valves: Used in irrigation and pneumatics, an electromagnet pulls a plunger to open or close fluid flow. DC solenoids draw steady current, while AC solenoids rely on the changing impedance of the magnetic gap to limit holding current.
- Maglocks (Electromagnetic Locks): Used in fail-safe security doors. These are massive electromagnets that require continuous power to stay locked. Because they draw high continuous current (often 500mA to 1A at 12V/24V), the wiring must be sized for continuous duty, and the access control board must have built-in flyback protection.
For a deeper look at protecting circuits from these specific inductive loads, review the guide to taming inductive kickback on All About Circuits.
Comparison Matrix: Electromagnets vs. Permanent Magnets
| Criterion | Electromagnet | Permanent Magnet (e.g., NdFeB) |
|---|---|---|
| Field Control | Infinitely variable (0 to max) via current regulation; instantly reversible by swapping polarity. | Fixed field strength; requires physical removal or complex mechanical shielding to 'turn off'. |
| Power Requirement | Continuous electrical power required to maintain the field (except in superconducting variants). | Zero electrical power required to maintain the field. |
| Heat Generation | Generates significant I²R heat; requires thermal management and duty-cycle limits. | Generates no heat; actually loses magnetism if exposed to external heat sources. |
| Circuit Protection | Mandatory flyback diodes, snubbers, or MOVs required to protect switching electronics. | None required (passive component). |
| Max Flux Density | Limited by core saturation (~2.0 Tesla for iron) and copper thermal limits, unless supercooled. | Caps out around 1.4 Tesla residual induction at room temperature. |
Frequently Asked Questions
Can an electromagnet be stronger than a neodymium permanent magnet?
Yes, but it depends on the scale and cooling. Neodymium (NdFeB) magnets cap out around 1.4 Tesla residual induction. Large superconducting electromagnets, like those used in MRI machines or particle accelerators, easily exceed 3.0 to 7.0 Tesla. However, for a given volume at room temperature, a permanent magnet will almost always produce a stronger field than a similarly sized copper-wound electromagnet. This is because copper's electrical resistance limits how much current you can push through a small coil before the heat melts the wire's insulation.
Why do electromagnets need a flyback diode but permanent magnets don't?
Think of the electrical current in an electromagnet like water flowing through a heavy, rigid pipe. If you suddenly slam a valve shut (open the electrical switch), the water's momentum causes a destructive pressure spike known as 'water hammer.' A flyback diode acts as a pressure relief valve, giving the collapsing magnetic field a safe, closed-loop path to circulate and dissipate its stored energy ($E = \frac{1}{2}LI^2$). Permanent magnets have no flowing electrical current, and therefore no stored electrical energy to dump into your circuit when you move them away.
Do electromagnets lose all their magnetism when turned off?
No. The iron or steel core retains a small amount of 'residual magnetism' (remanence) due to magnetic hysteresis. The core's atomic domains don't perfectly snap back to a randomized state the moment the current stops. In precision applications like CNC spindle brakes, robotic end-effectors, or sensitive relays, this residual stickiness can prevent the armature from releasing, causing timing errors or dropped parts. Engineers solve this by adding a small physical air gap (like a 0.010-inch non-magnetic brass shim), using specialized low-remanence core alloys, or applying a brief reverse-voltage pulse to actively demagnetize the core upon shutdown.
What happens if I run an AC electromagnet on DC power?
You will likely burn it out. AC electromagnets (like those in heavy-duty industrial contactors) are designed with a specific impedance that relies on the alternating frequency to limit current. When the armature is open, the inductive reactance is low, allowing a high 'inrush' current to pull the armature in. Once closed, the inductance spikes, dropping the holding current. If you apply DC, the inductive reactance is zero, and the only limiting factor is the very low DC resistance of the wire. The coil will draw massive current, overheat, and fail in minutes. For more on electromagnetism and AC/DC coil differences, see Electronics Tutorials.






