Safety Pin Motor

posted on 25 Jan 2013 by guy
last changed 17 Mar 2014

Average: 3.7 (9 votes)
Your vote (click to rate)

ages: 9 to 99 yrs
budget: $1.00 to $5.00
prep time: 5 to 30 min
class time: 10 to 60 min

This lesson describes a simple motor that can be constructed in 15 minutes with inexpensive materials. It involves all the basic principles of motors involving magnetic force, electromagnets, and commutators (rotating switches common in many commercial motors). This device is easy enough and cheap enough to make many copies for the classroom. This lesson works best after students have been introduced to electromagnets, and have seen a diagram of the magnetic field produced by a coil of wire.

learning goals:

  • reognize how an electromagnet coil produces a magnetic field like a bar magnet
  • understand forces between magnets
  • learn how a commutator (the rotary switch in a motor) works
required equipment: D battery, safety pin (2), magnet wire (20 to 26 gauge), Neodymium disk magnet
optional equipment: button cell battery
subjects: Engineering, Physics
keywords: battery, motor, commutator, Neodymium, magnet, electromagnetism, magnetism, electricity

A simple toy motor by crndy52 at YouTube.


In 2008, I came across the motor design shown in the video shown above. The general idea appeared in the 1990's in an episode of "Beakman's World", a kids educational television show. It is a stripped-down version of similar motors I made as a kid, but its clever use of safety pins as the connectors and the battery itself as the support structure make it a particularly simple and wonderful adaptation.  Modern high-strength magnets allow the motor to be very compact.

This lesson describes the construction and operation of the motor pictured above. For basic principles of operation describing how this and other motors work, please see our lesson on A Survey of Simple Electric Motors. For even simpler motor designs that don't use a wire coil, see  our lessons on Minimalist Motors and An Electric Screw Motor.

To build this one you will need:

  • one D cell battery (a C or AA cell will also work, but won't last as long)
  • two size 3 safety pins (5 cm long)
  • a thick rubber band
  • a neodymium disk magnet (a strong ceramic magnet will also work)
  • magnet wire (26 to 20 gauge)
  • a permanent marker


Fig. 1:  Detail showing the wire coil as the second knot is being tied.

Fig. 2:  Photo showing the motor with the disk magnet on the side. The coil is in its resting position. The top side of the horizontal legs of the wire, as well as both the turned-down ends, have been coated in black permanent marker that acts as insulation. Only the underside of the horizontal legs expose bare wire.

To make the coil, take about 2.5 meters (8 feet) of magnet wire and wrap it around the D cell battery for 20 turns to make a tight coil of diameter 3 cm. Then use the free ends of the wire to tie knots around the coil on opposite sides in order to hold the coil together, as in figure 1. Leave about 3 cm of wire for each of the straight ends of the wire. This coil will be your electromagnet.

Magnet wire is usually made from solid core copper wire with a thin enamel coat on it for insulation. Other insulated wire could work here, but the thin coating on magnet wire allows you to wind the coil more tightly and use more turns, thereby making the magnet stronger. Use 26 to 20 gauge wire for best results. It needs to be thick enough to support the weight of the coil on the ends of the wire. Scrape or sand the enamel off of the straight ends of the wire. Your electrical connections will be made at these ends.

Rubber band the safety pins onto the ends of the battery. Thread the two ends of the wire coil into the ends of the safety pins, and bend the very tips of the wire down to hold the coil in place, as in figure 2. In this figure, I'm using 8 cm long skirt pins to accommodate the thicker magnet. There is now a current running through the coil that produces a magnetic field. See the lesson on Basic Electromagnets to see how this field mimics the field of a bar magnet.

Stick the magnet underneath the coil, on top of the battery. The dimensions of the magnet are not critical, but the magnet needs to be thin enough so that the coil does not scrape as it rotates. A magnet thickness of less than 5 mm (3/16 inch) should be fine if you're using standard 3 cm safety pins. (Of course, you could always wind your coil tighter if this is a problem.)


As soon as the magnet and the wire coil are in place, the coil should rotate until the south pole of the coil is facing down towards the north pole of the disk magnet (assuming the north pole of the disk magnet is facing up). It may oscillate for a little while before coming to rest. In the end, the coil should be oriented in the horizontal plane.

Now remove the magnet from the motor and watch as the coil rotates back to its resting position. Usually, this will leave the coil aligned vertically. Hand-wound coils are almost never perfectly symmetric; one side is usually a little heavier than the other. While the magnet is still in this vertical orientation, use the permanent marker to coat the top side of the straight ends of the wire. Make sure you cover half the perimeter of the wire (or maybe a little more) all along the straight portion of the wire. This marker coating will act as insulation over half the wire. When the coil is upside down from its resting position, the marker insulation should be between the wire and the safety pin supports, and the electrical connection should be broken. Let the marker coat dry thoroughly before using the motor.

Put the coil and the disk magnet back in place and watch it go. As the coil first rotates up to the horizontal position, it should overshoot a little bit. When it does, it should rotate far enough so that the marker insulation comes between the wire and the safety pins, thereby breaking the connection and turning off the coil. Now the coil will continue to coast all the way around to the other side until the bare wire once again touches the safety pins, and the coil turns on. At this point, the coil will get another push from the disk magnet and will start the rotation all over again. If the motor is well balanced, and the insulation is aligned correctly, the motor will continue to rotate until the battery runs down (maybe several hours for a new D cell).

version with no permanent magnets

Don't have access to a good neodymium magnet? Arvind Gupta and team at have devised a version that replaces the disk magnet with an electromagnet wound around a sewing machine bobbin. Check it out at

mini version with button cell battery

The most elegant variation I've seen on this design is the mini version put together by alexs095 using a button cell battery and two small disk magnets. Check it out at and let it inspire your own ideas.


If the motor doesn't turn at all, you should check all your electrical connections. Clean the surfaces with alcohol to remove any oil or grime. Make sure you don't accidently remove the marker insulation with the alcohol.

If the motor starts to turn but gets stuck, just give it a little push. Often, a little extra inertia is all that's needed to get going.

If you really can't get the coil to complete a rotation, it means your marker insulation is not quite in the right place. Try exposing a little more or a little less bare wire. Alcohol will remove the marker if you want to start over. Alternatively, try moving the magnet underneath the coil. The magnet does not need to be directly under the coil for the motor to run, and putting it in a slightly different location may help.

teaching notes

This lesson works best after students have been introduced to electromagnets, and have seen a diagram of the magnetic field produced by a coil of wire. Check out the lesson on Basic Electromagnets for some ideas.

Students should be encouraged to try to predict the behavior of the coil before turning on the motor for the first time (even before the marker insulation has been applied). If they know that the coil produces a magnetic field like a bar magnet, they should be able to predict that it will rotate until opposite poles of the disk magnet and the coil are facing each other. If necessary, remind them that opposite magnetic poles attract.

Before putting on the marker insulation, ask the students to imagine how they might keep the motor turning. If prompting is necessary, grab hold of the end of one safety pin through the rubber band and pull it away from the battery just a little bit. Now touch the pin to the battery and pull it off again very quickly. With practice, you can give the motor a good enough push to turn all the way around. This may lead your students to think about what would happen if they could turn on and off the coil.

It takes a while for the marker to dry on the wire. If you want to move the class along, you can have another coil ready for which the marker insulation is already in place, or for which the enamel insulation has only been removed from the bottom side.

If your budget allows, you may wish to provide supplies for students to take home and amaze their parents. Make them practice their explanations to each other before they leave class.


login or register to post comments