i build some system that can measure water tank level with ultrasonic and monitor water flow from 2 pump (in, out), 1 pump to fill in the tank, but must have to check weather is there water flow on pipe or not. then if no water flow in pipe then pump goes OFF after 5 minute then delay 5 minutes later pump should ON again still check the flow loop again, the second out pump only ON when tank level above 50%. if not pump 2 will OFF. all the 3 sensor and 2 relay display their activity on 2004 i2c LCD. water in liter/ minute, level tank in percent then relay in symbols.