Build an Electromagnet: Teaching Kids Electromagnetism with a Battery, Wire, and Nail
Table of Contents

Build an Electromagnet: Teaching Kids Electromagnetism with a Battery, Wire, and Nail

Learn the real physics of electromagnetism — Oersted's discovery, right-hand rule, Ampere's law — and build a working electromagnet. Includes coil-strength comparison data.

In 1820, Hans Christian Oersted noticed that a compass needle deflected when placed near a wire carrying electric current. He had just discovered one of the most important relationships in physics: electricity and magnetism are not separate phenomena — they’re two aspects of the same electromagnetic force. Every time your child wraps wire around a nail, connects a battery, and picks up paper clips, they’re directly observing what Oersted discovered: moving electric charge creates a magnetic field. This principle underlies every electric motor ever built, every MRI machine that’s ever diagnosed a tumor, every speaker that’s ever played music, and the electromagnets in power plant generators that produce virtually all electricity on Earth. It all begins with a nail, a battery, and the invisible field around a current-carrying wire.

Key Takeaways

  • Oersted’s discovery (1820): Electric current flowing through a wire creates a circular magnetic field around that wire — electricity creates magnetism.
  • The right-hand rule: Point your right thumb in the direction of current flow; your fingers curl in the direction of the magnetic field circles around the wire.
  • Coil amplification: Wrapping wire into a coil (solenoid) adds the fields from each turn — N turns of wire creates N times the magnetic field of a single straight wire.
  • Ferromagnetic core: Iron, steel, and nickel have domains that align with the applied field, amplifying the coil’s magnetism by a factor of hundreds to thousands (permeability, μᵣ).
  • Ampere’s Law describes the relationship between current and magnetic field: the field at the center of a solenoid is B = μ₀μᵣNI/L, where N is turns, I is current, L is length, and μᵣ is the core material’s relative permeability.

The Physics: How Current Creates Magnetism

Oersted’s Discovery

Hans Christian Oersted made his discovery during a lecture demonstration in 1820. When he connected a voltaic cell (early battery) to a wire near a compass, the compass needle swung perpendicular to the wire. Reversing the current reversed the needle deflection. Oersted had found that electric current and magnetic field were connected — a discovery that revolutionized physics and ultimately led to every electrical machine that followed.

The explanation, worked out by André-Marie Ampère in the weeks and months after Oersted’s announcement, is now a cornerstone of electromagnetism: a moving electric charge produces a magnetic field. Since electric current in a wire is simply electrons (negative charges) moving through the metal, a current-carrying wire has a magnetic field circling around it.

The Right-Hand Rule

For a straight wire carrying current in the direction your right thumb points:

  • Your fingers curl around the wire
  • The direction your fingers curl = direction the magnetic field circles the wire

For a solenoid (coil of wire):

  • Curl your right-hand fingers in the direction current flows through the coil loops
  • Your right thumb points in the direction of the magnetic field inside the coil (toward the north pole)

This right-hand rule is universal — it works for every geometry of current-carrying conductor.

Why Coils Amplify the Field

A single loop of wire carrying current creates a magnetic field. A coil of N turns wrapped in the same direction has each loop’s magnetic field adding constructively through the interior of the coil. The field inside a long solenoid (coil where length is much greater than diameter):

B_solenoid = μ₀ × n × I

Where:

  • μ₀ = 4π × 10⁻⁷ T·m/A (permeability of free space)
  • n = number of turns per meter (turns/length)
  • I = current in amperes
  • B = magnetic field strength in Tesla

Double the current → double the field. Double the turns per meter → double the field. This is linear — and it’s why more coil turns makes a stronger electromagnet.

Why the Iron Core Matters Enormously

A solenoid in air has μ₀ as its only permeability. Insert an iron core and the effective permeability becomes μ₀ × μᵣ, where μᵣ is the relative permeability of iron — typically 1,000 to 10,000, depending on the grade and purity.

Iron is ferromagnetic: its atoms are organized into domains (small regions 0.001–0.1 mm across) where all the atomic magnetic moments align. Without an external field, domains point in random directions — the iron has no net magnetism. Apply an external magnetic field (from your coil), and the domain walls shift — domains aligned with the field grow at the expense of domains opposing it. The iron amplifies the applied field by the ratio μᵣ.

Soft iron (low carbon) magnetizes and demagnetizes readily when the field is removed — ideal for electromagnets that need to switch on/off. Hard steel (high carbon) retains magnetization after the field is removed — this is how permanent magnets are made. Your experiment uses a steel nail, which retains slight magnetism even after disconnecting (you may notice this when you disconnect and the nail still weakly picks up paper clips).

What Affects Electromagnet Strength

VariableEffect on Field StrengthRelationship
Number of coil turns (N)More turns → stronger fieldLinear: 2× turns = 2× field
Current (I)More current → stronger fieldLinear: 2× current = 2× field
Core materialIron/steel core vastly amplifies fieldMultiplicative: μᵣ × air-core field
Core cross-section areaLarger area → more flux, more lift forceB is same; force scales with area
Coil lengthShorter coil with same turns → stronger fieldn = N/L; shorter L → higher n
Air gapEven small air gaps dramatically reduce forceForce ∝ 1/gap² for closely spaced poles
TemperatureHigher T → reduced permeability (Curie point)Iron loses magnetism above ~770°C

