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.

Also, we discuss how to link Arduino to the soil moisture sensor and the advantages of using it. We also discuss many applications for these sensors, including irrigation systems, greenhouses, and more.

This blog is valuable for anybody who wants to learn how soil moisture sensors can enhance agricultural output and plant development.


Soil moisture sensors are becoming increasingly popular in agriculture, landscaping and gardening.

Farmers can ensure maximum crop development while conserving water by using these sensors to monitor soil moisture levels. This cutting-edge device delivers precise measurements of the amount of accessible water in a media such as soil or rock with minimum human intervention.

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 check moisture levels quickly, precisely, and affordably. With these gadgets, you can easily determine when to water or irrigate your field, since too much or too little might result in overgrowth or drought damage, respectively.

Soil analysis using a sensor reduces uncertainty by providing real-time data, allowing you to make more informed decisions about how to manage resources such as water.

Sensors have been proved to minimize labor costs while improving yields year after year, making them a fantastic investment for any agricultural organization looking to enhance 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 connection between estimated parameters and soil moisture has to be changed, and it can alter depending on environmental conditions such as temperature, soil type, and 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

Working Principle of Soil Moisture Sensor

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, if the moisture level exceeds the threshold, the module outputs LOW; otherwise, it outputs HIGH. This parameter is quite handy for starting actions when particular criteria are met.

For example, when the soil moisture level exceeds a threshold,  a relay can be activated to start pumping water.

Also, read our blog on Smart Plant Monitoring System detailing the plant moisture monitoring system, discussing their purpose, components, working, advantages over traditional systems, and other important aspects of this emerging technology.


  • 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:

Soil Moisture Sensor Pin Diagram

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




How To Use Soil Moisture Sensor:

A soil moisture monitor decreases the irregularity with which you water your plants, whether they are in a garden bed or in pots.

Here's are some simple steps to use the soil moisture sensor effectively:

Find the Right Location: Select a location in your garden or plant container which matches the usual moisture level. Avoid regions near edges or rocks, which may produce inaccurate readings.

Prepare the Sensor: Depending on the manufacturer's recommendations, the probes may need to be soaked in water before use. This helps to guarantee accurate readings.

Place the sensor: Gently push the sensor probes into the earth, aiming for your plants' root zone. For accurate readings, ensure that the probes are in solid contact with the soil.

Connect the Sensor (if necessary): Depending on the type of sensor you have, you might need to connect it to a device to read the data. Follow the instructions provided by the manufacturer.

Read and Understand the Data:¬†Sensors offer different types of readings‚ÄĒsome use voltage levels, while others use resistance values or digital outputs. Refer to the manufacturer's guide to understand what the readings mean in terms of moisture content.

Calibrate for Better Accuracy: To fine-tune your sensor, take measurements in both dry and moist soil. This way, you'll know what dry and wet soil look like on the sensor and may use it as a baseline for future observations.

Think About Soil type: The way your sensor detects moisture might vary depending on the kind of soil, such as sandy or clay. Sandier soils drain more quickly than clay soils do. Adapt your watering techniques appropriately.

Instead of using as a rule, use as a tool: You should follow the sensor's guidance but don't depend solely on it. To have a better picture of what the numbers mean for your particular circumstance, take a look at the soil moisture and confirm it with your hands.

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 article, we discovered that soil moisture sensors are game changers for anybody trying to improve their irrigation and water management techniques.

You may include them into your projects with ease if you understand the Arduino interface, pin arrangement, and operating principle.

Given that soil moisture sensors reduce plant stress, boost agricultural output, and preserve water, there's no good reason not to test them.

These sensors are excellent for precisely determining soil moisture, whether you're a farmer, gardener, or hobbyist.

As soon as possible, start looking into the various possibilities and uses for soil moisture sensors! 



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!)

You may also like to read

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