The basic principle is much like one that we use. However, Hubby tried building a home-made one years ago, and if the container you use isn't rigid
enough that it maintains its shape under pressure, the container will collapse and you'll likely have a mess, (in our case in the
chicken coop, so I can't recommend highly enough that you test your prototype in a spot that will enjoy a drink!)
With our commercial version, essentially, as the
chickens +/- gravity, empty the
water, pressure builds up in the container until it sucks air in through the out valve making a "glug, glug" noise that tells me everything's working properly. However, that means that the system is also capable of sucking in some of the dirty water. So even if you use this to try to save some time, if you can't fairly easily disassemble it for cleaning, you may find it gets amazingly scuzzy pretty fast. We add a little hydrogen peroxide to the ones we use for our meat birds as that helps.
That said, I don't think Hubby put a shut-off right where the hose entered the container (he'd used a new plastic gas can). That might help a lot. I'd still be looking for a container that was quite thick plastic and more of a round shape than rectangular if we were to try another diy version.