Mechanism for pouring exact amount of liquid?
My idea (might be complete fail) :
I put a hole at the bottom of the cylinder, and a door mechanism that opens and closes the hole. The door will be controlled by timing. So lets say i want to pour 50ml of water in a cup. Using some physics i can get the time needed for the water to freefall into the cup and i will open and close the door accordingly. The idea sounds a bit cheesy so I wanted some opinions. Picture is attached.
Some comments I would appreciate:
1. Is my door opening and closing mechanism a complete fail? A small motor will turn the pinion which will in turn move the rack horizontally opening and closing the door. Note that I want the door open/close mechanism to be as small as possible.
2.If the drink is not water, lets say orange juice or red bull, will the timing vary considerably?
3. Any ideas how to accomplish this in another way other than timing and opening closing a door? I want minimum complexity, and the amount poured doesn't have to be very exact, lets say within a 10% margin. (This is basically my question in the first 2 lines).
Note: At my disposal i have simple machining methods(lathe, milling, drilling, cutting), but nothing too fancy. I have sufficient knowledge of microcontrollers and electronics.
Thanks in advance!!