I am using a US Solid Motorized Ball Valve to control the water flow through a stream in my front yard. It works quite well when it works, though I've discovered that it seems to burn out and need to be replaced periodically. The code in the Arduino I'm using to control it could probably be improved so that it doesn't cycle the valve as much, but in the mean time, having to replace it is a bit of a pain. It has female threads on both ends, so unscrewing it means also having to dig up and unscrew a good portion of the piping around it. This is how it's installed now:
It's screwed in to pipes on both sides. Besides the fact that the pipes seem to be solidly rusted into the valve, its tight positioning means to replace it I have to dig up all of my piping and then replace and re-seal the sheeting and rocks on top afterwards. I'd like to make my design maintainable so that if and when the valve needs to be replaced, the procedure to do it is as non-invasive as possible. What are good ways to connect it in so it's less of a pain to replace?