Soil Moisture¶
A Soil Moisture Sensor is used to measure the amount of water present in the soil. It helps your micro:bit projects understand whether soil is dry or wet, enabling automatic watering and smart agriculture applications.
What It Does¶
The moisture sensor outputs a varying signal depending on the water content in the soil.
- Dry soil → Lower moisture value
- Wet soil → Higher moisture value
The micro:bit reads this as an analog value, which can be used to trigger actions such as turning on a pump or displaying soil status
Real-World Applications¶
Soil moisture sensing plays a key role in agriculture and smart systems:
- 🌱 Smart Irrigation Systems – Automatically watering plants when soil is dry
- 🚜 Agriculture Automation – Optimizing water usage in farms
- 🌿 Home Gardening – Maintaining healthy indoor and outdoor plants
- 🏡 Smart Greenhouses – Controlling watering cycles based on soil condition
- 🌍 Water Conservation Systems – Preventing overwatering and saving water
Using a moisture sensor, students learn how to build systems that respond to environmental conditions.
✅ With this sensor, you can create projects that care for plants automatically, making systems more efficient and intelligent.
Connection to the breakout¶
- Group of I2C female header, which can connect with OLED module.

- Connect the OLED module directly.

- Connect the Soil Moisture metal probe to the module board using the black and red wires as shown below:

- Connect the Soil Moisture Sensor to the port P2.

- Connection of Soil Moisture sensor and OLED.
