Soil Moisture Sensor
Principle
The soil humidity sensor operates based on the impact of soil moisture content on its resistance. In dry soil, the lack of moisture as a conductive medium results in high resistance; in moist soil, water dissolves some of the salts in the soil, forming an electrolyte solution that significantly lowers the soil’s resistivity. By applying a certain voltage between two electrodes and monitoring the resulting current changes or directly measuring the resistance changes, the moisture level in the soil can be accurately assessed.
Specifications
Item |
Description |
|---|---|
Name |
Soil Humidity Sensor |
Code |
B0020017 |
Voltage |
5V-DC |
Data Type |
Analog Signal |
Data Range |
0~1023 |
Ports |
Grove |
Dimensions |
79×24 (mm) |
Usage
|
||
|---|---|---|
|
|
|
Side View |
Front View |
Side View |
Soil Humidity Sensor Connection Diagram |
The soil humidity sensor can be connected to the P0, P1, or P2 ports of the micro: bit Intelligent Hub. In the coding environment, you can read the analog values from the soil humidity sensor. The sensor behaves as follows: the higher the soil moisture, the higher the detected value; conversely, the lower the soil moisture, the lower the detected value.
Note: Avoid exposing the components to water to prevent damage to the sensor.
Modular Coding

In the MakeCode coding environment, by adding the Microbit extension, you can program the system to read the soil humidity sensor signal from the P0 port and visualize the data on the micro: bit’s LED display.



