





Soil Moisture Sensor Module – LM393 Comparator with Analog & Digital Output for Arduino (FC-28)
- Module Type: Resistive Soil Moisture Sensor Module (FC-28)
- Comparator IC: LM393 Dual Voltage Comparator
- Output Type: Dual – Analog Output (AO) + Digital Output (DO)
- Analog Output: 0V – VCC (proportional to soil moisture, 0–1023 on 10-bit ADC)
- Digital Output: HIGH (dry) / LOW (wet) – TTL compatible
- Supply Voltage (VCC): 3.3V – 5V DC
- Interface: ADC (Analog), GPIO Digital Input
- Threshold Adjustment: Onboard 10KΩ Potentiometer (clockwise = higher threshold)
- Onboard LEDs: Power LED + DO Status / Trigger LED
- Probe Material: Dual Nickel-coated / Immersion Gold-coated Conductive Forks
- Probe Connector: 2-pin screw terminal / header
- Module PCB Size: 3.2 × 1.4 cm
- Pin Count: 4 (VCC, GND, DO, AO)
- Compatibility: Arduino, ESP32, ESP8266, Raspberry Pi, STM32
Product Details
Soil Moisture Sensor Module – LM393 Comparator with Analog & Digital Output (FC-28)
The Soil Moisture Sensor Module (FC-28) is a low-cost, easy-to-use resistive sensor designed to measure the volumetric water content of soil by detecting changes in electrical resistance between two conductive probes inserted into the soil. As soil moisture increases, resistance decreases — this analog signal is processed by the onboard LM393 dual voltage comparator IC to deliver both a continuous analog output (AO) for precise ADC readings and a threshold-triggered digital output (DO) for relay and switch-based automation — all without requiring additional signal conditioning circuits.
With dual output capability, an adjustable sensitivity potentiometer, and wide 3.3V–5V compatibility, this module is an essential component for automatic plant irrigation systems, smart agriculture, greenhouse monitoring, and IoT-based environmental control projects using Arduino, ESP32, ESP8266, and Raspberry Pi platforms.
Key Features
- Comparator IC: LM393 — low-power, wide voltage range, open-collector output
- Dual Output: Analog (AO) for proportional moisture reading + Digital (DO) for threshold trigger
- Analog Output Range: 0V to VCC — maps to 0–1023 on Arduino's 10-bit ADC
- Digital Output Logic: HIGH when soil is dry (below threshold); LOW when soil is moist (above threshold)
- Adjustable Threshold: Onboard 10KΩ potentiometer — turn clockwise to increase, counter-clockwise to decrease threshold
- Dual Onboard LEDs: Power indicator LED + Trigger/Status LED (lights when DO goes HIGH)
- Probe: Fork-shaped dual conductive probe with immersion gold / nickel plating for corrosion resistance
- Supply Voltage: 3.3V – 5V DC (breadboard and GPIO compatible)
- Bolt Holes: Yes — fixed mounting holes on PCB for enclosure integration
- Operating Principle: Resistive (conductivity-based) — higher moisture = lower resistance = lower analog output voltage
Technical Specifications
| Parameter | Specification |
|---|---|
| Module Type | Resistive Soil Moisture Sensor (FC-28) |
| Comparator IC | LM393 Dual Voltage Comparator |
| Supply Voltage (VCC) | 3.3V – 5.0V DC |
| Output Type | Analog (AO) + Digital (DO) |
| Analog Output | 0V – VCC (0–1023 on 10-bit ADC) |
| Digital Output | HIGH (dry) / LOW (wet) — TTL compatible |
| Threshold Adjustment | Onboard 10KΩ Potentiometer |
| Measurement Accuracy | ±10% (relative) |
| Probe Material | Nickel / Immersion Gold-plated Dual Forks |
| Onboard LEDs | Power LED + Status/Trigger LED |
| Interface | ADC Analog Input + GPIO Digital Input |
| Logic Level | 3.3V / 5V TTL compatible |
| Module PCB Size | 3.2 × 1.4 cm |
| Pin Count | 4 (VCC, GND, AO, DO) |
| Mounting Holes | Yes |
Pin Description
| Pin | Label | Description |
|---|---|---|
| 1 | VCC | Power Supply — Connect to 3.3V or 5V DC |
| 2 | GND | Ground — Connect to MCU GND |
| 3 | DO | Digital Output — Connect to any GPIO digital input pin |
| 4 | AO | Analog Output — Connect to ADC (analog input) pin of MCU |
| — | PROBE+/PROBE− | Soil probe terminals — polarity independent |
Working Principle
The two conductive fork probes are inserted into the soil. Current passes through the soil between the probes. The resistance measured depends on the water content — wetter soil = lower resistance = lower analog voltage at AO. This analog signal is fed simultaneously to the AO pin for precise ADC measurement and to the LM393 comparator, which compares it to a reference voltage set by the 10KΩ potentiometer. When moisture drops below the threshold, the DO pin goes HIGH and the status LED lights — allowing direct relay triggering for automatic irrigation without a microcontroller.
Compatible Platforms
- Arduino Uno, Nano, Mega, Leonardo, Pro Mini
- ESP8266 (NodeMCU, Wemos D1 Mini)
- ESP32 DevKit (use 3.3V VCC for analog output accuracy)
- Raspberry Pi (via ADC module like MCP3008 for analog; directly for digital)
- STM32, Teensy, MSP430, Nucleo boards
- MicroPython and CircuitPython boards
Arduino Sample Code (Analog + Digital)
#define AOUT_PIN A0 // Analog output from sensor
#define DOUT_PIN 8 // Digital output from sensor
#define PWR_PIN 9 // Optional: power sensor via digital pin to reduce corrosion
void setup() {
Serial.begin(9600);
pinMode(DOUT_PIN, INPUT);
pinMode(PWR_PIN, OUTPUT);
digitalWrite(PWR_PIN, LOW);
}
void loop() {
digitalWrite(PWR_PIN, HIGH); // Power on sensor
delay(10); // Stabilize
int analogVal = analogRead(AOUT_PIN); // 0–1023
int digitalVal = digitalRead(DOUT_PIN); // HIGH = dry, LOW = wet
int moisturePct = map(analogVal, 1023, 0, 0, 100); // Map to percentage
Serial.print("Analog: "); Serial.print(analogVal);
Serial.print(" | Moisture: "); Serial.print(moisturePct); Serial.print("%");
Serial.print(" | Status: "); Serial.println(digitalVal == HIGH ? "DRY" : "WET");
digitalWrite(PWR_PIN, LOW); // Power off to reduce probe corrosion
delay(1000);
}
Applications
- Automatic Irrigation Systems: Trigger water pump relay when soil dries below threshold
- Smart Agriculture: Real-time soil moisture monitoring and data logging
- Greenhouse Automation: Maintain optimal soil moisture for plant growth
- Smart Home / IoT: Integration with Home Assistant, Blynk, ThingSpeak, MQTT
- Garden & Plant Care: Automated plant watering systems for indoor/outdoor plants
- Educational Projects: Arduino lab experiments, STEM kits, IoT coursework
- Soil Research: Comparative moisture analysis across soil types
Important Usage Notes
- Corrosion Prevention: Power the sensor only during measurement (use a digital GPIO pin as VCC) — avoid continuous energization to extend probe lifespan.
- Insertion Depth: Insert the full length of the fork probes into the soil; keep the PCB and upper probe connections dry at all times.
- Analog Calibration: Establish dry (value ~1023) and wet (value ~215) baseline readings for your specific soil type before mapping to percentage.
- Mineral Interference: Dissolved minerals from fertilizers can affect resistance readings — account for this in threshold calibration.
- Voltage Dependency: Analog output values change with VCC — always use a stable regulated supply for consistent readings.
- Not Waterproof: The PCB module is not waterproof — protect from rain and condensation.
Package Contents
- 1 × Soil Moisture Sensor PCB Module (LM393, FC-28)
- 1 × Dual Fork Soil Probe with connecting cable
Tip: For longer probe lifespan and more stable readings, consider using a capacitive soil moisture sensor (corrosion-free) for permanent outdoor installations, or power this resistive module only during measurement intervals.
















