Electronic – How much time to wait before sampling new data from soil moisture sensor

humiditymicrocontrollersensor

I am working with some cheap soil moisture sensors, as the ones on the picture below.

enter image description here

One of the problems of these kind of sensors is that they must not be powered on at all times. If you neglect to do so and leave them powered up at all times, electrolysis will take place and corrode the anode probe, thus releasing unwanted materials into the soil that you are probing.

To overcome this problem I intend to keep the board without power until the system needs to acquire new data.

This is the schematic of the board:

enter image description here

My question is, how much time after powering up should I wait before the voltage from the A0 output is stable?

The RC constant of the 51K resistor and the A0 capacitor is 5.1 ms. Should I at least wait 5.1 ms?

Best Answer

I would wait for 10ms, take multiple readings, check if they are stable (within a defined range) and average them to get the final reading.