Soil
Interfacing Soil Capacitive with Arduino Uno
What is the Soil Capacitive?
Soil Capacitive practical reference
Unlike resistive probes, this capacitive sensor doesn't corrode over time, making it the preferred choice for long-running automated plant watering builds. The sensor works by measuring the change in capacitance between two exposed copper plates embedded in the probe as soil moisture content changes, entirely without running any current directly through the soil (unlike older resistive probes) — since there's no direct electrical contact current flowing through the wet medium, the sensor doesn't suffer the electrolytic corrosion that eventually kills resistive soil probes.
Key specifications
- Sensor type: Capacitive soil moisture probe (v1.2), corrosion-resistant compared to resistive-type probes
- Operating voltage: 3.3V–5.5V DC
- Operating current: ~5 mA typical
- Output: Analog voltage, inversely related to moisture — drier soil gives a higher voltage, wetter soil gives a lower voltage (or vice versa, check your specific board's convention)
- Interface: Single analog output pin, read with analogRead()
- Durability: No exposed metal contacts in direct current-carrying contact with soil, significantly longer usable lifespan than resistive probes
- Calibration: Requires per-sensor calibration (a 'dry air' and 'water' reading) since raw analog values vary between individual sensors and soil types
Pinout and connection notes
Take a reading in dry air and a reading fully submerged in water to establish the sensor's practical analog range, then map subsequent readings between those two calibration points to get a 0-100% moisture-ish scale — raw analog values are not standardized across different soil types or even between individual sensor units, so skipping this calibration step will give inconsistent results in different soil.
- VCC: Power, 3.3–5.5V DC
- GND: Ground
- AOUT: Analog output — read with analogRead(), inversely proportional to soil moisture
Integration checklist
- Confirm the exact part number and breakout-board revision.
- Verify supply voltage, current demand, logic levels, and signal direction against the datasheet.
- Check controller pin assignments and bus address or interface mode against the example code.
- Power up with external loads disconnected, then test signals before full integration.
- If readings or communication fail, check power and ground first, then pin mapping, interface settings, and library initialization.
Troubleshooting and reproducibility
Record the board used, wiring, library/version, supply arrangement, and measured behavior. Use the selected board-specific wiring example as the source of truth. Never assume visually similar modules share identical voltage tolerance or pin order.
Setting Up Soil Capacitive with Arduino Uno
Library
None — built-in analogRead by —
No library needed; uses core Arduino functions only.
Wiring
| Component pin | Arduino Uno pin | Note |
|---|---|---|
| VCC | 5V | 3.3-5.5V accepted. |
| GND | GND | |
| AOUT | A0 | Lower value = wetter soil (opposite of resistive probes). |
Swipe sideways to see every column →
- Capacitive sensors corrode much slower than the cheaper resistive probes, since there is no exposed metal in contact with the soil — worth the small price difference for anything left in the ground.
- AIR_VALUE and WATER_VALUE vary between individual sensors; run the sensor in dry air and in a glass of water once to get real numbers before trusting the percentage.
Related Components
A3144
Digital Hall-effect switch for contactless magnetic detection
ACS712
Measure AC or DC current with an analog Hall-effect sensor
ADXL345
Low-power 3-axis accelerometer with tap/double-tap and freefall detection for wearables.
AHT10
A tiny I2C sensor that packs temperature and humidity sensing into the smallest footprint possible.
Related Guides & Projects
Arduino Uno R4 Minima Pinout: Every GPIO, ADC, DAC, and Op-Amp Pin Explained
A complete Arduino Uno R4 Minima pinout reference — digital I/O, ADC, DAC, op-amp, CAN, dual UART, and exactly what it leaves out compared to the WiFi variant.
Mastering PWM on Arduino: Dimming LEDs and Controlling Motors
Understand what PWM actually is on Arduino, dim an LED smoothly, and safely control a DC motor's speed with a driver chip -- plus the mistakes (like wiring a motor straight to a pin) that damage boards.
4-Digit 7-Segment Counter with TM1637 & Arduino
Drive a TM1637-based 4-digit 7-segment display with Arduino Uno to show a real-time up/down counter, elapsed timer, and scrolling text. Covers library setup, brightness control, and custom segment mapping.
Arduino Uno R4 Minima vs WiFi: Which One Should You Choose?
Same processor, same memory, different price. Here's what the WiFi variant's extra hardware actually gets you, and when the Minima is the smarter buy.