Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use Soil moisture: Examples, Pinouts, and Specs

Image of Soil moisture
Cirkit Designer LogoDesign with Soil moisture in Cirkit Designer

Introduction

The Soil Moisture Sensor by DFROBOT is a reliable and easy-to-use device designed to measure the volumetric water content in soil. This sensor provides an analog or digital output that reflects the soil's moisture level, making it an essential tool for applications such as automated irrigation systems, agricultural monitoring, and gardening projects. Its compact design and compatibility with microcontrollers like Arduino make it a popular choice for both hobbyists and professionals.

Explore Projects Built with Soil moisture

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino UNO-Based Smart Soil Moisture Monitoring System with LCD Display and Automatic Water Pump Control
Image of Sistem Penyiraman Otomatis: A project utilizing Soil moisture in a practical application
This circuit is an automated soil moisture monitoring and irrigation system. It uses an Arduino UNO to read data from a capacitive soil moisture sensor and display the moisture level on a 16x2 I2C LCD. Based on the moisture level, the Arduino controls three LEDs (green, yellow, red) to indicate the soil status and activates a relay to power a water pump for irrigation when needed.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino-Controlled Soil Moisture Sensing and Water Pump System
Image of SachetBhaiya: A project utilizing Soil moisture in a practical application
This circuit is designed to monitor soil moisture levels using a SparkFun Soil Moisture Sensor connected to a Soil Moisture Module, which interfaces with an Arduino Nano microcontroller. The Arduino reads the analog moisture level and can control a water pump via a relay module based on the moisture data. The system is powered by an 18650 Li-Ion battery, and the relay ensures that the pump is activated only when the soil moisture falls below a certain threshold, as determined by the Arduino's programmed logic.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP8266 Nodemcu Controlled Smart Irrigation System with Soil Moisture Sensing and I2C LCD Display
Image of FARM LAND IRRIGATION: A project utilizing Soil moisture in a practical application
This is a smart irrigation system that monitors soil moisture, air temperature, and humidity, displaying the readings on an LCD and providing remote data access via Blynk. It automatically waters plants using a 5V mini water pump controlled by a relay, which is triggered by the ESP8266 NodeMCU when the soil moisture is below a set point.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino-Controlled Automated Irrigation System with Soil Moisture Monitoring
Image of NEW one : A project utilizing Soil moisture in a practical application
This circuit is designed to monitor soil moisture levels using four soil moisture sensors and control a 12V pneumatic solenoid valve through a single-channel relay. The Arduino Nano reads analog values from the sensors, calculates the average moisture level, and activates the solenoid valve if the average moisture is below a certain threshold, indicating the soil is dry. The solenoid valve, when activated, presumably allows water to irrigate the soil, and the system is powered by a DC power source.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Soil moisture

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Sistem Penyiraman Otomatis: A project utilizing Soil moisture in a practical application
Arduino UNO-Based Smart Soil Moisture Monitoring System with LCD Display and Automatic Water Pump Control
This circuit is an automated soil moisture monitoring and irrigation system. It uses an Arduino UNO to read data from a capacitive soil moisture sensor and display the moisture level on a 16x2 I2C LCD. Based on the moisture level, the Arduino controls three LEDs (green, yellow, red) to indicate the soil status and activates a relay to power a water pump for irrigation when needed.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of SachetBhaiya: A project utilizing Soil moisture in a practical application
Arduino-Controlled Soil Moisture Sensing and Water Pump System
This circuit is designed to monitor soil moisture levels using a SparkFun Soil Moisture Sensor connected to a Soil Moisture Module, which interfaces with an Arduino Nano microcontroller. The Arduino reads the analog moisture level and can control a water pump via a relay module based on the moisture data. The system is powered by an 18650 Li-Ion battery, and the relay ensures that the pump is activated only when the soil moisture falls below a certain threshold, as determined by the Arduino's programmed logic.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of FARM LAND IRRIGATION: A project utilizing Soil moisture in a practical application
ESP8266 Nodemcu Controlled Smart Irrigation System with Soil Moisture Sensing and I2C LCD Display
This is a smart irrigation system that monitors soil moisture, air temperature, and humidity, displaying the readings on an LCD and providing remote data access via Blynk. It automatically waters plants using a 5V mini water pump controlled by a relay, which is triggered by the ESP8266 NodeMCU when the soil moisture is below a set point.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of NEW one : A project utilizing Soil moisture in a practical application
Arduino-Controlled Automated Irrigation System with Soil Moisture Monitoring
This circuit is designed to monitor soil moisture levels using four soil moisture sensors and control a 12V pneumatic solenoid valve through a single-channel relay. The Arduino Nano reads analog values from the sensors, calculates the average moisture level, and activates the solenoid valve if the average moisture is below a certain threshold, indicating the soil is dry. The solenoid valve, when activated, presumably allows water to irrigate the soil, and the system is powered by a DC power source.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Automated irrigation systems for gardens and farms
  • Soil moisture monitoring in greenhouses
  • Smart gardening projects
  • Environmental monitoring systems
  • Educational projects involving soil and plant science

