Digitize Your Soil With A Sensor


In this section you will learn how to use the soil moisture sensor. With a practical example to help you grab the concept.

What You Will Learn

  • How the soil moisture sensor operates
  • Hardware Overview 
  • Interfacing the sensor with Arduino

How The Soil Moisture Sensor Operates

The sensor has two probes which serves as conductors. The conductivity of the sensor is dependent on the moisture level of the soil. More water in the soil means more conduction and less resistance where as less moisture content means less conduction and more resistance. The sensor produces an output voltage according to the resistance, which means by measuring we can determine the soil moisture level.

Hardware Overview

A typical sensor has two components 

  • Probe 
  • Electronic Module


This is a fork shaped component that goes into the soil.It conducts electricity according to the moisture level of the soil

Electronic Module

This is what links the Arduino to the probe.The sensor has four pin-out

  •  VCC(Power Pin)
  • GND(Ground Pin)
  • AO(Analog Pin)-gives an analog signal and will be connected to analog input on the Arduino
  • DO(Digital Pin)-gives digital output of the internal comparator output and will be connected to a digital input of the Arduino or 5v relay.
 The module produces an output voltage according to the resistance of the probe and is made available at an analog output pin (AO).
The same signal is fed to an LM293 high precision comparator and is made available at the digital output pin(DO)
The module has a potentiometer for sensitivity adjustment of the (DO).Nevertheless you can use an external potentiometer to set a threshold.
This set up is useful and can help make your soil smatter ,for example when a threshold is reached a signal can be sent to trigger a relay to start pumping water on the farm into the soil
Also the module has two LED’s
 i) Power LED -goes and stays on when powered
ii) Status LED-Lights up when the digital output goes low

Interfacing sensor with Arduino

There are two ways of connecting the soil moisture level sensor to the Arduino

  • Analog mode
  • Digital mode

Components for both set ups are:

  • Arduino UNO
  • connecting wires 
  • Soil moisture level sensor
  • Breadboard
  • LED

Analog mode

circuit diagram of sensor in analog mode

Digital mode

The circuit diagram for the digital mode is similar to that of the analog mode just that the digital pin of the module is connected to the digital pin of the arduino

circuit diagram on sensor in digital mode

Related Articles

The 555 timer IC.

As a hobbyist, engineer, or maybe an electronics geek or wherever you find yourself, you can’t really have the time and pleasure to know what goes on in all the million ICs in the world. However you can delve with me into this simple 555 timer to see whats going on in it. This can give you a certain level of understanding about almost all ICs.


Your email address will not be published. Required fields are marked *

  1. wooow! my very own Hon. Garbah, nice job bro. Keep it up. I suggest you implement it on an actual day to day life practicality, for instance, a garden.

    1. its will happen practically,the project is in the dormancy stage it will germinate and skate the soil soon.
      thanks very much bro

  2. i would like to recommend this if its possible on your side 
    i think it make reading very easy 🙂

    the output should be rated over 10% and print something like this
    1 — dry soil
    2 — dry soil
    3 — Wet
    4 –Average
    5 — Average
    6 — Average
    7 — Moist
    8 — Moist
    9 — Very moist
    10 — Wattery