Spike: Plant Monitoring Sensor Platform

February 4, 2026 • By Nicholas Romero

This is the engineering journal for our monitoring hardware platform spike. The question: what is the cheapest, easiest-to-wire hardware setup for monitoring soil moisture, light, temperature, and humidity — and which software platform gets us there without writing custom firmware?

The Spike Question

I needed a monitoring-only system. No automated watering, no relay control — just sensors reporting to a dashboard. Three platforms made the shortlist.

Platform Evaluation

Mycodo (Raspberry Pi)

Mycodo is designed around PID control loops for pumps, relays, and dosing systems. Overkill for monitoring-only. A Raspberry Pi starts at $15+ (vs $4.71 for an ESP32), and the Pi lacks analog inputs — you'd need an external ADC just to read a soil moisture sensor.

Prometheus + Grafana (Custom Firmware)

The ESP32 can expose a Prometheus metrics endpoint (ESP2Grafana demonstrates the pattern). Professional-grade monitoring, but you have to write Arduino/C++ firmware and run a Prometheus server. Too much setup for four sensors.

ESPHome + Home Assistant

ESPHome compiles declarative YAML into ESP32 firmware. Native components for every sensor I need, automatic WiFi/OTA/API, and it exposes a Prometheus metrics endpoint natively — Grafana integration for free later.

Result

ESPHome won decisively. Zero custom code. The entire firmware is a 168-line YAML file.

| Factor | Mycodo | Prometheus+Grafana | ESPHome | |--------|--------|-------------------|---------| | Hardware cost | $15+ (Pi) | $4.71 (ESP32) | $4.71 (ESP32) | | Custom code | Minimal | Arduino/C++ | None (YAML) | | Analog inputs | Needs external ADC | Built-in | Built-in | | Setup complexity | Medium | High | Low |

Bill of Materials: $18.49/unit

| Component | Per Unit Cost | |-----------|--------------| | ESP32-C3 dev board (6-pack) | $4.71 | | BMP280 (temp + pressure) | $1.48 | | BH1750 (digital lux) | $2.50 | | Capacitive soil moisture v1.2 (10-pack) | $1.30 | | Breadboard + jumper wires | ~$3.50 | | Micro USB cable | $5.00 | | Total | $18.49 |

Bulk purchase for 3+ units came to $84.11 total.

Build

Initial component layout on breadboard

Wiring uses 3 GPIO pins: two I2C devices (BMP280 + BH1750) share GPIO4/GPIO5, and one soil sensor uses GPIO1 for ADC. Everything runs on 3.3V — no level shifters or custom PCBs.

GPIO0 gotcha: On the ESP32-C3, GPIO0 is the boot pin and interferes with ADC readings. I burned time debugging erratic soil moisture values before switching to GPIO1.

First successful firmware flash and sensor readings

Sensor Choices

Capacitive over resistive soil moisture — Resistive sensors corrode within days. The capacitive v1.2 is well-documented with ESPHome; v2.0 has reported compatibility issues. Individual calibration per sensor+board is mandatory. Must use ADC1 pins since ADC2 conflicts with WiFi.

BMP280 over BME280 — The BME280 adds humidity but costs more. BMP280 is sufficient for outdoor use where ambient humidity is less critical than soil moisture and light. BME280 remains an option for indoor setups.

BH1750 — Digital lux output over I2C, no calibration needed. Firmware converts lux to PPFD (photosynthetically active radiation) for growers who want photosynthesis-relevant units.

Calibration

Capacitive sensors require per-unit calibration. I wrote a stripped-down ESPHome config that reads raw ADC voltages at 2-second intervals:

  • Dry air: 2.72V (0% moisture)
  • Submerged in water: 1.08V (100% moisture)

These values get hardcoded into production firmware for automatic percentage conversion.

ESPHome web dashboard showing live sensor readings

I also wrote a bash monitoring script that curls the Prometheus metrics endpoint and displays readings in a human-readable format — useful for field testing with a laptop and portable battery power.

Field Test: Outdoor Milkweed Plant

The real validation was deploying outdoors. I chose a milkweed plant that gets full Houston sun, inconsistent watering, and wide day/night temperature swings.

Board deployed on outdoor milkweed plant

| Metric | Reading | Notes | |--------|---------|-------| | Soil Moisture | 73% (1.52V raw) | Well-watered soil, calibration validated | | Temperature | 22.4°C | Cooler outdoors vs 24.5°C indoors | | Pressure | 1025.0 hPa | Normal atmospheric | | Light Level | 8,050 lux | ~270x brighter than indoor (30 lux) | | Estimated PPFD | 128.3 µmol/m²/s | Good for photosynthesis | | WiFi Signal | -69 dBm | Stable through one exterior wall |

The sensor accurately transitioned 0% (dry air) → 73% (moist soil) → 100% (water). WiFi held steady at ~15 meters from the access point. No crashes or disconnects.

Spike Conclusion

All five success criteria met:

  • BOM under $100 — $18.49 per unit, $84.11 bulk for 3+ units
  • Simplest monitoring platform identified — ESPHome with Prometheus metrics
  • Sensor-software compatibility validated — field tested with real plant
  • Wiring diagram produced — 3 pins (GPIO1, GPIO4, GPIO5)
  • Data visualization confirmed — Prometheus metrics + monitoring script

The platform is production-ready. Next: deploy to edible crops, integrate Prometheus into Grafana for long-term trending, and collect 30 days of baseline data per crop.


All firmware and configs are open source — see the GitHub repo.