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

How to Use Capacitive Soil Moisture Sensor: Examples, Pinouts, and Specs

Image of Capacitive Soil Moisture Sensor
Cirkit Designer LogoDesign with Capacitive Soil Moisture Sensor in Cirkit Designer

Introduction

The Capacitive Soil Moisture Sensor (Manufacturer Part ID: SEN0193/SEN0308) by DFRobot is a reliable and durable sensor designed to measure the volumetric water content in soil. Unlike resistive soil moisture sensors, this capacitive sensor detects changes in soil capacitance, making it less prone to corrosion and ensuring a longer lifespan. It provides an analog output that corresponds to the soil moisture level, making it ideal for a variety of applications.

Explore Projects Built with Capacitive Soil Moisture Sensor

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
ESP32-Based Wi-Fi Connected Soil Moisture Monitoring System
Image of 2: A project utilizing Capacitive Soil Moisture Sensor in a practical application
This circuit consists of an ESP32 microcontroller connected to a capacitive soil moisture sensor. The ESP32 provides power to the sensor and reads the analog output from the sensor to monitor soil moisture levels.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Smart Soil Moisture and Temperature Monitoring System with Solar Power
Image of THEISISSSSSS POWERBANK: A project utilizing Capacitive Soil Moisture Sensor in a practical application
This circuit is a soil moisture and environmental monitoring system using an ESP32 microcontroller. It integrates multiple capacitive soil moisture sensors and a DHT22 temperature and humidity sensor to collect data, which can be processed or transmitted by the ESP32. The system is powered by a solar charger power bank, ensuring sustainable operation.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Pro Mini Based Soil Moisture Monitoring System with Sleep Mode
Image of Moisture Meter: A project utilizing Capacitive Soil Moisture Sensor in a practical application
This circuit is designed to monitor soil moisture levels using a capacitive soil moisture sensor interfaced with an Arduino Pro Mini. It indicates the moisture level through three LEDs (red for dry, yellow for moderate, and green for wet) and outputs readings to a serial monitor. The system also features a pushbutton to activate the device and a sleep mode function to conserve power when not in use.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Based Soil Moisture Monitoring System
Image of capacitive sensor: A project utilizing Capacitive Soil Moisture Sensor in a practical application
This circuit consists of an Arduino UNO microcontroller connected to a Capacitive Soil Moisture Sensor V1.2. The Arduino is programmed to read the moisture levels from the sensor and categorize the soil moisture content as 'Very Wet', 'Wet', or 'Dry', which is then output through the serial port. The sensor is powered by the Arduino's 5V supply, and its output is read by the Arduino's analog pin A0.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Capacitive Soil Moisture Sensor

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 2: A project utilizing Capacitive Soil Moisture Sensor in a practical application
ESP32-Based Wi-Fi Connected Soil Moisture Monitoring System
This circuit consists of an ESP32 microcontroller connected to a capacitive soil moisture sensor. The ESP32 provides power to the sensor and reads the analog output from the sensor to monitor soil moisture levels.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of THEISISSSSSS POWERBANK: A project utilizing Capacitive Soil Moisture Sensor in a practical application
ESP32-Based Smart Soil Moisture and Temperature Monitoring System with Solar Power
This circuit is a soil moisture and environmental monitoring system using an ESP32 microcontroller. It integrates multiple capacitive soil moisture sensors and a DHT22 temperature and humidity sensor to collect data, which can be processed or transmitted by the ESP32. The system is powered by a solar charger power bank, ensuring sustainable operation.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Moisture Meter: A project utilizing Capacitive Soil Moisture Sensor in a practical application
Arduino Pro Mini Based Soil Moisture Monitoring System with Sleep Mode
This circuit is designed to monitor soil moisture levels using a capacitive soil moisture sensor interfaced with an Arduino Pro Mini. It indicates the moisture level through three LEDs (red for dry, yellow for moderate, and green for wet) and outputs readings to a serial monitor. The system also features a pushbutton to activate the device and a sleep mode function to conserve power when not in use.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of capacitive sensor: A project utilizing Capacitive Soil Moisture Sensor in a practical application
Arduino UNO Based Soil Moisture Monitoring System
This circuit consists of an Arduino UNO microcontroller connected to a Capacitive Soil Moisture Sensor V1.2. The Arduino is programmed to read the moisture levels from the sensor and categorize the soil moisture content as 'Very Wet', 'Wet', or 'Dry', which is then output through the serial port. The sensor is powered by the Arduino's 5V supply, and its output is read by the Arduino's analog pin A0.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Smart irrigation systems
  • Agricultural monitoring
  • Gardening and horticulture
  • Environmental monitoring projects
  • DIY electronics and IoT projects

