Moist sensor

Capacitive soil moisture sensor

Published:
Published:

It's a simple analog sensor, for compatibility with Raspberry Pi (see, no analog inputs) you will need an extra ADC converter. The Arduino analog input voltage is 1V max, and the output voltage of the capacitive sensor is about 3V (if powered by 3.3V), which means you have to use a voltage divider at the output of the sensor.

Before you buy

  • One SOT-23 component marked as 662K is 3.3V 200mA Positive Fixed LDO Voltage Regulator (XC6206P332MR) which gives the board an operating voltage range of 3.3-5.5V
  • And 555 timer. Be careful with greedy sellers that might put the wrong version of the timer that can only work with 5V. So verify this info with the datasheet. I have NE555 from Texas Instruments which only works from the voltage in the range between 4V and 16V. Instead it should be TLC555C or TLC555I or an outlier NE555 with a second line 20M

Calibration

Calibrate or not calibrate? Don't do it but normalize (as science people say).

Probes are normalised by matching the raw readings from each sensor at both 0% (held in air) and 100% water levels (submerged in water). Without normalising, these devices would only provide a range of irrelevant raw data that varies slightly with each sensor. By matching the raw reading from each sensor to both 0% and 100% water levels, a comparison of readings taken by different sensors can be made on a common scale. Equipment suppliers should provide you with procedures for normalising their product.

Sketch

  1. Open the serial port
  2. Record the sensor value when the probe is exposed to the air. This is the minimum value of dry soil "Moist: 0%"
  3. Take a cup of water and insert the probe into it (the probe, not the whole board)
  4. Record the sensor value when the probe is exposed to the water. This is the maximum value of moist soil "Moist: 100%"
void setup() {
  Serial.begin(9600);
}

void loop() {
  int val = analogRead(0); //connect sensor to Analog 0
  Serial.print(val);
  delay(100);
}

Schematics

Schematics of capacitive soil moisteru sensor

Reference

Rate this page