A command acknowledgment approach provides additional assurance that critical pump commands are received and executed. Each pump command from AR1 to AR3 over RS-485 includes a sequence number from 0 to 15 in the format CMD:SEQ:n|PUMP:0/1|.... When AR3 receives this command, after executing it (or determining it should be blocked by one of the guard timers), it sends an acknowledgment frame back over RS-485 in the format ACK:SEQ:n|PUMP:0/1 containing the same sequence number and indicating the current pump state.
In the house AR1 tracks whether it has received acknowledgment for the most recent command it sent. If no acknowledgment arrives within 120 milliseconds, AR1 retransmits the identical command including the same sequence number. This fast retry continues up to four times (five total transmissions including the original) at 120-millisecond intervals. If all five transmissions fail to elicit acknowledgment, AR1 gives up and logs the failure. When AR3 receives a command with a sequence number matching the most recent command it executed, it sends the acknowledgment again but does not re-execute the command, preventing duplicate execution from retry transmissions.
This acknowledgment protocol ensures that pump commands are not silently lost due to electrical noise on the RS-485 line corrupting a frame, or due to timing collisions where AR1 and AR3 attempt to transmit simultaneously. The 120-millisecond retry interval provides rapid recovery from transmission failures while being long enough that a transmission in progress will have completed before the retry begins. The protocol does not require TCP-like connection state or sequencing complexity—it operates as simple request-acknowledgment pairs that can be implemented entirely in stateless frame handlers.
Control signals in the pump shed: In the pump shed whilst a latching setup is retained for the signal for P1 (activating the diesel pump) the peripheral outputs P1 through P4 to the relays in the relay module (Module 2), employ direct active-low relay control. Here driving the output pin low energizes the Songle relay coil and driving it high de-energizes it. These are standard electromagnetic relays rather than latching types, so the Arduino must maintain the coil energized throughout the time the relay should be active.
Hard wired pump disable switchIn addition, the pump control has a hard-wired switch which grounds the control wire ("Wire 1") to the control module (Module 5) when switched to "disable", preventing the pump from starting. A buzzer can be switched on in lieu of the pump for testing and development.
Recirculation control Recirculation is used as the main option to create an intermittent spray capability that conserves water in periods of ember attack. It is important that in failure of the recirculation valve water still flows, and so the code ensures that relays energized (pin LOW) corresponds to pass-through mode where water flows directly from pump to sprinklers, while relay de-energized (pin HIGH, LED off) corresponds to recirculation mode where the valve diverts water back to the tank. This needs to be clearly understood so that when following the intermittent cycling logic, the code may be misinterpreted as turning the relay "off" when is actually activating recirculation.
<< Output Control and Safety Interlocks | | Manual Remote Control Features >> |Table of Contents>
