Soil Moisture Sensor

Hi,

I recently bought a SparkFun soil moisture sensor and I am having trouble with getting correct readings. I am using Adafruit ESP32 to read the data using micropython.

I have the power running to the 5V supply and the signal line running to the ADC A2 port on the microcontroller. Then in my code I have it set up to read the analog data coming in.

Except I am only getting two values for the readings. I get 75 for when it’s dry and 1026 when the sensor gets wet. These seem a bit off to what others have gotten in forums and the ranges listed on the SparkFun soil moisture sensor set up website.

Would anyone know what the issue is? Is it a calibration problem, if so can I get some insight on that. Thank You

Hi Yoshi.

We haven’t tested this sensor on an Adafruit ESP32, I believe that micro controller has a different type ADC input than the Arduino boards we have tested it with and that would account for a difference in your readings. There is no calibration needed on the Soil Moisture Sensor, it simply outputs an analog voltage that’s proportional to the conductivity of the soil you’re using it in. Differences in soil composition and dissolved minerals in the water can affect your readings and you would need to account for those in your code.