Tags: RobotDyn, Soil, Moisture, Sensor, Arduino, Raspberry, pi, Microcontroller

Soil Moisture Sensor for Arduino Raspberry pi and any Microcontroller

  • 9.00 AED
    • Ex Tax:9.00 AED
    • Brands RobotDyn
    • Product Code: 249
    • Availability: In Stock
    This sensor reminds the user to water their plants and also monitors the moisture content of soil.It has been widely used in agriculture,land irrigation and botanical gardening.Soil Moisture Sensor functioning all you will need is to connect the VCC and GND pins to your Arduino-based device (or comp..

    This sensor reminds the user to water their plants and also monitors the moisture content of soil.It has been widely used in agriculture,land irrigation and botanical gardening.

    Soil Moisture Sensor functioning all you will need is to connect the VCC and GND pins to your Arduino-based device (or compatible development board) and you will receive a SIG out which will depend on the amount of water in the soil. One commonly known issue with soil moisture senors is their short lifespan when exposed to a moist environment. To combat this, we’ve had the PCB coated in Gold Finishing (ENIG or Electroless Nickel Immersion Gold). 

    Working Principle of Moisture Sensor                                                                                                     

    The Soil Moisture Sensor uses capacitance to measure dielectric permittivity of the surrounding medium. In soil, dielectric permittivity is a function of the water content. The sensor creates a voltage proportional to the dielectric permittivity, and therefore the water content of the soil. The sensor averages the water content over the entire length of the sensor. There is a 2 cm zone of influence with respect to the flat surface of the sensor, but it has little or no sensitivity at the extreme edges.The Soil Moisture Sensor is used to measure the loss of moisture over time due to evaporation and plant uptake,evaluate optimum soil moisture contents for various species of plants,monitor soil moisture content to control irrigation in greenhouses and enhance bottle biology experiments


    this sensor is compatible with SparkFun Soil Moisture Sensor :




    This code is a Soil Moisture Sensing Basic Example for Arduino:


    /*  Soil Mositure Basic Example

        This sketch was written by SparkFun Electronics

        Joel Bartlett 

        August 31, 2015

        Basic skecth to print out soil moisture values to the Serial Monitor 

        Released under the MIT License(http://opensource.org/licenses/MIT)*/

    int val = 0; //value for storing moisture value 

    int soilPin = A0;//Declare a variable for the soil moisture sensor 

    int soilPower = 7;//Variable for Soil moisture Power


    //Rather than powering the sensor through the 3.3V or 5V pins, 

    //we'll use a digital pin to power the sensor. This will 

    //prevent corrosion of the sensor as it sits in the soil. 

    void setup() 

    {

      Serial.begin(9600);   // open serial over USB

      pinMode(soilPower, OUTPUT);//Set D7 as an OUTPUT

      digitalWrite(soilPower, LOW);//Set to LOW so no power is flowing through the sensor

    }

    void loop() 

    {

    Serial.print("Soil Moisture = ");    

    //get soil moisture value from the function below and print it

    Serial.println(readSoil());

    //This 1 second timefrme is used so you can test the sensor and see it change in real-time.

    //For in-plant applications, you will want to take readings much less frequently.

    delay(1000);//take a reading every second

    }

    //This is a function used to get the soil moisture content

    int readSoil()

    {

        digitalWrite(soilPower, HIGH);//turn D7 "On"

        delay(10);//wait 10 milliseconds 

        val = analogRead(soilPin);//Read the SIG value form sensor 

        digitalWrite(soilPower, LOW);//turn D7 "Off"

        return val;//send current moisture value

    }

    There are no reviews for this product.

    Write a review

    Please login or register to review