Soil moisture sensor output values


I just bought a new sensor. It has LM939 chip.This is the link in Ali Expreess:

What I'd like to know are the output range values when the sensor is in water, is dry or is humid.

Do I have any way to see that?


The LM393 is a dual comparator. I'm guessing from that that it has a single Moist/Dry output. The trim pot on the circuit board probably sets the trigger level.

I believe it has an analog o/p. Best you experiment to get the information you want for the ranges. The salts in the soil will have a big effect on readings.

Got the same sensor here. The pins: it has a "gnd" pin, a "vcc" pin. An analog out: "A0". And a "do" pin. If you want to read out an analog value, use the A0 pin and connect it to an analog input pin on the arduino. In this case neglect the "do" pin and "potmeter". The potmeter sets the as I call it minimum border value to give Do a positive (or negative) output value. hope this helps.

Thanks for answering.

I used the AO pin and the console output writes 1023 when the sensor is dry. If I "inmerse" the sensor in the water, it writes values aroun 200 and 300. Is that fine? it seems to be weird.. at least for me :(

It is showing difference between dry and humid. Thats good.

I tried a moisture sensor similar to that. After several test, I decided to abandon it, and make my own that would read deeper in the soil. Garden plants really need the moisture deeper than these probes seem to want to go. I used two wires, separated by a small pvc pipe, and insert it about 8 inches below the ground level. That seems to give a usable reading to A1 (you need to do your own celebration tho).