An electromagnet is a temporary magnet created by passing direct current (DC) through a wire coil wrapped around a ferromagnetic core. In a real circuit, it changes electrical energy into a controllable mechanical pulling force, acting as the physical bridge that allows a low-power microcontroller signal to switch a high-power AC load or move a physical valve. Builders commonly confuse the generation of the magnetic field (which happens entirely in the copper coil) with the concentration of the field (which happens in the iron core), or they mistakenly assume AC electromagnets can use solid iron cores without suffering from massive eddy current heating.

The Three Physical Components of an Electromagnet

Strip down any relay, solenoid, or magnetic lock, and you will find the same three physical layers. Understanding what each layer is made of dictates the efficiency and thermal limits of your build.

1. The Ferromagnetic Core

The core does not generate the magnetic field; it provides a low-reluctance path that concentrates and multiplies the flux generated by the coil. For DC applications, 1018 low-carbon steel or soft iron is the standard because it magnetizes and demagnetizes rapidly without retaining significant residual magnetism. For AC applications, solid steel would overheat from eddy currents, so cores are made of laminated silicon steel (thin sheets insulated from each other) to break up the current paths.

2. The Magnet Wire Coil

This is the engine of the electromagnet. You cannot use standard stranded hook-up wire here; you need magnet wire (typically copper) coated in a microscopically thin layer of dielectric enamel. This enamel (often polyurethane for lower temps or polyimide/Kapton for high temps) allows the wire to be wound tightly layer-over-layer without shorting out. According to MWS Wire Industries, the enamel build thickness adds only 0.0005 to 0.002 inches to the bare wire diameter, maximizing the copper cross-section in a tight bobbin.

3. The Bobbin and Insulation

The coil needs a physical form to wrap around, known as a bobbin. These are typically injection-molded from high-dielectric-strength plastics like Nylon 6/6 or PET. The bobbin prevents the energized copper from touching the grounded steel core, which would instantly short the circuit and trip your breaker or fry your MOSFET.

Worked Example: Sizing a 12V DC Lifting Magnet

Let us run the math on a typical bench build to see how material choices translate into real physical dimensions. Suppose you are winding a custom 12V DC holding electromagnet to pull a steel latch, and you want it to draw exactly 1.0 Amp from a standard 12V bench supply.

  • Target Resistance: Using Ohm's Law (R = V / I), we need 12V / 1.0A = 12 ohms of total coil resistance.
  • Wire Selection: We select 24 AWG polyurethane-enameled copper wire. According to standard AWG tables, 24 AWG has a resistance of roughly 25.67 ohms per 1,000 feet (0.02567 ohms/ft).
  • Total Wire Length: 12 ohms / 0.02567 ohms/ft = 467.4 feet of wire.
  • Turn Calculation: Assume you are wrapping this around a bobbin with a 2-inch outer diameter. The circumference is π × 2 inches = 6.28 inches (0.523 feet). Dividing our total length (467.4 ft) by the circumference (0.523 ft) gives us roughly 893 turns.
Bench Reality Check: 24 AWG magnet wire has an outer diameter (including enamel) of about 0.0201 inches. If you wound 893 turns in a single layer, the coil would be 17.9 inches long. Since your bobbin is likely only 2 inches wide, you must wind the wire in multiple layers. 893 turns divided by 100 turns-per-layer means you will stack roughly 9 layers deep, adding about 0.18 inches of radial thickness to your bobbin. This is why precise AWG selection is critical: drop down to 28 AWG, and you will need thousands of feet of wire, making the coil physically too large to fit inside your enclosure.

Where You Meet Electromagnets in Practice

You interact with electromagnets constantly, often without realizing the specific material engineering inside them. Here is where they show up in real installations:

  • Relays and Contactors: The SparkFun Relay Tutorial highlights how a small 5V or 12V DC coil pulls a steel armature to close heavy copper contacts, allowing an Arduino to safely switch a 120V AC water heater.
  • Solenoids: Found in automotive starters and irrigation valves. When energized, the magnetic field pulls a steel plunger into the center of the coil, converting electrical energy into direct linear mechanical motion.
  • Magnetic Locks (Maglocks): Used in commercial access control. A massive DC electromagnet in the door frame pulls against a solid steel armature plate on the door, generating up to 1,200 lbs of holding force. These are 'fail-safe'—they unlock when power is cut.
  • Speakers and Microphones: A lightweight voice coil (electromagnet) interacts with a permanent magnet to push a paper or Kevlar cone, moving air to create sound waves.

Decision Tree: Choosing Core and Wire for Your Build

Do not guess your materials. Use this decision matrix to select the exact core alloy and wire gauge based on your circuit's operating parameters. As detailed by Georgia State University's HyperPhysics, the permeability of your core material directly dictates your inductance and pulling force.

If Your Application Is... Choose This Core Material Choose This Wire Type Why?
12V/24V DC Holding Magnet or Relay 1018 Low-Carbon Steel or Soft Iron 24-28 AWG Polyurethane Enameled Copper Solid steel handles DC flux perfectly without eddy current losses; polyurethane enamel is easy to solder.
120V/240V AC Contactor or Transformer Laminated Silicon Steel (E-I cores) 18-22 AWG Polyimide (Kapton) Enameled Laminations stop AC eddy currents from melting the core; polyimide survives the higher thermal load of AC coils.
High-Frequency Switching Power Supply Manganese-Zinc Ferrite (e.g., Type 43) Litz Wire (multi-strand insulated) Ferrite prevents high-frequency core losses; Litz wire defeats the skin effect at high frequencies.
The Default Pick: For 90% of hobbyist and DIY 12V DC projects, terminate your decision here: buy a 1018 low-carbon steel rod (McMaster-Carr part 8920K14) and 24 AWG polyurethane-enameled copper wire. This combination offers the best balance of ease of winding, solderability, and magnetic saturation for low-voltage bench work.

Thermal Limits, Flyback Spikes, and Burnout Prevention

The most common reason a DIY electromagnet fails is not a lack of magnetic force, but thermal destruction or inductive voltage spikes. When you design and install these components, you must account for two physical realities.

I²R Heating and Duty Cycles

Every electromagnet is essentially a resistor. In our 12V/1A example above, the coil dissipates 12 Watts of heat continuously (P = I²R). If you pack 467 feet of wire tightly into a small plastic bobbin, that heat has nowhere to go. If the coil exceeds the thermal rating of the enamel (typically 155°C for standard polyurethane), the insulation melts, the turns short together, resistance drops, current spikes, and the coil burns open. If your application only requires the magnet to be on for a few seconds (like a door strike or a starter motor), you can safely use thinner wire and higher current. If it must hold continuously (like a maglock), you must design for a lower current and use a larger core to dissipate heat.

The Flyback Diode Requirement

When you de-energize a DC electromagnet, the collapsing magnetic field induces a massive reverse voltage spike (V = -L × di/dt). A simple 12V relay coil can generate a 100V+ spike that will instantly punch through the silicon junction of your driving transistor or Arduino GPIO pin. You must always wire a flyback diode (like a 1N4007) in reverse bias across the electromagnet terminals. This provides a safe recirculation path for the inductive energy, clamping the spike to a safe ~0.7V above the supply rail.