Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

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

Image of Capacitive Soil Moisture Sensor v1.2Design with Capacitive Soil Moisture Sensor v1.2 in Cirkit Designer

Introduction

The Capacitive Soil Moisture Sensor v1.2 (Manufacturer Part ID: SEN0193) 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 non-corrosive and long-lasting. It provides an analog output that corresponds to the soil moisture level, making it ideal for applications requiring precise and consistent soil moisture monitoring.

Explore Projects Built with Capacitive Soil Moisture Sensor v1.2

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 Arduino UNO Based Soil Moisture Monitoring System: A project utilizing Capacitive Soil Moisture Sensor v1.2 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.

Open Project in Cirkit Designer

Common Applications

Technical Specifications

Below are the key technical details of the Capacitive Soil Moisture Sensor v1.2:

Parameter Specification
Operating Voltage 3.3V - 5.5V
Output Voltage Range 0V - 3V (analog output)
Current Consumption < 20mA
Interface Type Analog
Dimensions 98mm x 23mm
Weight 15g
Operating Temperature -40°C to 85°C
Cable Length 21cm

Pin Configuration and Descriptions

The sensor has a 3-pin interface for easy connection:

Pin Name Description
1 VCC Power supply pin. Connect to 3.3V or 5V.
2 GND Ground pin. Connect to the ground of the power source.
3 AOUT Analog output pin. Outputs a voltage proportional to the soil moisture level.

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 of a microcontroller (e.g., Arduino UNO).
  3. Calibrate the Sensor: The sensor outputs a voltage between 0V and 3V. A higher voltage indicates drier soil, while a lower voltage indicates wetter soil. You may need to calibrate the sensor for your specific soil type and conditions.

Important Considerations and Best Practices

Example Code for Arduino UNO

Below is an example of how to use the sensor with an Arduino UNO to read and display soil moisture levels:

// Capacitive Soil Moisture Sensor v1.2 Example Code
// Manufacturer: DFRobot
// Part ID: SEN0193

// 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
  float voltage = sensorValue * (5.0 / 1023.0); // Convert the reading to voltage
  
  // Print the sensor value and voltage to the Serial Monitor
  Serial.print("Sensor Value: ");
  Serial.print(sensorValue);
  Serial.print(" | Voltage: ");
  Serial.print(voltage);
  Serial.println("V");
  
  delay(1000); // Wait for 1 second before the next reading
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Output or Incorrect Readings:

    • Ensure the sensor is properly powered (3.3V or 5V).
    • Check all connections for loose wires or incorrect pin assignments.
    • Verify that the analog pin on the microcontroller is functioning correctly.
  2. Fluctuating Readings:

    • Ensure the sensor is inserted firmly into the soil.
    • Use a stable power source to minimize noise in the readings.
    • Avoid placing the sensor near sources of electrical interference.
  3. Sensor Not Responding:

    • Check for physical damage to the sensor or cable.
    • Test the sensor with a multimeter to verify output voltage.

FAQs

Q: Can this sensor be used in hydroponics?
A: No, this sensor is designed for soil use and should not be submerged in water.

Q: How do I calibrate the sensor?
A: Measure the sensor's output voltage in completely dry soil and fully saturated soil. Use these values to map the sensor's output to moisture levels in your application.

Q: Is the sensor waterproof?
A: The sensor is water-resistant but not waterproof. Avoid submerging it in water or exposing it to prolonged moisture without protection.

Q: Can I use this sensor with a 3.3V microcontroller?
A: Yes, the sensor operates at 3.3V and is compatible with 3.3V microcontrollers like the ESP32 or Raspberry Pi Pico.