Soil Moisture Sensor Working and Applications

Soil Moisture Sensor Working and Applications


Do you want to explore the importance of soil moisture sensors in agriculture and gardening? If yes! In this blog post, We covered everything about soil moisture sensors from the basics of what a soil moisture sensor is, its working principle, and pin configuration. Additionally, we delve into how to interface Arduino with the soil moisture sensor, and the benefits of using it. We also discuss various applications and how these sensors can be useful in irrigation systems, greenhouses, and more. This blog provides valuable insights for anyone interested in understanding the importance of soil moisture sensors in optimizing crop yield and plant growth.


Soil moisture sensors are becoming increasingly popular in agriculture, landscaping and gardening. By monitoring soil moisture levels using these sensors, farmers can ensure optimal crop growth while reducing water usage. This advanced technology provides accurate readings of the amount of available water within a medium such as soil or rock with minimal user input. Moisture sensing technologies provide benefits to growers by saving them time and money spent on manual watering systems that are often inaccurate when measuring the actual amount of needed hydration for plants to survive.

Moreover, this type of sensor also serves an invaluable role in irrigating remote landscapes due to its low-maintenance needs, affordability and convenience ‚Äď eliminating labor costs associated with repeat visits by agricultural workers throughout field plots during long growing seasons.

Soil moisture sensors are an invaluable tool for those interested in managing their soil. They can help farmers and gardeners monitor the levels of moisture content quickly, accurately, and cost-effectively. With these devices, it is easy to assess when to water or irrigate your land as too much or too little could lead to overgrowth or drought damage respectively. Soil analysis with a sensor eliminates guesswork by providing immediate readings that allow you to make informed decisions about how best to manage resources like water more judiciously. Sensors have been shown reduce labor costs up substantially while increasing yields significantly year after year ‚Äď making them highly recommended investments for any agricultural operation striving for efficiency!

What is a Soil Moisture Sensor?

Soil water content has important effects on many fundamental biophysical processes. It influences seed germination, plant growth and nutrition, microbial degradation of soil organic matter, conversion of nutrients in the root zone, and water transfer at the land-air interface. Quantification of soil water content is necessary for a variety of applications ranging from large-scale calibration of global climate models to field monitoring in agricultural and horticultural systems. When we need to measure water content in the soil, the soil moisture sensor comes to mind.


A soil moisture sensor is a type of sensor used to measure the volumetric water content of the soil. Because, a direct gravimetric amount of soil moisture must be removed, dried and weighed. These sensors do not directly measure volumetric water content using other soil laws such as permittivity, electrical resistivity, interaction with neutrons, and water content displacement. 


 The relationship between calculated properties and soil moisture needs to be adjusted and can change with ecological factors such as temperature, soil type and other conductivity. Reflected microwave radiation can be affected by soil moisture and is mainly used in remote sensing in agriculture and hydrology.


What is a soil moisture sensor


The main advantage of using soil moisture sensors to plan irrigation is more efficient water usage, thus reducing water consumption while allowing plant roots to grow deeper and avoiding over-watering or over-watering. Nutrient leaching is avoided. Avoiding overwatering also eliminates favorable conditions for some pests and fungal diseases. These statements are especially true for trees affected by citrus blight. This is because reduced root size and function can exacerbate the effects of drought.

Working Principle and Specification

This sensor primarily uses capacitance to measure soil moisture content (permittivity). The functionality of this sensor can be performed by inserting this sensor into the soil and reporting the moisture content status of the soil in percentage. This sensor is ideal for conducting experiments in science courses such as environmental science, agriculture, biology, soil science, botany and horticulture.


This soil moisture sensor is integrated with the LM393 comparator chip, this is an integrated circuit (IC), a dual differential comparator, consisting of two integrated operational amplifiers. They are commonly used in devices that measure analog signals and act as Analog-to-digital converters (ADC) also each comparator accepts two inputs for comparison. A comparator compares these two input voltages, measures which input voltage is greater, and provides an output. 


