Interfacing YL-69 Soil Moisture Sensor Module with Arduino

Introduction

In this tutorial, we learn how to Interfacing YL-69 Soil Moisture Sensor Module with Arduino, The YL-69 Soil Moisture Sensor Module is a valuable tool for gardeners and farmers to ensure optimal soil moisture levels for healthy plant growth. In this comprehensive guide, we will explore the working principle and features of the YL-69 sensor module.

Additionally, we will learn how to interface it with an Arduino UNO to create a soil moisture monitoring system. By the end of this tutorial, you will have the knowledge and skills to integrate the YL-69 Soil Moisture Sensor Module into your gardening or agricultural projects, promoting efficient water usage and vibrant plant health. So, let’s dive into the world of soil moisture sensing with Arduino and unlock the potential of the YL-69 Soil Moisture Sensor Module!

Hardware Required

You will require the following Hardware Components for Interfacing YL-69 Soil Moisture Sensor Module with Arduino.

Components#Buy From Amazon
Arduino UNO1Buy Now
YL-69 Soil Moisture Sensor1Buy Now
9v DC Adapter (Optional)1Buy Now
Jumper Wires4Buy Now
Breadboard1Buy Now

What is YL-69 Soil Moisture Sensor?

The YL-69 Soil Moisture Sensor Module is designed to detect the moisture content in the soil by measuring its electrical conductivity. It comprises two probes that are inserted into the soil, and as the soil moisture changes, the electrical conductivity between the probes also changes. The sensor module includes an onboard LM393 comparator chip, which converts the analog output of the sensor into a digital signal. This digital signal is then read by the Arduino UNO, allowing for real-time monitoring and analysis of soil moisture levels.

Pinout

YL-69-Soil-Moisture-Sensor-Module-Pinout

Pin Configuration

Pin NameDescription
VCCVcc pin powers the module, typically with +5V
GNDPower Supply Ground
DODigital Out Pin for Digital Output.
AOAnalog Out Pin for Analog Output

Specifications

  1. Moisture Detection Range: The YL-69 Soil Moisture Sensor Module can measure soil moisture levels within a specific range, providing accurate readings.
  2. Digital Output: The sensor module offers digital output, making it easy to interface with Arduino UNO’s digital input pins.
  3. Operating Voltage: The module operates within the voltage range compatible with Arduino UNO, ensuring seamless integration into projects.
  4. Compact Size: The small form factor of the YL-69 Sensor Module allows for easy insertion into the soil.

Features

  1. Non-Destructive Soil Testing: The sensor module’s non-destructive nature allows for repeated testing without harming the plants or soil.
  2. Fast Response Time: The YL-69 Sensor Module exhibits a fast response time, enabling real-time monitoring and quick adjustments to irrigation schedules.
  3. Cost-Effective: The affordability of the module makes it accessible to gardeners, farmers, and hobbyists.

Circuit Diagram

The following circuit shows you the connection of the Interfacing YL-69 Soil Moisture Sensor Module with Arduino Please make the connection carefully

YL-69-Soil-Moisture-Sensor-Module-Interfacing-with-Arduino

Circuit Connections

ArduinoSoil Moisture Sensor
+5VVCC Pin
GNDGND Pin
A0A0 Pin

Installing Arduino IDE Software

First, you will require to Download the updated version of Arduino IDE Software and Install it on your PC or laptop. if you Learn How to install the Arduino step-by-step guide then click on how to install Arduino Button given Blow

Code

//For more Projects: www.arduinocircuit.com

int moisturePin = A0;
int threshold = 750;

void setup(){
    pinMode(moisturePin, INPUT);
    Serial.begin(9600);
}

void loop(){
    int sensorValue = analogRead(moisturePin);    
    Serial.print(sensorValue);    
    if (sensorValue < threshold){
        Serial.println(" - Plant doesn't need water");
    } else {
        Serial.println(" - Plant needs water!");
    }
    delay(1000);
}

Applications

  1. Smart Irrigation Systems: The YL-69 Soil Moisture Sensor Module uses in smart irrigation systems to regulate water supply based on soil moisture levels, conserving water resources and optimizing plant health.
  2. Greenhouses and Indoor Gardens: The sensor module is valuable in greenhouse and indoor gardening setups to ensure plants receive adequate moisture for optimal growth.
  3. Plant Watering Alarms: By incorporating the sensor module into plant watering systems, users can receive alerts when soil moisture levels drop below a specified threshold, prompting timely watering.
  4. Agricultural Research: The YL-69 Sensor Module uses in agricultural research for studying soil moisture variations and their impact on crop growth and yield.
  5. Soil Moisture Mapping: In large agricultural fields, the sensor module can be employed for soil moisture mapping to identify areas with varying water retention capabilities.

Conclusion

You can create smart irrigation systems, indoor gardening setups, and more, promoting efficient water usage and vibrant plant growth. The module’s fast response time and digital output make it a valuable tool for agriculture, gardening, and research projects. Armed with this knowledge, you can now embrace the power of soil moisture sensing and nurture healthy, thriving plants with the YL-69 Soil Moisture Sensor Module and Arduino UNO.

Leave a Comment


error: