This article was taken from the February 2013 issue of Wired magazine. Be the first to read Wired's articles in print before they're posted online, and get your hands on loads of additional content by <span class="s1">subscribing online.
A simple electromagnet is behind the ubiquitous solenoid, a device that can operate anything from an automatic car-door lock to a giant hydraulic robot arm. Wrap some wire around a tube, turn on the juice and watch a plunger go in and out, or anything else you like.
You'll need
Plastic drinking straw
Electrical tape
2m thin insulated wire (size 32 magnet wire works best)
1.5 Volt battery (AAA or AA)
Sandpaper or a wire stripper
Steel needle
(Optional) Steel flat-head nail that could fit inside the straw, and a strong (rare earth) disk-magnet
Create a coil Cut a 10cm length of straw. Wrap Sellotape around it a little way up from the bottom, sticky side out. Leaving a "tail" about 15cm long, wind 100 tight, neat coils of wire around the taped part of the straw, one layer at a time. Make sure you always coil the wire in the same direction. Leave another 15cm "tail" at the end.
Connect the battery Tape the battery across the coiled end of the straw to form a "T". Remove some insulation from the ends of the wire using sandpaper or wire strippers.
Connect one end of the wire to the battery with tape, leaving the other end loose. Make sure everything is neat and tidy because the next step is a bit more involved.
Add the plunger and test it Hold the straw upright a little above the table. Slip the needle (the plunger), point up, into the straw and let it rest on the table, or place the nail head on the magnet and insert into the straw that way. Briefly touch the loose wire to the exposed end of the battery. The needle or nail plunger should shoot up into the straw.
This article was originally published by WIRED UK