Two galvanized nails set in a plug of plaster-of-Paris. That’s it. The Cheap Vegetable Gardener, who created the sensor for an automated grow box project, explains:

Technically a gypsum block measures soil water tension. When the gypsum block is dry it is not possible for electricity to pass between the probes, essentially making the probe an insulator with infinite resistance. As water is added to the problem more electrons can pass between the probes effectively reducing the amount of resistance between the problem to the point when it is fully saturated where the probe has virtually zero resistance. By using this range of values you can determine the amount of water than exists in your soil.

[via Hack a Day]