ANAVI Gardening uHAT

Open source smart gardening done easy, with Raspberry Pi

Oct 12, 2021

Capacitive Soil Moisture Sensors

by ANAVI Technology

The main feature of the ANAVI Gardening uHAT is its capability to measure soil moisture of two different plants simultaneously. This is achieved using the Microchip MCP3002 Analog-to-Digital Converter (ADC) and a couple of capacitive soil moisture sensors.

All ANAVI Gardening uHAT kits include two capacitive soil moisture sensors. These are analog sensors which detect capacitance changes. They operate using a variant of the 555 timer chip and come with appropriate cables for connecting them to the dedicated male header pins on the ANAVI Gardening uHAT. Each sensor has ten pins: ground (GND), VCC (which should be connected to 5V), and an analog output (AOUT) for the signal. The Microchip MCP3002 is needed to convert the analog signal to a digital data that can be processed on a Raspberry Pi with various programming languages such as Python, C, C++, and many more.

After attaching the ANAVI Gardening uHAT to a Raspberry Pi, connect the capacitive soil moisture sensors and turn on the Raspberry Pi. We recommend you use the Raspberry Pi OS, although any other GNU/Linux distribution for Raspberry Pi should be also fine.

Next, enable the Serial Peripheral Interface (SPI). This is the hardware interface that connects the Microchip MCP3002 ADC to the Raspberry Pi. On a Raspberry Pi OS an easy way to enable SPI is through the command-line interface using raspi-config. Have a look at step two in the video for more details. A simple Python example showing how to read soil moisture using ANAVI Gardening uHAT is available at our GitHub repo.

There are two different types of low-cost soil moisture sensors on the market: resistive (on the left) and capacitive (on the right). The photo above you shows popular sensor models of both types. Compared with resistive sensors, capacitive sensors do not require direct exposure of the metal electrodes. Because of this, capacitive sensors have two very important advantages: they are corrosion resistant and they have a significantly longer life span.

The first prototype of ANAVI Gardening uHAT was created in 2017, but it relied on resistive soil-moisture sensors, which were vulnerable to corrosion. After that, the project was put on hold for several years and in 2021 revision 1.3 was created to take advantage of the superior capacitive soil moisture sensors.

Thank you for supporting ANAVI Gardening uHAT through the crowdfunding campaign! Stay tuned for more updates with interesting details about the project!

Thanks, Leon


Sign up to receive future updates for ANAVI Gardening uHAT.

Subscribe to the Crowd Supply newsletter, highlighting the latest creators and projects