Every pin used on the three Arduino UNO R4 WiFi boards. This is the definitive list: other pages link here rather than repeating pin numbers.

Last checked against the code: 7 November 2026 (commit 1e3f995).

Read this first

  • The TestSys pins are permanent straps, not buttons. AR1 A3 and AR3 D11 are read once at start-up. Strapped to GND = TestSys; left open = production. A loose strap makes the board start in the wrong mode. (AR3 checks for the LCD at start-up and carries on without it if none is found.)
  • AR3's A3 is the test button, a real push-button. It has nothing to do with TestSys detection. Hold it for 3 seconds to start a test; any press during a test ends it.
  • The backup link is cross-connected: AR1 A4 (transmit) to AR3 A2 (receive), and AR3 A1 (transmit) to AR1 A5 (receive). If these wires are the wrong way round it stops the backup link working in both directions.
  • Relay outputs are active LOW: the relay energises when the pin goes LOW.

AR1 - Remote Control Module (house)

In use

PinName in codeUse
A0BATT_SENSE_PINShed battery voltage: 30 kΩ from Module 2's fused 12 V, 10 kΩ and 100 nF to GND (see Sensors)
D0 / D1Serial1RS-485 link to AR3, through a Gravity DFR0845 board (switches direction automatically, so no direction pin is needed)
A3JF_TESTSYS_PINTestSys strap to GND; open = production. (D13 is avoided: its on-board LED pulls the input down.)
A4PIN_SW_TXBackup link transmit, to AR3 A2
A5PIN_SW_RXBackup link receive, from AR3 A1

Defined but no longer connected

The pins below are defined in AR1's code, but this is a legacy of earlier design and now nothing is connected to them: the relays are driven by AR3 and the sensors read by AR2 in the shed (see Development history: the electronics for why).

PinName in codeFormer use
A2waterPressureSwitchPinWater pressure switch - read by AR2
D2 / D3relayPumpOn / relayPumpOffPump latch relay - driven by AR3
D4-D7relayPeripheral1-4Valve relays P1-P4 - driven by AR3. AR1 still runs its manual-mode logic on these pins
D8heartbeatPinHeartbeat wire to AR3 - the heartbeat is a field in the RS-485 messages
D9 / D10tempSensor1Pin / tempSensor2PinLabels only; temperatures arrive from AR3
D11directPumpPinDirect pump start
D12-Direction pin for the earlier MAX485 boards

AR2 - sensors (Module 4)

AR2 has no relays and no RS-485. It runs its own WiFi access point and broadcasts the sensor readings to AR3 by UDP (port 5000).

PinName in codeSensorNotes
A0TANK_SENSOR_PINTank levelQDY30A 4-20 mA sensor across a 235 Ω shunt. Depth (m) = 1.513 × (V − 1.030). Below 0.9 V or above 4.6 V the gauge is flagged as failed
A2BATTERY_PINShed battery voltageResistor divider; reads full scale (13.24 V) until the divider is corrected, so not used. The battery is read by AR1
A3FUEL_SENDER_PINDiesel levelWema 25 sender (30 Ω full, 240 Ω empty) with a 100 Ω divider
D2FLOW_OUT_PINDN50 flow meter, pump line to the sprinklers16.2 pulses per litre (calibrated against the house water meter); blue wire
D3FLOW_IN_PINDN15 flow meter, mains into the tank450 pulses per litre; white wire
D7TEMP_ONEWIRE_PINThree DS18B20 temperature sensorsOne shared 1-Wire bus; grey wire. (Moved from D6, whose socket is damaged on the present board)
D10OIL_PRESS_PIN_DIGITALOil pressureFrom the optocoupler board: LOW = oil pressure present (engine running)
D12EMBER_PINEmber detectorDigital, active LOW; yellow wire
D13WATER_PRESS_PIN_DIGITALPump water pressureFrom the optocoupler board: about 0 V with no pressure, about 4.8 V with pressure. Read as a digital input and reported as 0 or 5 V (on above 2.5 V). (Moved from A1, whose socket is unreliable on the present board)

Temperature sensor addresses

The three DS18B20 sensors are identified by their built-in addresses, so their order on the bus doesn't matter.

AddressRole
28 2E 53 57 00 00 00 3EOutside (EXT_TEMP; HA "Outside Temperature")
28 11 F1 35 00 00 00 D0Inside the pump shed (INT_TEMP; HA "Temperature inside Pump Shed")
28 5B 83 57 00 00 00 13Outside 2 (EXT2_TEMP; HA "Outside Temp 2")

The shed probe was identified on site by warming each probe in turn by hand; its readings also swing least, as an inside probe should.

AR3 - control (Module 4)

PinName in codeUseNotes
D0 / D1Serial1RS-485 link to AR1Gravity DFR0845 board
A1PIN_SW_TXBackup link transmit, to AR1 A5
A2PIN_SW_RXBackup link receive, from AR1 A4Switched on only after 10 s of RS-485 silence, because its interrupt disturbs AR3's WiFi link to AR2
A3PIN_TEST_BTNTest buttonHold 3 s to start; any press ends; a test ends itself after 30 minutes
D2PIN_COIL_ONPump latch relay input300 ms pulse. With the code setting FS_POLARITY_INVERT = 1 (current), D3 is the "pump on" input and D2 the "pump off" input. On TestSys these drive LEDs
D3PIN_COIL_OFFPump latch relay inputSee D2
D4PIN_P1Recirculation valve, relay R7Off = water to the sprinklers; energised = recirculate to the tank
D5PIN_P2Shed cooling valve, relay R6Energised = cooling on
D6PIN_P3Flow valve, relay R5Off = reduced flow; energised = high flow
D7PIN_P4Gel valve, relay R4Energised = gel injected
D8PIN_CRANKStarter relay R1 (separate 3-core cable, core A)Used only in BYPASS mode
D9PIN_MODE_BYPASSBOX / BYPASS mode input (3-core cable, core B)Open = BOX (SFS01 starts the pump; fails safe); linked to earth = BYPASS (AR3 starts it)
D10PIN_LATCH_FBPump latch read-backPlanned; ignored while LATCH_FB_FITTED = 0
D11JF_TESTSYS_PINTestSys strap to GNDOpen = production
SDA / SCL-LCD, 16 × 2, I²C address 0x27Production only; three pages, 2.5 s each
A0-Not usedFormerly the TestSys pin

See also: Modules and relays for the relays, Multicore cables for the multicore cores.

<< Modules and relays | | Multicore cables >>      |Table of Contents>


Page last modified on November 22, 2026, at 01:57 AM