The adoption of IoT technologies in irrigation management is transforming both agricultural landscapes and residential lawn care. Systems equipped with EQSP32 IoT controllers exemplify this technological advancement, offering robust, flexible, and efficient irrigation solutions. These systems are effective in settings ranging from vast farming operations to private lawns.
System Configuration and Operation
In a typical installation, one or multiple EQSP32 controllers may be employed to manage distinct zones of a farm or a large lawn area. The system depicted in the next figure represents an actual setup. Incorporating a Master EQSP32 Controller for the main zone and a Slave Remote Controller for a distant zone it is effectively bridging a distance of 150 meters or more.
Irrigation System Configuration
The necessity for multiple controllers arises in systems where water travels through extensive and lengthy piping networks to reach various substations. Each substation is equipped with multiple valves that direct water to different irrigation points across expansive areas. This configuration facilitates localized control at each substation, thereby eliminating the need for lengthy wiring back to a central controller. In this specific installation, the Master controller additionally manages the pumps needed to fill a large water reservoir from an underground well and to pressurize the water distributed to the irrigation heads.
These controllers are connected to the internet via Wi-Fi, allowing for real-time data transmission and remote system management. Each controller can independently manage watering times and durations for each connected electric valve, making the system highly adaptable to specific watering needs.
Smart Water Management
One of the key features of the EQSP32-controlled irrigation system is its ability to adjust watering schedules automatically in response to weather conditions, captured by an onsite personal weather station. This integration ensures that irrigation is increased during dry spells and reduced when rain is sufficient, thus maintaining optimal soil moisture levels and reducing water and energy use without manual intervention.
Furthermore, the system’s flow meter plays a critical role in operational oversight by monitoring water usage. Any deviation from the norm, such as higher than usual water consumption, can indicate a leak in the system, while lower consumption might suggest a malfunctioning valve. These alerts enable quick diagnostics and prompt repairs, ensuring efficient and effective water management.
Remote Monitoring and Management
A significant advantage of this IoT-enabled irrigation system is its accessibility for remote management through a smartphone app. This capability allows gardeners and farmers to monitor the system’s performance from anywhere and make adjustments to watering schedules as needed, without being physically present at the site. It simplifies the management process, especially for large-scale operations or homeowners who wish to maintain their lawns effortlessly.
This digital management tool not only saves time but also enhances the precision of water delivery to plants. By enabling meticulous control over irrigation practices, tailored to the exact needs of crops or lawns, farmers and homeowners can achieve better growth outcomes and more efficient use of resources.
Electrical Connection Details
Wiring the EQSP32 for this irrigation system is straightforward and detailed in the schematics below. Elegantly mounted on the DIN rail, the EQSP32 directly connects to all relays, valves, and switches. The controller is powered by a DIN-rail mounted 110/220V to 24VDC power supply, and it generates the necessary 5V DC power for the flow meter.
Electrical Wiring of Master Controller
Electrical Wiring of Slave Controller
Electrical panel of slave device for smart irrigation system
Direct Control of Irrigation Valves
In the illustrated system, each of the EQSP32’s outputs can drive 1A of current, which is more than sufficient for operating standard irrigation valves. The EQSP32 natively employs Pulse Width Modulation (PWM) to control the voltage applied to the valve coils.
This method involves a two-step power application process: initially, the controller delivers a surge of power to activate the valve, which requires substantial energy for a brief duration to overcome the inertia of the valve mechanism. After activation, the power supply is significantly reduced. This lower level of power is sufficient to maintain the valve in its active state without the continuous application of high energy, allowing smaller and less expensive power supplies to be used or more valves to be activated simultaneously.
Connecting and Powering Irrigation Valves
High Power Relay Integration for Pump Management
The system incorporates a high-capacity relay capable of switching three phases at 40A each, handling a maximum of 26kW. A smaller relay controls the common 24V for the valves, and another relay signals the well pump’s controller when the reservoir needs filling. All the relay coils are rated at 24V and are activated using the same high-efficiency, two-step PWM voltage steps described earlier for the valves.
Using Live Local Weather Data to Optimize Watering
The EQSP32 is an open architecture computer with a fully accessible Internet stack, allowing it to be easily programmed to make API calls to personal weather stations’ cloud servers. This capability to directly interact with weather data in real-time is unparalleled among micro PLCs in its size and price range, making the EQSP32 a standout choice for advanced irrigation management.
Accessing Personal Weather System Data
In this application, the EQSP32 is programmed to monitor rainfall over the past 24 hours. If more than a predetermined amount of rain has fallen, the system will suspend watering to conserve water and prevent potential overwatering damage to plants. More complex watering strategies can be devised by incorporating additional weather parameters such as wind speed, air temperature, and humidity. For instance, on particularly windy days, the system might reduce watering to minimize water loss due to evaporation. Similarly, on hot, dry days, the system might increase watering to ensure plants receive adequate hydration.
Flow Meter Direct Interfacing
The flow meter uses a small propeller with magnets embedded at the tips of its blades, placed within the water flow path. As water flows and the propeller rotates, a Hall effect sensor detects the magnetic fields and generates pulses with each rotation. The frequency of these pulses correlates directly with the rate of flow; faster water flow results in a higher pulse frequency, ranging from a few Hz in low-flow scenarios to several hundred Hz during high-flow conditions.
A Hall-effect water flow sensor for water usage tracking and leak detection.
The EQSP32 microcontroller, being an open and versatile platform, is uniquely suited for interfacing with such a flow meter. Fast repeating pulses can be measured very accurately with special code that takes advantage of its 240MHz processor.
Software Architecture and Cloud-Based Coordination
Beyond the physical hardware setup, the core of this irrigation system lies in its intelligent software architecture, which relies on real-time cloud synchronization between a master EQSP32 controller and one or more remote slave controllers. The brain of the system resides in the master unit, which not only oversees its own set of local irrigation valves and water pumps, but also determines when the remote units must activate their respective zones.
At the center of this communication strategy is the Arduino IoT Cloud, a cloud-based infrastructure developed by Arduino that allows remote devices to share variables, trigger events, and synchronize states. In the context of this irrigation project, the Arduino Cloud functions as a distributed database and messaging layer. Through it, the master controller communicates its decisions to the slave units by updating shared variables, which the slaves continuously monitor. The result is a smooth, centralized command structure with distributed actuation – each slave controller makes no local scheduling decisions of its own but responds immediately to commands it receives from the cloud.
Master-slave arrangement and data sharing
From the software perspective, the master controller is the decision-maker. It determines irrigation timing based on a combination of hardcoded schedules, environmental factors such as weather data, and sensor feedback including water flow and tank levels. The master controller executes code that manages several parallel concerns. First, it calculates when each irrigation valve should open based on user-defined schedules. Then, it enables the necessary relays to operate pumps and deliver water to the appropriate zones. Additionally, it publishes Boolean status variables, each corresponding to a specific valve or zone, to the Arduino Cloud.
For example, if zone 10 in a remote area is scheduled for watering, the master controller sets the corresponding variable to true using the Arduino Cloud interface. This variable is defined as a shared cloud variable, which is also recognized by the relevant slave controller responsible for operating the valve in zone 10. Once the slave device sees this variable updated to true, it triggers the opening of its assigned valve by energizing a relay. After the watering duration has elapsed, the master sets the variable back to false, signaling the slave to close the valve.
On the master side, additional logic governs when to activate the irrigation or well pumps. Flow data is collected using the Hall-effect flow meter and converted to usable water consumption figures, which are then transmitted to the cloud as telemetry.
Remote Control via Customized Dashboards
One of the most user-friendly features of the EQSP32-based irrigation system is its seamless integration with the Arduino IoT Cloud’s dashboard functionality. These dashboards are fully customizable and can be accessed from smartphones, tablets, and desktop browsers, providing real-time insight and control over every aspect of the irrigation system, without requiring any specialized software installation.
The Arduino Cloud platform allows users to build intuitive dashboards using visual widgets such as toggles, sliders, numerical displays, and even graphical maps. Each widget is linked to a cloud variable, defined in the firmware of the master or slave controller, and any interaction with the widget directly affects the controller’s behavior in real time. This creates a fluid experience in which users can adjust watering schedules, monitor system status, or trigger manual override actions, whether they are on-site or miles away.
Real-time mobile dashboard for smart irrigation management.
The first smartphone screenshot shows the dashboard developed for this application. At the top, users can set the start time of irrigation. Then, the dropdown menu allows the user to select the specific zone. A duration field follows, indicating the number of minutes the irrigation valve for the selected zone will remain open. Users also have the option to override automated schedules using a manual switch, which is particularly useful for testing or unscheduled watering needs.
Real-time metrics such as water flow rate and daily water usage are prominently displayed. These are calculated using the pulse signals from the flow sensor and help the user assess efficiency and detect leaks. Additionally, status indicators show whether the tank level is low, whether the well pump is operating, and whether the well flow sensor is active—all of which are essential for diagnosing system health.
At the bottom of the screen, telemetry such as Wi-Fi signal strength for both the master and slave controllers and their respective uptimes are also displayed. This is critical for maintenance and troubleshooting, particularly in rural or challenging connectivity conditions.
Interactive visual layout of the irrigation zones with live valve status display.
The second screenshot shows a map of the property and the location of each irrigation zones. Over each active irrigation area, an “ON/OFF” label reflects the actual state of the valve associated with each zone.
This geographic visualization is particularly powerful for large or complex installations. Instead of interpreting a list of numbered stations, users can see exactly which part of the lawn or garden they are controlling, reducing the likelihood of user error and making the system far more approachable for less technical users.
AI-Assisted Coding
Erqos has trained an AI assistant that can generate code, provide guidance on hardware configurations, and offer solutions for integrating IoT functionality. The system has been trained with EQSP32 user guides, manuals, library documentation, and practical code examples that demonstrate how to utilize the library for different scenarios.
The irrigation program source code was almost entirely written by the EQ-AI code generator through careful prompting and supervision. So fortunately, it is not necessary to be an expert in C to create applications like the one described here.
Conclusion
The use of EQSP32 IoT controllers in irrigation systems represents a leap forward in agricultural technology and home lawn care. By automating and optimizing irrigation based on real-time environmental data and enabling remote management, these systems offer a high level of control and efficiency.
Whether it’s maintaining the health of large farming operations or ensuring the aesthetic appeal of residential lawns, EQSP32-based irrigation systems provide a sophisticated, user-friendly solution that promotes sustainability and ease of use.
As IoT technologies continue to evolve, their potential to further enhance agricultural and residential irrigation practices promises even greater advances in efficient water management and plant care.
Application noteJune 2024Agricultural automation · Irrigation control
Multi-Zone Agricultural Irrigation Control with Distributed EQSP32 Controllers
A complete design reference for a master-slave irrigation system spanning large agricultural sites: distributed valve control, MQTT telemetry, PWM-derated outputs, flow-based leak detection, and weather-adjusted scheduling.
System Overview
This application covers the control of a multi-zone agricultural irrigation installation on a large site, where water travels through extensive piping networks from a central well pump and reservoir to multiple remote substations, each managing several electric valves. The control challenge is typical of large-site irrigation: too many I/O points, spread over too large an area, to wire back to a single central panel.
The solution is a distributed architecture. A master unit manages the local zone, the well pump, the reservoir fill pump, and the pressurization pump. One or more slave units, each located at a remote substation, manage their own valve sets independently without any control wiring back to the master panel. All controllers communicate over MQTT.
This application note describes a two-controller installation (one master, one slave) as a concrete reference. The architecture is inherently scalable: adding a substation means deploying another EQSP32 slave, subscribing it to the relevant MQTT topics, and assigning it a set of zones in the master scheduling logic. A dozen slaves on the same site presents no architectural change.
System overview. The master controller manages the well pump, reservoir fill pump, pressurization pump, and local irrigation zones. Reservoir level is measured continuously by a bottom-mounted pressure sensor; a float switch at the top of the tank provides an independent overflow safety cutoff. The slave controller at the remote substation manages its own valve set independently. Both units connect to the MQTT broker over Wi-Fi.
I/O Inventory
All I/O was mapped before any logic was written. The master and slave units have distinct I/O assignments:
Signal
Unit
Type
Notes
Irrigation zone valves (local)
Master
Relay out
PWM-derated, 24 V coil
Well pump enable
Master
Relay out
Signals VFD or contactor
Reservoir fill pump
Master
Relay out
3-phase, 40 A relay, up to 26 kW
Pressurization pump
Master
Relay out
24 V common relay
Flow meter (well)
Master
Digital in
Hall-effect pulse, frequency-to-flow
Reservoir level (continuous)
Master
Analog in
4–20 mA pressure sensor, bottom-mounted
Reservoir full switch
Master
Digital in
Float switch, independent overflow safety cutoff
Weather station data
Master
Virtual (API)
HTTPS call to weather station cloud
Irrigation zone valves (remote)
Slave
Relay out
PWM-derated, 24 V coil
Zone commands from master
Slave
Virtual (MQTT)
Boolean per zone, subscribed topic
Distributed Architecture and MQTT Communication
The master controller is the scheduling authority. It evaluates watering schedules, weather data, tank levels, and flow readings, then decides which zones across both units should be active at any given time. For its own local valves, it actuates the relays directly. For the remote slave unit, it publishes one Boolean MQTT topic per remote zone. The slave subscribes to these topics and actuates its valves accordingly. The slave makes no scheduling decisions of its own.
MQTT communication architecture. The master publishes one topic per remote zone. The slave subscribes and actuates. Telemetry (state, uptime, Wi-Fi signal) flows back to the broker from both units.
MQTT was chosen as the communication layer because it is a mature, well-supported protocol designed for exactly this class of application: low data rate, many topics, reliable delivery over unreliable networks. The data volume in this installation is very low — a few dozen small messages per minute — which keeps broker costs negligible even on metered cloud tiers.
Broker options: the system works with any standards-compliant MQTT broker. For installations with internet connectivity, managed cloud brokers (HiveMQ Cloud, EMQX Cloud, AWS IoT Core) provide reliable uptime and TLS security with no infrastructure to maintain. For sites where connectivity is intermittent or data must remain on-premises, a local broker (Mosquitto on a small Linux server or NUC) is equally viable. The EQSP32 connects to either with the same firmware configuration.
Connectivity at Each Substation
Each EQSP32 unit requires an independent internet or network connection to reach the MQTT broker. This is the main site infrastructure consideration for distributed installations and should be planned before panel layout.
For most agricultural sites, Wi-Fi coverage is the first option to evaluate. Industrial-grade outdoor Wi-Fi access points can cover 200 m or more in open terrain. The EQSP32 supports an external antenna via a standard connector, which significantly extends effective range compared to internal antenna designs and allows the antenna to be mounted on the outside of a metal enclosure or on an elevated point for better line-of-sight.
For substations beyond practical Wi-Fi reach, two options are available:
Cellular data expansion module: an EQXpansion module that provides 4G/LTE connectivity, allowing the EQSP32 to connect to the MQTT broker over a mobile data SIM. Suitable for remote locations with cellular coverage. Requires software adaptation to configure the cellular interface.
EQSP32 with internal LoRa transceiver: for sites where cellular coverage is also limited, the LoRa-equipped EQSP32 variant enables long-range, low-power radio communication directly between units. Effective range in open terrain can reach several kilometres. This option also requires software adaptation to implement the LoRa messaging layer in place of the standard Wi-Fi/MQTT stack.
Connectivity recommendation: start with Wi-Fi and external antennas — this covers the majority of agricultural sites with no additional hardware or firmware changes. Plan cellular or LoRa only for substations where a Wi-Fi survey confirms insufficient coverage.
Wiring: Master and Slave Panels
Both controllers are mounted on DIN rail inside their respective panels. The EQSP32 is powered from a DIN-rail 110/240 V to 24 V DC supply in each panel. The 24 V rail powers the controller and all valve coils directly. A 5 V output from the EQSP32 powers the flow meter sensor.
Master panel wiring. The EQSP32 drives valve relays, the pressurization pump relay, and the well pump relay directly. The 3-phase irrigation pump relay feeds through a motor protection block before reaching the motor terminals. Reservoir level is read as a 4–20 mA signal from a bottom-mounted pressure sensor. The flow meter connects as a pulse output to a digital input, powered from the EQSP32 5 V rail.Slave panel wiring at the remote substation. Zone valve outputs connect directly to the EQSP32. No control wiring runs back to the master panel.Installed slave panel at the remote substation. The EQSP32 on DIN rail, power supply, and valve terminals fit in a compact weatherproof enclosure.
Valve Control: PWM Derating
Standard 24 V solenoid irrigation valves require significant pull-in current to overcome the mechanical inertia of the plunger, but a much lower current to hold the valve open. Driving all valves at full coil voltage continuously puts unnecessary thermal load on the power supply and the valve coils themselves.
The EQSP32 handles this automatically on every output configured in relay mode:
Pull-in phase: full drive voltage applied for a configurable duration (typically 150 ms), ensuring reliable opening under all supply voltage and temperature conditions.
Hold phase: duty cycle reduced to approximately 35%, maintaining the valve open with a fraction of the pull-in power.
The result is that a modest 24 V supply can drive more simultaneous valves than a continuous-drive design would allow, and valve coil temperatures stay lower over long watering cycles. Built-in flyback diodes on each output suppress inductive transients at the terminals.
All irrigation valves in this installation are normally-closed solenoids. On loss of power or control signal, every valve returns to its closed position without any software intervention. Water flow stops safely across the entire system on any supply failure.
PWM output profile for valve control. Full duty cycle during pull-in, reduced hold duty cycle thereafter. The EQSP32 applies this automatically on all outputs in relay mode.
High-Power Pump Relay
The reservoir fill pump in this installation is a three-phase motor drawing up to 26 kW. A dedicated high-capacity relay rated at 40 A per phase is used to switch it. Between the relay and the motor terminals, a motor protection block provides thermal overload and phase-loss protection, ensuring the motor is not damaged by sustained overcurrent or a missing phase. The relay coil is 24 V and is driven by an EQSP32 output using the same PWM derating profile as the valve outputs.
A separate smaller relay switches the 24 V common for the valve bus, and a third relay signals the well pump controller when the reservoir needs filling. All relay coils in the system are 24 V, simplifying the control wiring: the EQSP32 24 V rail drives everything without additional signal converters or intermediate relays.
Flow Monitoring and Leak Detection
Both the master and slave panels include a Hall-effect flow meter in the water supply line. The meter uses a propeller with magnets embedded in the blades. As the propeller rotates with water flow, a Hall-effect sensor generates one pulse per revolution. The EQSP32 measures the pulse frequency and converts it to a flow rate using the meter's calibration constant.
Reservoir level is measured continuously by a bottom-mounted pressure sensor with a 4–20 mA output. The hydrostatic pressure at the sensor is proportional to the water column height, giving a smooth, accurate level reading across the full tank range. This allows the fill pump to be staged on adjustable level thresholds rather than a fixed high/low setpoint. The EQSP32 analog input reads the 4–20 mA signal directly, powered from the panel 24 V rail through a current loop. A float switch mounted at the maximum safe fill level provides an independent hardware safety cutoff: if the pressure sensor reading is ignored or the fill logic fails, the float switch stops the fill pump regardless of control software state.
Hall-effect flow meter in the supply line. Pulse frequency ranges from a few Hz at low flow to several hundred Hz at full flow. The EQSP32 captures this accurately using a dedicated hardware pulse counter peripheral, with no risk of missed pulses regardless of what the rest of the firmware is doing.
The flow data serves two functions:
Water accounting: daily consumption is accumulated and published to the MQTT broker for logging and reporting.
Fault detection: if measured flow is significantly higher than expected for the active valve configuration, a pipe leak is indicated. If flow is lower than expected, a valve may have failed to open. Both conditions generate an alert published over MQTT.
Weather-Adjusted Scheduling
The master EQSP32 makes periodic HTTPS API calls to an on-site weather station connected to a cloud service. The controller reads the rainfall total for the preceding 24 hours and compares it against a configurable threshold. If sufficient rain has fallen, the scheduled irrigation cycle is suspended. More complex strategies can incorporate additional weather parameters: wind speed (to reduce drift losses), air temperature, and evapotranspiration estimates for crop-specific water demand modelling.
The EQSP32 polls the weather station API directly. Rainfall, temperature, wind speed, and humidity are available as inputs to the scheduling logic. No intermediate gateway or cloud service is required between the controller and the weather data.
The ability to make direct HTTPS API calls from the controller — without an intermediate gateway — is uncommon at this price and form factor. Most micro-PLCs in this class require a separate edge computer or cloud function to fetch external data and relay it to the controller.
Software Architecture
The master firmware handles several concurrent concerns within a fixed-period main loop:
Schedule evaluation against real-time clock
Weather API polling at a slow fixed interval
Flow meter pulse counting and rate calculation
Tank level monitoring and pump sequencing logic
MQTT publishing of zone commands to the slave
MQTT publishing of telemetry (flow rate, daily usage, system state, Wi-Fi signal)
The slave firmware is deliberately simple: subscribe to zone command topics, actuate the corresponding relay outputs, measure local flow, and publish telemetry back. All intelligence is in the master.
Software architecture. The master owns scheduling, weather, and pump logic. MQTT topics carry zone commands downstream and telemetry upstream. The slave firmware is a thin actuator layer.Master firmware execution flow. Weather polling, schedule evaluation, flow measurement, pump sequencing, and MQTT publish all run within the same periodic loop with appropriate time-division.
Field Operations Interface
The control system exposes two operator interfaces built on top of the same MQTT data stream: a full SCADA-style desktop dashboard for the control room, and a smartphone app for field staff working on-site.
Desktop dashboard (PC browser). A supervisory view covering all zones across three controllers, live flow data, reservoir level, pump state, schedule status, weather adjustment summary, and per-controller Wi-Fi signal strength. Intended for the agronomist or site manager at a desk.
Field staff need to monitor system state, trigger manual overrides, and diagnose faults without returning to a PC. A smartphone-optimised view of the same MQTT data stream provides exactly this, accessible from any phone on the site network or remotely through the broker.
Smartphone field app (portrait mode). Zone status, active flow, tank level, pump toggles, schedule, and alerts are accessible through a bottom-navigation layout sized for one-handed use. Badge count on the Alerts tab flags issues that need attention without opening the view.
EQ-AI: Coding Productivity for Control Engineers
The irrigation firmware was developed with EQ-AI, the Erqos AI coding assistant trained specifically on the EQSP32 library, hardware documentation, and a library of application examples. For an experienced control programmer, EQ-AI functions as a high-productivity tool: it generates correct library calls, suggests idiomatic patterns for scheduling and state machine logic, and resolves IoT connectivity questions (MQTT topic structure, TLS configuration, broker authentication, JSON payload formatting) without requiring the developer to search documentation.
The assistant is particularly useful at the IoT integration layer, where the number of configuration options and protocol details can slow development even for engineers with deep PLC experience. EQ-AI reduces that overhead significantly, allowing the developer to focus on the control logic rather than the connectivity plumbing.
EQ-AI is a productivity tool, not a replacement for engineering judgment. Control logic, fail-safe design, and system architecture decisions remain the responsibility of the programmer. EQ-AI accelerates the implementation of decisions already made.
Why EQSP32 for This Application
Direct HTTPS API calls
The controller fetches weather data directly from external APIs without an intermediate gateway, edge server, or cloud function.
Native MQTT client
Built-in MQTT stack with TLS support connects to any standards-compliant broker, cloud or local, without external libraries.
PWM valve derating
Automatic pull-in and hold current management on every output reduces supply sizing and keeps valve coil temperatures low during long cycles.
Hardware pulse counter
A dedicated pulse counter peripheral captures flow meter signals from a few Hz to several hundred Hz accurately, independent of firmware execution timing and without external counter hardware.
5 V sensor supply output
The EQSP32 generates 5 V directly for the flow meter sensor, eliminating the need for a separate sensor supply in the panel.
No control wiring between panels
The master-slave architecture eliminates all inter-panel control wiring over long distances. Only power and network infrastructure are needed at the remote substation.