Back to selected work07 / 12

Embedded Systems & IoT · 2023 · completed

Smart Irrigation System

Automated closed-loop precision agricultural system with soil moisture telemetry and relay valves.

IoTMicrocontrollersCapacitive SensorsRelay SwitchingEmbedded CHardware Protection

01 / Overview

An automated closed-loop irrigation system designed to eliminate water waste and prevent crop root dehydration. Reads soil moisture levels across multiple sensor points, triggers solenoid valves, and streams telemetry data to a local monitoring dashboard.

02 / Problem

Traditional timed irrigation runs regardless of actual soil moisture levels or atmospheric humidity, resulting in severe water waste and risk of crop root rot.

03 / Contribution

Constructed the sensing array, designed transistor relay driver circuits with flyback protection, and programmed hysteresis control logic.

04 / System architecture

Physical + hardware

  • Capacitive soil moisture sensors (corrosion resistant)
  • Submersible 12V DC water pump and 12V solenoid valves
  • Optocoupled relay module with flyback freewheeling diodes
  • Microcontroller unit running continuous sensing loop

Firmware + software

  • Sensor calibration curve mapping analog voltage readings to volumetric water content percentage
  • Hysteresis threshold control algorithm preventing pump rapid cycling (chattering) around trigger boundaries
  • Timeout failsafes ensuring pump auto-shuts off if moisture does not rise within 3 minutes (leakage protection)

Signal flowCapacitive sensors -> Analog input ADC pins -> Threshold comparator logic -> Optocoupler -> 12V relay drive -> Pump.

05 / Engineering decisions

  1. 01Used capacitive moisture sensors rather than resistive probes to prevent metal oxidation and electrode corrosion over prolonged soil immersion.
  2. 02Built dual-threshold hysteresis (activating pump at <30% moisture and deactivating at >65%) to extend mechanical valve lifespan.

06 / Results + constraints

Observed results

  • Maintained consistent root-zone moisture across 30-day testing cycle.
  • Reduced total water consumption by an estimated 38% compared to continuous scheduled timer watering.
  • Failsafe shutoff successfully prevented dry-run pump damage when water reservoir was depleted.

Current limitations

  • Requires periodic soil salinity recalibration for maximum absolute accuracy.
  • Off-grid solar charging integration is planned for remote field deployments.