Short answer
A solenoid is an electromagnet made from a coil of wire, with a movable iron or steel core inside. The core is called a plunger or armature. When current flows through the coil, the magnetic field pulls the plunger into the coil, or in some designs pushes it out. When the power is removed, a spring or the load usually returns the plunger to its resting position.
How a solenoid works
The coil is a helix of wire. Current through it creates a magnetic field that runs along the coil’s axis. The plunger is a piece of magnetic material that sits partly inside the coil, and the field tends to pull it toward the centre of the coil. That movement is linear, in a straight line, so it can push a valve pin, lift a latch, or strike a chime.
Because the movement is driven by a magnetic field, the force is strongest over short distances. Solenoids are usually built for short strokes.
Solenoid, coil, or electromagnet?
The word is used in a few ways:
- In physics, a solenoid is a long helical coil, one that is much longer than its diameter. Inside it, the field is fairly uniform.
- In engineering, a solenoid is an actuator: a coil plus a movable plunger that turns electrical energy into linear motion.
- In valves and switches, a solenoid valve uses a solenoid to open or close a pneumatic or hydraulic valve, and a solenoid switch uses one to close heavy contacts, like a relay.
- An electromagnet with a fixed core is usually not called a solenoid.
Where you will find them
- Valves: solenoid valves control the flow of water, air, and hydraulic fluid. They appear in washing machines, irrigation systems, and pneumatic equipment.
- Vehicles: a car’s starter solenoid receives a small current from the ignition switch and closes heavy contacts that send a large current to the starter motor.
- Locks and doorbells: some electric door locks and doorbells use a solenoid to move a latch or strike a chime.
- Machines and printers: dot matrix printers and fuel injectors have used solenoids.
Common types
- Pull-type: the plunger is drawn into the coil when the coil is energized.
- Push-type: the plunger is pushed out of the coil when the coil is energized.
- Valve solenoids: these are normally open or normally closed. A normally closed valve blocks flow when the coil is not energized and opens it when the coil is energized. A normally open valve works the other way round.
Ratings to check
- Voltage: coils are rated for a specific voltage, such as 12 V DC or 24 V DC. Use a supply that matches the coil rating.
- Current and power: the coil draws current from its supply. Check the rated power and make sure your supply can provide it.
- Duty cycle: a coil held on for a long time can overheat. Check whether the solenoid is rated for continuous or intermittent duty.
Driving a solenoid in a project
Yes, a solenoid can be switched on and off. You control the current through its coil, using a switch, a relay, or a transistor, depending on how much current the coil draws.
A solenoid coil is inductive, so the same precautions apply as for a relay coil:
- Switch the coil with a transistor or MOSFET rated for its current, or with a relay.
- Place a flyback diode across the coil, with its cathode toward the positive supply. It absorbs the voltage spike when the current stops. Types of diodes covers suitable parts.
- Do not connect the coil directly to a microcontroller pin. The pin usually cannot supply the coil’s current.
- Keep the coil energized only as long as the job needs it.
For switching choices, see power transistor vs MOSFET. For the contact-based version of the same idea, see how a relay works. Solenoid symbols on drawings are covered in electrical diagrams and schematic symbols.