May 30, 2022

Soil Moisture Sensor interface with Arduino

 The soil Moisture sensor is widely used in measuring the water content in the soil. Soil moisture sensors do not measure water in the soil directly. Instead, they measure changes in other soil properties related to water content in a predictable way. Today we will see how it works and how we can use it in our way.

This sensor mainly utilizes capacitance to gauge the water content of the soil (dielectric permittivity). The working of this sensor can be done by inserting this sensor into the earth and the status of the water content in the soil can be reported in the form of a per cent.
The soil moisture sensor consists of two probes which are used to measure the volumetric content of water. The two probes allow the current to pass through the soil and then it gets the resistance value to measure the moisture value.
When there is more water, the soil will conduct more electricity which means that there will be less resistance. Therefore, the moisture level will be higher. Dry soil conducts electricity poorly, so when there will be less water, then the soil will conduct less electricity which means that there will be more resistance. Therefore, the moisture level will be lower.

Specifications
Operating Voltage: 3.3-5V
Current: <20mA
Output: Analog and Digital

The sensor comes with an LM393 comparator chip mounted on a module. This helps to generate a Digital Output as per the threshold setting value. The threshold value can be adjusted from the pot mounted on the module.

Pinout:
Vcc : +5V
Gnd: Ground
A0: Analog Out
D0: Digital Out