soil moisture sensor



This module has a built-in potentiometer to set the sensitivity of the digital output (DO). You can set the threshold with a potentiometer. So when the moisture level exceeds the threshold, the module will output LOW, otherwise, it will output HIGH. This setting is very useful for triggering actions when certain thresholds are reached. For example, when the soil moisture level exceeds a threshold,  a relay can be activated to start pumping water.


  • It is integrated with the LM393 comparator module chip.
  • Dual output module, analog and digital¬†
  • The soil moisture sensor have to fix bolt holes for easy mounting.¬†
  • There are two LED indicators, red (power indicator) and green (output indicator).¬†
  • Soil moisture sensors are the most sensitive to the environment and typically use soil moisture content.


Sensor Type

Soil Moisture sensor

Operating voltage

3.3 V - 5V

Current flow

< 20 Am

Type of Interface

Analog Type

Working temperature of the sensor

10 - 30 degree Celcius

PCB Dimension of comparator

3 cm x 1.5 cm

Soil Probe Dimension

6 cm x 3 cm

Cable length

20 cm


50 gms

Pin Configuration:

pin configuration of soil moisture sensor


Sensor Probe


Voltage supply


-ve pin

LM393 Comparator


Power supply


Common GND


Analog pin


Digital pin

Interface Arduino with the Soil Moisture Sensor:

Interface Arduino with the Soil moisture sensor



LM393 comparator








GPIO pins (9)


#define sensor_pin 9

void setup() {



void loop() {

  int val;


//val=analogRead(A0); //If you connect analog pin




Benefits of Soil Moisture Sensor

  • Less water use can be modified to lower and higher thresholds to preserve ideal soil moisture saturation and reduce plant withering.¬†
  • It can result in deeper plant root growth, decreased soil runoff and leaching, and unfavorable circumstances for pests and fungi.


  • Agriculture
  • Landscape irrigation
  • Research
  • Simple sensors for gardeners


In this blog post, we have learnt that soil moisture sensors are game-changers for anyone looking to optimize their irrigation and water management practices. By understanding the working principle, pin configuration, and interface with Arduino, you can easily incorporate them into your projects. With the added benefits of reduced water usage, increased crop yields, and minimized plant stress, there's no reason not to try soil moisture sensors. Whether you're a hobbyist, farmer, or gardener, these sensors are the perfect solution for precision soil moisture monitoring. Start exploring the endless possibilities and applications of soil moisture sensors today!


 If you appreciate our work don't forget to share this post and leave your opinion in the comment box.


Please do check out other blog posts about Popular electronics


Make sure you check out our wide range of products and collections (we offer some exciting deals!)

Frequently Asked Questions

1. How does the Soil Moisture Sensor work?

The moisture content in soil can be gauged via electrical resistance, which changes as water levels vary. The resultant electrical conductivity shift enables a soil moisture sensor to detect moisture content. This data can then be transmitted to an agricultural monitoring system, automating irrigation or helping to enhance crop yields.

2. What are the benefits of Soil Moisture Sensor?

Soil moisture sensors are like little wizards that wield the power of the earth's water content. They gift us with divine insight on how much water is in the soil, paving the way for irrigation and water management that's more efficient. With their mystical abilities, they can fend off overwatering, lessen water waste, and make crops thrive. What's more, soil moisture data can uncover soil ailments like nutrient shortages and compaction issues, making them true allies in soil health monitoring.

3. How soil moisture sensor is used in agriculture?

In the realm of agriculture, soil moisture sensors are a prevailing technology deployed to measure the quantity of aqueous substance in the soil. The knowledge gathered is then utilized to optimize irrigation processes, which ultimately forestalls the possibility of overwatering or underwatering and helps improve crop productivity. An automatic watering mechanism can be set in motion, with the aid of the sensor, to water crops whenever the soil moisture falls below a certain threshold.

Back to blog

Leave a comment

Please note, comments need to be approved before they are published.

You may also like to read