Solenoids are electromagnets. They usually have an iron core which greatly increases the magnetic effect of the coil. The magnetic effect is often used to produce straight line motion. Solenoids are often spring loaded so when the current is turned off, the moving part returns to its "off" position.

This movement can be used to
To design a system using solenoids, you need to know the stroke distance and force.
Stroke Distance: The size of the movement when the solenoid is turned on.
Force: How strong the force is so the solenoid produces enough force to operate the valve for example.
Solenoids are inductive and they can produce a large back EMF if the current flowing is suddenly turned off. To prevent this effect, put a diode in parallel with the solenoid. This allows the current to die away slowly and the large back EMF is prevented. This also prevents damage to the driver circuit controlling the solenoid.
