Capacitive Soil Moisture Sensor v1.2

Hello all,

I've been having trouble with some capacitive soil moisture sensors, and I'm hoping to find some answers here.

The one I am using is like this: https://i.imgur.com/tLj1zax.png

Basically, by default analogRead gives a very low value (10-20). If I put it in water, it does not change at all. Yet if I touch it with my finger, the value skyrockets to 500-600. If I put it in water, then dip my finger in the water, once again its value increases. Not because of the water, but because of my finger.

I have 4 of these sensors, so I tried it with a second sensor, and had the exact same result.

I connect it to a nodemcu v3 with a very straightforward setup - vcc to 3v, gnd to gnd, data to A0. No voltage dividers or pullup / pulldown resistors. Do I need one? None of the examples I have seen mentioned one.

One thing I noticed is that my sensors are a little different from the one I see in many tutorials; notice the part in the U2 location on this sensor:

I believe that is a voltage regulator? My version just has a resistor between two pins, and the third pin is empty. (As you can see in the first image). Does that mean anything? From my rudimentary knowledge I'm guessing it means that the sensor only runs on 3.3v? Or maybe it only runs on 5v?

I'm really scratching my head here. I found a topic on these forums from a couple months ago with some people having the same problem, but no solutions.

I hope that I can figure out what is wrong with your help!

What does the sensor data sheet tell you. I am having a hard time following you, you have 3 pins only 2 connected, the chip is a regulator (why), It says capacitance sensor that typically involves AC. Check your supplier see if they have some information that can help you. Also it would be helpful if you posted a picture of the one you have.

Thanks for trying to help.

I did post a picture of the one I have. (https://i.imgur.com/tLj1zax.png)

Just look at the two pictures I posted and compare the parts in the spot marked as "U2". Hopefully you will understand what I'm trying to talk about.

I have never heard of an AC requirement in the 10+ tutorials I combed through. They all connect it directly to vcc / gnd / a0.

Like this one:

I figured out the problem!

At least, I think I did... The sensors I have do not seem to work with 3.3v. It seems that they require at least 4.2v or so in order to work. I thought I tested them with 5v before, but I guess I must have miswired something.

Now of course that is a bit of a problem, since the nodemcu v3 doesn't have a 5v output... And I was hoping to power this whole thing through the usb port of the nodemcu. Now I will either need a step-up converter, or get power from an external source and use a 5v regulator. But I guess that is going off-topic. I will create another topic in the respective board for that issue.