Magnetic Forces and Torques
Every motor, loudspeaker, relay, Hall sensor and old cathode-ray tube exploits one law: a magnetic field pushes sideways on moving charge. Engineers meet it at three scales. A single charge curves in a field (electron beams, mass spectrometers, the Hall effect); a wire carrying current feels a force per metre (motors, busbars pulling together during a short circuit); a current loop feels a torque (motors, meters, compass needles). This lesson writes all three from the Lorentz force and computes them in code. The school treatment is in Force on a Current, Force on a Moving Charge and The Electric Motor.
The Lorentz force
The magnetic part is perpendicular to the velocity, so it changes the direction of motion but never the speed: a static magnetic field does no work on a free charge. In a uniform a charge moving perpendicular to it travels in a circle:
The cyclotron frequency does not depend on the speed: per millitesla for electrons. A velocity component along is unaffected, so the general path is a helix.
The Hall effect. Current flows along a strip of thickness in a field perpendicular to it. The carriers are pushed to one side until the transverse electric field they build balances the magnetic force: . With this gives the Hall voltage
Its sign tells the sign of the carriers, which is how holes in p-type silicon were confirmed. Because , metals give microvolts and lightly doped semiconductors give tens to hundreds of millivolts, which is why Hall sensors are semiconductor devices (Position, Light and Hall Sensors).
Force on a current
Summing over the carriers in a wire element gives
Two parallel wires a distance apart: wire 1 makes at wire 2, so
attractive for currents in the same direction, repulsive for opposite currents. Until 2019 this defined the ampere ( for at ). It matters in power hardware: the forces grow with , so a short-circuit current of tens of kiloamperes can bend busbars, which switchgear is designed and tested to withstand (calculation only in this course).
Torque on a loop
In a uniform field the forces on opposite sides of a closed loop cancel (), but they act along different lines and form a couple. For a flat coil of turns and area :
where follows the current by the right-hand rule. The torque turns towards , like a compass needle, and the stored energy is . In a DC motor the commutator reverses the coil current every half turn, just as passes , so the torque keeps its sign; real motors use many coils so the torque ripple is small (more in Electrical Machines & Transformers). In a non-uniform field a loop also feels a net force, : that is how a magnet picks up a paper clip.
Interactive: force on a wire between poles
The lab draws a wire of length in a uniform field between magnet poles. Set , , , : , and at . Press Play to sweep : the force vanishes when the wire lies along the field, and reverses direction if you reverse the current or swap the poles.
Worked example: a small motor coil
Given: a rectangular coil of turns, , carrying in a radial-gap field modelled as uniform .
Find: the magnetic moment, the largest torque, and the torque when is from .
Solve:
Check: each side carries effectively, so feels ; with a lever arm of half the side on each, . A small hobby motor indeed delivers tens of .
In Python: a charge in a field, torque and forces
The electron is pushed with the Boris method, the standard particle-in-cell step: it rotates the velocity exactly, so the speed is conserved as physics requires. The rest are direct formulas.
import numpy as np
MU0 = 4e-7 * np.pi
q, m = -1.602e-19, 9.109e-31 # electron
B = np.array([0.0, 0.0, 1e-3]) # 1 mT along z
v = np.array([1e6, 0.0, 0.0]) # 1000 km/s along x
x = np.zeros(3)
T = 2 * np.pi * m / (abs(q) * B[2])
dt = T / 200
xs = []
for _ in range(200): # one period with the Boris rotation (exact |v|)
t = q * B / m * dt / 2
s = 2 * t / (1 + t @ t)
vp = v + np.cross(v, t)
v = v + np.cross(vp, s)
x = x + v * dt
xs.append(x.copy())
xs = np.array(xs)
r_num = (xs[:, 1].max() - xs[:, 1].min()) / 2
print(f"radius: numerical {r_num*1e3:.3f} mm, m v/(|q| B) = {m*1e6/(abs(q)*1e-3)*1e3:.3f} mm")
print(f"cyclotron frequency {abs(q)*B[2]/(2*np.pi*m)/1e6:.2f} MHz, speed kept: {np.linalg.norm(v):.4e} m/s")
print(f"turns {'counter-clockwise' if xs[10,1] > 0 else 'clockwise'} seen from +z")
N, I, a, b, B0 = 100, 0.5, 0.04, 0.05, 0.3
mom = N * I * a * b
for deg in (0, 30, 60, 90):
print(f"angle between m and B = {deg:2d} deg: torque = {mom*B0*np.sin(np.radians(deg))*1e3:5.2f} mN m")
for I1, d in ((100, 0.01), (10, 0.002)):
print(f"parallel wires {I1} A, {d*1e3:.0f} mm apart: {MU0*I1*I1/(2*np.pi*d):.3f} N/m")
e = 1.602e-19
print(f"Hall voltage, copper strip 0.1 mm, 1 A, 0.5 T: {1.0*0.5/(8.5e28*e*1e-4):.3e} V")
print(f"Hall voltage, semiconductor film (n = 1e22 /m^3, 10 um), 10 mA, 0.5 T: {0.01*0.5/(1e22*e*1e-5):.3e} V")radius: numerical 5.686 mm, m v/(|q| B) = 5.686 mm
cyclotron frequency 27.99 MHz, speed kept: 1.0000e+06 m/s
turns counter-clockwise seen from +z
angle between m and B = 0 deg: torque = 0.00 mN m
angle between m and B = 30 deg: torque = 15.00 mN m
angle between m and B = 60 deg: torque = 25.98 mN m
angle between m and B = 90 deg: torque = 30.00 mN m
parallel wires 100 A, 10 mm apart: 0.200 N/m
parallel wires 10 A, 2 mm apart: 0.010 N/m
Hall voltage, copper strip 0.1 mm, 1 A, 0.5 T: 3.672e-07 V
Hall voltage, semiconductor film (n = 1e22 /m^3, 10 um), 10 mA, 0.5 T: 3.121e-01 V
The electron (negative charge) circles counter-clockwise seen from the tip of ; a positive charge would go clockwise. The Hall voltage in copper is even at and , while the semiconductor film gives at a hundredth of the current: a factor of a million, from the carrier density.
Guided lab: weigh the force on a wire
Hand calculation. A wire segment of in the gap of a magnet assembly with , at : , equivalent to on a scale.
Simulation. Set the lab above to , , , and read .
What you would measure. Put a U-shaped magnet assembly (two flat ferrite or neodymium magnets on a steel yoke) on a kitchen scale with resolution and tare it. Hold a stiff copper wire through the gap from a clamp that does not touch the scale, and feed to from a bench supply in constant-current mode (limit ). By Newton's third law the magnet's apparent weight changes by . Plot the reading against : a straight line through zero whose slope is ; reversing the current reverses the change. From the slope get (compare with a Hall probe in the gap). Expect scatter: the field is not uniform across the gap, and the effective is uncertain by the fringe region (about one gap width at each side).
Hazards and safe setup. Low voltage, current-limited; the thin wire warms at . Neodymium magnets snap together with enough force to pinch skin and shatter; slide them apart, keep them away from phones, cards and pacemakers, and handle them one at a time.
Pitfalls
- Magnetic force does no work on free charges. Motors convert electrical energy via the induced back-EMF, not because does work (Motional EMF and Generators).
- Sign of the charge. Electrons curve the other way, and the Hall voltage of n-type and p-type material has opposite signs.
- needs a uniform field. Otherwise integrate along the wire.
- Torque on a loop is zero when (the stable position), not when the coil's plane is parallel to the field (that is the maximum).
Practice
- A proton () moves at perpendicular to . Find the radius and the cyclotron frequency.
- Two long parallel conductors apart carry in opposite directions. Find the force per metre and its direction.
- A circular coil of 20 turns, radius , carries in the Earth's horizontal field . What is the largest torque?
Answer
- ; .
- , repulsive.
- , .
Test yourself
A static magnetic field acting on a free moving charge…
- speeds it up
- changes only its direction
- slows it down
- stops it
Two parallel wires carry currents in the same direction. They…
- attract
- repel
- feel no force
- twist
A coil with moment sits in a uniform . The torque is largest when…
- is parallel to
- is perpendicular to
- is antiparallel to
- the coil's plane is perpendicular to
Why are Hall sensors made from semiconductors rather than copper?
- copper is not magnetic
- , and semiconductors have far fewer carriers
- semiconductors conduct better
- copper has holes
In the lab, , , , . The force is…