Technical Specifications

Below are the key technical details for the Capacitive Soil Moisture Sensor:

Parameter Specification
Operating Voltage 3.3V - 5.5V
Output Voltage Range 0V - 3.0V (analog output)
Current Consumption < 20mA
Interface Type Analog
Measurement Range 0% - 100% soil moisture
Dimensions 98mm x 23mm
Cable Length 200mm
Operating Temperature -40°C to 85°C
Material Corrosion-resistant PCB

Pin Configuration and Descriptions

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

Pin Name Description
1 VCC Power supply input (3.3V - 5.5V)
2 GND Ground connection
3 AOUT Analog output signal proportional to soil moisture

Usage Instructions

How to Use the Sensor in a Circuit

  1. Power the Sensor: Connect the VCC pin to a 3.3V or 5V power source and the GND pin to ground.
  2. Read the Analog Output: Connect the AOUT pin to an analog input pin on your microcontroller (e.g., Arduino UNO).
  3. Insert the Sensor into Soil: Place the sensor into the soil you wish to monitor. Ensure the sensor is fully inserted for accurate readings.
  4. Calibrate the Sensor: The sensor's output voltage will vary based on soil moisture. Dry soil will produce a higher voltage, while wet soil will produce a lower voltage. Use these readings to calibrate your system.

Important Considerations and Best Practices

  • Avoid Submerging the Sensor: The sensor is designed for soil moisture measurement and should not be submerged in water.
  • Protect the Electronics: Ensure the exposed PCB and connections are not in direct contact with water to prevent damage.
  • Calibrate for Accuracy: Soil type and composition can affect readings. Perform calibration for your specific soil conditions.
  • Use a Pull-Up Resistor (if needed): If the analog signal is noisy, consider adding a pull-up resistor to stabilize the output.

Example Code for Arduino UNO

Below is an example of how to use the Capacitive Soil Moisture Sensor with an Arduino UNO:

// Capacitive Soil Moisture Sensor Example Code
// Manufacturer: DFRobot
// Part ID: SEN0193/SEN0308

// Define the analog pin connected to the sensor
const int sensorPin = A0; // Connect AOUT to A0 on Arduino

void setup() {
  Serial.begin(9600); // Initialize serial communication at 9600 baud
  pinMode(sensorPin, INPUT); // Set the sensor pin as input
}

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

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

  // Print the raw sensor value and the calculated percentage
  Serial.print("Raw Sensor Value: ");
  Serial.print(sensorValue);
  Serial.print(" | Soil Moisture: ");
  Serial.print(moisturePercent);
  Serial.println("%");

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

Notes on the Code

  • The map() function is used to convert the raw analog reading (0-1023) into a percentage (0%-100%). Adjust the mapping range based on your calibration.
  • Ensure the sensor is properly inserted into the soil before taking readings.

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Output or Incorrect Readings

    • Cause: Loose or incorrect wiring.
    • Solution: Double-check all connections, ensuring VCC, GND, and AOUT are properly connected.
  2. Fluctuating or Noisy Readings

    • Cause: Electrical noise or unstable power supply.
    • Solution: Use a decoupling capacitor (e.g., 0.1µF) between VCC and GND to stabilize the power supply.
  3. Sensor Not Responding

    • Cause: Sensor damaged or exposed to water.
    • Solution: Inspect the sensor for physical damage. Avoid exposing the PCB to water.
  4. Inconsistent Moisture Readings

    • Cause: Soil type or improper calibration.
    • Solution: Calibrate the sensor for the specific soil type and conditions.

FAQs

Q: Can this sensor be used outdoors?
A: Yes, but ensure the PCB and connections are protected from water and extreme weather conditions.

Q: How do I calibrate the sensor?
A: Measure the sensor's output voltage in dry soil and fully saturated soil. Use these values to map the sensor's output to a percentage scale.

Q: Can I use this sensor with a 3.3V microcontroller?
A: Yes, the sensor operates within a voltage range of 3.3V to 5.5V, making it compatible with 3.3V systems.

Q: What is the lifespan of this sensor?
A: The capacitive design ensures a longer lifespan compared to resistive sensors, as it is less prone to corrosion. Proper care and usage can further extend its life.

Q: Can I use multiple sensors in one project?
A: Yes, connect each sensor to a separate analog input pin on your microcontroller. Ensure the power supply can handle the total current consumption.