Greenhouse watering system - a solar powered automatic greenhouse watering system

Water is collected from the greenhouse gutters in water butts on the north (butt #1) and south (butt#2) sides. Butt #2 contains a small water pump, used to transfer water to butt #1. Water from butt #1 is piped into the greenhouse to a flow control valve, water pump, expansion accumulator pressure tank, flow sensor and two valves: one for north side plant watering, and one for the south side. Gardena pipes, connectors, valves and drip system on each side of the greenhouse are configured as necessary for plant irrigation, with a large number of sensors reporting conditions. A solar panel (10W?) is used to charge a 12 volt 12 Ah sealed gel accumulator inside the greenhouse. The complete system is self-contained, and communicates via WiFi & MQTT with the house IoT controller, hosted by a Raspberry Pi.

Original design based on a battery box (renamed Power Controller) containing a modified SPC3a solar panel charger, powering a central hub. Communication from hub via several software I2C buses to a couple of water butts (each with a depth sensor), valves (with flow & soil moisture sensors) controlling water flow to left and right sides of the greenhouse, and relay control of the main water pump. Generally this architecture has been preserved to date (2020), but with increase funtionality in the Power Controller, the addition of a Raspberrry Pi camera, incorporation of the relay controller into the hub (switching the main pump & valve, and water butt transfer pump), and the addition of an LCD display inside the hub controller.
The Power Controller uses an ESP32 to communicate via WiFi with the home network, and wake up periodically to perform sensor monitoring, watering & other housekeeping tasks. An Arduino Pro-Mini is always on, interfaced to an IR sensor for in-greenhouse direct control, and turning off the buck converter if battery voltage drops too low (eg in winter). The Power Controller has an internal I2C bus monitoring battery box air temperature, pressure & humidity via a BME280; monitoring battery, solar and load current via a modified INA3221, interfacing to the Pro-Mini to set thresholds & read battery voltage, and logging data in a 24LC1025 EEPROM. The ESP32 controls the SPC3a, turning on & off 12 volt power to the hub (via a level shifter); & communicates with the hub via a software I2C interface.
The Hub Controller uses a Arduino Nano to provide software I2C interfaces to the water butt sensors, the valve/flow/soil moisture controllers, the Sleepy Pi/Raspberry Pi camera, an 1602 LCD display, & a BME280 (monitoring greenhouse air pressure, temperature and humidity). When powered up by the Power Controller its hardware I2C interface allows the Power Controller to communicate with each hub peripheral, and also to switch on/off the main water pump (Shurflo 12v, 7 litres/min, 20 psi) & control valve (Sahuo Dream 331), and the pump in butt #2 (to transfer water from butt #2 to butt #1).

Both water butt controllers are based on Arduino Nano's communicating via I2C. Both sense water depth (& temperature) using a sealed MS5540, mounted using polypipe connectors and placed near the bottom of each butt. Butt #1 also has a BME280: water depth can be computed from the difference between air and water pressure (ingress of moisture rendered Butt#1's BME280 air pressure measurements unreliable, so air pressure from the hub controller's BME280 inside the greenhouse is now used). Butt #2 also interfaces to a relay switching a small 12v 18W pump, used to transfer water to butt #1 on demand.

Both valve/flow/soil moisture controllers use an Arduino Nano to check up to 4 soil moisture sensors connected to analogue ports, to open/close a Gardena 13mm water valve using a small high torque 5 rpm motor and pair of switch state digital inputs. Revised plan is to count pulses from a single hall-effect flow sensor inserted in the water feed before either valve, connected to the south side controller.
A Sleepy Pi blanket is used to switch a Raspberry Pi on/off in response to commands from the Power Controller (via the Hub Controller). The Raspberry Pi is autonomous, and configured to take 5 photos of the greenhouse at different angles (controlled by a small servo). Photos are uploaded via WiFi.