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. ›Soil Moisture Sensors
Step 11 of 18 in Sensors and measurementPart of a learning path.
Next

Comparison · Beginner · 3 min read

Soil Moisture Sensors

Resistive vs Capacitive, Wiring and Calibration

By Geekobot Learning Team · Updated 24 Oct 2026

I'm using
Wiring, code and the Run it panels follow your board.
On this page
Short answerResistive vs capacitiveWiring and reading a capacitive sensorCalibrating for your soilBuilding an automatic plant watererCommon problemsTry itCommon mistakesFAQsParts and next steps
Short answer

Buy a capacitive soil moisture sensor. Resistive sensors (YL-69, FC-28) pass current through two metal probes that corrode within weeks; capacitive sensors (v1.2 or v2.0) sense moisture through a coated PCB and last for years. Both give an analog voltage: read it with an ADC pin, record the dry and wet values once, and map between them.

Key specs at a glance

Capacitive v1.2 / v2.0
3.3 to 5.5 V, analog out about 1.5 V (wet) to 3 V (dry), about 5 mA
Resistive YL-69 / FC-28
3.3 to 5 V, analog + digital out, probes corrode
Output
Analog voltage; read with analogRead()
Depth
Insert to the line on the PCB, keep the electronics dry
Lifetime
Capacitive: years; resistive: weeks to months
Calibration
Record raw values in air and in water, then map
01

Resistive vs capacitive

Resistive (YL-69, FC-28)Capacitive (v1.2, v2.0)
How it worksResistance between two probesCapacitance of a coated electrode changes with water
CorrosionFast: electrolysis eats the probesNone, nothing is exposed
AccuracyDrifts as probes corrodeStable, but affected by soil type
PriceLowestSlightly more
VerdictClassroom demos onlyAny real plant project
How it works
Resistive (YL-69, FC-28):
Resistance between two probes
Capacitive (v1.2, v2.0):
Capacitance of a coated electrode changes with water
Corrosion
Resistive (YL-69, FC-28):
Fast: electrolysis eats the probes
Capacitive (v1.2, v2.0):
None, nothing is exposed
Accuracy
Resistive (YL-69, FC-28):
Drifts as probes corrode
Capacitive (v1.2, v2.0):
Stable, but affected by soil type
Price
Resistive (YL-69, FC-28):
Lowest
Capacitive (v1.2, v2.0):
Slightly more
Verdict
Resistive (YL-69, FC-28):
Classroom demos only
Capacitive (v1.2, v2.0):
Any real plant project
02

Wiring and reading a capacitive sensor

Three wires: VCC (3.3 or 5 V), GND, AOUT to an analog pin. On an ESP32 use an ADC1 pin (GPIO 32 to 39) so readings work while Wi-Fi is on. On a Raspberry Pi you need an external ADC such as the ADS1115.

Soil moisture as a percentage · Arduino C++Verify & upload in Electrolark
const int PIN = A0;        // ESP32: 34
int dryValue = 620;        // measure your own: sensor in air
int wetValue = 260;        // sensor in a glass of water

void setup() { Serial.begin(9600); }

void loop() {
  int raw = analogRead(PIN);
  int pct = map(raw, dryValue, wetValue, 0, 100);
  pct = constrain(pct, 0, 100);
  Serial.print(raw); Serial.print("  "); Serial.print(pct); Serial.println(" %");
  delay(1000);
}
03

Calibrating for your soil

  1. 1
    Power the sensor and note the raw value in dry air: that is 0%.
  2. 2
    Dip it to the line in a glass of water: that is 100%.
  3. 3
    Put those two numbers in the code. Readings in real soil fall between them.
  4. 4
    For watering decisions, pick a threshold by checking the plant: many houseplants want watering around 30 to 40% on this scale. Different soils read differently, so calibrate per pot if accuracy matters.
04

Building an automatic plant waterer

Pair the sensor with a 3 to 6 V mini submersible pump driven by a MOSFET or relay module, and water in short bursts (a few seconds) followed by a wait of several minutes so the moisture has time to spread before the next reading. Read the sensor only when needed and power it from a GPIO pin to extend battery life and sensor lifetime.

05

Common problems

Readings stuck near the dry value

