The basic idea behind an electromagnet is extremely simple: By running electric current through a wire, you can create a magnetic field.
By using this simple principle, you can create all sorts of things, including motors, solenoids, read/write heads for hard disks and tape drives, speakers, and so on. In this article, you will learn exactly how electromagnets work. You will also have the chance to try several experiments with an electromagnet that you create yourself!
An electromagnet starts with a battery (or some other source of power) and a wire. What a battery produces is electrons.
If you look at a battery, say at a normal D-cell from a flashlight, you can see that there are two ends, one marked plus (+) and the other marked minus (-). Electrons collect at the negative end of the battery, and, if you let them, they will gladly flow to the positive end. The way you "let them" flow is with a wire. If you attach a wire directly between the positive and negative terminals of a D-cell, three things will happen:
1. Electrons will flow from the negative side of the battery to the positive side as fast as they can. 2. The battery will drain fairly quickly (in a matter of several minutes). For that reason, it is generally not a good idea to connect the two terminals of a battery to one another directly. Normally, you connect some kind of load in the middle of the wire so the electrons can do useful work. The load might be a motor, a light bulb, a radio or whatever. 3. A small magnetic field is generated in the wire. It is this small magnetic field that is the basis of an electromagnet.
It is fairly easy to build an electromagnet. All you need to do is wrap some insulated copper wire around an iron core. If you attach a battery to the wire, an electric current will begin to flow and the iron core will become magnetized. When the battery is disconnected, the iron core will lose its magnetism.