I’ve been trying to make a simple water leakage detector to put under my kitchen sink. I came out with a pretty simple solution with a simple probe and a D1 mini.

Parts:

Schema:

image

(Notice that A0 is on the 7th pin and not the 8th like in the diagram)

 

20210409_134705

Sensitivity can be altered by changing this value:

return analog < 2.55;