Use an op amp comparator circuit. The two bare wires, used as electrodes placed close together, essentially becomes a short circuit when the water rises over the wires - that unbalances the input to the comparator causing the output to switch and shut off the pump. The output of the comparator drives the pump. It's a simple circuit using an IC and a few resistors - cost about $7.
Last edited: