Inspiration

Balcony gardens die from guesswork — apartment growers water on vibes, and most AI plant apps hand out generic advice that ignores what's actually happening in the pot. We wanted the opposite: a system that measures first, reasons from evidence, and only then speaks. And we wanted it running entirely on the balcony, on an Arduino UNO Q, without shipping raw sensor history to a cloud model.

What it does

Balcony Buddy is a local sensor-fusion and garden-question system. The UNO Q streams soil moisture, DHT11 temperature/humidity, and MQ2 gas-baseline readings; the dashboard stores timestamped data in SQLite, computes rolling 6-hour trends, detects watering responses, flags contradictions and probable sensor faults, and produces evidence-backed priorities with confidence scores and a verification step. You can ask natural-language garden questions and get grounded answers fully offline — an optional Ollama/OpenAI-compatible layer only polishes the prose and can never override the deterministic evidence (model output with unsupported numbers is discarded). A responsive dashboard shows live conditions, 24-hour garden rhythm, plant profiles and health score, camera view, warnings, and a full decision log.

How we built it

  • Firmware (C++): UNO Q sketch samples soil (A0), MQ2 (A1), DHT11 (D2) every 2 s at 115200 baud and shows calibrated soil % on the LED matrix.
  • Pipeline (Python 3.10, zero external dependencies): shared input contracts → SQLite storage → rolling features and sensor fusion → contradiction/fault checks → deterministic rules engine → compact garden-state JSON.
  • AI layer: the compact garden state (never raw history) goes to a local Ollama or any OpenAI-compatible model, for explanation only.
  • Dashboard: single-page HTML/JS served by a Python server that bridges serial, the HTTP API, and Logitech C270 camera streaming via FFmpeg.
  • Simulator: full simulated mode (normal / drying / heatwave / stuck-sensor) so the entire product works before hardware is attached — the server auto-switches the moment real serial readings arrive.
  • Deterministic unit and pipeline tests across the stack.

Challenges we ran into

  • The UNO Q's A1 ADC is 3.3 V-only while most MQ2 modules push up to 5 V on AO — we had to build a level-safe interface and treat MQ2 as relative drift from a warmed-up baseline, not absolute concentration.
  • Per-pot soil calibration: WET_RAW / DRY_RAW vary with every pot and probe placement.
  • Keeping the AI honest — we landed on a hard rule: the model may rephrase, never decide, and prose containing numbers not in the evidence is discarded.
  • Telling a drying plant apart from a dying sensor, which is why contradiction and stuck-sensor detection exist.
  • Making one dashboard behave identically on simulated and real data with seamless switchover.

Accomplishments that we're proud of

  • Every recommendation ships with evidence, confidence, and a way to verify it — no black-box advice.
  • A complete no-network fallback: the whole system, including Q&A, works offline.
  • Zero-hardware demo: a fresh install seeds 30 hours of history and offers live scenario controls.
  • Honest uncertainty: missing data stays missing, camera labels are "probable," and rain forecasts don't count as watering for covered pots.

What we learned

  • Sensor fusion is mostly about disagreement — the interesting signal is when sensors contradict each other.
  • LLMs are great narrators and terrible arbiters; grounding them in a compact, pre-computed state beats dumping raw history.
  • Hardware constraints (3.3 V ADCs, MQ2 warm-up, per-pot calibration) shape software architecture more than expected.
  • Building the simulator first made everything else faster.

What's next for Balcony buddy

  • A pump and relay for closed-loop auto-watering behind the same evidence gate.
  • Solar charging for a fully self-contained balcony unit.
  • Richer on-device leaf-health vision from the C270 feed flowing into the fusion engine.
  • Promoting light, IR, movement, and solar from API-only channels into firmware.
  • Multi-pot support and long-term seasonal learning.

Built With

Share this project:

Updates