All wiring guides

Free wiring guides

Wire the capacitive soil moisture sensor to the ESP32-S3

Capacitive soil moisture sensor, v1.2. Reads how wet the soil is, as a voltage.

When buying: Capacitive, not the two bare prongs: those corrode in weeks.

Which pin goes where

On the partOn the ESP32-S3
GNDGND
VCC3V3
AOUTGPIO 1

Wire it with the USB cable unplugged. Follow the names printed on your own part: makers sometimes reorder the pins.

In 3D

Example sketch

// Capacitive soil moisture sensor, v1.2
// on the ESP32-S3-DevKitC-1 (N8R2 or N16R8)
// https://stem.manusignal.com/en/parts/capacitive-soil-moisture-sensor-esp32-s3

const int PIN_AOUT = 1;

void setup() {
  Serial.begin(115200);
  analogReadResolution(12);
}

void loop() {
  Serial.println(analogRead(PIN_AOUT));
  delay(500);
}
  • Tools > Board > ESP32S3 Dev Module, then Tools > Port and choose the board's port.

This sketch is compiled for the board before the page is published. It has not been run on real hardware by us.

What you should see

Open the Serial Monitor at 115200. The number drops when the sensor goes from air into a glass of water.

If it does not work

Wet and dry look the same.
Set the two calibration numbers in the sketch: read the sensor in air, then in a glass of water.

The same part on the ESP32-C3

Build something with it

These Build Packs use this part on this board, with the same pins.

More parts on the ESP32-S3