Solenoid valves use electromagnets to move a plunger attached to the valve to open or close it. Cutting the power to the electromagnet allows a spring or other force to return the plunger to its original position. Automatic irrigation systems often use solenoid valves to control water delivery.
The electromagnet is a coil of wire. Moving electricity establishes a magnetic field. In the valves used for automated sprinklers, water pressure from the line presses a diaphragm to keep the valve closed. When the electrical impulse moves the plunger, it opens a small hole that allows the water pressure to drain, and pressure from the opposite side moves the diaphragm up to open the main valve to the sprinklers. As long as the small port is open, water continues to flow to the system.
Removing power from the electromagnet closes the port, and the diaphragm fills with water again. Once the pressure behind the diaphragm reaches the critical point, the water pressure forces the valve to close again and the sprinklers stop spraying water.
In the normally closed solenoid valve, the valve remains closed unless the magnet receives power. For some applications, a normally open valve is a better fit. In these solenoid valves, applying power closes the valve.