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
| Pin | Name in code | Use |
|---|---|---|
| A0 | BATT_SENSE_PIN | Shed battery voltage: 30 kΩ from Module 2's fused 12 V, 10 kΩ and 100 nF to GND (see Sensors) |
| D0 / D1 | Serial1 | RS-485 link to AR3, through a Gravity DFR0845 board (switches direction automatically, so no direction pin is needed) |
| A3 | JF_TESTSYS_PIN | TestSys strap to GND; open = production. (D13 is avoided: its on-board LED pulls the input down.) |
| A4 | PIN_SW_TX | Backup link transmit, to AR3 A2 |
| A5 | PIN_SW_RX | Backup 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).
| Pin | Name in code | Former use |
|---|---|---|
| A2 | waterPressureSwitchPin | Water pressure switch - read by AR2 |
| D2 / D3 | relayPumpOn / relayPumpOff | Pump latch relay - driven by AR3 |
| D4-D7 | relayPeripheral1-4 | Valve relays P1-P4 - driven by AR3. AR1 still runs its manual-mode logic on these pins |
| D8 | heartbeatPin | Heartbeat wire to AR3 - the heartbeat is a field in the RS-485 messages |
| D9 / D10 | tempSensor1Pin / tempSensor2Pin | Labels only; temperatures arrive from AR3 |
| D11 | directPumpPin | Direct 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).
| Pin | Name in code | Sensor | Notes |
|---|---|---|---|
| A0 | TANK_SENSOR_PIN | Tank level | QDY30A 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 |
| A2 | BATTERY_PIN | Shed battery voltage | Resistor divider; reads full scale (13.24 V) until the divider is corrected, so not used. The battery is read by AR1 |
| A3 | FUEL_SENDER_PIN | Diesel level | Wema 25 sender (30 Ω full, 240 Ω empty) with a 100 Ω divider |
| D2 | FLOW_OUT_PIN | DN50 flow meter, pump line to the sprinklers | 16.2 pulses per litre (calibrated against the house water meter); blue wire |
| D3 | FLOW_IN_PIN | DN15 flow meter, mains into the tank | 450 pulses per litre; white wire |
| D7 | TEMP_ONEWIRE_PIN | Three DS18B20 temperature sensors | One shared 1-Wire bus; grey wire. (Moved from D6, whose socket is damaged on the present board) |
| D10 | OIL_PRESS_PIN_DIGITAL | Oil pressure | From the optocoupler board: LOW = oil pressure present (engine running) |
| D12 | EMBER_PIN | Ember detector | Digital, active LOW; yellow wire |
| D13 | WATER_PRESS_PIN_DIGITAL | Pump water pressure | From 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.
| Address | Role |
|---|---|
| 28 2E 53 57 00 00 00 3E | Outside (EXT_TEMP; HA "Outside Temperature") |
| 28 11 F1 35 00 00 00 D0 | Inside the pump shed (INT_TEMP; HA "Temperature inside Pump Shed") |
| 28 5B 83 57 00 00 00 13 | Outside 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)
| Pin | Name in code | Use | Notes |
|---|---|---|---|
| D0 / D1 | Serial1 | RS-485 link to AR1 | Gravity DFR0845 board |
| A1 | PIN_SW_TX | Backup link transmit, to AR1 A5 | |
| A2 | PIN_SW_RX | Backup link receive, from AR1 A4 | Switched on only after 10 s of RS-485 silence, because its interrupt disturbs AR3's WiFi link to AR2 |
| A3 | PIN_TEST_BTN | Test button | Hold 3 s to start; any press ends; a test ends itself after 30 minutes |
| D2 | PIN_COIL_ON | Pump latch relay input | 300 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 |
| D3 | PIN_COIL_OFF | Pump latch relay input | See D2 |
| D4 | PIN_P1 | Recirculation valve, relay R7 | Off = water to the sprinklers; energised = recirculate to the tank |
| D5 | PIN_P2 | Shed cooling valve, relay R6 | Energised = cooling on |
| D6 | PIN_P3 | Flow valve, relay R5 | Off = reduced flow; energised = high flow |
| D7 | PIN_P4 | Gel valve, relay R4 | Energised = gel injected |
| D8 | PIN_CRANK | Starter relay R1 (separate 3-core cable, core A) | Used only in BYPASS mode |
| D9 | PIN_MODE_BYPASS | BOX / BYPASS mode input (3-core cable, core B) | Open = BOX (SFS01 starts the pump; fails safe); linked to earth = BYPASS (AR3 starts it) |
| D10 | PIN_LATCH_FB | Pump latch read-back | Planned; ignored while LATCH_FB_FITTED = 0 |
| D11 | JF_TESTSYS_PIN | TestSys strap to GND | Open = production |
| SDA / SCL | - | LCD, 16 × 2, I²C address 0x27 | Production only; three pages, 2.5 s each |
| A0 | - | Not used | Formerly 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>