Technical Specifications

The following table outlines the key technical details of the DFROBOT Soil Moisture Sensor:

Parameter Specification
Operating Voltage 3.3V - 5V
Output Type Analog and Digital
Analog Output Range 0V (dry) to 5V (wet)
Digital Output High (wet) or Low (dry)
Current Consumption < 20mA
Dimensions 60mm x 20mm
Interface Type 3-pin (VCC, GND, Signal)
Operating Temperature -10°C to 60°C
Sensor Type Resistive

Pin Configuration and Descriptions

The sensor has a 3-pin interface, as described in the table below:

Pin Name Description
1 VCC Power supply pin (3.3V - 5V)
2 GND Ground connection
3 Signal Outputs analog or digital signal based on moisture

Usage Instructions

How to Use the Sensor in a Circuit

  1. Connect the Sensor to a Microcontroller:

    • Connect the VCC pin to the 3.3V or 5V power supply of your microcontroller.
    • Connect the GND pin to the ground (GND) of your microcontroller.
    • Connect the Signal pin to an analog input pin (e.g., A0) or a digital input pin, depending on your application.
  2. Insert the Sensor into the Soil:

    • Place the sensor's probes into the soil at the desired depth. Ensure the probes are fully in contact with the soil for accurate readings.
  3. Read the Output:

    • For analog output, read the voltage from the Signal pin using an analog input pin on your microcontroller.
    • For digital output, adjust the onboard potentiometer to set the moisture threshold. The Signal pin will output HIGH or LOW based on the soil's moisture level.

Important Considerations and Best Practices

  • Avoid prolonged exposure of the sensor to water or highly humid environments to prevent corrosion.
  • Use the sensor in non-corrosive soil for extended lifespan.
  • Calibrate the sensor for your specific soil type to improve accuracy.
  • If using the sensor outdoors, consider waterproofing the connections to protect them from environmental damage.

Example Code for Arduino UNO

The following code demonstrates how to use the DFROBOT Soil Moisture Sensor with an Arduino UNO to read analog values and display them in the Serial Monitor:

// Define the analog pin connected to the sensor's Signal pin
const int sensorPin = A0;

void setup() {
  // Initialize the Serial Monitor for debugging
  Serial.begin(9600);
}

void loop() {
  // Read the analog value from the sensor
  int sensorValue = analogRead(sensorPin);

  // Map the sensor value to a percentage (0% = dry, 100% = wet)
  int moisturePercent = map(sensorValue, 0, 1023, 0, 100);

  // Print the moisture percentage to the Serial Monitor
  Serial.print("Soil Moisture: ");
  Serial.print(moisturePercent);
  Serial.println("%");

  // Wait for 1 second before taking the next reading
  delay(1000);
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Output or Incorrect Readings:

    • Ensure the sensor is properly connected to the microcontroller.
    • Verify that the power supply voltage is within the specified range (3.3V - 5V).
    • Check for loose or corroded connections.
  2. Sensor Corrosion:

    • Avoid leaving the sensor in wet soil for extended periods.
    • Use a protective coating (e.g., nail polish) on the sensor's probes to reduce corrosion.
  3. Unstable Readings:

    • Ensure the sensor is fully inserted into the soil and in good contact with it.
    • Avoid using the sensor in highly saline or conductive soils, as this may affect accuracy.

FAQs

Q: Can this sensor be used with a Raspberry Pi?
A: Yes, the sensor can be used with a Raspberry Pi. However, since the Raspberry Pi does not have built-in analog input pins, you will need an external ADC (Analog-to-Digital Converter) to read the analog output.

Q: How do I calibrate the sensor for my soil type?
A: To calibrate, take readings from the sensor in completely dry soil and fully saturated soil. Use these values to map the sensor's output to a percentage scale in your code.

Q: Is the sensor waterproof?
A: The sensor's probes are water-resistant, but the PCB and connections are not. Use waterproofing measures if deploying the sensor outdoors.