The Soil Moisture V2 sensor, manufactured by ESP32, is a reliable and efficient device designed to measure the volumetric water content in soil. This sensor provides accurate data that can be used for irrigation management, plant health monitoring, and other agricultural or gardening applications. Its compact design and ease of integration make it a popular choice for both hobbyists and professionals.
Explore Projects Built with Soil Moisture V2
Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
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.
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.
This circuit is a soil moisture monitoring system that uses a soil moisture sensor connected to a Soil Moisture Module, which in turn interfaces with a NodeMCU V3 ESP8266 microcontroller. The system is powered by a 12V power supply regulated through a buck converter, and it reads soil moisture levels, converting them to a percentage and transmitting the data via the microcontroller.
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.
The Soil Moisture V2 sensor is designed to operate efficiently in a variety of environments. Below are its key technical details:
Parameter
Value
Operating Voltage
3.3V to 5V
Operating Current
< 20mA
Output Signal
Analog voltage (0-3.3V)
Measurement Range
0% to 100% soil moisture
Interface Type
Analog
Dimensions
60mm x 20mm x 5mm
Operating Temperature
-10°C to 60°C
Material
Corrosion-resistant PCB coating
Pin Configuration and Descriptions
The Soil Moisture V2 sensor has three pins for easy integration into circuits:
Pin
Name
Description
1
VCC
Power supply pin (3.3V to 5V)
2
GND
Ground connection
3
AOUT
Analog output pin that provides soil moisture data
Usage Instructions
How to Use the Component in a Circuit
Power the Sensor: Connect the VCC pin to a 3.3V or 5V power source and the GND pin to the ground of your circuit.
Read the Output: Connect the AOUT pin to an analog input pin of your microcontroller (e.g., ESP32 or Arduino UNO).
Calibrate the Sensor: Place the sensor in dry soil and note the analog output value. Then, place it in fully saturated soil and record the value. Use these readings to map the sensor's output to a percentage scale (0% to 100%).
Important Considerations and Best Practices
Avoid Corrosion: The sensor's PCB is coated to resist corrosion, but prolonged exposure to water can still degrade it. Use the sensor intermittently rather than leaving it in the soil permanently.
Placement: Insert the sensor into the soil vertically for accurate readings. Ensure the sensor is fully in contact with the soil.
Power Supply: Use a stable power source to avoid fluctuations in the output signal.
Calibration: Regularly recalibrate the sensor to maintain accuracy, especially if used in different soil types.
Example Code for Arduino UNO
Below is an example of how to use the Soil Moisture V2 sensor with an Arduino UNO:
// Define the analog pin connected to the sensor
const int sensorPin = A0;
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
}
void loop() {
int sensorValue = analogRead(sensorPin); // Read the analog value from the sensor
float moisturePercentage = map(sensorValue, 0, 1023, 0, 100);
// Map the sensor value to a percentage (0% to 100%)
Serial.print("Soil Moisture: ");
Serial.print(moisturePercentage);
Serial.println("%"); // Print the moisture percentage to the Serial Monitor
delay(1000); // Wait for 1 second before taking the next reading
}
Notes on the Code
The map() function is used to convert the raw analog reading (0-1023) to a percentage (0-100%). Adjust the map() parameters based on your sensor's calibration values.
Use the Serial Monitor in the Arduino IDE to view the soil moisture readings in real time.
Troubleshooting and FAQs
Common Issues and Solutions
No Output or Incorrect Readings:
Cause: Loose or incorrect wiring.
Solution: Double-check all connections, ensuring the VCC, GND, and AOUT pins are properly connected.
Fluctuating Readings:
Cause: Unstable power supply or electrical noise.
Solution: Use a decoupling capacitor (e.g., 0.1µF) between VCC and GND to stabilize the power supply.
Sensor Degradation:
Cause: Prolonged exposure to water or corrosive soil.
Solution: Use the sensor intermittently and clean it after use. Consider using a protective coating for extended durability.
Inaccurate Calibration:
Cause: Soil type or environmental conditions differ from calibration conditions.
Solution: Recalibrate the sensor in the specific soil and conditions where it will be used.
FAQs
Q1: Can the Soil Moisture V2 sensor be used with a Raspberry Pi?
A1: Yes, but since the Raspberry Pi lacks analog input pins, you will need an ADC (Analog-to-Digital Converter) module to read the sensor's output.
Q2: How deep should the sensor be inserted into the soil?
A2: Insert the sensor fully into the soil, ensuring the entire sensing area is in contact with the soil for accurate readings.
Q3: Can this sensor measure soil salinity?
A3: No, the Soil Moisture V2 sensor is designed specifically for measuring soil moisture, not salinity or other soil properties.
Q4: Is the sensor waterproof?
A4: The sensor is water-resistant due to its PCB coating, but it is not fully waterproof. Avoid submerging it in water for extended periods.
By following this documentation, you can effectively integrate and use the Soil Moisture V2 sensor in your projects.