Soil Moisture Sensor
Soil Moisture Sensor Module consist of two probes which are used to measure the volumetric content of water. The two probes allow the current to pass through the soil and then it’s get the resistance value to measure the moisture value.
Specifications
- Cable length:20 Cm
- Shipment weight:0.105 kg
- Shipment dimension:8*6*3 cm
- VCC= 5 V or 3.3 V. May be powered from a digital output pin on a Uc
- GND= Ground, must be common with the Uc
- D0= Digital output of comparator circuit. May be connected to Uc or directly to a 5 V relay or similar device
- A0= Analog output usually connected to an analog input on Uc.
- Detection Humidity
Applications
- Agriculture
- Archeology
- Biofuel study
- Erosion studies
- Dust Control
- Soil carbon sequestration studies
Connect Sensor to Arduino
The sensor can be used through use of the analog output or the digital output. Both options shown below:
Analog Output Option
Click to enlarge
Digital Output Option
Click to enlarge
Arduino Code – Analog Output Option
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//Arduino Code - Soil Moisture
int Moisture_signal = A0; //Define the Analog pin# on the Arduino for the soil moisture sensor signal
void setup() {
Serial.begin(9600); // Start the serial communication
}
void loop() {
int Moisture = analogRead(Moisture_signal);
Serial.print("Soil Moisture Level: ");
Serial.println(Moisture);
delay(200);
}
Arduino Code – Digital Output Option
//Arduino Code - Soil Moisture
Arduino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//Arduino Code - Soil Moisture
int Moisture__dig_signal = 4; //Define the Digital Input on the Arduino for the sensor signal
int Sensor_State = 1;
void setup() {
pinMode(Moisture__dig_signal, INPUT); //Step pin as input
Serial.begin(9600); // Start the serial communication
}
void loop() {
Serial.print("Soil Moisture Level: ");
Sensor_State = digitalRead(Moisture__dig_signal);
if (Sensor_State == 1) {
Serial.println("Wet");
}
else {
Serial.println("Dry");
}
delay(200);
}
Frw 500