v1.2 boards use a 555 timer that needs at least 3.3 V on some batches and 5 V on others; try 5 V. Some v1.2 clones have a missing 1 MΩ resistor; v2.0 boards fix this.

Values jump around

mains noise or a long cable; average 10 readings.

Sensor died after a few weeks

water reached the electronics. Seal the top with heat-shrink or nail varnish and never bury past the line.

06

Try it: ADC resolution calculator

Change the values and the diagram and results update as you type.

07

Common mistakes to avoid

  • !Buying resistive probes for a long-term planter.
  • !Burying the sensor above the line and soaking the electronics.
  • !Using one calibration for every soil type and pot.
  • !Powering a pump from the microcontroller's 5 V pin.
  • !Watering continuously while the reading is low, flooding the plant before the sensor catches up.
08

Frequently asked questions

Which soil moisture sensor is best for Arduino?

A capacitive sensor (v1.2 or v2.0). It does not corrode and gives a stable analog signal that any Arduino, ESP32 or Pico can read.

Why does my soil moisture sensor always read dry?

Check that it is inserted to the line, powered at 5 V on v1.2 boards, and wired to an analog pin. Record your own dry and wet values instead of using numbers from the internet.

Can I use a soil moisture sensor with a Raspberry Pi?

Only with an external ADC, such as the ADS1115 (I2C) or MCP3008 (SPI), because the Pi has no analog inputs.

How long does a capacitive soil sensor last?

Years if the electronics stay dry. Resistive sensors corrode within weeks of continuous use.

Can I leave the sensor in the soil all the time?

Yes, for capacitive sensors. To extend battery life in a wireless node, power it only when taking a reading.

Parts for this guide

  • Mini Submersible Water Pump 3–6V
    ₹150View
  • 5V Relay Module with Optocoupler
    ₹74View
Shop Gas & Weather SensorsShop Pumps & Valves

Calculators

ADC resolution calculator

Terms in this guide

ADCAnalog-to-digital converter: turns a voltage into a number. A 10-bit ADC gives 0 to 1023; a 12-bit ADC gives 0 to 4095.CapacitanceA capacitor's ability to store charge, measured in farads (F); hobby parts are usually in pF, nF or µF.Analog signalA signal whose voltage varies continuously, such as a sensor output of 0 to 3.3 V, rather than switching only between HIGH and LOW.CalibrationMeasuring a sensor against known conditions so its raw numbers can be converted into meaningful values, such as dry and wet readings for a soil sensor.

Projects that use it

Put this into practice: 41 step-by-step builds in our project library use parts from this guide.

Beginner · 1–2 hoursAutomatic plant watering systemView projectIntermediate · 2 hoursPlant waterer with moisture displayView projectBeginner · 45 minutesHandheld soil moisture meterView project
Browse all 41 projects

Keep learning

Component guideBeginnerRelay ModulesA relay module is an electrically controlled switch that lets a microcontroller turn a separate circuit on or off, such as a 12 V pump or a mains lamp.4 min read · Switches, Relays & InputComponent guideBeginnerESP32 GuideThe ESP32 is a low-cost 3.3 V microcontroller from Espressif with built-in Wi-Fi and Bluetooth, used for IoT devices, smart-home controllers and web dashboards.5 min read · Boards & MicrocontrollersComparisonBeginnerDHT11 vs DHT22DHT11 vs DHT22 compared: accuracy, range and sampling rate, plus wiring, pull-up, Arduino/ESP32 code and when to pick a BME280 or SHT31.3 min read · SensorsHow-toIntermediateTransistors and MOSFETs as SwitchesA transistor lets a small microcontroller signal switch a much larger current.4 min read · Semiconductors & ICs

Sources

  • Capacitive Soil Moisture Sensor v1.2 / v2.0 schematic (DFRobot and community)
  • TLC555 datasheet (Texas Instruments)

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

On this page
Short answerResistive vs capacitiveWiring and reading a capacitive sensorCalibrating for your soilBuilding an automatic plant watererCommon problemsTry itCommon 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 guide2 items · ₹224

Mini Submersible Water Pump 3–6V · 5V Relay Module with Optocoupler

Run itChange the inputs and watch the output
Moisture40 %
Serial monitor9600 baud
473  40 %

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