Skip to the content
2 layers92.2 × 66.4 mmMatter thread relay r1, the printed circuit board in 3D

An Ardunio project for Apple Home matter/thread board to drive four relays

Size
92.2 × 66.4 mm
Copper layers
2
Thickness
1.6 mm
Parts
48
Nets
46
Pads
174
Tracks, vias
320, 81
Pours
2
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
2 Jun 2026
Updated
7 Jun 2026

Overview

Matter thread relay r1 is an open-source printed circuit board by jerryok826, from the jerryok826/ardunio_matter_thread_relay repository on GitHub, published under the MIT licence. It is a 2-layer board of 92.2 × 66.4 mm with 48 parts on 46 nets, routed with 320 tracks and 81 vias.

It is built around the 1N4448W and DMG2302U. Its parts include 19 resistors, 6 capacitors, 4 diodes, 4 switches and 3 ICs. It belongs with the home automation and IoT boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

2

README

README.md

Matter-over-Thread 4-Channel Intelligent Relay Controller

Robot_Front

Robot_Front

The board shown below is an Arduino Matter/Thread relay controller designed for use with an Apple HomeKit network. It uses an Arduino Nano Matter processor to control four onboard relays, which can be used to operate motors, lights, valves, or other electrical loads.

Each relay can be controlled locally using the onboard pushbuttons, allowing users to manually enable or disable individual outputs. Through the Apple Home app on an iPhone, each relay can also be monitored and controlled remotely from anywhere with internet access.

An integrated OLED display provides system status information, including Thread network signal strength. During initial setup, the display presents a QR code that can be scanned to quickly add the device to the Apple Home app.

The board also includes an I²C Qwiic connector for attaching external sensors and peripherals. For example, a rain sensor could be connected to automatically disable irrigation valves during rainfall, helping conserve water and prevent overwatering.

Status: The board completely supports relay control. The I²C Qwiic connector is wired wrong. There are other physical placements that need updating. So the board will be turned. Gerber files will be punished after these changes.

An industrial-grade, ultra-low-latency 4-Channel Relay Controller built using the Arduino Nano Matter (Silicon Labs MGM240S core). This project connects natively with Apple Home, Home Assistant, and other Matter ecosystems over a self-healing Thread mesh network.

Featuring an asynchronous hardware override architecture, non-blocking FreeRTOS thread watchdogs, and an integrated I2C OLED display that acts as a standalone RF Survey & Walk-Testing Tool, this project is designed for robust, long-term smart home panel automation.


✨ Key Features

  • Ecosystem Unified Build: Native Matter protocol integration that auto-populates as four independent, sequential switch endpoints in your smart home application.
  • Zero App Dependence Override: Local manual buttons run entirely on edge-triggered Asynchronous Hardware Interrupts. Relays switch locally within microseconds even if your smart home hub is offline or entirely destroyed.
  • Anti-Race Watchdog: Implements a non-blocking 50ms throttled execution pacing engine to prevent Matter application layer data collisions and loop freezing.
  • Failsafe Boot Protection: Firmware forces relay pins to an explicit LOW state prior to opening output drivers. Combined with physical pull-down networks, this eliminates clicks or accidental appliance cycles during microcontroller reboots.
  • Dual-OLED Matrix Engine: Dynamic runtime support for both SH1106 and SSD1306 I2C displays via a simple preprocessor toggle.
  • Standalone RF Survey Tool: Displays a dynamic pairing QR code on boot, then transitions automatically into a real-time system dashboard mapping your Thread Node Role and precise signal attenuation metrics (dBm) on a fast 3-second cycle.

🛠️ Hardware Requirements & Pinout

Core Microcontroller

Supported Displays

  • 0.96" I2C OLED Display (SH1106 Recommended for native border alignment, or SSD1306)

Physical Netlist Connection Map

