I think that a piston is abit over your head at the moment!
not to say that you couldn't but you should start with a simple pneumatic first
one must walk before they can run
There can be several problems that could occure in the process of building a piston and since it seams that your knoledge of pneumatics is limited I suggest you build the first drawing I saw of the chamber, ball valve, and barrel.
very simple but good practice.
ps. if you use a 1" threaded nipple on the chamber and the barrel you will be able to advance to a sprinkler valve with the same chamber and barrel