A solenoid is an electromagnetic device and operates in the same way as a relay; however, a
solenoid uses a movable iron core. Solenoids can do mechanical work, such as switching
elec-trical, vacuum, and liquid circuits. The iron core inside the coil of the solenoid is spring loaded.
When current flows through the coil, the magnetic field created around the coil attracts the