Let’s make soil moisture detector…

In this article, we will provide you with the source code of soil moisture detector which can be made using ARDUINO. You can find hardwaring part on many different websites like circuitstoday.com or many more.

Digital Mode – Interfacing Arduino and Soil Moisture Sensor

To connect the soil moisture sensor FC-28 in the digital mode, we will connect the digital output of the sensor to the digital pin of the Arduino. The Sensor module contains a potentiometer with it, which is used to set the threshold value. This threshold value is then compared with the sensor output value using the LM393 comparator which is placed on the sensor module.

The LM393 comparator will compare the sensor output value and the threshold value and then gives us the output through the digital pin. When the sensor value will be greater than the threshold value, then the digital pin will give us 5V and the LED on the sensor will light up and when the sensor value will be less than this threshold value, then the digital pin will give us 0V and the light will go down.

Circuit Diagram

The connections for connecting the soil moisture sensor FC-28 to the Arduino in digital mode are as follows.