The physics behind capacitive soil sensing
I researched how electric fields, polarization, and capacitance explain the sensor’s response to moisture. This background helped me connect the voltage readings to what was happening around the probe.

The soil becomes part of the measurement
A capacitive probe has conductive electrodes whose electric field extends beyond the board into nearby material. These curved, outward-reaching fields are called fringing fields. They let the probe respond to the soil around it instead of keeping the field entirely inside a component.
Water has a much higher permittivity than air. As water replaces air in soil pores, the material’s effective permittivity generally rises, increasing the probe’s capacitance. The sensor’s electronics turn that change into an output voltage. In my tests, wetter samples produced lower output voltages.
The electrode geometry determines how the field spreads; it is not a fixed 180-degree curve or a sharply bounded sensing distance. This explains why the material close to the probe and consistent placement matter.
Explore the electric fields, polarization & equations
1. Electric fields act on charges
Electric fields point away from positive charges and toward negative charges. The force on a charge is F = qE: a positive charge feels a force along the field, while a negative charge feels a force in the opposite direction. Like charges repel and opposite charges attract; “positive force” alone does not mean repulsion. For two point charges, the force magnitude is F = k|q₁q₂| / r².
2. The surrounding material polarizes
An applied field can slightly shift a bound electron cloud relative to its positive nucleus. This separates the centers of positive and negative charge without necessarily giving the atom a net charge. Water molecules already have positive and negative ends; an applied field tends to align these permanent dipoles.

In the simple dielectric-filled capacitor model, polarization produces bound charges whose field opposes part of the field from the plate charges. This is electric-field superposition, not destructive interference between traveling waves. Permittivity describes a material’s electrical response, including polarization; it is not itself an amount of stored energy.
3. Capacitance changes—not just voltage
Capacitance means charge stored per volt: C = Q / V. An ideal parallel-plate capacitor has C = εA / d, where ε is permittivity, A is plate area, and d is separation. Higher permittivity increases capacitance. This formula illustrates the principle; it is not an exact model of the probe’s fringing-field geometry.
For an isolated capacitor with fixed charge Q, increasing C lowers V = Q / C; the charge does not disappear. If a supply instead holds voltage constant, more charge can be stored. The relation V = Ed applies to the voltage magnitude across a uniform field along the separation—not directly to the probe’s curved, nonuniform field.
Voltage is energy per unit charge, not energy itself. A capacitor’s stored energy is U = CV² / 2 = Q² / (2C). Whether that energy increases or decreases when capacitance changes depends on whether voltage or charge is held fixed.
4. Why my board gives a lower voltage when wet
The ESP32 reads the sensor board’s processed analog output, not simply the voltage across an isolated capacitor. A change in capacitance changes the circuit’s response, which the board converts into that output. The lower reading in water is consistent with my measurements and DFRobot’s documented inverse response for a similar sensor; it cannot be derived from V = Q / C alone without knowing the circuit.
Water’s relative permittivity is roughly 80 under room-temperature, low-frequency conditions, compared with about 1 for air. Actual readings also depend on frequency, the soil mixture, and placement. The explanation does not establish a universal moisture percentage or watering threshold.
References
- OpenStax · Capacitors and capacitance
- OpenStax · Capacitors and dielectrics
- Research example · Fringing-field capacitive soil sensing (a different sensor design).
- DFRobot · Calibration and output direction (a similar commercial sensor).
Finding the soil sensors’ voltage range
I tested the soil-moisture sensors in dry air and pure water to establish the approximate upper and lower voltage readings for this build. The readings varied by about ±0.02 V around these values.
Endpoint measurements, temperature checks & test limits
| Test condition | Approximate reading | Reference point |
|---|---|---|
| Dry air | 2.66 V ±0.02 V | Upper / dry endpoint |
| Pure water | 0.80 V ±0.02 V | Lower / wet endpoint |
I also tested the sensors in hot and cold air and observed approximately the same voltage readings in both conditions, within the variation above.
These tests established the approximate minimum and maximum of my observed voltage range: lower voltage indicated wetter conditions, while higher voltage indicated drier conditions. I used those endpoints as a reference when developing the V1 voltage bands and later V2 watering settings.
These are measurements from this project’s tests, not universal sensor limits or a direct soil-moisture percentage. The hot/cold comparison describes the conditions tested; it does not establish performance across every temperature. The watering thresholds and durations were control settings, not values determined by the endpoint measurements alone.
Choosing the watering threshold
I prepared three cups containing approximately equal amounts of spent coffee grounds, labeled dry, moist, and very moist. Initially, I added no water, three bottle-capfuls, and five bottle-capfuls respectively, mixed the wetted samples, and adjusted their water content based on my observations. The capfuls were approximate amounts, not measured volumes.
I repeatedly tested each cup, removing the sensor and cleaning off adhering grounds between insertions. The dry sample read approximately 2.3 V, the moderately moist sample around 1.8 V, and the very moist sample approximately 1.2 V. These comparisons helped me select 1.75 V as a practical watering threshold: readings above it requested watering, while readings at or below it were treated as sufficiently moist by the controller.
This was an exploratory test using qualitative moisture categories and approximate water amounts—not a calibrated measurement of soil-water content. It informed the initial control setting rather than establishing a universal threshold for every soil type. The dry coffee-ground reading is separate from the 2.66 V dry-air endpoint above.
Background research
Sensor calibration reference: DFRobot’s capacitive soil-moisture sensor calibration guide explains how dry and wet reference readings help interpret capacitive soil-moisture sensors. It also notes that insertion depth and soil packing affect the results. For this project, I selected the 1.75 V watering threshold through repeated tests with dry, moist, and very moist samples.
This reference was added while documenting the project. It covers a similar sensor, not a confirmed match to the model used here, and does not independently validate the 1.75 V setting.
Why I added a second soil sensor
Moving one sensor only a few centimeters changed its reading by approximately 0.2–0.3 V. That made a single location’s reading an uncertain basis for the watering decision. I added a second sensor and combined repeated measurements from both locations.
Two-sensor sampling method & observations
- Take six samples per sensor at 100 ms intervals.
- Calculate each sensor’s average.
- Average those two results into the final voltage reading.
The sampling takes approximately half a second per sensor, or about one second for both sampled sequentially. Averaging reduces dependence on a single instantaneous reading at one location. I found the combined readings more useful for the watering decision, but did not establish a formally measured accuracy improvement against a reference instrument.






