EmbeddedRelated.com

Automated Soil Moisture Monitoring and Irrigation System

Prototype plant watering and soil moisture monitoring system with local sensing and automatic watering control.

Intermediate Project — This is more than a simple sensor demo because it combines analog moisture sensing, environmental sensing, pump switching, power integrity, and possibly WiFi telemetry, all of which need careful integration and calibration.
Assumptions:
  • The prototype will monitor one or a few potted plants, not a large irrigation zone.
  • The user wants a simple first build using the existing ESP32 or Arduino Uno rather than a custom PCB.
  • Automatic watering is implied by the project name, so an actuator block is included for a pump or valve.
  • Soil moisture sensing will use capacitive probes rather than resistive probes for better corrosion resistance.
  • The system may optionally report readings over WiFi if the ESP32 is used.

Bill of Materials

Microcontroller
Top Pick ESP32-DEVKITC-32E Espressif Systems From our database
ESP32-DEVKITC-32E is the best overall pick because it matches the user's existing ESP32 ecosystem, gives built-in WiFi for monitoring, and is easy to prototype with on a breadboard.
Dev Board 113991254 Seeed Studio
Ready-to-use board for prototyping with this chip
Mouser $5.38 (3,202 in stock) Digikey
ESP32-S3-DEVKITC-1 Espressif Systems From our database
Good if you want more RAM and a newer ESP32 family member while staying in the same ecosystem. It still supports WiFi and USB, and is useful if you later add a display, web UI, or OTA updates.
ESP32-C3-DEVKITM-1 Espressif Systems From our database
Lower-cost ESP32 option with WiFi and BLE in a compact board. It is enough for moisture sensing, pump control, and simple cloud or phone notifications, though it has less headroom than the S3.
Soil Moisture Sensor
Top Pick SEN0193 DFRobot From our database
SEN0193 is the best pick because it is a proven capacitive moisture module, easy to calibrate, and a strong fit for a plant-watering prototype.
SEN-13322 SparkFun Electronics From our database
Compact capacitive soil moisture breakout with analog output, well suited to quick prototyping and easy wiring. It is a good choice if you want a small board and a straightforward analog signal for calibration in different soil types.
SEN0244 DFRobot From our database
Another widely used capacitive soil moisture sensor module from the same ecosystem, useful if you want a Gravity-style sensor with simple hookup. It is appropriate for prototype plant monitoring and keeps the sensing method non-corrosive.
Temperature and Humidity Sensor
Top Pick HDC1080DMBR Texas Instruments From our database
HDC1080DMBR is the best overall choice because it is simple, accurate, low power, and gives the environmental context that improves watering decisions.
HDC2010YPAR Texas Instruments From our database
Low-power digital humidity and temperature sensor with a heater to help reduce condensation issues. That heater can be useful in humid plant environments where condensation on the sensor could otherwise skew readings.
SHTC3-TR-2.5KS Sensirion AG From our database
Very low-power humidity and temperature sensor that is well suited to battery-powered or always-on monitoring. It is a strong option if you want a compact, modern I2C sensor with good accuracy.
Actuator
Top Pick IRLZ44N Infineon From our database
IRLZ44N is the best choice if the actuator is a DC pump, because it is efficient, silent, and more reliable than a relay for repeated watering cycles.
Mouser $1.77 (46,160 in stock)
SRD-05VDC-SL-C Songle AI suggestion - verify availability
Common 5 V relay for switching a small DC pump or solenoid valve from a microcontroller through a driver stage. It is inexpensive and easy to understand for a prototype, but it is mechanical and not ideal for high-cycle use.
AO3400A Alpha and Omega Semiconductor AI suggestion - verify availability
Small logic-level MOSFET for compact low-current pump or valve switching. It is a good fit for a small prototype PCB, especially if the load current is modest and you want a tiny footprint.
Power Supply
Top Pick TPS63070 Texas Instruments From our database
Top pick: TPS63070 (Texas Instruments). Buck-boost converter that can hold a stable output even as the input voltage rises or falls. This is useful if you later move to battery power and want the ESP32 rail to stay regulated over a wide input range.
MCP1700-33 Microchip Technology From our database
Very low quiescent current 3.3 V LDO, useful if you want to power only low-current electronics from a battery or regulated source. It is a good companion regulator for the sensor side, but not for driving a pump directly.