Arduino PinHardware ComponentElectrical Specification / Circuit Design
D2Relay 1 Trigger OutputActive-HIGH Latch (Must use 10kΩ external Pull-Down to GND)
D3Relay 2 Trigger OutputActive-HIGH Latch (Must use 10kΩ external Pull-Down to GND)
D4Relay 3 Trigger OutputActive-HIGH Latch (Must use 10kΩ external Pull-Down to GND)
D5Relay 4 Trigger OutputActive-HIGH Latch (Must use 10kΩ external Pull-Down to GND)
D6Manual Button 1 InputShort-to-GND Momentary Switch (Relies on internal INPUT_PULLUP)
D7Manual Button 2 InputShort-to-GND Momentary Switch (Relies on internal INPUT_PULLUP)
D8Manual Button 3 InputShort-to-GND Momentary Switch (Relies on internal INPUT_PULLUP)
D9Manual Button 4 InputShort-to-GND Momentary Switch (Relies on internal INPUT_PULLUP)
A4 / SDAOLED Serial Data LineI2C Data (Include physical 4.7kΩ external Pull-Up to 3.3V)
A5 / SCLOLED Serial Clock LineI2C Clock (Include physical 4.7kΩ external Pull-Up to 3.3V)
BTN_BUILTINFactory Reset TriggerPhysical button on Nano Matter. Hold 10s to wipe Matter Fabric.

⚠️ CRITICAL DEVELOPER WARNING: The Arduino Nano Matter GPIO pins safely output a maximum of 4mA to 8mA. Standard mechanical relay coils draw between 70mA and 100mA. Do not wire relay coils directly to the Arduino pins. You must use transistor switches (e.g., 2N2222) or optocouplers (e.g., PC817) on your custom PCB to isolate the driver currents.


💻 Firmware Installation & Configuration

1. Prerequisites

Ensure your Arduino IDE environment is properly updated:

  1. Open the Arduino IDE, go to Tools > Board > Boards Manager and install the Arduino Nano Matter board package.
  2. Go to Tools > Manage Libraries and install these exact dependencies:
    • SSD1306Ascii (by Bill Greiman)
    • QRCode (by Richard Moore)

2. IDE Compilation Configuration

Before flashing the firmware, you must configure the low-level stack settings:

  • Go to Tools > Protocol Stack and select Matter.
  • Note: If this is left on "None", the compiler will completely ignore all Matter initialization sequences.

3. Display Selection Toggle

At the very top of the primary sketch file, uncomment the specific preprocessor definition that matches your physical OLED module hardware:

cpp
// UNCOMMENT ONLY ONE of the options below to match your physical OLED panel:
#define DISPLAY_TYPE_SH1106      // Use this if your screen has an SH1106 controller
// #define DISPLAY_TYPE_SSD1306  // Use this if your screen has a true SSD1306 controller

📱 Provisioning & First-Time Setup

  1. Flash the firmware to your board and open your serial monitor at 115200 baud.
  2. Upon boot, the board will automatically check its secure enclave storage rows. If it is uncommissioned, a custom Version 3 QR Matrix will automatically render on the left side of your OLED screen.
  3. Open your native smart home app (e.g., Apple Home) on your iPhone.
  4. Tap Add Accessory and point your camera at the OLED glass panel.
  5. Alternative Manual Flow: If the camera cannot capture the display grid due to enclosure glare, tap More Options / I Don't Have a Code, select the module from the nearby Bluetooth list, and manually input the static 11-digit setup passcode:
    text
    Manual Setup Code: 3497-0259-332
  6. Keep your phone close to the hardware for the first 30 seconds. The initial handshake executes over Bluetooth Low Energy (BLE) before moving the board permanently to your home's Thread Mesh Network.

Parts

