Monitoring plant health is very important for their fast growth. In this busy world, people usually forget to water their plants which leads to bad growth and health of their plants. For ensuring complete development of plants it is necessary to know the amount of moisture present in the soil.Soil moisture sensor will sense the amount of moisture present in the soil.

Soil Moisture sensor

Soil moisture sensors (Wikipedia) measure the volumetric water content in the soil. The two probes of moisture sensor are connected to LM293 comparator. This sensor uses the two probes to pass current through the soil, and then it reads that resistance to get the moisture level.Soil Moisture sensor with comparator

How does soil moisture sensor work?

The Soil Moisture Sensor uses capacitance to measure the water content of soil (by measuring the dielectric permittivity of the soil, which is a function of the water content).M393 IC do the voltage comparing here, a reference voltage (UR) is set by the adjustable potentiometer, when the analog output value over this value, the LM393 comparator  will output a digital value to indicate this sensor is triggered by reaching this setup threshold.For more visit soil-moisture-sensor-interfacing-evive

Setting up the circuit for soil moisture sensor

The circuit of soil moisture sensor is explained below:

  • + pin of the comparator is connected to the 5V pin of the evive board.
  • – pin of the comparator is connected to GND pin of the evive board.
  • Out of AO(Analog output) and DO(digital output) AO pin is connected to the analog pin(here in our code we have used A0 pin) of the evive board.

Arduino Code

This arduino code displays the soil moisture on the evive screen.


Firstly, the sensor is immersed in dry soil and  the soil moisture sensor is displayed on the screen.Later water is poured in the soil and the soil moisture sensor is immersed in the soil and the moisture is obtained on the evive display screen. The amount of moisture is displayed on the evive screen.soil moisture sensor

This Helped
This didn't help
Close Menu


STEMpedia Starter Package is now on Indiegogo!
Get 41% OFF with Super Early Bird discounts!