Compatibility Notes

  • The ESP32 family is 3.3 V logic, so the SEN0193, SEN-13322, and HDC1080DMBR should be powered and read with 3.3 V-compatible wiring or through appropriate scaling if a module outputs higher voltage.
  • If you use the Arduino Uno instead of the ESP32, the analog soil sensor is still easy to read, but the HDC1080DMBR I2C lines need 5 V-safe interfacing or pullups to 3.3 V depending on the breakout.
  • The recommended actuator MOSFET choice assumes a DC pump or solenoid with a separate supply and a flyback diode; do not drive the load directly from the MCU pin.
  • The ESP32-DEVKITC-32E is appropriate for a higher-voltage input source, but the ESP32 and sensors still need a clean 3.3 V rail or a board with onboard regulation.
  • If WiFi telemetry is used, keep the pump power wiring physically separated from the sensor wiring to reduce ADC noise and false moisture readings.

You'll Also Need

  • A water pump or solenoid valve is not included in the database list and must be selected separately if you want automatic watering.
  • You will need a flyback diode, gate resistor, pull-down resistor, and possibly a transistor or MOSFET driver depending on the actuator current.
  • You will need tubing, a water reservoir, connectors, and a waterproof enclosure or at least splash protection.
  • Calibration materials and firmware constants are needed because capacitive soil sensors vary significantly by soil type and pot geometry.
  • If you want battery operation, you may also need a battery charger and protection circuit, which are not covered here.
Estimated BOM Cost: $20-40 for a basic prototype, excluding the pump/v (based on live distributor pricing)

Design Considerations

Moisture Sensor Calibration
Capacitive soil sensors are much better than resistive probes for long-term use, but they still need calibration per soil type and pot size. Record dry, field-capacity, and fully watered readings for each plant and map them to a percentage or threshold. Expect drift over time from mineral buildup and changing soil composition, so re-check calibration after a few weeks.
Pump Control and Protection
If you switch a DC pump with a MOSFET, add a flyback diode across the pump terminals and keep the high-current loop short. A relay is simpler conceptually, but it is noisier, slower, and wears out mechanically. For a prototype, a logic-level MOSFET plus diode is usually the most reliable and compact approach.
Power Budget
The ESP32 can draw large current bursts during WiFi activity, so size the regulator for peak load, not just average load. If the pump is powered from the same supply, separate the motor rail from the logic rail or add bulk capacitance to prevent brownouts. For battery operation, deep sleep can reduce the ESP32 average current dramatically, but the sensor and regulator quiescent currents must also be low.
Environmental Robustness
Plant environments are humid, splash-prone, and often electrically noisy because of pumps and long wires. Use conformal coating or at least careful enclosure design for the electronics, and route sensor cables away from pump wiring. If the humidity sensor is placed too close to the soil or water source, it will read local microclimate rather than room conditions.
Firmware Architecture
Use a simple state machine: sample sensor, filter readings, decide whether watering is needed, actuate for a bounded time, then verify recovery. Add a watchdog and a maximum pump-on timeout so a stuck sensor or firmware bug cannot flood the plant. If WiFi is enabled, send periodic heartbeats so you can distinguish a dead device from a dry plant.
Validation and Failure Modes
Test the system first with a cup of water and a dummy load before connecting a real pump and plant. The most common failures are sensor cable corrosion, pump supply sag, and false dry readings caused by poor grounding or ADC noise. Log raw sensor values over time so you can see whether the threshold is stable before trusting automatic watering.

Want to customize this project or build something different?

Try the Project Advisor