create new tag
view all tags

Moisture sensors

Different types of sensors

There are two different types of moisture sensors:

  • resistive sensors, measuring the resistance between two electrodes which changes with humidity
  • capacitive sensors, where the change in capacitance is measured.

Resistive sensors

For resistive sensors, I found again two types:

resistiveMoisture1.png resistiveMoisture2.png
The sensor on the left, using a PCB to implement the electrodes, should be avoided because electrolysis happens when a current flows from one electrode to the other in a humid environment, dissolving the electrodes in just a few days of operation.

Capacitive sensors

There are plenty of these sensors on the market, and they all look pretty much the same. However, quite a number of them have serious design flaws, as explained in this YouTube video:


The principle of how to convert the change of capacitance into a signal level is also explained in the video. Here is the circuit diagram of the sensor for reference:



The software for these sensors is rather simple, as they provide an analogue signal, inversely proportional to the moisture in the soil. The software must therefore simply read out an ADC channel.


The plot shows a value of ~ 1000 measured when the sensor was inserted into a glass of water and ~ 2500 when it was removed. These values lay in the linear range of the ESP32 ADC.

-- Uli Raich - 2022-07-31

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng capacitiveMoisture.png r1 manage 94.1 K 2022-07-31 - 13:35 UliRaich  
JPEGjpg capacitiveSensor.jpg r1 manage 81.2 K 2022-07-31 - 13:52 UliRaich  
PNGpng moistureResults.png r1 manage 162.8 K 2022-07-31 - 13:41 UliRaich  
PNGpng resistiveMoisture1.png r1 manage 163.8 K 2022-07-31 - 13:18 UliRaich  
PNGpng resistiveMoisture2.png r1 manage 160.3 K 2022-07-31 - 13:18 UliRaich  
Topic revision: r1 - 2022-07-31 - UliRaich
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback