This is the rain sensor for my DIY robot lawn mower. The output of the operation amplifier is connected to the ADx pin of the Arduino DUE. The voltage does not go over 3.3V. Close the switch to simulate rain. The resistance of the raindetector with rain can be simulated by changeing the resistorvalue of the resistor which is connected to the switch. The connector consists of two screws of
stainless steel which are 2mm away form each other. If rain is in between this screws, then the resistance is between 400k and 2M ohms. As OPA the LM358N is used.