How Solenoids Work

The basics of solenoids and how they work

8
Solenoid Basics Explained
Solenoid Basics Explained

In this article we’re going to be looking into how solenoids work, how to see a magnetic field, how to create an electromagnet from a wire, the right-hand grip rule, examples of real world solenoid and how to make a solenoid.
Scroll to the bottom for the YouTube tutorial video

If you’re working with solenoid valves, you’re going to want to download the Magnetic Tool app from Danfoss. The app makes it easy to test that your solenoid valve is working properly, and works with both AC and DC versions.

🎁 You can download the Magnetic Tool App for free for Android and iPhone

So we’ll start off by taking a look at a standard bar magnet. This is a permanent magnet, you’ve probably seen these types before, they have their ends marked “N” for north and “S” for south magnetic pole.

Bar magnet
Bar magnet

We can use the magnetic field to move other objects. The problem with this type of magnet is that the magnetic field can’t easily and practically be turned off, so in this case the nail will stay attached until we physically pull it off.

Magnet attract nail
Magnet attract nail

If we place two of these magnets together, we see that the likewise polar ends will repel each other, but the opposite polar ends will be attracted to each other.

Magnets oppose and attract north and south poles
Magnets oppose and attract north and south poles how solenoids work

If I then place a compass near the magnet, we see that as I move the compass along the perimeter of the magnet the compass is being affected by the magnetic filed. The compass face will rotate to align with the opposite polar end of the magnet and it follows the magnetic field lines. Remember opposites attract.

We can see these magnetic lines if we place the bar magnet down on a sheet of white card and then sprinkle some iron filings over the top. The iron filings are aligning with the magnetic field lines to create this pattern. These lines always form closed loops and run from north to south, although the field doesn’t run or move it’s a stationary line of force.

Magnetic field lines, how solenoids work
Magnetic field lines, how solenoids work

As I mentioned, the problem with permanent magnets it that they are always on and can’t easily or very practically be turned off or controlled. However, we can control an electromagnetic field, and we can generate that with some standard wire.

If I place a compass near the copper wire, we see that it has no effect on the compass. However, if I now connect a power source to each end of the wire, we see that as soon as I pass a current through the wire the current creates an electromagnetic field and this will change the direction of the compass.

Electromagnetic field on copper wire
Electromagnetic field on copper wire

The electromagnetic field is operating in a circular pattern around the wire.

If I place some compasses around the wire and pass a current through it, we see they all point to form a circle. If I reverse the direction of the current then the compasses point the opposite direction.

Compass alignment electromagnetic field
Compass alignment electromagnetic field

If we now take the wire and wrap it into a coil, we can intensify the electromagnetic field.

Now, if I connect a power supply to the coil and pass a current through it. We see that the compass will be affected and now points at the end of the coil just like it did with the permanent magnet. If I move the compass around the perimeter of the coil, the compass will rotate to align with the magnetic field lines. If I reverse the current we see that the magnetic poles will also reverse.

Coil magnetic field alignment
Coil magnetic field alignment

When current flows through a wire it creates a circular magnetic field around the wire, as we saw a moment ago. But when we wrap the wire into a coil, each wire still produces a magnetic field except the field lines will merge together to form a larger and stronger magnetic field.

We can tell which end the north and south pole will be for a solenoid coil by using the right hand grip rule. This says that if we grip our hand into a fist around the solenoid and point our thumb in the direction of conventional current flow, that’s from positive to negative (it actually flows from negative to positive but don’t worry about that for now), then the thumb points to the north end and the current will be flowing in the direction of your fingers.

Right hand grip rule solenoid coil
Right hand grip rule solenoid coil

If I connect this small solenoid to a power supply, we can see that the piston can be pulled in by the electromagnetic field as soon as current starts to flow through the coil. If I cut the power then the spring will force the piston back to it’s original position.

Solenoid working
Solenoid working

Make a basic solenoid

For the core body of the solenoid, we can just use part of a plastic Bic pen. I have melted the ends and flattened them to help contain the copper coil.

For the piston I’ll use an iron nail  and to ensure it fits into the centre of the pen I’ll just use a needle file to ensure a smooth fit.

Now we need to wrap the coil. I’m going to use some 26 gauge or 0.4mm enamelled wire I bought online. So we simply want to wrap the copper wire as tight as possible from one end to the other. We should end up with something that looks like this.

Coil of a solenoid valve
Coil of a solenoid valve

Then we need to wrap it a few more times in opposite directions to make it stronger. 3 or 4 length of wrap is probably fine. I didn’t count the number of turns for this one as I’m just making a quick example for you.

Once it’s fully wrapped, we can just cut the wire and free it from the drum. Then we want to just use some sand paper to remove the enamel from the end which will give us a better electrical connection.

If the iron nail is placed concentrically within the coil, but not fully within, we see that the nail piston is pulled inwards by the electromagnetic field as current passes through. If we placed a spring at the end it would return to the original position.

Home made solenoid coil
Home made solenoid coil

If we place the piston fully within the coil and then apply a current, the magnetic field will move the piston and we could use this to provide a pushing force. Again if there was a spring on the far end then it could be returned to it’s original position.

Home made solenoid coil reverse
Home made solenoid coil reverse

8 COMMENTS

  1. I’ll bet the coil you cut I half was an AC coil. Most solenoid valve could are AC. Your article discusses DC coils.

    The fun is wondering why an AC coil works to pull in anything when the magnet field is flipping or at least why it doesn’t chatter at 60Hz?

LEAVE A REPLY

Please enter your comment!
Please enter your name here