An electro-magnet is a device that generates a controllable magnetic field when electric current passes through a wire coil, typically amplified by a ferromagnetic core. Unlike permanent magnets, it changes a static electrical circuit into a dynamic mechanical or switching system, allowing you to turn magnetic force on and off instantly or scale it by adjusting the current. People commonly confuse electro-magnets with inductors (which store energy in a magnetic field to smooth AC/DC current changes) and solenoids (which are actually just a specific sub-class of electro-magnets optimized for linear push/pull motion).

The Bottom Line: If you need a magnetic field that you can control with a microcontroller, relay, or simple switch, you need an electro-magnet. The force it exerts is strictly a function of the current flowing through it and the number of wire turns in the coil.

The Core Concept: What an Electro-Magnet Actually Is

At the bench level, an electro-magnet relies on Ampere’s Law: any moving electrical charge generates a magnetic field. By looping a conductive wire into a coil, the individual magnetic fields of each loop stack together, concentrating the flux density through the center of the coil. Wrapping this coil around a high-permeability ferromagnetic core (like soft iron or silicon steel) multiplies the resulting magnetic field strength by hundreds or thousands of times compared to an air core.

The fundamental metric for electro-magnet strength is Magnetomotive Force (MMF), measured in Ampere-turns (AT). The formula is deceptively simple:

MMF = Current (I) × Number of Turns (N)

This means you can achieve the exact same holding force by pushing 10 Amps through 100 turns of thick 12 AWG wire, or by pushing 0.1 Amps through 10,000 turns of hair-thin 36 AWG magnet wire. The choice between high-current/low-turns and low-current/high-turns dictates the physical size, thermal limits, and power supply requirements of your build.

The Math: A Worked Numeric Coil Design Example

Let’s design a basic 12V DC holding electro-magnet for a custom DIY cabinet lock. Our target is to generate roughly 1,100 Ampere-turns (AT), which is sufficient to hold a small steel strike plate against a localized iron core.

  1. Define the Power and Current: We have a standard 12V DC supply. To prevent the coil from overheating without active cooling, we want to limit the continuous current draw to 1 Ampere. Using Ohm’s Law ($R = V / I$), our target coil resistance must be $12\Omega$.
  2. Select the Wire Gauge: We choose 28 AWG enameled copper wire (magnet wire). According to standard AWG tables, 28 AWG has a resistance of roughly $65.3\Omega$ per 1,000 feet, which converts to $0.214\Omega$ per meter.
  3. Calculate Wire Length: To hit our $12\Omega$ target, we divide the required resistance by the resistance per meter: $12\Omega / 0.214\Omega/\text{m} =$ 56 meters of wire.
  4. Calculate the Turns: Assume our soft iron core has a circumference of 5 cm (0.05 m). We divide the total wire length by the core circumference: $56\text{ m} / 0.05\text{ m} =$ 1,120 turns.
  5. Verify the MMF: $1\text{ Ampere} \times 1,120\text{ turns} =$ 1,120 Ampere-turns.
Bench Tip: When winding your own coils, always use a layer of Kapton tape or polyester film tape between winding layers. This prevents the outer layers from crushing the inner layers and shorting out the microscopic enamel insulation, which causes dead shorts and thermal runaway.

Where You Meet This in Practice

You are likely already interacting with electro-magnets daily, even if they are hidden inside sealed enclosures. According to foundational resources on electromagnetism principles, these components bridge the gap between low-voltage control logic and high-voltage or heavy mechanical loads.

  • HVAC Contactors: The 24V AC coil inside your air handler pulls a heavy steel armature downward, mechanically forcing high-amperage mains contacts closed to start the compressor.
  • Access Control Maglocks: Commercial glass doors use massive electro-magnets embedded in the door frame. When the badge reader cuts power to the coil, the door unlocks (a fail-safe design for fire codes).
  • Automotive Starters: The starter solenoid is a heavy-duty electro-magnet that simultaneously pushes the pinion gear into the engine flywheel and closes a massive copper contact to deliver 200+ Amps to the starter motor.
  • Scrap Yard Cranes: Industrial lifting magnets use thousands of turns of anodized aluminum wire wrapped around deep iron poles to generate enough flux to penetrate thick, irregular stacks of scrap steel.

Decision Tree: Picking the Right Actuator for Your Build

Do not buy a generic "electro-magnet" coil if you actually need a specific mechanical action. Use this decision matrix to select the correct form factor and concrete part number for your next project.

Application Need Actuator Type Concrete Part Pick Key Spec to Verify
Linear push/pull motion (under 1-inch stroke) Linear Solenoid Adafruit 412 (or generic 12V 10N push solenoid) Stroke length and holding force at max stroke
Hold a door or panel shut (>500 lbs force, no moving parts) Electromagnetic Lock (Maglock) Seco-Larm E-996D-J1 Input voltage (12V vs 24V) and fail-safe vs fail-secure
Switch a high-current AC load using a 5V microcontroller logic pin PCB Mount Relay Omron G5V-2-DC5 Coil voltage (5V) and contact rating (e.g., 2A/30A)
Rotate a shaft a specific number of degrees (e.g., a valve) Rotary Solenoid Ledex 2E (12V DC Rotary) Rotation angle (e.g., 25°, 45°, 90°) and torque

Default Recommendation: If you are building an Arduino or ESP32 automation project that requires moving a physical latch, start with a standard 12V linear solenoid driven by an IRLZ44N logic-level MOSFET. They are cheap, widely available, and provide immediate, forceful mechanical feedback.

The Flyback Spike: Protecting Your Circuit

The most common way hobbyists destroy their microcontrollers when working with electro-magnets is ignoring inductive kickback. As detailed in relay and inductor theory guides, an electro-magnet coil is a massive inductor. It stores energy in its magnetic field while powered.

When your transistor cuts the power, the magnetic field collapses rapidly. According to Faraday’s Law of Induction ($V = -L \cdot di/dt$), this rapid change in current induces a massive reverse voltage spike. A simple 12V solenoid can easily generate a 300V to 500V reverse spike that will instantly punch through the drain-source breakdown voltage of your MOSFET or fry your ESP32 GPIO pin.

The Mandatory Fix: Always wire a flyback diode (like a standard 1N4007 rectifier) in reverse bias directly across the electro-magnet’s coil terminals. The cathode (stripe) must face the positive voltage supply. When the coil is powered, the diode blocks current. When power is cut and the voltage spike reverses polarity, the diode conducts, safely routing the collapsing energy back through the coil until it dissipates as heat.

Frequently Asked Questions

Can I run an AC electro-magnet coil on a DC power supply?
No. AC coils rely on inductive reactance ($X_L = 2\pi fL$) to limit current. Their actual DC wire resistance is very low. If you apply 24V DC to a 24V AC contactor coil, it will draw massive current, overheat, and burn out in seconds. Always match the coil type to the supply, or use a DC-specific coil with higher wire resistance.

Why does my solenoid get too hot to touch after a few minutes?
Most standard linear solenoids are rated for intermittent duty (typically a 10% to 25% duty cycle). They are designed to pull hard for a fraction of a second, not to hold a load continuously. If you need continuous holding, you must either buy a continuous-duty rated solenoid, or wire a resistor in series that bypasses during the initial pull-in phase to drop the holding current by 50%.

Does the core material matter for DC electro-magnets?
Yes. Use soft iron or low-carbon steel (like 1018 steel). Avoid hardened steel or stainless steel (which is largely non-magnetic). Soft iron magnetizes easily when current flows, but crucially, it loses its magnetism almost instantly when power is cut. Hardened steel will retain residual magnetism, causing your actuator to stick even after you turn it off.