How Electromagnets Work

DIY Electromagnets and Experiments to Try

Electromagnets are easy to make; just a few pieces of hardware and a power supply gets you on your way. First, you'll need the following items:­

  • one iron nail, at least 6 inches (15 centimeters) in length
  • a length of 22-gauge insulated copper wire
  • one D-cell battery

Once you have these items, remove the insulation from each end of the copper wire, just enough to provide a good connection with the battery. Wrap the wire around the nail; the tighter you can wrap it, the more powerful the magnetic field will be. Finally, connect the battery by attaching one end of the wire to the positive terminal and one to the negative terminal (it doesn’t matter which end of the wire gets paired with which terminal). Presto! A working electromagnet [source: Jefferson Lab].

Can't get enough of hands-on electromagnetic experiments? We have some more ideas for you to try:

  • What is the magnetic power of a single coil wrapped around a nail? Of 10 turns of wire? Of 100 turns? Experiment with different numbers of turns and see what happens. One way to measure and compare a magnet's "strength" is to see how many staples it can pick up.
  • What is the difference between an iron and an aluminum core for the magnet? For example, roll up some aluminum foil tightly and use it as the core for your magnet in place of the nail. What happens? What if you use a plastic core, like a pen?
  • What about solenoids? A solenoid, you remember, is another form of electromagnet. It's an electromagnetic tube generally used to move a piece of metal linearly. Find a drinking straw or an old pen (remove the ink tube). Also find a small nail (or a straightened paper clip) that will slide inside the tube easily. Wrap 100 turns of wire around the tube. Place the nail or paper clip at one end of the coil and then connect the coil to the battery. Notice how the nail moves? Solenoids are used in all sorts of places, especially locks. If your car has power locks, they may operate using a solenoid. Another common thing to do with a solenoid is to replace the nail with a thin, cylindrical permanent magnet. Then you can move the magnet in and out by changing the direction of the magnetic field in the solenoid. (Please be careful if you try placing a magnet in your solenoid, as the magnet can shoot out.)
  • How do I know there's really a magnetic field? You can look at a wire's magnetic field using iron filings. Buy some iron filings, or find your own iron filings by running a magnet through playground or beach sand. Put a light dusting of filings on a sheet of paper and place the paper over a magnet. Tap the paper lightly and the filings will align with the magnetic field, letting you see its shape!

For more on electromagnets and related topics, check out the electrifying links below.

Related Articles


  • “Electromagnets.” Encyclopædia Britannica Online. (Sep 23. 2011)
  • “Ferromagnets.” Boston University. (Sept. 21, 2011)
  • Grossman, Lisa. “Tube Full of Plasma Creates Solar Eruption in Lab.” Wired Magazine. Aug. 31, 2010. (Sept. 26, 2011)
  • Mansfield. A.N. “Electromagnets – Their Design and Construction.” Rough Draft Printing. July, 2007.
  • NOVA Teachers. “NOVA ScienceNOW: CERN.” (Sept. 23, 2011)
  • Underhill, Charles Reginald. “Solenoids, Electromagnets and Electromagnetic Windings.” Nabu Press. March 20, 2010

More to Explore