This Capacitive soil moisture sensor measures soil moisture levels by capacitive sensing rather than resistive sensing like other sensors on the market. It is made of corrosion-resistant material which gives it excellent service life. Insert it into the soil around your plants and impress your friends with real-time soil moisture data!
This module includes an onboard voltage regulator which gives it an operating voltage range of 3.3 ~ 5.5 V. It is perfect for low-voltage MCUs , both 3.3V , and 5V . For compatibility with a Raspberry Pi , it will need an ADC converter .
This
soil moisture sensor is compatible with our
3-pin “
Gravity ” interface, which we can connect to the
Gravity I/O expansion shield .
Applications:
Garden plants
Moisture detection
Intelligent agriculture
Note: This module is available in different versions. The V1.2 version sensor can work with only 5v while the V2.0 version sensor works with both 3.3V and 5V
Circuit Diagram of Moisture Sensor Compatible with Arduino and Display:
Software
Features:
Supports 3-Pin Gravity Sensor interface
Analog output
Package Includes:
1 x Capacitive Soil Moisture Sensor
Pin Connections Table 1
Board Sensor Pin Connection Soil Sensor VCC/GND/AOUT 3.3-5V / GND / board analog pin
Capacitive Soil Moisture Sensor - Arduino Uno
Capacitive Soil Moisture Sensor - Arduino Nano
Capacitive Soil Moisture Sensor - Arduino Mega
Capacitive Soil Moisture Sensor - ESP32
Capacitive Soil Moisture Sensor - ESP8266
Capacitive Soil Moisture Sensor - STM32
Capacitive Soil Moisture Sensor - Raspberry Pi Pico
1 //ekostra.com
2 //electronics store in egypt
3 //+201008896258
4
5 // Analog pin A0 on Arduino Uno. Lower reading = wetter soil (less resistance between probes).
6 #define SOIL_PIN A0
7
8 void setup () {
9 Serial.begin (115200 );
10 }
11
12 void loop () {
13 int raw = analogRead(SOIL_PIN);
14 float voltage = raw * 5.0 / 1023.0 ;
15
16 Serial.print ("Soil moisture raw: "); Serial.print (raw);
17 Serial.print (" Voltage: "); Serial.print (voltage);
18 Serial.println (raw < 500 ? " -> Wet" : " -> Dry"); // calibrate threshold for your own soil/probe
19
20 delay (1000 );
21 }
1 //ekostra.com
2 //electronics store in egypt
3 //+201008896258
4
5 // Analog pin A0 on Arduino Nano. Lower reading = wetter soil (less resistance between probes).
6 #define SOIL_PIN A0
7
8 void setup () {
9 Serial.begin (115200 );
10 }
11
12 void loop () {
13 int raw = analogRead(SOIL_PIN);
14 float voltage = raw * 5.0 / 1023.0 ;
15
16 Serial.print ("Soil moisture raw: "); Serial.print (raw);
17 Serial.print (" Voltage: "); Serial.print (voltage);
18 Serial.println (raw < 500 ? " -> Wet" : " -> Dry"); // calibrate threshold for your own soil/probe
19
20 delay (1000 );
21 }
1 //ekostra.com
2 //electronics store in egypt
3 //+201008896258
4
5 // Analog pin A0 on Arduino Mega. Lower reading = wetter soil (less resistance between probes).
6 #define SOIL_PIN A0
7
8 void setup () {
9 Serial.begin (115200 );
10 }
11
12 void loop () {
13 int raw = analogRead(SOIL_PIN);
14 float voltage = raw * 5.0 / 1023.0 ;
15
16 Serial.print ("Soil moisture raw: "); Serial.print (raw);
17 Serial.print (" Voltage: "); Serial.print (voltage);
18 Serial.println (raw < 500 ? " -> Wet" : " -> Dry"); // calibrate threshold for your own soil/probe
19
20 delay (1000 );
21 }
1 //ekostra.com
2 //electronics store in egypt
3 //+201008896258
4
5 // Analog pin 34 on ESP32. Lower reading = wetter soil (less resistance between probes).
6 #define SOIL_PIN 34
7
8 void setup () {
9 Serial.begin (115200 );
10 }
11
12 void loop () {
13 int raw = analogRead(SOIL_PIN);
14 float voltage = raw * 3.3 / 4095.0 ;
15
16 Serial.print ("Soil moisture raw: "); Serial.print (raw);
17 Serial.print (" Voltage: "); Serial.print (voltage);
18 Serial.println (raw < 500 ? " -> Wet" : " -> Dry"); // calibrate threshold for your own soil/probe
19
20 delay (1000 );
21 }
1 //ekostra.com
2 //electronics store in egypt
3 //+201008896258
4
5 // Analog pin A0 on ESP8266. Lower reading = wetter soil (less resistance between probes).
6 #define SOIL_PIN A0
7
8 void setup () {
9 Serial.begin (115200 );
10 }
11
12 void loop () {
13 int raw = analogRead(SOIL_PIN);
14 float voltage = raw * 3.3 / 1023.0 ;
15
16 Serial.print ("Soil moisture raw: "); Serial.print (raw);
17 Serial.print (" Voltage: "); Serial.print (voltage);
18 Serial.println (raw < 500 ? " -> Wet" : " -> Dry"); // calibrate threshold for your own soil/probe
19
20 delay (1000 );
21 }
1 //ekostra.com
2 //electronics store in egypt
3 //+201008896258
4
5 // Analog pin PA0 on STM32. Lower reading = wetter soil (less resistance between probes).
6 #define SOIL_PIN PA0
7
8 void setup () {
9 Serial.begin (115200 );
10 }
11
12 void loop () {
13 int raw = analogRead(SOIL_PIN);
14 float voltage = raw * 3.3 / 4095.0 ;
15
16 Serial.print ("Soil moisture raw: "); Serial.print (raw);
17 Serial.print (" Voltage: "); Serial.print (voltage);
18 Serial.println (raw < 500 ? " -> Wet" : " -> Dry"); // calibrate threshold for your own soil/probe
19
20 delay (1000 );
21 }
1 //ekostra.com
2 //electronics store in egypt
3 //+201008896258
4
5 // Analog pin 26 on Raspberry Pi Pico. Lower reading = wetter soil (less resistance between probes).
6 #define SOIL_PIN 26
7
8 void setup () {
9 Serial.begin (115200 );
10 }
11
12 void loop () {
13 int raw = analogRead(SOIL_PIN);
14 float voltage = raw * 3.3 / 4095.0 ;
15
16 Serial.print ("Soil moisture raw: "); Serial.print (raw);
17 Serial.print (" Voltage: "); Serial.print (voltage);
18 Serial.println (raw < 500 ? " -> Wet" : " -> Dry"); // calibrate threshold for your own soil/probe
19
20 delay (1000 );
21 }
Project Notes: Capacitive (corrosion-resistant) analog soil moisture sensor.