System Architecture
An Arduino Nano acts as a sensor hub, reading zone-level soil health data via RS485 multi-sensors and plant-level moisture data via capacitive sensors. The Nano reports to the FarmBot Raspberry Pi over USB serial. The Pi uses the data to trigger automated watering sequences and publishes all readings live to nahsfarmbot.org.
USB Serial
REST API
Flask
Sensor Tiers
One per growing zone. Provides a full soil health picture for maintenance decisions and long-term trend monitoring.
- Moisture ยท Temperature ยท EC
- pH ยท Nitrogen ยท Phosphorus ยท Potassium
- Modbus RTU over RS485 via MAX485
- 12V DC โ powered from bed supply
- 120ฮฉ termination resistor at far end
One per plant location. Measures soil moisture only. Drives individual automated watering decisions via FarmBot REST API.
- Analog moisture reading per plant
- Mapped to FarmBot XY coordinates
- Calibrated dry/wet threshold per soil type
- Up to 6 sensors per Arduino Nano (A0โA5)
- Expand with second Nano for more plants
Bill of Materials
โ Wiring Notes
- Cat5 cable used as sensor loom โ 4 twisted pairs, 8 conductors total.
- RS485 zone sensors use one twisted pair per sensor (A/B differential) + one pair for 12V/GND.
- Capacitive sensors use 3 conductors each (VCC, GND, Signal) routed along remaining Cat5 pairs.
- Add 120ฮฉ resistor between A and B lines at the far end for runs over 1 meter.
- Zone sensors require 12V DC โ share GND with Nano but power separately from bed 12V supply.
- Use outdoor-rated Cat5 if possible โ indoor jacket degrades in sunlight and moisture.
- Nano powered via USB from FarmBot Pi.
Build Phases
Calibration Notes
- Insert sensor in completely dry soil โ record raw value as DRY baseline.
- Water thoroughly, wait for drainage โ record raw value as WET baseline.
- Set watering trigger threshold at approximately 40โ50% between dry and wet values.
- Allow 1โ5 minutes for sensor to stabilize after insertion or soil disturbance.
- Recalibrate if soil composition changes significantly.
- RS485 NPK readings are relative reference only โ use for trend monitoring, not precise nutrient calculation.
3D Printed Enclosure
The junction box housing the Nano and MAX485 modules is a good candidate for the school 3D printer. Design it to mount cleanly on the FarmBot bed frame with neat cable management.