YL-69 Moisture Sensor For Automated Gardening

YL-69 is a very popular soil moisture detection sensor. Because the cost of this module is cheap and good working. This is commonly used in automated gardening and other electronics gardening projects. In this article you can learn about the YL69 moisture sensor and all its detailed information.

What Is the YL-69 Moisture Sensor?

yd69 Moisture sensor board parts
Figure 1: YD69 Sensor parts

The YL69 is a affordable moisture sensor DIY board. Most of the Arduino and ESP projects this modules are used to demonstrate the agriculture or gardening related utilities. The main purpose of this module is measure the water content between the electrical conductive probes. The module is comes in two separate parts which is detecting probe and moisture sensing circuit.

  • Working Voltage is 3.3 V to 5V DC supply.
  • The sensing method is Resistance of the soil in between the probe.
  • It has Dual output of Digital D0 and Analog A0.

How the YL-69 Moisture Sensor Works

YL69 sensor probe
Figure 2: Moisture sensor probe insertin in soil roughly 5CM deep

The sensor will measure the volumetric water content of the soil using the electrical resistance principle. The probe is placed inside the soil, and when the soil loses moisture content, the dissolved ions lost conductivity and the resistance changes.

The change in resistance value measures the value of water content remails in the gardening pot. These two parts are separated because the probe gets dirty every time. The module signal is processed by the comparator chip of the LM393 IC. The resitance value is processed and converted into the useful value for the microcontroller or aruino board.

Features of the YL-69 Moisture Sensor

  • The sensor give digital and analoge signal as the output and is marked as AO and DO.
  • The digital output gives simple HIGH or LOW.
  • The analog output gives a continuous measurement of the exact moisture level to the microcontroller IC.
  • An in-built potentiometer to adjust its sensitivity.
  • The operating voltage in 3.3 to 5 V DC, so we can easily operate using arduino or ESP8266. Soil resistive sensing through the connected probe.

Components Included in the YL-69 Sensor Module

Moisture sensor parts
  • Soil Resistivity sensing probe.
  • Resistive soil value to microcontroller and transistors readable converter circuit.

The moisture sensor contains two detachable parts, which, when combined, make the sensor fully functional. The leg-type pins are the sensing part, and the circuit board is for signal conversion from a resistive value to a microcontroller and a switch-controlling signal.

Pin Configuration and Connections

moisture sensor pinout

The module has four pins on the left side and two on the right. The 2 pins represent the soil resistivity testing probe connection. Marking positive and negative connections corresponds to the same polarity of the probe. The left side of the sensor board has analog A0, Digital D0, ground, and Vcc for a 3.3V to 5V DC supply connection.

PinLabelFunctionConnection
1VCCPower supply input.Connect to Arduino 5V or 3.3V
2GNDGround.Connect to Arduino GND.
3DO (Digital Output)Outputs HIGH/LOW based on the moisture threshold set by the onboard potentiometer.Connect to any digital input pin.
4AO (Analog Output)Provides a variable analog voltage proportional to soil moisture.Connect to any analog input pin.

How to Interface the YL-69 Sensor with Arduino

First, connect the moisture measuring sensor module to the Arduino. Then upload the code to calibrate it first before uploading the project code. Calibration is needed to identify the analog value of water presence and the time without water. The connection is given below,

  • Supply voltage VCC to Arduino 5V.
  • GND to the Arduino GND connection.
  • A0 (Analog Out) to Arduino A0.
  • Upload the code and open serial monitor in Arduino IDE software.
  • Then first place the sensor in a glass of water and measures the analogue reading value.
  • After place the probe in dry place and read the value.
  • The values can be used to trigger the output device like water pump or LED indication.
  • This is only for monitoring the analog code for making project, not complete project code.

Role of the YL-69 Sensor in Automated Gardening

The sensor is highly popular in gardening projects because it measures the moisture content of soil. Most electronic engineering students do this basic project to impress people. I’ve also tested it in an automatic gardening project; this is awesome.

Benefits of Using the YL-69 Moisture Sensor

  • Low cost and affordable soil moisture content detector.
  • Digital and analog output to control microcontroller device.
  • Adjustable sensitivity based on soil type.

Akhil Satheesh

Akhil Satheesh

Akhil Satheesh is an electronics expert and the Founder and CEO of Soldering Mind. Specializes in designing innovative electronic circuits and custom, high-performance PCB layouts. Every project he shares on solderingmind.com is rigorously bench-tested to ensure accuracy for makers and hobbyists alike.

Leave a Reply