A soil moisture sensor is a device that measures the amount of water in the soil. The sensor consists of two metal probes that can be inserted into the soil to measure the moisture levels.
In this tutorial, the Arduino will help you avoid repeating this. It will make the process easier for you, as it usually does.
Connect the wires between the soil moisture sensor and the Arduino, as shown in the image below.
Connections from the soil moisture sensor:
• Positive pin→ comparator op-amp module positive pin
• Negative pin→ comparator op-amp module negative pin
Connections from the comparator op-amp module:
• VCC pin → Arduino VCC pin (5V)
• GND pin → Arduino GND pin
• A0 pin → Arduino pin A0
Now access the serial monitor on your Arduino IDE by clicking on the magnifying glass icon at the top right corner.
Insert the sensor’s two metal probes into the soil of your flower pot to test it. Make sure it’s completely dry before watering it with a sufficient amount of water.
The serial monitor will now print the sensor read value as well as the status of your soil, indicating whether it requires water or not.
Different plants require different quantities of water. As a result, you may adjust the code’s threshold value to meet your planting water requirements.