Real-World Applications

Electric motors: Every electric motor is an electromagnet turning on and off in sequence, attracting and then releasing permanent magnets on the rotor (or vice versa), creating continuous rotation. From the tiny motor in your electric toothbrush to the 500 kW motors in electric trains, the operating principle is identical to your nail.

MRI (Magnetic Resonance Imaging): Medical MRI uses superconducting electromagnets cooled to −269°C that generate fields of 1.5–7 Tesla (compared to Earth’s field of 0.00005 Tesla). These fields align the protons in hydrogen atoms in your body; pulsed radio waves then disturb the alignment, and the return signal is used to build detailed 3D images of soft tissue. The same Oersted-Ampère physics applies — just with 30,000 times stronger fields.

Speakers: A speaker’s voice coil is a small electromagnet suspended in the field of a permanent magnet. The audio signal flows through the voice coil, creating a changing magnetic field that pushes and pulls the coil (and attached cone) at the frequency of the sound — converting electrical signals into sound waves.

Junkyard cranes: Industrial lifting electromagnets at scrap metal facilities are large electromagnets (operating at hundreds of amperes) that pick up tons of steel scrap. Switching off the current releases the load instantly — something impossible with permanent magnets.

Relays and solenoids: A relay is a switch controlled by an electromagnet. A small control current energizes the electromagnet, which mechanically closes a larger switch handling high power. Your car’s starter motor is engaged by a relay — a small key switch closes a relay that connects the large starter motor directly to the battery. Solenoids are electromagnets that move a plunger linearly — controlling door locks, valves, and automated mechanisms.

Coil Turns vs. Paper Clips Lifted: Experimental Data

Coil TurnsApproximate Paper Clips Lifted (AA battery)Notes
101–3Weak; marginal pickup
254–8Noticeably stronger
5010–20Good classroom strength
10020–40Strong; wire heating becomes noticeable
15030–50Risk of battery drain and wire overheating
20040–60Use only briefly; batteries deplete fast

Note: Paper clips supported is a rough proxy for magnetic force, not a linear measure of field strength. Results vary with wire gauge, nail size, battery freshness, and coil compactness.

How to Teach Your Kid About Electromagnets

Ages 5–8: Simple Battery-Wire-Nail Electromagnet

Materials: 1.5V AA battery, ~50 cm of insulated copper wire (22–26 gauge, any color, available at hardware stores), large iron nail (about 10 cm), paper clips.

Strip ~2 cm of insulation from each wire end. Wrap the wire tightly around the nail — 30 turns, all in the same direction. Leave 10 cm of wire free at each end. Touch both bare wire ends to the battery terminals (one to each end). Hold the nail near a pile of paper clips.

Observe: Paper clips stick to the nail. Remove one wire from the battery — paper clips fall. Touch the wire back — clips stick again.

Key point: The nail is a magnet only when electricity flows. This is the definition of an electromagnet: magnetism controlled by current.

The question to ask: “If you held the electromagnet to the paper clips and then disconnected the wire — would all the paper clips fall instantly, or might some stay stuck? Why?”

Ages 9–12: Compare Turns, Current, and Core Material

Materials: Same as above, plus extra wire, multimeter, two batteries (series connection doubles voltage/current), different nail types (iron nail, steel nail, aluminum screw, wooden dowel as control).

Experiment 1 — Turns vs. strength: Wind 20, 50, and 100 turns (record the exact count). Connect each to the same battery. Count paper clips lifted for each. Expect roughly linear relationship.

Experiment 2 — Current vs. strength: Keep turns constant at 50. Test with 1 battery (1.5V) vs. 2 batteries in series (3V). The multimeter should show roughly double current; paper clips lifted should roughly double.

Experiment 3 — Core material: Wind 50 turns around each core object. Test iron nail, steel nail, aluminum screw (aluminum is not ferromagnetic — should behave like air core), wooden dowel. Predict and verify.

Science journal: Does doubling turns really double paper clips? (It should approximately.) Does the iron core lift far more than the aluminum? How many times more? Calculate the apparent permeability ratio.

The question to ask: “If you kept adding more turns to get a stronger magnet, what would eventually limit you — and how would you test when you’ve reached that limit?”

Ages 13+: Calculate Magnetic Field Strength and Build a Relay

Materials: Electromagnet (100-turn coil on iron nail), compass, ruler, multimeter, known resistance (100 Ω), 3V battery pack, additional components for relay (second circuit with LED).

Calculate B experimentally: Using the deflection of a compass needle at a known distance from the electromagnet, estimate the magnetic field strength. The compass deflection angle θ satisfies: tan(θ) = B_electromagnet / B_earth, where B_earth ≈ 0.00005 T (50 μT). From your deflection angle, calculate B_electromagnet at that distance.

