soil moisture sensor

Resistive/conductive soil moisture sensors work well if fed with an AC rather than DC voltage. The rapidly changing polarisation considerably reduces any corrosion. There used to be (now obsolete) a nice little chip from National Semiconductors called LM1830 that was designed to do just that and was used in continous industrial applications. If you use a datasheet archive service (with a good anti-virus as some are suspect) you could get an idea how they operated.
Commercial conductivity meters use as many as 4 electrodes and the electrodes are often carbon composition.
If you just a "is it wet or is it dry" indication, a BJT transistor or almost any CMOS logic gate will do - the input impedance of the CMOS inputs is so high that corrosion would be negligable.
Remember that any soil sample needs to be in a condition to actually allow conduction. If it consists of large separate lumps of damp soil, it probably won't work, then nor would capacitance

1 Like