← Wiki

Concept

Recipe: orchard disease-prediction station

Also known as: disease prediction station recipe, Mills curve recipe

Reference design composed from the farm-tech toolkit: a battery-and-solar-powered weather station deployed in an orchard or vineyard that measures temperature, humidity, leaf-wetness, and rainfall continuously, runs the Mills (apple scab) and Magarey (grape downy mildew) infection-prediction models, and alerts the orchardist when conditions cross the action threshold for a fungicide spray window. Combines weather telemetry with simple agronomic logic to convert sensor data into a *decision*, not just a dashboard.

Problem statement

An apple orchard, vineyard, or other perennial-crop block needs to schedule fungicide sprays only when infection conditions are likely. Calendar spraying is wasteful and over-applies; weather-driven spraying targets the windows that actually matter. The Mills curve (apple scab) and similar models for grape downy mildew, fire blight, and tomato late blight all express infection risk as a function of leaf-wet hours × temperature.

The Mills curve (the canonical disease-prediction model)

Apple scab spore germination and infection requires:

  • Continuous leaf-wetness above a temperature-dependent threshold of hours
  • E.g., at 16°C: ~9 wet hours produce light infection; ~13 hours produce moderate; ~17 hours produce severe
  • At 7°C: ~14 / 20 / 30 hours

The model output is a risk class — light / moderate / severe — that maps to spray-or-don’t-spray decisions.

Architecture

[Field station — one per orchard block]
  ESP32 (Heltec WiFi LoRa 32)
  BME280 (canopy T/RH)
  capacitive leaf-wetness sensor at canopy height
  optional rain gauge (tipping-bucket)
  10 W solar panel + 18650 + small MPPT
  2-meter mounting pole

  Sleeps 14 minutes, wakes, reads, transmits LoRaWAN uplink with payload:
  { temp_c, humidity, leaf_wet, last_15min_rain_mm }

         ▼ via LoRaWAN gateway
[Farm hub]
  Raspberry Pi 5
  ChirpStack network server
  Mosquitto MQTT broker
  Home Assistant + a custom integration that:
    - tracks consecutive leaf-wet hours
    - applies the Mills curve to (wet_hours, avg_temp_during_wet)
    - emits "scab risk: moderate" / "spray window opens in 6 hours" notifications

The decision logic (Home Assistant template, conceptual)

template:
  - sensor:
    - name: "Apple scab risk"
      state: >
        {% set wh = states('sensor.consecutive_leaf_wet_hours')|float %}
        {% set t = states('sensor.avg_temp_during_wet')|float %}
        {% set thr_light = mills_threshold(t, "light") %}
        {% set thr_moderate = mills_threshold(t, "moderate") %}
        {% set thr_severe = mills_threshold(t, "severe") %}
        {% if wh >= thr_severe %}severe
        {% elif wh >= thr_moderate %}moderate
        {% elif wh >= thr_light %}light
        {% else %}none
        {% endif %}

automation:
  - alias: "Scab risk crosses to moderate"
    trigger: state(apple_scab_risk, to: "moderate")
    action:
      notify: "Apple scab moderate — consider 24-hour spray window"

What this recipe does that pure dashboards don’t

  • Translates raw sensor data into an action threshold. The orchardist does not have to interpret leaf-wet hours or temperature integrals — the system says spray now or no action needed.
  • Creates an audit log of every decision (good for season-end review and for IPM compliance).
  • Captures multi-block variation — different orchard blocks have different microclimates and may have different spray timing.

Cost

  • ESP32 Heltec board: $25
  • BME280 + leaf-wetness + rain gauge: $80
  • Solar + battery + enclosure + mounting pole: $80
  • [[lorawan|LoRaWAN]] gateway (one-time): $200
  • Pi 5 hub (one-time): $100
  • Per-station: ~$185. Hub: ~$300 once. Three stations across an orchard: ~$855 total.

See also

Auto-generated from this entry’s typed relations: frontmatter, grouped by relation type so the editorial signal isn’t flattened.

  • Combines: [[esp32]] · [[bme280-environmental-sensor]] · [[leaf-wetness-sensor]] · [[lorawan]] · [[solar-charge-controller]] · [[home-assistant]] · [[raspberry-pi]]

What links here, and how

Inbound connections from across the wiki, grouped by lens and by relationship. These appear automatically — every entity page declares what it links to, and that data populates here on the targets.

Practical

contains

1 inbound link · 7 outbound