Lesson 1 of 3 in Step 5 · Electricity and magnetism

Electromagnets

By Mihai Dumitru · · 6 min read

On this page

Electricity and magnetism are two sides of the same thing. Every current flowing through a wire creates a magnetic field around it. This page explains how to make that field strong enough to be useful, which is how an electromagnet works: a magnet you can switch on and off. Electromagnets are inside relays, motors, loudspeakers and electric door locks, which later pages build on.

A current makes a magnetic field

Hold a compass next to a wire and connect the wire to a battery for a moment: the needle turns. The current has produced a magnetic field, an area around the wire where magnetic forces act. The field forms circles around the wire, and its direction depends on the direction of the current. Reverse the battery and the needle turns the other way.

Around a single straight wire the field is weak, because it spreads out in all directions. Two changes make it much stronger.

Coils and iron cores

First, wind the wire into a coil. The fields of all the turns now point the same way through the middle of the coil and add up. A coil with a current flowing through it behaves like a bar magnet, with a north pole at one end and a south pole at the other. More turns give a stronger field.

Second, put a piece of iron inside the coil, called the core. Iron is made of tiny magnetic regions that normally point in random directions. The coil's field lines them up, and together they add a field hundreds of times stronger than the coil's own. A plain iron nail is enough to show it.

An iron nail wrapped in a coil of insulated wire. The coil is connected through a switch and a resistor to a battery. Magnetic field lines loop from the north pole at the tip of the nail to the south pole at its head, and two paper clips hang from the tip.
A coil around an iron nail. With the switch closed, the nail becomes a magnet and picks up paper clips.

What sets the strength

  • The current. Twice the current gives roughly twice the field.
  • The number of turns. Twice as many turns, with the same current, also roughly doubles it.
  • The core. Soft iron gives a strong field that disappears almost completely when the current stops. Hardened steel keeps some magnetism afterwards, which is unwanted in an electromagnet.

Engineers combine the first two as the current multiplied by the number of turns. 100 turns carrying 0.5 A give the same field as 50 turns carrying 1 A.

Building one safely

A classic experiment uses a large iron nail, a metre or two of thin enamelled copper wire wound around it, and a battery. The catch is that the coil is just wire, and wire has very little resistance. Two metres of 0.3 mm copper wire have about half an ohm, so connected straight to an AA cell the coil is close to a short circuit. The current would be several amps, the wire and battery would get hot, and the battery would run down in minutes.

Limit the current, as with any other part. A resistor in series does that, and its size follows from Ohm's law: with a 4.5 V battery pack and a 10 Ω resistor the current is about 0.45 A. That resistor turns about 2 W into heat, so it has to be a 3 W or 5 W part, as the power page explains. The simpler alternative is to connect the battery only for a few seconds at a time.

Where electromagnets are used

Because they switch on and off, electromagnets are used wherever something has to move or hold on command. A relay uses one to flip a switch. A motor uses the forces between electromagnets and permanent magnets to turn. A loudspeaker has a coil that moves a paper cone in and out as the current changes, producing sound. Electric door locks, scrapyard cranes that lift cars, and the huge magnets of hospital MRI scanners all work on the same principle.

Check yourself

  1. How does winding a wire into a coil make its magnetic field stronger?

    Show the answer

    The fields of all the turns point the same way through the middle of the coil and add up, so the coil acts like a bar magnet.

  2. Why does an iron core make an electromagnet much stronger?

    Show the answer

    The coil's field lines up the tiny magnetic regions in the iron, and their fields add to the coil's own field, many times over.

  3. A coil of 200 turns carries 0.1 A. How much current would a coil of 50 turns need for roughly the same field?

    Show the answer

    The field depends on current times turns: 200 × 0.1 = 20. With 50 turns you need 20 ÷ 50 = 0.4 A.

  4. Why shouldn't you connect a coil of copper wire straight across a battery for long?

    Show the answer

    The wire has very little resistance, so it acts almost like a short circuit. A large current flows, heating the wire and the battery and draining it quickly.

Read next