I just love my Scarecrow motion activated sprinkler. It works like a charm and I've had it for at least 15 years. There is a little dial on the back so you can turn it off (if you remember) when you're out there. Leaf motion in the wind can set it off, so you need to watch where you aim it, or it might cost you a bit for water. I had mine nicely set, was walking away when a car went by on the street and set it off.
Other than learning the trick to aiming it, the only 'down' side is that I can't deploy it inside my fence or - Zuzu, you're so right - my cat comes in wet, with her little paws on her little haunches and won't speak to me for the rest of the day. So it's no good for the mango tree, but the lychee tree is in the front yard, and the Scarecrow does an awesome job of keeping the birds and squirrels off the fruit.
Now, if I can just remember next year to deploy it on time . . .