Sprinkler systems are often large and complex, with several moving parts, such as sprinkler heads, valves, plus electrical wiring. The difficulty of the repairs will also affect the price, such as the depth of lines, tree roots, underground obstructions, and multiple PVC pipe connections. A sprinkler head replacement costs about $45, while replacing a backflow preventer can range from $1,500 to $2,000 to bring it up to code with permit and backflow testing.