An electromagnet is a type of magnet in which the magnetic field is produced by an electric current flowing through a wire coil, usually wrapped around a ferromagnetic core. When you introduce this component into a circuit, it fundamentally changes the electrical behavior by adding inductance, which resists changes in current and stores energy in a magnetic field. Beginners often confuse the broad category of electromagnets with solenoids (which are specifically designed to produce linear mechanical motion) or assume they behave identically to permanent magnets in a circuit, leading to destroyed transistors and unpredictable switching behavior.
The Physics of the Coil: Ampere-Turns and Core Saturation
The scientific foundation of an electromagnet rests on Ampere’s Law, which dictates that a current-carrying conductor generates a concentric magnetic field. By looping the wire into a coil, these individual fields superimpose, creating a concentrated, directional magnetic flux. Wrapping that coil around a ferromagnetic core (like soft iron or silicon steel) multiplies the field strength by thousands of times due to the core's high magnetic permeability.
To quantify this, engineers use Magnetomotive Force (MMF), measured in Ampere-turns (At). The formula is straightforward:
MMF = N × I
Where N is the number of turns and I is the current in amperes. The resulting Magnetic Field Strength (H) depends on the physical length of the magnetic path (l):
H = MMF / l
Let’s calculate the magnetic field strength of a standard Bosch-style 12V DC automotive relay.
• Coil Resistance (R): 80 Ω
• Applied Voltage (V): 12V DC
• Current (I): 12V / 80 Ω = 0.15 A
• Number of Turns (N): 600 turns of 28 AWG enameled copper wire
• Magnetic Path Length (l): 0.04 meters (4 cm)
Calculation:
MMF = 600 × 0.15 = 90 Ampere-turns
H = 90 At / 0.04 m = 2,250 A/m
This field strength drives the magnetic flux density (B) through the iron core, pulling the steel armature against the spring tension to close the high-current contacts. According to HyperPhysics, this relationship holds true until the core reaches magnetic saturation, a point where increasing the current yields almost zero additional magnetic force.
What an Electromagnet Changes in a Real Circuit
Treating an electromagnet as a simple resistor is a common and costly mistake on the workbench. Because it is a coil of wire, an electromagnet is inherently an inductor. This introduces two major circuit alterations:
- Current Delay (Time Constant): When voltage is applied, current does not instantly reach its maximum (Ohm's Law) value. It rises exponentially based on the circuit's time constant ($\tau = L/R$). In high-speed applications, this delay limits how fast the electromagnet can physically actuate.
- Inductive Kickback (Back-EMF): This is the most critical factor for circuit designers. When you de-energize the coil by opening a switch or turning off a MOSFET, the magnetic field collapses rapidly. Faraday's Law of Induction dictates that this collapsing field will induce a massive voltage spike to keep current flowing.
A standard 12V relay coil can generate a 400V to 800V spike upon de-energization if unprotected. This spike will instantly punch through the drain-source junction of a switching MOSFET or fry a microcontroller GPIO pin.
The Fix: You must install a flyback diode in reverse bias across the coil. However, component selection matters. If you are switching the electromagnet with a low-frequency mechanical switch, a standard 1N4007 rectifier diode is fine. But if you are driving the coil with PWM (Pulse Width Modulation) at frequencies above 5 kHz, the 1N4007’s slow reverse recovery time (~30µs) will cause it to fail. For PWM applications, you must use a Schottky diode (like the 1N5819) or an ultra-fast recovery diode (like the UF4007) to safely clamp the back-EMF without overheating.
Where You Meet Electromagnets in Practice
Electromagnets bridge the gap between low-power control signals and high-power physical work. While the underlying science is identical, the mechanical packaging dictates the application. Electronics Tutorials categorizes these practical implementations based on their mechanical output.
| Device Type | Primary Function | Typical Coil Voltage | Core Construction |
|---|---|---|---|
| Relay | Switching low-to-medium electrical loads via isolated contacts. | 5V, 12V, 24V DC | Solid soft iron or steel bobbin core. |
| Contactor | Switching heavy 3-phase industrial motor loads (up to hundreds of amps). | 24V DC, 120V AC, 240V AC | Laminated silicon steel to prevent eddy current heating (especially in AC). |
| Solenoid Valve | Controlling the flow of liquids or gases via a linear plunger. | 12V, 24V DC / 24V AC | Stainless steel tube with a movable iron plunger. |
| Maglock | Securing doors via sheer magnetic holding force (no moving parts). | 12V, 24V DC | Massive solid iron core and aluminum housing for heat dissipation. |
Common Confusions in Magnetic Terminology
When reading datasheets or discussing designs, precise terminology prevents costly ordering errors.
- Electromagnet vs. Permanent Magnet: A permanent magnet (like Neodymium or Ferrite) has a persistent magnetic field due to its atomic domain alignment. An electromagnet's field exists only while current flows. In a circuit, a permanent magnet generates no back-EMF and presents zero inductance; an electromagnet does both.
- Electromagnet vs. Solenoid: All solenoids are electromagnets, but not all electromagnets are solenoids. "Solenoid" specifically refers to an electromagnet designed to convert electrical energy into linear mechanical motion (pulling or pushing a plunger). An electromagnet designed to hold two surfaces together (like a scrap yard crane or a maglock) is not a solenoid.
- Electromagnet vs. Inductor: Physically, they are the same thing (wire wrapped around a core). Functionally, an inductor is designed to store energy in its magnetic field to filter signals or smooth power supplies, while an electromagnet is designed to use that magnetic field to perform external mechanical work.
Electromagnet Science FAQ
What is the scientific definition of an electromagnet compared to a permanent magnet?
In science, an electromagnet is defined as a temporary magnet whose magnetic field is generated by the kinetic movement of electrons (electric current) through a conductor. Unlike a permanent magnet, which relies on the quantum mechanical spin and orbital alignment of electrons within a ferromagnetic material to maintain a persistent field, an electromagnet's field collapses to near-zero when the external power source is removed. This allows for precise, active control over magnetic force in engineering applications.
How does the number of wire turns affect electromagnet strength?
The magnetic force is directly proportional to the number of turns (N) multiplied by the current (I), known as Ampere-turns. Doubling the number of turns theoretically doubles the Magnetomotive Force. However, in a real circuit with a fixed voltage source, adding more turns requires using thinner wire (to fit the same physical space), which increases the coil's electrical resistance. This higher resistance reduces the current draw. Therefore, simply adding infinite turns does not yield infinite strength; engineers must optimize the wire gauge and turn count to match the available voltage and thermal limits of the coil.
Why do DC electromagnets require a flyback diode?
When a DC circuit powering an electromagnet is opened, the sudden interruption of current causes the magnetic field to collapse rapidly. According to Faraday's Law, this induces a reverse-polarity voltage spike (Back-EMF) that can reach hundreds of volts, easily exceeding the breakdown voltage of the switching transistor or MOSFET. A flyback diode, wired in reverse bias across the coil, provides a safe, low-resistance path for this induced current to circulate and dissipate as heat, clamping the voltage spike to a safe level (typically around 0.7V above the supply voltage).
Can an electromagnet work on alternating current (AC)?
Yes, but AC electromagnets require specific design modifications. Because AC current passes through zero 100 or 120 times per second (depending on the 50Hz or 60Hz grid), the magnetic field also drops to zero at those intervals. In a standard relay, this would cause severe mechanical chatter, arcing, and rapid destruction of the contacts. To prevent this, AC electromagnets (like industrial contactors) feature a shading coil (or shading ring)—a single loop of copper or aluminum embedded in the face of the iron core. This ring acts as a shorted secondary transformer winding, generating a delayed magnetic field that holds the armature closed during the zero-crossings of the main AC waveform. Furthermore, AC coils use laminated cores to minimize eddy current heating, which would otherwise melt a solid iron core.