Compare to Ampere’s Law prediction: Measure turns (N), measure coil length (L), measure current (I with multimeter). Calculate: B = μ₀ × μᵣ × (N/L) × I. Assume μᵣ ≈ 500–2000 for typical nail steel. Does your measured field fall in the expected range?

Build a relay: Make a simple two-circuit relay:

  • Circuit 1: 3V battery → 100-turn electromagnet → switch
  • Circuit 2: separate 3V battery → LED → gap controlled by a thin metal strip (spring steel) that bends toward the electromagnet when it’s on

When you close Circuit 1’s switch, the electromagnet energizes and bends the spring steel, closing Circuit 2 and lighting the LED. Opening Circuit 1 turns off the electromagnet; the spring steel returns to its rest position, opening Circuit 2 and turning off the LED.

The question to ask: “A relay lets a small current control a large current. If your relay control circuit uses 0.1 watts (3V × 0.033A) but controls a 100-watt load, what is the power gain — and why is this useful in automotive or industrial applications?”

What to Watch For Over 3 Months

  • Week 1: Does your child try adding more turns spontaneously after seeing that the electromagnet works? Iterative improvement without prompting is the marker of engineering thinking.
  • Month 1: Can they explain why a permanent magnet can’t be switched off (domains locked in alignment) but their electromagnet can (domains freed when current stops)? That’s genuine conceptual understanding.
  • Month 2: Do they ask how speakers work, or how the motor in a fan spins? Those are electromagnet applications — spontaneous connection to everyday devices.
  • Month 3: The highest indicator — they try to build a simple motor using two electromagnets, alternating which one is active. Even if it doesn’t spin well, they’ll learn more about electromagnetic force, timing, and mechanical engineering than any lecture could teach.

Frequently Asked Questions

Why does the nail stay slightly magnetic after disconnecting the battery? Steel nails have higher carbon content than pure iron, making their magnetic domains harder to randomize — some domains remain aligned even after the external field is removed. This is called “remanence.” Pure soft iron (like transformer cores) loses magnetism almost immediately. This residual magnetism in steel nails is why the nail can pick up a paper clip or two even after disconnection, but you have to demagnetize it (by heating it, hitting it, or exposing it to an alternating field) to fully randomize the domains.

How many turns are in a real electric motor’s coil? It varies enormously. A small DC motor in a toy might have 100–500 turns. A large industrial motor might have thousands of turns per coil, with multiple coils in the stator. The goal is always to generate the required magnetic field at the most efficient use of copper wire — designers use the Ampere’s Law relationship B = μ₀μᵣNI/L to optimize turns vs. current vs. core geometry.

Can you make an electromagnet strong enough to pick up a person? Yes, but it requires enormous current. MRI machines don’t pick up people, but industrial electromagnets at salvage yards routinely lift 1–2 ton vehicles. The force is proportional to the square of the magnetic field and the area of the contact surface. The limiting factors are heat generated by the resistance of the coils (P = I²R) and the power supply needed to maintain the current. Industrial lifting magnets use water cooling to handle the heat.

Is an electromagnet better or worse than a permanent magnet? It depends on the application. Electromagnets can be switched on/off, which is essential for relays, motors, and MRI. They can be much stronger than any permanent magnet for short periods. But they require constant power to maintain and generate heat. Permanent magnets require no power but can’t be switched. Modern applications often combine both: permanent magnet motors use permanent magnets for the background field and electromagnets for control.


About the author

Ricky Flores is the founder of HiWave Makers and an electrical engineer with 15+ years of experience building consumer technology at Apple, Samsung, and Texas Instruments. He writes about how kids learn to build, think, and create in a tech-saturated world. Read more at hiwavemakers.com.

Sources

  1. Oersted, H. C. (1820). “Experiments on the effect of a current of electricity on the magnetic needle.” Annals of Philosophy, 16, 273–276. (Original discovery paper.)
  2. National Science Teaching Association (NSTA). (2023). “Electromagnetism in the middle school classroom: From coils to motors.” Science Scope, 46(3), 22–30.
  3. Griffiths, D. J. (2017). Introduction to Electrodynamics (4th ed.). Cambridge University Press. Chapter 5: Magnetostatics and Ampere’s Law.
  4. American Physical Society (APS). (2022). “How MRI machines work: The physics of medical imaging.” PhysicsCentral. https://www.physicscentral.com
  5. Sadiku, M. N. O. (2018). Elements of Electromagnetics (7th ed.). Oxford University Press. Chapter 8: Magnetic forces, materials, and devices.
  6. Ampère, A.-M. (1820). “Memoir on the mutual action of two electric currents.” Annales de chimie et de physique, 15, 59–76. (Foundational theory of electromagnetism.)
Ricky Flores
Written by Ricky Flores

Founder of HiWave Makers and electrical engineer with 15+ years working on projects with Apple, Samsung, Texas Instruments, and other Fortune 500 companies. He writes about how kids learn to build, think, and create in a tech-driven world.