SparkFun Qwiic Soil Moisture Sensor

The SparkFun Qwiic Soil Moisture Sensor is a simple breakout for measuring the moisture in soil and similar materials. The soil moisture sensor is pretty straightforward to use. The two large, exposed pads function as probes for the sensor, together acting as a variable resistor. The more water that is in the soil means the better the conductivity between the pads will be, resulting in a lower resistance and a higher SIG out. This version of the Soil Moisture Sensor includes a Qwiic connector, making it even easier to use this sensor!

To get the SparkFun Soil Moisture Sensor functioning, all you will need is to connect the VCC and GND pins to your Arduino-based device (or compatible development board). You will receive a SIG out, which will depend on the amount of water in the soil. One commonly known issue with soil moisture senors is their short lifespan when exposed to a moist environment. To combat this, we’ve had the PCB coated in gold finishing (ENIG, or Electroless Nickel Immersion Gold).

Note: Check the Hookup Guide below for assembly and weatherproofing instructions, as well as a simple example project that you can put together yourself!

SparkFun Qwiic Soil Moisture Sensor Product Help and Resources

Soil Moisture Sensor Hookup Guide

January 29, 2021

A quick hookup guide and project to get you started with the Soil Moisture Sensor from SparkFun.

Comments

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • Member #1601392 / about 4 years ago / 2

    I came across a video talking about different moisture sensors and the difference between them. He provided tests that showed some exposed copper plating sensors and fall off and taint the soil. Link Here: https://www.youtube.com/watch?v=udmJyncDvw0&t=214s

    Can you provide and detail or reassure why this won't happen to my sensor? I will make sure its out of the water, but I don't want to go eat my food and its toxic for my family.

    I'm looking in the near future to purchase one and wanted a heads up.

    Thanks, Caleb

Customer Reviews

2.7 out of 5

Based on 3 ratings:

Currently viewing all customer reviews.

Seems like a device that has been optimized but should never have been optimized in the first place

I recently bought this sensor and regret my purchase after seeing that video. I don't know why they still make these if it leads to corrosion after a while. It seems like they are trying to optimize a device that shouldn't be optimized by adding a gold plate. Also, are the readings less accurate with the ions in the soil? I am still trying to get it to work on a Raspberry Pi, but am less motivated after knowing it may corrode and capacitance measurements would be a better option. Now I am out $9 :(

Very handy little sensor

Following the guide, calibration is definitely important with these, but once dialed in to the soil and the peculiarities of each individual sensor, the measurements roughly align, which is all I need. My only concern is the inability to turn off the power LED via I2C. I use these in a grow tent with photoperiod plants and needed to permanently disable the power LED.

It works, but only for a while

First issue: It's a known thing that these types of moisture sensors corrode after a while and stop working, especially if the electrodes are constantly being energized. You can slow down that corrosion by gold-plating the electrodes, which this devices has. However, this device is always keeping the electrodes energized, which causes the gold and copper on the electrodes to get stripped away more quickly, which then leaches into the soil. Having those ions getting stripped off and deposited into the soil can eventually become an issue for the plants, too. I bought two of these for that reason, and I'm glad I did. After about 2 months of use, the bottom centimeter (the only portion of the sensor that I stuck into the dirt), became corroded quite a bit with exposed copper and even some areas where even the copper was completely stripped away, leaving bare fiberglass. The correct way to make/use these is to use a microcontroller to only energize the electrodes when taking a measurement, and then deenergize the electrodes afterwards and while not taking measurements. That way the electrodes won't be corroding constantly (from always being powered), and will only corrode when taking measurements. This is typically why capacitance moisture sensors are a better option for sensing moisture in soil. They don't have any exposed metals to get corroded and leached into the soil. There's a downside to using those kind, but overall I think they're a better option.

Second issue: After about 2 weeks, one of the sensors I bought completely died on me. I don't know exactly what happened, but I had to replace the microcontroller (ATTiny85) and reprogram it with the open source firmware Sparkfun provides for this device in order to get it up and running again. I don't know why the microcontroller died after just 2 weeks, but oh well I guess. And this leads me to my third issue:

Third issue: I think the MOSI and MISO pins on the ICSP header are swapped. I tried for so long to reprogram this device after soldering in a new microcontroller, and couldn't get it communicating with my Atmel ICE programmer. I finally had the idea of just swapping the MOSI and MISO pins around on my programmer, and it suddenly worked and I was finally able to reprogram the new microcontroller. The programmer I use is the Atmel ICE, which comes with a cable that has the 6-pin connector with the correct ICSP pinouts, so it's pretty much impossible to connect the programmer to an ICSP header incorrectly. I had to use jumper wires to connect the programmer's 6-pin connector to the ICSP header of this sensor in order to swap the MISO and MOSI connections around and finally reprogram the device.

So, this device needs to use a small transistor or mosfet that can be controlled by the microcontroller to energize the electrodes when taking a measurement and then deenergize the electrodes afterwards so they don't corrode nearly as quickly, and the MOSI and MISO pins on the ICSP header need to be swapped. If those two issues are fixed, this sensor could be a pretty decent option.