Earlier, I wrote some posts on a Capacitive Soil Humidity sensor, Two years down the line this still functions well.
However, a recent video of Andreas Spiess, presented a rather interesting capacitive soil sensor that works according to a somewhat different principle
My earlier sensor was an oscillator in which the soil sensor formed the capacitor determining the frequency of the oscillator. This frequency was subsequently measured with PulseIn
The sensor that Andreas touched upon does it different: There is a fixed frequency oscillator, built with a 555. The square wave generated is then fed to the sensor that -as we know- is in fact a capacitor. To a square wave signal that capacitor however has a certain reactance, or for arguments sake a resistance that forms a voltage divider with a pure ohm type resistor (the 10k one on pin 3). The wetter the soil, the higher the capacitance of the sensor, the smaller the reactance to the square wave, the lower the voltage on the signal line.
The voltage on the signal pin -that can be measured by an analog pin on the Arduino‐ is thus a representation of the humidity in the soil.
Sadly some of the sensors sold come with some problems.
- Some have an NE555 rather the TLC needs 2-15V)you will need to remove the voltage regulator.
- The 1 M resistor (R4 picture below) is not connected to ground. Easiest solution here is to add a 1M resistor over Aout and ground pins
It is simple to build but economically it is wiser to just buy one as they are dirt cheap