First Greenhouse Automation Build
Notes from setting up the first automated climate control system in a 30x96 high tunnel.
Context
This is the first field note from our 30x96 high tunnel automation project. The goal: replace manual vent cranking and fan switching with sensor-driven climate control using off-the-shelf components and a Raspberry Pi gateway.
What We Installed
- Temperature/humidity sensors: SHT31 breakouts on Teensy 4.1 nodes, mounted at crop canopy height and ridge vent level
- Exhaust fans: Two 48” belt-drive fans with VFD (variable frequency drive) speed control
- HAF fans: Four horizontal air flow fans for internal circulation
- Roll-up sides: Existing manual crank system — automation deferred to phase 2
- Gateway: Raspberry Pi 5 running Mosquitto, Python control service, and a basic web dashboard
What Worked
The SHT31 sensors have been rock-solid. Readings are consistent across nodes, and the I2C interface is straightforward. Mounting them in radiation shields (3D-printed Stevenson screens) was worth the effort — unshielded sensors read 3–5°F high in direct sun.
MQTT telemetry from the Teensy nodes to the Pi is fast and reliable over the local network. Message latency is consistently under 50ms.
The tiered fan staging logic works well: HAF fans run continuously above 65°F, exhaust fans kick in at 75°F and ramp to full speed by 85°F. Simple, predictable, and effective.
What Didn’t
WiFi range: The Pi’s built-in WiFi was inadequate for the full tunnel length. We added a USB WiFi adapter with an external antenna, which solved the problem but added cost and a potential failure point. Next build will use hardwired Ethernet to a central switch.
Power cycling: A brief power outage caused the Teensy nodes to reboot faster than the Pi, resulting in 30 seconds of missed heartbeats and a false failsafe trigger. Added a boot delay to the node firmware to allow the gateway to initialize first.
Relay board quality: The cheap Amazon relay board had inconsistent coil resistance across channels. One relay would occasionally fail to pull in at 3.3V logic levels. Replaced with a board that includes opto-isolation and 5V level shifting.
Lessons
- Always test WiFi signal strength at the actual installation location before committing to wireless
- Boot sequence matters in distributed systems — plan for staggered initialization
- Spend the extra $10 on quality relay boards — debugging intermittent hardware failures is expensive in time
- Radiation shields for temperature sensors are not optional in any greenhouse application
- Start with simple control logic and add complexity only after the basics are proven reliable