48
QtyValueFootprintReferences
610KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR1, R2, R12, R13, R14, R15
4100RResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR16, R17, R18, R19
4560RResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR4, R5, R6, R7
4MountingHole_PadMountingHole:MountingHole_3.2mm_M3_ISO7380_Pad_TopBottomH1, H2, H4, H6
4TS29-1212-1-R-300-Djerrys_library:SW_TS29-1212-1-R-300-DS1, S2, S3, S4
30.1uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC1, C2, C6
3GNDTestPoint:TestPoint_THTPad_D2.0mm_Drill1.0mmGND1, GND2, GND3
21N4448WDiode_SMD:D_SOD-123D3, D4
2RED LEDLED_SMD:LED_1206_3216Metric_Pad1.42x1.75mm_HandSolderD1, D2
2o.1uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC4, C5
1+5V PwrTerminalBlock_CUI:TerminalBlock_CUI_TB007-508-02_1x02_P5.08mm_HorizontalJ2
1100KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR10
110RResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR11
110uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC3
11KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR8
12.7KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR3
13.3KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR9
1BuzzerBuzzer_Beeper:Buzzer_12x9.5RM7.6BZ1
1Conn_01x04Connector_JST:JST_SH_SM04B-SRSS-TB_1x04-1MP_P1.00mm_HorizontalJ1
1DMG2302UPackage_TO_SOT_SMD:SOT-23Q1
1SH1106jerrys_library:SH1106U3
1SN74AHCT125DRPackage_SO:SO-14_5.3x10.2mm_P1.27mmU2
1arduino_nano_matterModule:Arduino_NanoU1
1relay driver pinsTerminalBlock_CUI:TerminalBlock_CUI_TB007-508-04_1x04_P5.08mm_HorizontalJ3

Similar boards

  • 4 layers154 × 159 mmNb1ecu, the printed circuit board in 3D

    Nb1ecu

    swagprincess/nb1ecu

    NB1 Miata PNP Custom Speeduino Teensy 4.1 ECU

    129 parts1GPL-3.0
  • 2 layers69 × 72 mmMMv3, the printed circuit board in 3D

    MMv3

    MrCroesus/MMv3

    MMv3 is the 3rd generation robot platform used to teach the IEEE Micromouse DeCal at UC Berkeley. It was designed with usability, manufacturability, size, and cost in mind.

    47 parts16Apache-2.0
  • 4 layers40 × 19 mmRom2k40, the printed circuit board in 3D

    Rom2k40

    mengstr/Rom2k40

    EPROM emulator based on RP2040

    28 parts12
  • 4 layers45.7 × 90.3 mmIo v2-Board, the printed circuit board in 3D

    Io v2-Board

    Maeswoon/UNHSEDS

    great people building dream rockets

    81 parts11
  • 2 layers101.6 × 31.8 mmPico 12vrgb controller, the printed circuit board in 3D

    Pico 12vrgb controller

    bluekeyes/pico-12vrgb-hid-controller

    4-pin RGB controller using the Pi Pico and USB HID

    20 parts9MIT
  • 2 layers54.1 × 48.6 mmE Fidget V3, the printed circuit board in 3D

    E Fidget V3

    miameows/E-Fidget

    Hi there! There's a lot of moving parts with this project right now, so why don't you check out my latest blog post for more info?

    29 parts6MIT
  • 2 layers75.1 × 100 mmZamkonator, the printed circuit board in 3D

    Zamkonator

    alufers/Zamkonator

    RFID access-control board with PoE and Wiegand

    182 parts5
  • 2 layers240 × 100 mmKha bgt extend, the printed circuit board in 3D

    Kha bgt extend

    kiu/kha

    Overengineered Modular RS-485 Multi-Master 19" Subrack Home Automation / Control

    69 parts5

Questions

How big is the Matter thread relay r1 PCB?

It measures 92.2 × 66.4 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Matter thread relay r1 use?

48 parts, built around the 1N4448W and DMG2302U. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Matter thread relay r1 KiCad files?

From the jerryok826/ardunio_matter_thread_relay repository on GitHub, at the commit this page was made from: the board is Hardware/matter_thread_relay_r1.kicad_pcb and its schematic Hardware/matter_thread_relay_r1.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Matter thread relay r1 design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).