I am planning to make an automatic rain water collector by adding a water sensor and servo motor into the circuit. When the water sensor detect the rain, the lid of the water tank will be opened by the servo motor and when there is no rain, the lid will be closed. The circuit below is used to fill the tank when the rain collected is below x cm. The water pump will be connected to the faucet. Is there any way to make it happen?
Here is my diagram