How to Repair a broken Sprinkler Head Connection
If your sprinkler head has a broken or leaking connection there is a good chance you have a rigid PVC nipple connection. Swing pipe connections tend to be very resilient and don’t suffer damage as frequently. If you do have a rigid connection and wish to go back with the same you can use a cut off nipple. These let you cut to fit your elevation requirements.
The first thing to do is unscrew the sprinkler head. Grab the top of the head and wiggle it in different directions slightly. This may loosen the soil enough so you can do this without any digging. Warning: one problem you face is replacing the head without having a great deal of dirt fall into the open pipe. If you have very loose or sandy soil, go ahead and dig a small hole around the head, far enough back to keep soil from sliding in.
Remove the original nipple. If it is still in fairly decent shape (cracked but not broken through), and the head was at the right elevation, you can use this as your gauge for cutting the new one. If the nipple has snapped off even with the top of the PVC connector you will need an extractor to remove it. You might be able to do so with a large screwdriver (very large) or needle nose pliers but you risk ruining the threads on the PVC. That leads to real work.
Once you have the old nipple removed just cut the replacement nipple to length. Remember, it’s easier to cut one that’s too long down to size than try to stretch a too-short cut. Measure twice. Screw the nipple in using plumbers tape on both ends. Backfill and you are done.
If you had dirt fall into the open pipe, don’t worry. Remove the nozzle from this head and turn on the system. The water will blow out the debris. Replace nozzle, sit back, relax.