Electrolysis process has been the primary cause of your water level detector probes, and you can avoid this by sensing the current by this probe using alternating current. In alternating current, the electrolysis process will be reversed for every alternating cycles, making the probe will last longer to survive from corrosion. The electronic circuit for this alternating current sensing for water level detector is very simple. Look at the circuit’s schematic diagram below.

ac water level detector circuit schematic

The whole circuit consist of oscillator and detector. The oscillator is build around U1A. The capacitor C2 is inserted between the oscillator output and the probe to block DC signal, same as the C3 capacitor function. When the probe is submersed under water, an alternating current generated by the oscillator will flow through C2, probes, and C3. The alternating current from C3 is then rectified by D2 and filtered by C4 to get back the DC voltage. The diode D1 is provided to give the back flow¬† path for the alternating current. Without D1, the alternating current won’t flow since the D2 diode only permit the current to flow for one direction. The DC level detected on C4 then trigger the U1B gate to turn on the relay. You can control a water pump using the relay output to turn on the pump if the water level is below the probes, and turn off when the they’re submersed.