EduKG
← Back

Magnetic fields and electromagnets

Learning objectives

  • Outcome

    Calculate the magnetic field magnitude of a straight wire with B=μ0I2πrB = \frac{\mu_0 I}{2\pi r} and state the field direction using the right-hand rule.

  • Outcome

    Find the coil current from Ohm's law I=URI = \frac{U}{R} and compute the field inside a solenoid with B=μ0nIB = \mu_0 n I.

  • Outcome

    Compare the field of a coil with and without an iron core using simulation or measurement data.

  • Outcome

    Calculate the force on a current-carrying wire in a magnetic field with F=BILsin⁡θF = BIL\sin\theta.

Understand the idea

Magnetic Fields and Electromagnets: From Current to Force

Text

Electric current is ordered motion of charges, and every moving charge creates a magnetic field B⃗\vec{B} around itself, so a current-carrying wire is always surrounded by a magnetic field.

Near a long straight wire the field is described by Ampère's law:

B=μ0I2πr,B = \frac{\mu_0 I}{2\pi r},

where II is the current, rr is the distance from the wire, and μ0=4π×10−7 T⋅m/A\mu_0 = 4\pi \times 10^{-7}\ \text{T}\cdot\text{m/A} is the magnetic constant. The direction of the field is found with the right-hand rule: point the thumb along the current, and the curled fingers show the direction of the field lines — concentric circles around the wire.

If the wire is wound into a coil of NN turns of length ll, the fields of the individual turns add up, and inside a long solenoid the field is nearly uniform:

B=μ0nI,n=Nl.B = \mu_0 n I, \qquad n = \frac{N}{l}.

An iron core inside the coil turns it into an electromagnet: the iron domains align with the external field and multiply it many times over, while the field remains controllable.

Because Ohm's law gives I=URI = \frac{U}{R}, the strength of an electromagnet can be adjusted smoothly by the source voltage, the coil resistance, or the number of turns — which is exactly why electromagnets are used in relays, lifting cranes, and loudspeakers.

Worked examples

Direct

Problem

A long straight wire carries a current I=2.0 AI = 2.0\ \text{A}. Find the magnetic field magnitude at a distance r=5.0 cmr = 5.0\ \text{cm} from the wire.

Solution

Apply Ampère's law for a straight wire:

B=μ0I2πr=4π×10−7⋅2.02π⋅0.050.B = \frac{\mu_0 I}{2\pi r} = \frac{4\pi \times 10^{-7}\cdot 2.0}{2\pi \cdot 0.050}.

Cancel 2π2\pi:

B=2×10−7⋅2.00.050=8.0×10−6 T=8.0 μT.B = \frac{2 \times 10^{-7}\cdot 2.0}{0.050} = 8.0 \times 10^{-6}\ \text{T} = 8.0\ \mu\text{T}.

Direction: the field lines are circles around the wire, with orientation given by the right-hand rule (thumb along the current, curled fingers along the field).

Application

Problem

The winding of an electromagnet — a coil of length l=20 cml = 20\ \text{cm} with N=400N = 400 turns — is connected to a source with U=12 VU = 12\ \text{V}. The winding resistance is R=6.0 ΩR = 6.0\ \Omega. Find the current in the winding and the field inside the coil without a core.

Solution

Step 1. Current from Ohm's law.

I=UR=126.0=2.0 A.I = \frac{U}{R} = \frac{12}{6.0} = 2.0\ \text{A}.

Step 2. Turns per unit length.

n=Nl=4000.20=2000 turns/m.n = \frac{N}{l} = \frac{400}{0.20} = 2000\ \text{turns/m}.

Step 3. Field inside the solenoid.

B=μ0nI=4π×10−7⋅2000⋅2.0≈5.0×10−3 T=5.0 mT.B = \mu_0 n I = 4\pi \times 10^{-7}\cdot 2000 \cdot 2.0 \approx 5.0 \times 10^{-3}\ \text{T} = 5.0\ \text{mT}.

Note: with an iron core the field would be hundreds of times larger at the same current.

Transfer

Problem

The winding of an electromagnet with resistance R=4.0 ΩR = 4.0\ \Omega is powered by a source with U=24 VU = 24\ \text{V} and has N=300N = 300 turns. The average magnetic path length in the iron core is lc=20 cml_c = 20\ \text{cm}, the relative permeability of the iron is μr=1000\mu_r = 1000, and the core has an air gap lg=2.0 mml_g = 2.0\ \text{mm}. In the gap a straight wire of length L=10 cmL = 10\ \text{cm} carries a current I2=5.0 AI_2 = 5.0\ \text{A} perpendicular to the field. Find the magnetic field in the gap and the force acting on this wire.

Solution

