Ultra-Low Power Soil Moisture Sensor

Electricity can be a pretty handy tool when it stays within the bounds of its wiring. It’s largely responsible for our modern world and its applications are endless. When it’s not running in wires or electronics though, things can get much more complicated even for things that seem simple on the surface. For example, measuring moisture in soil seems straightforward, but corrosion presents immediate problems. To combat the problems with measuring things in the natural world with electricity, [David] built this capacitive soil moisture sensor which also has the benefit of using an extremely small amount of energy to operate.

The sensor is based on an STM32 microcontroller, in this case one specifically optimized for low-power applications. The other low-power key to this build is the small seven-segment e-ink display. The segments are oriented as horizontal lines, making this a great indicator for measuring a varying gradient of any type. The microcontroller only wakes up every 15 minutes, takes a measurement, and then updates the display before going back to sleep.

To solve the problem resistive moisture sensors have where they’re directly in contact with damp conditions and rapidly corrode, [David] is using a capacitive sensor instead which measures a changing capacitance as moisture changes. This allows the contacts to be much more isolated from the environment. The sensor has been up and running for a few months now with the coin cell driving the system still going strong and the house plants still alive and properly watered. Of course if you’re looking to take your houseplant game to the next level you could always build a hydroponics system which automates not only the watering of plants but everything else as well.

11 thoughts on “Ultra-Low Power Soil Moisture Sensor

  1. Ynvisible displays are more similar to segment LCDs, than e-ink/epaper displays. Driving them is similar, you generate a voltage across them and the segments change their contrast. Ynvisible segments need a DC bias though, and the direction of voltage can actually increase AND decrease the contrast (meaning its possible to turn segments off at any time). The timescales are very long though, once updated the segments are legible for around 10-15 minutes (they slowly lose contrast), after which another update is required.

    I had a chance to try out their evaluation kit for a project. Neat tech but you will need a custom display made just like segment LCDs.

  2. If I remember correctly one of the corrosion issues with the resistive sensors is that a common library or code snippet leaves them charged and sensing constantly instead of blipping a reading infrequently. That’ll corrode them fairly quick.

    Always meant to test that. As I’m finally getting some raised beds together this season maybe I’ll be reporting back!

    1. I think you are also supposed to swap polarity when sensing, e.g. treat it as AC.

      Would have been nice to also add some radio. An 433mhz thingie or some such, so we can log data and get notificiations , in lets say home assistant

      1. Ah, thanks. I was going to use them outdoors with LoRa and harden the assembly against the environment. Although if the capacitive version is also buck-a-pack as the other response implies I may modify or just use these to do a test.

      2. I actually ran with this idea, using an attiny85 to make a measurement with a capacitive sensor (with attiny pwm providing de block wave needed for the capacity sensing), then sending the measurement to a central server using nrf24l01 transceiver (central server being a nrf24l01 hooked up to a raspberry pi). I make a measurement every 6 hours or so, with sensors running 3+ months on a single coin cell.

    2. As the other dude said, run them on AC to help prevent electrolysis.

      Even better, just use a capacitive one like this build does. You can buy those for the same price as the old resistive ones these days.

  3. This is the high tech version of putting your finger in the soil to check if the plant need watering. It’s “high tech”, but apart from that, it doesn’t provide any useful function. IMHO, it’s just a waste of resources (the lithium in the coin cell battery, the PCB that’ll corrode in the soil, and all the fancy electronic chips). If it were connected to some network, it could at least provide a function of warning you if you forget to water your plant. But as it is, well, no way thanks. Leaving copper in the soil is not really a good stuff for your plant and microbial life.

  4. Pro tip (sorta)

    If you don’t want to buy expensive conformal coating for your boards, use wood varnish. Simply dip your board, wait a minute or two, dip it again. Do this maybe 4-5 times and you will have a completely waterproof board

  5. Hate to be a downer, but this is not practical for anything that is not in a benign and stable (household) environment. Have been implementing stuff for 30 years for use in industrial greenhouses and fields. Most off-the-shelf temp and hygro sensor modules have a medium lifetime of less than 14 months. The serious stuff is at least two orders of magnitude greater in cost.

    Packaging and fault tolerance/detection is what differentiates a hack from an engineered design.

    The USDA and USGS have published some really good stuff on these type of sensors and data acquisition systems. Although this stuff may no longer be available to the Fatherland.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.