Soil Hygrometer - LM393

This sensor is used to detect the humidity level in soil and can be used to determine if a plant requires watering.


Sensor specifications

  • Input voltage: 3.3V - 5V
  • Output voltage: 0V - 5V

Pin specification

  • VCC: voltage input 3.3V - 5V
  • GND: ground
  • DO: digital output
  • AO: analog output

The sensor can be used in 2 different ways. Either a humidity threshold can be set using the potentiometer present on the pcb. The sensor will output a high signal on it’s digital output pin whenever the humidity level in the soil goes below the set threshold. This provides and easy way to just get a signal whenever the soil is getting dry but requires a known threshold to be set and it is impossible to track the moisture level within the soil except for seeing when it gets too dry.

The other way to read the sensor is to connect the analog output to an analog-to-digital converter and then read the analog voltage level that is output from the sensor. The sensor will output a analog voltage level that is proportional to the humidity level in the soil, 5V for completely dry (e.g. in the air) and 0V for completely wet (e.g. water).

Sample code

console.log("Coming soon");