Step 1. Current in the winding (Ohm's law).

I1=UR=244.0=6.0 A.I_1 = \frac{U}{R} = \frac{24}{4.0} = 6.0\ \text{A}.

Step 2. Field in the gap of the electromagnet. A core with a gap is a magnetic circuit, so the empty-solenoid formula B=μ0nI1B = \mu_0 n I_1 does not apply here: the field depends on the permeability and length of the core and on the gap length. Apply Ampère's law for the vector H⃗\vec{H} around a path along the core:

Hclc+Hglg=NI1.H_c l_c + H_g l_g = N I_1.

The magnetic flux is continuous, so the flux density is the same in the core and in the gap: B=μ0μrHc=μ0HgB = \mu_0 \mu_r H_c = \mu_0 H_g. Substituting Hc=Bμ0μrH_c = \frac{B}{\mu_0 \mu_r} and Hg=Bμ0H_g = \frac{B}{\mu_0} gives

B(lcμr+lg)=μ0NI1,B=μ0NI1lg+lc/μr.B\left(\frac{l_c}{\mu_r} + l_g\right) = \mu_0 N I_1, \qquad B = \frac{\mu_0 N I_1}{l_g + l_c/\mu_r}.

B=4π×10−7⋅300⋅6.02.0×10−3+0.201000=2.26×10−32.2×10−3≈1.03 T.B = \frac{4\pi \times 10^{-7}\cdot 300 \cdot 6.0}{2.0 \times 10^{-3} + \frac{0.20}{1000}} = \frac{2.26 \times 10^{-3}}{2.2 \times 10^{-3}} \approx 1.03\ \text{T}.

For comparison: without the core the same coil (n=N/lc=1500n = N/l_c = 1500 turns per metre) would give only B=μ0nI1≈1.1×10−2 TB = \mu_0 n I_1 \approx 1.1 \times 10^{-2}\ \text{T} — nearly a hundred times smaller. The iron core greatly strengthens the field, while the air gap weakens it noticeably.

Step 3. Force on the current-carrying wire. The field is perpendicular to the wire, so θ=90∘\theta = 90^\circ and sin⁡θ=1\sin\theta = 1:

F=BI2Lsin⁡θ=1.03⋅5.0⋅0.10≈0.51 N.F = B I_2 L \sin\theta = 1.03 \cdot 5.0 \cdot 0.10 \approx 0.51\ \text{N}.

The direction of the force is given by the left-hand rule: the field enters the palm, the four fingers point along I2I_2, and the thumb points along FF.

Practice

Text

Model the electromagnet in a simulation (for example, PhET "Magnets and Electromagnets" or "Faraday's Electromagnetic Lab") so that you never work with large currents.

  1. Build a circuit: source, winding (coil), switch; place a compass or field sensor nearby.
  2. Vary the source voltage and record the current II and the compass deflection (or the sensor reading BB).
  3. Repeat for different numbers of turns NN.
  4. Compare the coil field with and without an iron core.

Make a table and plot BB against II: for a solenoid you should see direct proportionality B∝IB \propto I. Conclude how Ohm's law, the number of turns, and the strength of the electromagnet are related.

Safety: do not use the 220 V220\ \text{V} mains; if you work with real equipment, use only a battery of up to 9 V9\ \text{V} and connect the coil through a resistor to limit the current.

Visual reference

Purpose

Show that magnetic field lines are closed, surround a current-carrying wire, and concentrate inside a coil with a core, while their direction is set by the right-hand rule.

Representation

A two-part diagram.

(1) Cross-section of a straight wire perpendicular to the page: the current points toward the observer (⊙\odot), surrounded by concentric field-line circles with counter-clockwise arrows; II and rr are labelled.

(2) Longitudinal section of a solenoid with an iron core: NN turns, nearly parallel field lines along the axis inside, with poles NN and SS labelled.

Below is a mini-graph of BB versus II: a straight line through the origin, as predicted by B=μ0nIB = \mu_0 n I.

Real-world examples

Scrapyard crane electromagnet

Scenario

A scrap-yard crane lowers a steel disc onto a flattened car body and switches on the coil. The coil has N=800N = 800 turns, is fed at U=220 VU = 220\ \text{V} and has resistance R=2.2 ΩR = 2.2\ \Omega, so I=U/R=100 AI = U/R = 100\ \text{A} flows. The iron core concentrates the flux until it saturates near B≈1.8 TB \approx 1.8\ \text{T}; the disc must hold a load of m=1200 kgm = 1200\ \text{kg}, that is mg≈11.8 kNmg \approx 11.8\ \text{kN}.

Connection

The coil is an electromagnet: its field follows B=μ0μrNILB = \mu_0 \mu_r \dfrac{N I}{L}, so the strength is set by the current that Ohm's law fixes, and a ferromagnetic core multiplies BB by a factor of hundreds over air until saturation — which is why such a crane drops its load the instant the current is switched off.

Electric doorbell

Scenario

A doorbell is powered by a 6 V6\ \text{V} battery. Its coil has N=500N = 500 turns and resistance R=30 ΩR = 30\ \Omega, so I=U/R=0.2 AI = U/R = 0.2\ \text{A}. The coil sits on a soft-iron core and faces a spring-loaded armature across an air gap of about 1 mm1\ \text{mm}; the field pulls the armature, its hammer strikes the gong, the contact opens and closes again about 2020 times each second.

Connection

Only current creates the field here, B∝NIB \propto N I, and the soft-iron core keeps BB large enough across the millimetre gap for the pull to be felt. Switching the current off removes the field at once, so the spring wins and the armature returns — a magnetic field that exists only while charge flows.

Loudspeaker in a phone

Scenario

The loudspeaker of a phone is a coil of N=50N = 50 turns glued to a paper cone and sitting in the permanent field B0=0.4 TB_0 = 0.4\ \text{T} of a small magnet. Music sends an alternating current of up to 0.5 A0.5\ \text{A} through the coil, which has an impedance of 8 Ω8\ \Omega. The coil's own field in the gap reaches Bcoil≈0.6 mTB_{\text{coil}} \approx 0.6\ \text{mT} and reverses sign with every half-cycle of the audio signal.

Connection

The coil is a small electromagnet whose field lines follow the right-hand grip rule; they add to the permanent field on one side of the coil and subtract on the other, so the total field B0±BcoilB_0 \pm B_{\text{coil}} is non-uniform in the gap — the superposition of two magnetic fields is what the cone responds to.