Ok, I'll admit, I'd just buy the sprinkler head. Let someone else do the work of engineering it so that it would work consistently on demand, because this has to work thousands of times, day after day. It must survive variable water pressure, be robust to working in a dirty environment, hard water, heat and cold. Any water system sometimes even has grains of sand, etc., that find their way into the lines. So you must cater to that possibility.
You need a filter. Materials that will be dimensionally stable under temperature variations, without corrosion. A robust design that will not leak, yet survive enough water pressure to spray the water where you need it.
If your goal is to do better than what you would find on the shelf, and this is truly for your own DIY use, then buy it off the shelf, and dissect that unit. Look carefully at it, and decide what makes it work or not work to your satisfaction. I'll admit that I don't think you can make it better for less money than the unit cost you off the shelf. The fact is, you have not said what it was that makes you think the off-the-shelf unit is unsatisfactory to YOU.
If your goal is to try to make something like this better for sale to others, then you are asking in the wrong place anyway. In that case, this question should then be shut down.