Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Sensors
  4. ›Resistive Soil Moisture Sensor (FC-28 Style)

Component guide · Beginner · 4 min read

Resistive Soil Moisture Sensor (FC-28 Style)

Analog, Digital and Relay Versions

By Geekobot Learning Team · Updated 29 Oct 2026

I'm using
Wiring, code and the Run it panels follow your board.
On this page
Short answerWhat the Resistive soil moisture sensor module isResistive soil moisture sensor module pinoutWiring the Resistive soil moisture sensor moduleExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Short answer

A resistive soil moisture sensor passes a small current between two metal prongs: wet soil conducts better, so the reading changes. Most come with an LM393 comparator board that gives an analog output plus a digital output whose threshold you set with a trimmer. They are cheap and easy for school projects, but the prongs corrode if powered all the time.

Key specs at a glance

Principle
Resistance between two exposed electrodes
Supply
3.3 to 5 V
Outputs
AO (analog) and DO (digital, adjustable threshold)
Comparator
LM393 with sensitivity trimmer
Relay versions
12 V controller boards with a relay output for pumps
Life
Weeks to months if powered continuously; longer if switched

Models in this guide

These are alternatives. Pick the one that fits your project; you only need one.

  • Option 1Soil Moisture Sensor Hygrometer Module – Analog/Digital Output₹33
  • Option 2Soil Moisture Sensor Module with 1.3M Cable – Analog/Digital Output₹299
  • Option 3Soil Moisture Sensor Module – Corrosion-Resistant Probe, Analog/Digital Output₹449
  • Option 4DFRobot Gravity Analog Soil Moisture Sensor – 3.3V/5V Compatible₹329
  • Option 5Elecrow Crowtail Moisture Sensor 2.0 – Analog Soil Moisture Sensor Module₹104
  • Option 6Seeed Studio Grove Moisture Sensor v1.4 – Soil Resistivity Measurement Module₹419
01

What the Resistive soil moisture sensor module is

Resistive soil moisture sensors (such as the YL-69 and FC-28) measure soil wetness by passing current between two probes, giving an analog value and a digital threshold output.

DC current through the prongs causes electrolysis, which eats the plating and changes readings. Power the probe from a GPIO and switch it on only for a reading every few minutes; that alone extends its life a lot.

The 12 V hygrometer with relay and the XH-M214 controller work without a microcontroller: set the threshold and they switch a pump directly.

02

Resistive soil moisture sensor module pinout

The pins on the Resistive soil moisture sensor module and what each one does.

PinFunction
VCC3.3 to 5 V
GNDGround
AOAnalog output (higher = drier on most boards)
DODigital output, low when wet past the threshold
PinFunction
VCC
3.3 to 5 V
GND
Ground
AO
Analog output (higher = drier on most boards)
DO
Digital output, low when wet past the threshold
03

Wiring the Resistive soil moisture sensor module

Powering the sensor from a digital pin lets you switch it off between readings. A GPIO can supply the few milliamps the board needs.

Resistive soil moisture sensor module pinArduino UnoESP32
VCCD7 (switched power)GPIO 25 (switched power)
GNDGNDGND
AOA0GPIO 34
DOD2 (optional)GPIO 27 (optional)
VCC
Arduino Uno:
D7 (switched power)
ESP32:
GPIO 25 (switched power)
GND
Arduino Uno:
GND
ESP32:
GND
AO
Arduino Uno:
A0
ESP32:
GPIO 34
DO
Arduino Uno:
D2 (optional)
ESP32:
GPIO 27 (optional)
04

Example code

Calibrate dry and wet values for your soil as with any moisture sensor. Use DO with the trimmer for simple on/off control.

Read only when needed to slow corrosion (Uno) · Arduino C++Verify & upload in Electrolark
const int PWR = 7;

void setup() { Serial.begin(9600); pinMode(PWR, OUTPUT); }

void loop() {
  digitalWrite(PWR, HIGH);
  delay(100);                       // let the reading settle
  int raw = analogRead(A0);
  digitalWrite(PWR, LOW);
  Serial.println(raw);              // higher = drier
  delay(60000);                     // once a minute
}
05

