> *I have tried Window comparator circuit it work fine during water > filling from 1V to 5V, but it suddenly start the pump at 4.5V* A window comparator will do this because it doesn't have hysteresis. So, try this dual comparator driving a D type flip-flop with a reset circuit (pretty commonly available): - <!-- Begin schematic: In order to preserve an editable schematic, please don't edit this section directly. Click the "edit" link below the image in the preview instead. --> ![schematic](https://i.sstatic.net/qQZRE.png) <!-- End schematic --> If the sensor output becomes less than 1 volt then, COMP2's output will trigger the flip-flop (via CLK) and, because D is set to logic 1 level, the Q output will be set. The Q output then drives your pump (via appropriate circuitry) until the sensor output hits 5 volts. At this point COMP1 resets the flip-flop and turns the pump off. When the water level drops sufficiently, COMP2 will re-trigger the flip-flop to restart the pump. I might be tempted to add some water overflow protection circuit as a back-up against a single failure of the circuit.