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. Unlike permanent magnets, you can turn the magnetic field on, off, or modulate its strength by adjusting the current. When you drop an electromagnet into a real circuit, it fundamentally changes the electrical behavior: it introduces significant inductance, causes a massive current spike at turn-on (stall current), and generates a destructive flyback voltage spike when the circuit opens.
The Core Physics: Amp-Turns and Magnetic Flux
To understand how an electromagnet works on the bench, you have to look past the abstract physics and focus on Magnetomotive Force (MMF). MMF is the magnetic equivalent of electromotive force (voltage) in a standard DC circuit, and it is measured in Amp-turns. You calculate it by multiplying the number of wire turns ($N$) by the current ($I$) flowing through them.
A Worked Numeric Example
Let’s say you are winding a custom holding electromagnet. You wrap 400 turns of 24 AWG magnet wire around a soft iron core. Your target current is 1.5A.
- MMF: 400 turns × 1.5A = 600 Amp-turns.
- Resistance: 24 AWG copper wire has a resistance of about 25.67 ohms per 1,000 feet. If your 400 turns use roughly 80 feet of wire, the coil resistance is about 2.05 ohms.
- Required Voltage: Using Ohm’s Law ($V = I \times R$), you need $1.5A \times 2.05\Omega$ = 3.07V to push that current through the coil.
However, the magnetic circuit isn't just about the wire; it's about the core and the air gap. Think of magnetic reluctance like electrical resistance, but for magnetic flux. Iron has very low reluctance, but air has extremely high reluctance. Even a 1mm air gap between your electromagnet and the steel target will drastically reduce the holding force. According to Georgia State University's HyperPhysics, the magnetic field strength drops off exponentially as the air gap increases, which is why electromagnet faces must be machined perfectly flat for maximum pull.
Where You Meet This in Practice
You interact with electromagnets constantly in both residential wiring and embedded electronics, often without realizing the underlying component is just a coil on a core. Here is where they show up on the jobsite and the workbench:
- Relays and Contactors: The "coil" terminal on a 24V HVAC contactor or an automotive relay is an electromagnet. When energized, it pulls a steel armature that physically closes the high-current load contacts.
- Magnetic Locks (Maglocks): Used in commercial access control. A 12V or 24V DC electromagnet mounted on the door frame holds up to 1,200 lbs of force against an armature plate on the door.
- Solenoid Valves: The coil pulls a magnetic plunger to open or close water, gas, or pneumatic lines in irrigation systems and industrial automation.
- AC/DC Motors: The stator windings in a brushed DC motor or the field coils in an alternator are just rotating or stationary electromagnets interacting with other magnetic fields.
Worked Scenario: Sizing a 24V DC Maglock Power Supply
Let’s walk through a real-world installation where the definition of an electromagnet as an inductive load causes a catastrophic failure if ignored.
The Setup
You are wiring a 24V DC magnetic lock for a secure server room door. The maglock requires 500mA to hold and has an internal coil resistance of 48 ohms. You power it with a 24V 1A power supply, running 100 feet of 22 AWG solid copper wire from the access controller’s relay output to the lock.
The Numbers
First, we calculate the voltage drop to ensure the lock gets enough voltage to engage.
- Wire Resistance: 22 AWG wire is roughly 16.14 ohms per 1,000 ft. A 100 ft run means 200 ft of total wire (out and back). $200 / 1000 \times 16.14 = 3.23$ ohms.
- Total Circuit Resistance: 48 ohms (lock) + 3.23 ohms (wire) = 51.23 ohms.
- Circuit Current: $24V / 51.23\Omega = 0.468A$ (468mA).
- Voltage Drop: $0.468A \times 3.23\Omega = 1.51V$.
- Voltage at Lock: $24V - 1.51V = 22.49V$.
On paper, 22.49V is well within the 10% tolerance for a 24V lock. The lock engages perfectly.
The Outcome
The system works for three days. Then, when an employee badges out and the access controller opens its internal relay to release the door, the relay contacts weld shut. The access controller's 5V logic board shorts out, fries the Ethernet port, and permanently kills the $400 controller.
What Went Wrong: The Inductive Kickback
The installer treated the electromagnet like a simple resistive load (like a heater or a lightbulb). But an electromagnet stores energy in its magnetic field. When the relay opens, the current drops to zero in milliseconds. The collapsing magnetic field induces a massive reverse voltage to keep the current flowing, governed by the formula $V = -L(di/dt)$.
If the maglock has an inductance of 5 Henries, and the relay opens in 1ms (0.001s), the induced voltage is:
$V = 5 \times (0.468 / 0.001) = 2,340$ Volts.
This 2,340V spike arc'd across the opening relay contacts, back-fed into the access controller, and destroyed the sensitive microprocessors. Electronics Tutorials notes that inductive kickback is the primary killer of switching transistors and relay contacts in DC circuits.
Common Confusions: Electromagnets vs. Solenoids vs. Inductors
People frequently confuse electromagnets with other coiled-wire components. While they all rely on the same physics, their engineering intent is entirely different.
| Component | Primary Purpose | Core Material | Mechanical Movement? | Circuit Role |
|---|---|---|---|---|
| Electromagnet | Generate a static holding force or magnetic field. | Solid soft iron or steel. | No (attracts external armature). | Inductive load. |
| Solenoid | Convert electrical energy into linear mechanical motion. | Hollow tube with a movable steel plunger. | Yes (plunger pulls in). | Inductive load + actuator. |
| Inductor | Store energy in a magnetic field to filter or shape AC signals. | Ferrite, powdered iron, or air core. | No. | Reactive impedance (filters). |
| Transformer | Transfer electrical energy between two circuits via mutual induction. | Laminated silicon steel or ferrite. | No. | Voltage step-up/step-down. |
If you are trying to hold a door closed, you want an electromagnet. If you are trying to push a pin to lock a drawer, you want a solenoid. If you are trying to smooth out PWM ripple on a buck converter, you want an inductor.
FAQ: Electromagnet Design and Troubleshooting
Why does my DC electromagnet get incredibly hot even when it's just "holding"?
Unlike a motor that generates back-EMF when spinning to limit its current draw, a stationary DC electromagnet has no back-EMF. The only thing limiting the current is the DC resistance of the copper wire. If you apply continuous voltage, it will draw maximum current continuously, dissipating heat via $I^2R$ losses. For continuous-duty applications, you must either design the coil with enough turns of thin wire to create high resistance, or use a "hold circuit" that drops the voltage by 50% once the armature is pulled in.
Can I power an AC-rated electromagnet (like an HVAC contactor coil) with DC?
No, it will likely burn out. AC electromagnets rely on inductive reactance ($X_L = 2\pi fL$) to limit current, not just wire resistance. Their DC resistance is intentionally kept very low. If you apply DC (where frequency $f = 0$, meaning reactance is zero), the only limit is that low DC resistance. The coil will draw massive current, overheat, and melt the insulation within seconds.
How do I measure the health of an electromagnet coil with a multimeter?
Set your multimeter to resistance (Ohms) and measure across the coil terminals. Compare the reading to the manufacturer's spec sheet. An "OL" (open loop) reading means the wire has broken internally or a thermal fuse has blown. A reading of near 0.0 ohms means the coil has shorted internally between winding layers. Both conditions require replacing the coil.