Setup and tuning

Wiring

VCC, GND, AO to an analog pin and DO to a digital pin.

Corrosion

power the sensor from a GPIO only when reading to slow probe corrosion.

Calibration

record dry and wet readings and map between them.

Threshold

set DO with the trimmer for a simple watering alarm.

Alternative

capacitive sensors last much longer in soil.

06

What you need

Shop this list15 of 16 found in our store · ₹5,683

  • Generic Soil Moisture Sensor Hygrometer Module – Analog/Digital Output: the part this guide coversSoil Moisture Sensor Hygrometer Module – Analog/Digital Output₹33
  • Generic Soil Moisture Sensor Module with 1.3M Cable – Analog/Digital Output: another version this guide coversSoil Moisture Sensor Module with 1.3M Cable – Analog/Digital Output₹299
  • Generic Soil Moisture Sensor Module – Corrosion-Resistant Probe, Analog/Digital Output: another version this guide coversSoil Moisture Sensor Module – Corrosion-Resistant Probe, Analog/Digital Output₹449
  • DFRobot Gravity Analog Soil Moisture Sensor – 3.3V/5V Compatible: another version this guide coversDFRobot Gravity Analog Soil Moisture Sensor – 3.3V/5V Compatible₹329
  • Elecrow Crowtail Moisture Sensor 2.0 – Analog Soil Moisture Sensor Module: another version this guide coversElecrow Crowtail Moisture Sensor 2.0 – Analog Soil Moisture Sensor Module₹104
  • Seeed Studio Studio Grove Moisture Sensor v1.4 – Soil Resistivity Measurement Module: another version this guide coversSeeed Studio Grove Moisture Sensor v1.4 – Soil Resistivity Measurement Module₹419Closest match, check the specs
  • Waveshare Moisture Sensor – Analog Output Module: another version this guide coversWaveshare Moisture Sensor – Analog Output Module₹349
  • M5 Stack Earth Moisture Sensor Unit with Analog and Digital Output – Grove Interface: another version this guide coversM5 Stack Earth Moisture Sensor Unit with Analog and Digital Output – Grove Interface₹489
  • SparkFun Qwiic Soil Moisture Sensor – Resistivity-Based Probe: another version this guide coversSparkFun Qwiic Soil Moisture Sensor – Resistivity-Based Probe₹1,799
  • Generic 12V Soil Hygrometer Humidity Detection Module with Relay – Automatic Watering Device: another version this guide covers12V Soil Hygrometer Humidity Detection Module with Relay – Automatic Watering Device₹135
  • XH-M214 Humidity Controller Soil Sensor Module 20-99%RH Precise Automatic Control Irrigation System Red Digital Display: another version this guide coversXH-M214 Humidity Controller Soil Sensor Module 20-99%RH Precise Automatic Control Irrigation System Red Digital Display₹416
  • Uno R3 development board: the controller used in the wiring tableFind this part
  • ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389
  • 5V relay module with optocoupler: to switch a pump or valve5V Relay Module with Optocoupler₹74
  • R385 diaphragm water pump 12V: a pump to controlR385 / R365 Diaphragm Water Pump 12V₹220
  • 16x2 LCD with I2C: to show readings on a character display16×2 LCD with I2C (RG1602A)₹179Closest match, check the specs
07

Alternatives and when to choose them

  • ✓Capacitive soil moisture sensor: no corrosion, better for long term.
  • ✓Soil moisture sensors overview: which type to use.
  • ✓RS485 soil sensors: professional probes.
08

Common mistakes to avoid

  • !Powering the probe all the time.
  • !Skipping calibration.
  • !Using 5 V into a 3.3 V ADC.
  • !Expecting long life outdoors.
09

Frequently asked questions

Why does my soil sensor stop working after weeks?

The probes corrode from electrolysis; power it only during reads or use a capacitive sensor.

How do I calibrate it?

Record values in dry and wet soil, then map them to 0 to 100 %.

Why are readings higher with fertiliser?

