From sensors to intelligent self-deciding systems: lessons, projects, architectures, interactive simulation labs and a specialist AIoT assistant.
Soil moisture sensor
A sensor that estimates the water content of soil through its resistance or capacitance, used in smart irrigation.
Educational content in scientific-draft form; a specialist should review it before it is adopted as an academic reference. No measurement or performance result that was not actually obtained is shown here.
Facts
| Measured quantity | Soil moisture (relative) |
|---|---|
| Data type | Analogue |
| Units of measurement | Relative until calibrated |
| Examples of common parts | A capacitive or resistive sensor |
How it works
The resistive type measures resistance between two electrodes, and the capacitive type measures a change in capacitance; the latter usually lasts longer because its electrodes are not corroded to the same degree.
How to connect
Analogue output to an ADC with power and ground.
AIoT applications
- Smart irrigation
- Precision agriculture
Measurement and calibration issues
- Needs calibration in your own soil
- Affected by salinity and soil type
- Resistive electrodes corrode
Code example
// raw analogue reading (calibration needed)
const int PIN = 34;
void setup() { Serial.begin(115200); }
void loop() {
int raw = analogRead(PIN);
Serial.println(raw);
delay(1000);
}Simulations and labs run inside your browser. Nothing you enter and none of the conversations is stored on the server. Privacy policy
