How a Solenoid Works: A Guide

Apr 30, 2026

The previous article explained that a solenoid, in its most basic form, is a helical coil of  copper wire that is longer than its diameter. Basically, it’s a coil of wire in the shape of a tube. Passing an electric current through the wire generates a magnetic field, turning the coil of wire into an electromagnet. 

Engineers use this basic solenoid as the basis for the more complex solenoids that are seen in products we use every day. Solenoids are used to actuate locks, valves, switches, and a host of other components.

Magnetism: The Basics

To better understand how a solenoid uses electromagnetism, it is important to first understand how magnets work. Most people are familiar with permanent magnets, such as bar magnets. Those magnets often have an “N” and an “S,” which stands for “north” and “south,” engraved on opposite ends. These mark the poles of the magnet. 

Poles of like polarity will repel each other, and opposite poles will attract. So, placing two magnets side by side with the north poles facing each other will cause the magnets to repel each other. But placing the north and south poles next to each other will cause the two magnets to snap together. 

Magnets generate a magnetic field, which can be represented by lines that travel out of the north pole and return at the south pole, in much the same way that current travels from positive to negative in an electric circuit. The more lines, the stronger the magnetic field.

Why are only some materials magnetic?

In all matter, electrons have a property called spin and are found in regions around the nucleus of the atom called orbitals, much like the way Earth spins on its axis as it orbits the sun. This spin and orbit creates a magnetic moment. However, in most materials, electrons will pair with other electrons spinning in the opposite direction, cancelling their magnetic moments. 

In ferromagnetic materials (like iron) some of these electrons remain unpaired, which gives each atom a small magnetic dipole, like a very tiny bar magnet. This is why materials like iron and steel are strongly attracted to magnets. 

A permanent magnet has lots of magnetic dipoles that line up in the same direction across larger regions called domains, causing their tiny magnetic fields to add together. The resulting magnetic field can actually be seen by sprinkling iron filings around the magnet. 

Electromagnetism

There is a fundamental relationship between electricity and magnetism. In both a permanent magnet and a solenoid, electrons are responsible for the magnetic field, but in different ways. In a permanent magnet, it’s the electron’s spin and orbit that create the magnetic field. In a solenoid, it is the movement of electrons along a conductor that creates the magnetic field. 

As electrons move through a conductor, they create an electric current. A current passing through a straight length of wire creates a very weak magnetic field that runs counterclockwise around the wire. Coiling the wire into a tube stacks the magnetic field, making it more focused and uniform. Increasing the number of coils and/or the amount of current will produce a stronger magnetic field. 

When current is applied to the solenoid, the magnetic field generated by a solenoid has north and south poles just like a permanent magnet. However, the solenoid is only magnetic while current is passing through it. As soon as the current is shut off, the magnetic field collapses.  

Making a Solenoid Do Work

Solenoids can be used to create a push or pull motion. To do this, they need something called an armature, which is a plug of ferromagnetic metal. They also need a spring.

The armature is placed partially inside the coil and held in position by the spring. The armature will move in and out of the coil as the solenoid is either energized or de-energized. 

By adding a pin or rod to one end of the armature, the solenoid can either push or pull when it’s energized. Whether the solenoid pushes or pulls depends on which end of the armature the pin is placed. Engineers can also determine how much force the solenoid can exert by changing the size of the coil, the armature, and how much current is applied.

Applying Current (Energized)

When current is applied, the solenoid is energized. This creates a magnetic field with north and south poles. The coil’s magnetic field also magnetizes the armature but with the north and south poles in the opposite orientation. This means the armature’s south pole will be facing the coil’s north pole. Because the armature has poles that are opposite that of the coil, the armature and coil are attracted to each other. The spring tension holding the armature in position is overcome, and the armature is drawn into to coil until it reaches the point where the magnetic field is the strongest (usually the center).

At Rest (De-Energized)

When the current is turned off, the magnetic fields in both the coil and armature collapse, and the spring returns the armature to its original position. 

In the Real World

Solenoids are found in countless everyday products: office water coolers, dishwashers, washing machines, doorbells, medical equipment, ATMs, gas station fuel pumps. The list is almost endless!

There are different types of solenoids for different applications. Each type will be explored with its own guide.