user29832: I am making a project about an automated water level controller using ultrasonic, potentiometer and Arduino board. I need a mathematical calculation on how it works. So here's a simple scenario:
I have an open top cylindrical container with a radius of 7cm. The ultrasonic sensed that the half height of the container, which is 15cm, is filled with water. At the bottom part of it, a tube with a radius of 1cm is connected alongside with the water valve. How can I calculate the time needed for the water valve to stop dispensing water if I set the potentiometer to keep the level of water at 9cm only? Can you give me a mathematical formula??
I really need a help, please. Any answer will be highly appreciated. Thank you in advance.

user28033: The concept you have is more complicated than you can imagine. But to answer your question (which is not so arduino-based), the mathematical formula you looking for is Torricelli's Law.
My suggestion for you is design a system which use a feedback concept instead
 

29832: <p>I am making a project about an automated water level controller using ultrasonic, potentiometer and Arduino board. I need a mathematical calculation on how it works. So here's a simple scenario:</p>

<p>I have an open top cylindrical container with a radius of 7cm. The ultrasonic sensed that the half height of the container, which is 15cm, is filled with water. At the bottom part of it, a tube with a radius of 1cm is connected alongside with the water valve. How can I calculate the time needed for the water valve to stop dispensing water if I set the potentiometer to keep the level of water at 9cm only? Can you give me a mathematical formula??</p>

<p>I really need a help, please. Any answer will be highly appreciated. Thank you in advance.</p>
 28033: <p>The concept you have is more complicated than you can imagine. But to answer your question (which is not so arduino-based), the mathematical formula you looking for is <a href="https://en.wikipedia.org/wiki/Torricelli&#39;s_law" rel="nofollow noreferrer">Torricelli's Law</a>.</p>

<p>My suggestion for you is design a system which use a feedback concept instead
<a href="https://i.stack.imgur.com/Mhc03.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Mhc03.png" alt="enter image description here"></a>     </p>
