GrovePi Moisture sensor returning erratic readings

Hi there, I’m hoping someone can point me in the right direction.

I’ve got a Grove Pi Moisture sensor connected to the GrovePi via a pair of RJ45 ethernet connectors (I stretch the sensor out into my garden).

GrovePi – Analogue Port 0 – RJ45 ---------- Ethernet cable ------ RJ45 – Grove Moisture sensor

The problem I’m having is that the readings coming out of the sensor using the standard Grove Python script are erratic.



I’m wondering if anyone can give me any pointers for making these values more consistent. At the moment they’re not really usable for my garden watering project.

Attached you can see some pics of how the sensor looks.

Any advice would be much appreciated. It’s also odd, but the script returns a value even if I change the port to use Analogue Port 2 (and nothing is plugged in there). Something feels … wonky.

Hmm. Could you try hooking it up on a shorter distance? Like maybe no extension cords. Having too long of a cable could be an issue. For example hdmi will stop working after a certain distance. Also is the sensor getting super wet? I no this sounds like a stupid question, but the entire sensor isn’t supposed to get wet. Maybe try another port. Also try running the trouble shooting software on Raspbian_For_Robots. You should see an icon on the desktop. Hope this helps.

Thanks. I’ll give those things a go in the next 48 hours and report back.

The sensor is not completely wet. Ie only the gold plated tips are in the
soil, and even then not all the way up to the join. Is that pretty standar?

That sounds about right.

Hi @ptagell,

Can you check out your firmware version if its 1.2.7. You can run this code to find it out and also can you double check you have the sensor connected to the right port.


Hi Shoban,

Yep. On 1.2.7 using the Dexter industries image. I did a full re-install to
avoid a RST issue I kept hitting when using relays on the same device. The
sensor is definitely connected to the right point - A0 at the moment. I do
find it odd that I get a reading from the script
even if the sensor port specified is incorrect. Does anyone else have that