Aug 2024IoT1 min read

Smart Irrigation IoT

Built a soil/climate irrigation setup: NodeMCU sensors publish to Firebase, a Flutter dashboard visualizes the stream, and an SVM model drives pump actuation with hard edge cutoffs if the cloud path stalls.

NodeMCU sensor telemetry, Firebase fan-out, and an SVM actuation model with edge fail-safes

NodeMCU / Flutter / Dart / SVM / Firebase Realtime Database

Edge node
NodeMCU multi-sensor publish
Decision model
SVM on moisture / temp / humidity

What it does

Timer-based irrigation ignores humidity and temperature. This project streams soil moisture, temperature, and humidity from a NodeMCU into Firebase Realtime Database, shows the feed in a Flutter app, and uses a small SVM to decide when to actuate a pump: with firmware hard cutoffs if cloud commands stop arriving.

Constraints

  • Tiny edge RAM/CPU
  • Unreliable Wi-Fi in the field
  • Actuation still needs a local fail-safe
  • Operators want live graphs, not only relay state

Decisions & tradeoffs

  1. Firebase as fan-out bus: many consumers without taxing the MCU
  2. SVM on three sensor features: cheap inference, easy retrain vs a neural net
  3. Client caching for dashboard continuity during brief drops
  4. Firmware emergency cutoffs independent of the cloud path
Diagram
to FirebaseRelay CommandHard Cutoff GuardSoil Moisture /Temp / HumidityNodeMCURTDBSVM DecisionFlutter Ops AppWater Actuator

Tradeoffs: a cloud hop adds latency vs peer sockets and allows multi-consumer analytics. SVM fits low-dimensional sensor vectors; it will not magically generalize to unrelated climates without retraining.

What it demonstrates

  • End-to-end IoT path from firmware to mobile UI
  • Keeping safety on the edge when cloud control is optional
  • Matching model complexity to feature dimensionality