KS0108 keyestudio EASY plug Soil Humidity Sensor

1. Introduction
The EASY Plug soil moisture sensor can read the amount of moisture present in the soil surrounding it. It’s an ideal for monitoring an urban garden, or your pet plant’s water level.
This soil moisture sensor uses the two probes to pass current through the soil, and then it reads that resistance to get the moisture level.
More water makes the soil conduct electricity more easily (less resistance), while dry soil conducts electricity poorly (more resistance).
If you use this sensor to make an automatic watering device, it will be helpful to remind you to water your indoor plants or to monitor the soil moisture in your garden.
This module should be used together with EASY plug control board.
Special Note:
The sensor/module is equipped with the RJ11 6P6C interface, compatible with our keyestudio EASY plug Control Board with RJ11 6P6C interface.
If you have the control board of other brands, it is also equipped with the RJ11 6P6C interface but has different internal line sequence, can’t be used compatibly with our sensor/module.
2. Features
Connector: Easy plug
Power Supply: 3.3V or 5V
Working Current: ≤ 20mA
Output Voltage: 0-2.3V
Sensor type: Analog output
Surface finish: immersion tin
3. Technical Details
Dimensions: 66mm * 20mm * 18mm
Weight: 4.8g
4. Connect It Up
Connect the EASY Plug soil sensor to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.

5. Upload the Code
Download code: Code
/*
# Example code for the moisture sensor
# Connect the sensor to the A0(Analog 0) pin on the control 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);
}
6. Result
Done uploading the code, open the serial monitor and set the baud rate to 57600, you can see the analog value is 0.
When place the two probes of moisture sensor into your plant soil, you can see the value change.