Fertiliser salts raise soil conductivity, so the sensor reads wetter than it is.

Can I use it with ESP32?

Yes. Power it from 3.3 V so the analog output stays safe for the ESP32.

Is capacitive better?

Yes. Capacitive sensors do not pass current through soil, so they do not corrode.

Parts for this guide

  • Soil Moisture Sensor Hygrometer Module – Analog/Digital Output
    ₹33View
  • Soil Moisture Sensor Module with 1.3M Cable – Analog/Digital Output
    ₹299View
  • Soil Moisture Sensor Module – Corrosion-Resistant Probe, Analog/Digital Output
    ₹449View
  • DFRobot Gravity Analog Soil Moisture Sensor – 3.3V/5V Compatible
    ₹329View
  • Elecrow Crowtail Moisture Sensor 2.0 – Analog Soil Moisture Sensor Module
    ₹104View
  • Seeed Studio Grove Moisture Sensor v1.4 – Soil Resistivity Measurement Module
    ₹419View
  • Waveshare Moisture Sensor – Analog Output Module
    ₹349View
  • M5 Stack Earth Moisture Sensor Unit with Analog and Digital Output – Grove Interface
    ₹489View
  • SparkFun Qwiic Soil Moisture Sensor – Resistivity-Based Probe
    ₹1,799View
  • 12V Soil Hygrometer Humidity Detection Module with Relay – Automatic Watering Device
    ₹135View
  • XH-M214 Humidity Controller Soil Sensor Module 20-99%RH Precise Automatic Control Irrigation System Red Digital Display
    ₹416View
  • Uno R3 Development Board (No Cable)
    ₹359View
  • ESP32-WROOM-32 38-Pin Development Board
    ₹389View
  • 5V Relay Module with Optocoupler
    ₹74View
  • R385 / R365 Diaphragm Water Pump 12V
    ₹220View
  • 16×2 LCD with I2C (RG1602A)
    ₹179View
Shop Soil Moisture, pH & Agriculture Sensors

Keep learning

ComparisonBeginnerSoil Moisture SensorsResistive (YL-69) vs capacitive v1.2/v2.0 soil moisture sensors: why resistive probes corrode, Arduino and ESP32 wiring, dry and wet calibration, auto watering.3 min read · SensorsComponent guideBeginnerCapacitive Soil Moisture Sensor v1.2A capacitive soil moisture sensor measures how water changes the capacitance around its probe, without exposing metal to the soil, so it does not corrode like the forked resistive sensors.3 min read · SensorsHow-toBeginnerMini Water Pumps for Arduino ProjectsA mini submersible pump is a small DC motor that pushes water when it sits underwater.3 min read · Motors & MotionComponent guideBeginner5V, 12V and 24V Relay Modules (1 to 16 Channel)A relay module lets an Arduino or ESP32 switch a lamp, pump, solenoid or fan through an isolated contact rated about 10 A at 250 V AC or 30 V DC.4 min read · Sensors

Sources

  • LM393 datasheet
  • Typical FC-28 module schematics

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWhat the Resistive soil moisture sensor module isResistive soil moisture sensor module pinoutWiring the Resistive soil moisture sensor moduleExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide8 items · ₹3,851

Soil Moisture Sensor Hygrometer Module – Analog/Digital Output · Soil Moisture Sensor Module with 1.3M Cable – Analog/Digital Output · Soil Moisture Sensor Module – Corrosion-Resistant Probe, Analog/Digital Output · DFRobot Gravity Analog Soil Moisture Sensor – 3.3V/5V Compatible · Elecrow Crowtail Moisture Sensor 2.0 – Analog Soil Moisture Sensor Module · Waveshare Moisture Sensor – Analog Output Module · M5 Stack Earth Moisture Sensor Unit with Analog and Digital Output – Grove Interface · SparkFun Qwiic Soil Moisture Sensor – Resistivity-Based Probe

Run itChange the inputs and watch the output

Powered only for 100 ms per minute so the probe corrodes slowly. Wet soil reads lower.

Serial monitor9600 baud
748

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question