This is a simple but reliable circuit for your sump-pump, aquarium, boat, or whatever, but water only. Please be careful when working with 115Volt line voltage! Take every precaution to avoid electrical shock. Unplug the power before making changes or touching resistor R1. Murphy's Law applies to all of us
http://www.uoguelph.ca/~antoon/circ/sensor1.htm