Twelve Nanos across an 80 m greenhouse: least wiring back to one gateway?
Greenhouse project. Twelve Arduino Nanos spread over 80 m, each with soil moisture, an SHT31 and a light sensor. I want them all to report through one ESP32 at the end of the house, which then sends to Hermetry with the gateway topics so each Nano shows up as its own child device.
What I’d like is minimum wiring: ideally one cable running along the benches, with every Nano tapping into it. No Wi-Fi in the middle of the house (it’s a metal frame with wet plants, coverage is bad), and I’d rather not put batteries in 12 nodes.
Options I’ve thought about: I2C with extenders, RS-485, CAN, 1-Wire. I’m leaning RS-485 but I’ve never done multi-drop with this many nodes. Power also has to come along the same cable somehow.
I2C with a bus extender like the P82B715 can do long runs, we used it for 20 m once.
For 80 m and 12 nodes I’d not go I2C, even with extenders the capacitance adds up. CAN would work fine, MCP2515 boards are cheap. But RS-485 with Modbus is easier to debug with a USB dongle and a laptop.
Total newbie question: why not just LoRa on each node and skip the cable?
Could, but 12 radios and their power is more cost than a cable, and I want mains-powered nodes anyway.
From the data side: whatever you choose, have the gateway stamp ts when it polls, then late uploads after a Wi-Fi drop at the gateway land at the right time.
RS-485, Modbus RTU, one 4-core cable. I’ve wired a few greenhouses like this.
Cable: a shielded twisted pair cable with two pairs, for example a 2x2x0.5 mm². One pair for A/B, the other pair for power: 12 V and 0 V. The 0 V also serves as the RS-485 common. At 80 m and 12 Nanos drawing maybe 40 mA each through a small buck converter, the voltage drop on 0.5 mm² is under a volt, fine for 12 V in.
Topology: a daisy chain along the benches, with short stubs (under 30 cm) to each node. No star. 120 Ω termination at both ends of the main run, bias resistors only once, at the ESP32 end. Each Nano gets a MAX485 (or better, an auto-direction module so you save a pin).
Protocol: each Nano is a Modbus RTU slave with its own address 1-12 (the ModbusRTUSlave library is fine), holding registers for moisture, temp x10, RH x10, lux. The ESP32 is master, polls every node every 30 s at 19200, and publishes:
v1/gw/connect {"device": "bench-03", "type": "greenhouse-node"}
v1/gw/telemetry {"bench-03": {"ts": 1767225600000, "values": {"soil": 41, "t": 23.4, "rh": 71.2, "lux": 8200}},
"bench-04": {"ts": 1767225600000, "values": {"soil": 38, "t": 23.1, "rh": 70.8, "lux": 7900}}}
One gateway message for all twelve, and megan_b40 is right about ts, only if the ESP32 has NTP. Make a device profile named greenhouse-node and every child lands in it with the same alarms.
If a node stops answering, publish v1/gw/disconnect for it so it shows offline instead of silently going stale.
Built it last week. 2x2x0.5 shielded, auto-direction 485 modules, buck converters to 5 V at each Nano. All twelve answer at 19200 with zero CRC errors over two days. I forgot the bias resistors at first and got junk on node 11 (the far end) when the bus idled, adding them fixed it. Children show up in Hermetry as bench-01 to bench-12 under the gateway.
- You must be logged in to reply to this topic.
Join the conversation
Sign in to ask and answer, like helpful posts and mark the reply that solved your problem. Every contribution earns points and levels.

