The geeekus Soil Moisture Sensor can read the amount of moisture present in the soil making it an excellent tool for your connected garden.
This moisture sensor uses two probes inserted in the soil. When the current goes through the soil, the sensor will get the resistance value by reading the current changes between the two probes and convert the resistance value into moisture content. The greater the moisture in the soil, the less the resistance and therefore the greater the electrical conductivity (analog value output of the sensor will increase). Dry soil results in more resistance and therefore less conductivity of electricity (analog value output of the sensor will decrease).
Specifications:
Power Supply Voltage: 3.3V or 5V
Working Current: ≤ 20mA
Output Voltage: 0-2.3V (When the sensor is totally immersed in water, the voltage will be 2.3V) the higher humidity, the higher the output voltage
Sensor type: Analog output
Interface definition: Pin1- signal, Pin2- V, Pin3 - GND
Sample Code
Upload the code and check the analog value on the monitor.
/* # Example code for the moisture sensor # Connect the sensor to the A0(Analog 0) pin on the Arduino board # the sensor value description # 0 ~300 dry soil # 300~700 humid soil # 700~950 in water */ void setup(){ Serial.begin(57600); } void loop(){ Serial.print("Moisture Sensor Value:"); Serial.println(analogRead(0)); delay(100); }