Skip to the content
6 layers268 × 230 mmRf board, the printed circuit board in 3D

Remote HF antenna switch: 3 radios x 4 antennas (path to 8), outdoor relay unit with a hardware safety chain, controlled over Cat6 from a shack interface. KiCad 10, open hardware, designed together with an AI.

Size
268 × 230 mm
Copper layers
6
Thickness
1.6 mm
Parts
357
Nets
242
Pads
1,176
Tracks, vias
4,260, 4,208
Pours
26
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
27 Oct 2026
Updated
2 Nov 2026

Overview

Rf board is an open-source printed circuit board by PE1RGU, from the PE1RGU/hf-antenna-switch repository on GitHub, published under the CERN-OHL-S-2.0 licence. It is a 6-layer board of 268 × 230 mm with 357 parts on 242 nets, routed with 4,260 tracks and 4,208 vias.

It is built around the PCA9539PW, LM2901 and LP2985-33DBV, with the BSS138BK, 1N4148W and RTD14012F among its other parts. Its parts include 108 resistors, 55 capacitors, 54 diodes, 51 transistors and 43 switches. It belongs with the radio and wireless and home automation and IoT boards and the ESP32 and RISC-V boards of this library.

Main components

12

README

README.md

HF Antenna Switch

Status: design phase Hardware: CERN-OHL-S-2.0 Scripts: MIT KiCad 10

A remote antenna switch for an HF amateur radio station: 3 radios, 4 antennas, one Cat6 cable, and the safety rules in hardware. Designed by a radio amateur together with an AI assistant, and documented decision by decision.

Outdoor unit with the lid removed: RF board with the relay matrix, controller board stacked above, SO-239 connectors in the milled aluminium tray Shack interface with the cover removed: main board in the extruded case, front plate with the display, LEDs, RESET and KILL switch

Left: the outdoor unit, lid removed. Right: the shack interface, cover removed. CAD views of the current design, not photos.

The relay unit sits outdoors, close to the antennas, in a milled aluminium case. A small interface box in the shack controls it over one Cat6 cable. A computer sends the commands over USB. If anything goes wrong (a cable break, a box fault, a press on the KILL switch), every radio is inhibited and every relay is released, without help from the firmware.

Status: design phase. Schematics, layouts and the case are drawn and checked by scripts. No board is built yet, and nothing here is tested on the bench. The shack interface firmware runs in an emulator on the computer.

In numbers

Radios3, each with its own transmit antenna and receive antenna
Antennas4 per unit; a second unit adds 4 more
Frequency range1.8 to 54 MHz
Power100 W, SWR up to 3:1
Relays37 × TE RT1, one type everywhere
RF board6 layers, 50 Ω coplanar lines
Link to the shackOne Cat6 cable, four opto-isolated current loops
Outdoor caseMilled aluminium tray, 288 × 250 × 66 mm
Shack caseHammond 1455T1601 extrusion, PCB end plates
ControllersESP32-C3 in the box and in the shack

Why this project may interest you

Safety in hardware, not only in software. A receive-only antenna (such as a loop with a preamplifier) never sees transmit power. No relay switches while RF is present. The firmware may ask for a state. The hardware decides whether that state is allowed.

Designed with an AI, in the open. This is an experiment in how a person and an AI assistant (Claude, by Anthropic) design hardware together. I set the goals and took the decisions. The AI did much of the research, the calculations and the scripts. The design log records every decision, who took it, and why. Rejected options stay in it too. See docs/how-this-was-made.md for the method and its limits.

Everything comes from scripts. Schematics, footprints, board placement, routing, end plates, the 3D fit checks and these renders are all generated by Python scripts. A change is repeatable, and two revisions can be compared. The logic is checked with truth tables against the real netlists. tools/README.md lists every script and how to run it.

What it does

  • Connects each of 3 radios to a transmit antenna and, separately, to a receive antenna.
  • Keeps receive-only antennas away from transmit power.
  • Changes relays only when no RF is present (TX inhibit and handshake per radio).
  • Stops all transmission and releases all relays on any fault, cable break or KILL switch.
  • Grounds antennas that are not in use, through a static bleed.
  • Feeds an active receive antenna through a switched bias-T.
  • Is controlled from a computer over USB through the shack interface.

System overview

mermaid
flowchart LR
  subgraph SHACK["Shack"]
    PC["Computer"]
    SI["Shack interface<br/>SAFE latch, TX permits,<br/>radio ports R1 to R3"]
    R1["R1 FT-710"]
    R2["R2"]
    R3["R3"]
  end
  subgraph BOX["Outdoor unit, milled aluminium case"]
    CB["Controller board<br/>ESP32-C3, safety gate, watchdog"]
    RF["RF board<br/>3 radios x 4 antennas<br/>37 x TE RT1 relays"]
  end
  subgraph ANT["Antennas"]
    A1["A1 G5RV"]
    A2["A2 RX loop"]
    A34["A3, A4 spare"]
  end
  U2["Unit 2, optional<br/>+4 antennas"]
  PC -- USB --> SI
  SI == "Cat6: 4 opto current loops" ==> CB
  CB -- I2C --> RF
  R1 -- coax --> RF
  R2 -- coax --> RF
  R3 -- coax --> RF

The dotted lines from the radios are the TUNER and LINEAR jacks (TX inhibit, PTT sense). More detail, and the reason for each choice, is in docs/architecture.md.

The outdoor unit

The RF board carries the relay matrix: per radio a changeover relay, a transmit row and a receive row; per antenna a ground relay, a static bleed, an RF detector and an optional bias-T. The controller board sits on standoffs above it.

Controller board, top side: Cat6 link with opto isolators on the left, ESP32-C3 DevKit on the right

Controller board (KiCad render). Left: the Cat6 link with the opto current loops and a 3 mm isolation gap. Right: the ESP32-C3 DevKit. The NOR gate on the silkscreen is the relay enable: RLY_EN = NOR(KILL, MCU_EN_N, FAULT).

The shack interface

The shack interface powers the four current loops, holds the SAFE latch and the transmit permits, and connects to the three radios. At the front: a 2 inch colour display, the SAFE and LATCHED LEDs, RESET and the KILL switch. At the rear: 13.8 V DC, Cat6 to the outdoor unit, USB and the three radio ports.

Shack interface, front: display, SAFE and LATCHED LEDs, RESET and the red KILL switch Shack interface, rear: three mini-DIN radio ports, USB-C, Cat6 and the XT60 power input

Front and rear of the shack interface (SolidCraft views).

Safety chain

The SAFE loop is one series current loop from the shack to the box and back. Any break stops the current: KILL switch, cable cut, box fault, or loss of power. All radios are then inhibited and all relays released, in hardware, without help from the firmware.

L1 SAFE loop diagram

Radios R2 and R3 transmit only after a handshake with the box: request, state check, relay set, read-back, permit.

F2 TX handshake flow chart

All logic, timing and flow diagrams:

DiagramContent
L1SAFE loop
L2Box safety gate
L3Shack latch and radio port
T1Box start-up timing
T2SAFE stop timing
T3a, T3bTX start and TX end timing
T4R1 PTT loop timing
F1Box firmware flow
F2TX handshake for R2 and R3

Firmware and emulator

The firmware is written in Rust and runs on an ESP32-C3 in the box and in the shack. No board exists yet, so the firmware is developed in an emulator. The emulator runs the same firmware logic that goes into the ESP32-C3, against models of the parts on the board: the I/O expander, the supervisors and latches, the SAFE loop, the radio ports, the data link to the box and the display.

Emulator in iTerm2, pixel view: the shack display as the firmware draws it, with radios, antennas and routes, the outside-world keys, board signals and host traffic Emulator, text view: the same display drawn with characters, radio boxes, antenna boxes and route lines

The emulated shack interface in a terminal. Left: pixel view, the 2 inch display exactly as the firmware draws it. Right: text view, for terminals without images. R1 transmits on A1 and receives on the loop A2; R2 uses A3.

In the emulator you can:

  • see the shack display as the firmware draws it (page B: radios, antennas and their routes; page C: one card per radio; the Safe stop screen with its cause and the steps to recover),
  • press RESET and KILL, cut the cable, switch the supply, and let a radio transmit, with function keys,
  • type the same commands that a station program sends over USB, or connect a program over TCP,
  • stop it and start it again: the routes, names and page come back, as on the real unit; a transmission never does.

It runs in a terminal on macOS, Linux and Windows:

bash
cd firmware
bash
cargo run --release -p sim-shack

firmware/README.md explains how the emulator works, every key and command, and a first session step by step. To read or change the code, start with the firmware guide, written for hobby programmers.

Where it stands

PartState
Requirements and architectureRequirements in draft, architecture rev C
Schematics, all boardsGenerated, ERC clean, logic checked by script
RF board layoutPlaced and routed, DRC clean
Controller board layoutPlaced and routed, DRC clean
Shack interface layoutPlaced and routed, DRC clean; end plates drawn
CasesOutdoor tray and shack end plates drawn; 3D fit checked
Firmware, shack interfaceRuns in the emulator: permits, handshake, host protocol, display, stored settings; tested against the hardware logic
Firmware, box controllerNot started; a scripted box stands in for it in the emulator
Bench testsNot started; see docs/test/test-spec.md

The CHANGELOG has the details per revision.

Documents

DocumentContent
docs/requirements.mdWhat we build and what is important
docs/architecture.mdSystem blocks, interfaces, main decisions
docs/design/Detailed design, one document per board
docs/test/test-spec.mdHow each requirement is tested
design-log.mdEvery decision, assumption, calculation, standard and measurement, with its reason
CHANGELOG.mdChanges per revision

Repository layout

text
docs/                       requirements, architecture, design, test, images
hardware/unit/              outdoor unit: RF board, controller board, case, verification scripts
hardware/shack-interface/   shack interface board, end plates, case fit and renders
hardware/docs/diagrams/     logic, timing and flow diagrams
firmware/                   Rust firmware and the emulator (see firmware/README.md)
tools/README.md             where each generator and verification script is, and how to run it
Datasheets/                 datasheet register (the PDFs are not in the repository)
archive/                    earlier revisions (card cage and backplane, rev A/B)

Tools

  • KiCad 10, with the board layouts generated by Python scripts
  • Rust for the firmware and the emulator (esp-hal, embedded-graphics, ratatui)
  • Python 3 for the generators, the router and the verification scripts
  • cadquery and SolidCraft for the cases, the 3D fit checks and the renders
  • JLCPCB for the PCBs

Licence

  • Hardware design files and documentation: CERN Open Hardware Licence v2, Strongly Reciprocal (CERN-OHL-S-2.0). See LICENSE.
  • Python scripts (generators, verification) and the firmware (Rust): MIT. See LICENSE-MIT.
  • The display fonts compiled into the firmware are M+ FONTS (through the mplusfonts crate), under the SIL Open Font License 1.1.
  • Vendor 3D models and libraries (SnapEDA, SamacSys, Ultra Librarian, Amass, Amphenol) are not in the repository. See hardware/THIRD-PARTY.md for where to get them.

Source Location (required by CERN-OHL-S): https://github.com/PE1RGU/hf-antenna-switch

73 de PE1RGU

Parts

357
QtyValueFootprintReferences
47100kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR101, R102, R103, R104, R105, R106, R107, R108, R1012, R1014, R1022, R1024, R1032, R1034, R1042, R1044 +31
42BSS138BKPackage_TO_SOT_SMD:SOT-23Q2, Q101, Q102, Q103, Q104, Q105, Q106, Q107, Q108, Q109, Q110, Q111, Q1013, Q1023, Q1033, Q1043 +26
371N4148WDiode_SMD:D_SOD-123D101, D102, D103, D104, D105, D106, D107, D108, D109, D110, D111, D201, D202, D203, D204, D205 +21
37RTD14012FRelay_THT:Relay_SPDT_Schrack-RT1-16A-FormC_RM5mmK101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K201, K202, K203, K204, K205 +21
1510kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR1, R801, R811, R812, R813, R814, R831, R832, R833, R834, R903, R1016, R1026, R1036, R1046
1247kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR404, R405, R504, R505, R604, R605, R704, R705, R1013, R1023, R1033, R1043
90RResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR1201, R1202, R1203, R1204, R1205, R1206, R1207, R1208, R1209
9DNP 100p C0GCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC1201, C1202, C1203, C1204, C1205, C1206, C1207, C1208, C1209
61u 16V X7RCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC3, C802, C901, C902, C903, C1001
683-798 SO-239rf-board:SO239_83-798_StrapPad_BossRightJ1, J2, J3, J7, J8, J9
6DNP bondCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC8, C9, C10, C11, C12, C13
6M3MountingHole:MountingHole_3.2mm_M3_PadS1, S2, S3, S4, S5, S6
6SMBJ15ADiode_SMD:D_SMBD7, D8, D1011, D1021, D1031, D1041
5100n 50V X7RCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC801, C1011, C1021, C1031, C1041
510k x4Resistor_SMD:R_Array_Convex_4x0603RN901, RN902, RN903, RN1001, RN1002
510n 50V X7RCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC4, C403, C503, C603, C703
40R wire linkrf-board:WireLink_P7.62mm_D1.0mmR402, R502, R602, R702
410RResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR1011, R1021, R1031, R1041
41MResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR821, R822, R823, R824
41M HVResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR401, R501, R601, R701
433kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR1015, R1025, R1035, R1045
44.7p 1kV C0Grf-board:C_1206_3216Metric_RFgap2.0C404, C504, C604, C704
447p 50V C0GCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC405, C505, C605, C705
4BAS70-04Package_TO_SOT_SMD:SOT-23D401, D501, D601, D701
4BC857BPackage_TO_SOT_SMD:SOT-23Q1011, Q1021, Q1031, Q1041
4BZT52C24Diode_SMD:D_SOD-123D2, D3, D4, D5
4DNP 100nCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC402, C502, C602, C702
4DNP DC blockCapacitor_SMD:C_1812_4532Metric_Pad1.57x3.40mm_HandSolderC401, C501, C601, C701
4DNP bias chokeInductor_SMD:L_1812_4532Metric_Pad1.30x3.40mm_HandSolderL402, L502, L602, L702
4IRFL9014Package_TO_SOT_SMD:SOT-223-3_TabPin2Q1012, Q1022, Q1032, Q1042
4PCA9539Package_SO:TSSOP-24_4.4x7.8mm_P0.65mmU901, U902, U903, U1001
31A TFuse:Fuse_1206_3216Metric_Pad1.42x1.75mm_HandSolderF1, F2, F3
31u 50V X7RCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC101, C201, C301
32k2Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR2, R901, R902
3SMA jack EXPrf-board:SMA_901-9215_StrapPadJ4, J5, J6
247u 25V polymerCapacitor_SMD:CP_Elec_6.3x7.7C6, C7
2XT60PW-MConnector_AMASS:AMASS_XT60PW-M_1x02_P7.20mm_HorizontalJ11, J12
1+12V_AUXTestPoint:TestPoint_Pad_D1.5mmTP2
1+12V_RLYTestPoint:TestPoint_Pad_D1.5mmTP1
1+12V_SWTestPoint:TestPoint_Pad_D1.5mmTP4
1+3V3TestPoint:TestPoint_Pad_D1.5mmTP5
1+5VTestPoint:TestPoint_Pad_D1.5mmTP3
10RResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR4
11kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR802
14.7u 16V X7RCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC5
183-798 SO-239rf-board:SO239_83-798_StrapPad_BossLeftJ10
1A2_RFDETTestPoint:TestPoint_Pad_D1.5mmTP1209
1BZT52C15Diode_SMD:D_SOD-123D6
1Controller headerConnector_PinHeader_2.54mm:PinHeader_2x12_P2.54mm_VerticalJ14
1DNPCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC2
1DNP 10nF 1kVCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC1
1EXP_INTTestPoint:TestPoint_Pad_D1.5mmTP1203
1LM2901Package_SO:SOIC-14_3.9x8.7mm_P1.27mmU801
1LP2985-33Package_TO_SOT_SMD:SOT-23-5U1
1M3 CHASSISMountingHole:MountingHole_3.2mm_M3_PadH1
1PMV50EPEAPackage_TO_SOT_SMD:SOT-23Q1
1RLY_ENTestPoint:TestPoint_Pad_D1.5mmTP1204
1SCLTestPoint:TestPoint_Pad_D1.5mmTP1201
1SDATestPoint:TestPoint_Pad_D1.5mmTP1202
1SMBJ6.0ADiode_SMD:D_SMBD9
1SS14Diode_SMD:D_SMAD1
1TX_ANYTestPoint:TestPoint_Pad_D1.5mmTP1205
1XT30PW-MConnector_AMASS:AMASS_XT30PW-M_1x02_P2.50mm_HorizontalJ13
1controller board 3D (reference only)CTL3D
1openJumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mmJP1

More from PE1RGU/hf-antenna-switch

6
  • 4 layers159.6 × 161 mmShack interface, the printed circuit board in 3D

    Shack interface

    PE1RGU/hf-antenna-switch

    Remote HF antenna switch: 3 radios x 4 antennas (path to 8), outdoor relay unit with a hardware safety chain, controlled over Cat6 from a shack interface. KiCad 10, open hardware, designed together with an AI.

    290 parts2CERN-OHL-S-2.0
  • 4 layers152 × 122.5 mmController board, the printed circuit board in 3D

    Controller board

    PE1RGU/hf-antenna-switch

    Remote HF antenna switch: 3 radios x 4 antennas (path to 8), outdoor relay unit with a hardware safety chain, controlled over Cat6 from a shack interface. KiCad 10, open hardware, designed together with an AI.

    93 parts2CERN-OHL-S-2.0
  • 6 layers340 × 126 mmBackplane, the printed circuit board in 3D

    Backplane

    PE1RGU/hf-antenna-switch

    Remote HF antenna switch: 3 radios x 4 antennas (path to 8), outdoor relay unit with a hardware safety chain, controlled over Cat6 from a shack interface. KiCad 10, open hardware, designed together with an AI.

    24 parts2CERN-OHL-S-2.0
  • 2 layers70 × 70 mm2x1 as, the printed circuit board in 3D

    2x1 as

    PE1RGU/hf-antenna-switch

    Remote HF antenna switch: 3 radios x 4 antennas (path to 8), outdoor relay unit with a hardware safety chain, controlled over Cat6 from a shack interface. KiCad 10, open hardware, designed together with an AI.

    16 parts2CERN-OHL-S-2.0
  • 4 layers60 × 107 mmRf iso backplane, the printed circuit board in 3D

    Rf iso backplane

    PE1RGU/hf-antenna-switch

    Remote HF antenna switch: 3 radios x 4 antennas (path to 8), outdoor relay unit with a hardware safety chain, controlled over Cat6 from a shack interface. KiCad 10, open hardware, designed together with an AI.

    4 parts2CERN-OHL-S-2.0
  • 4 layers100 × 50 mmRf iso card, the printed circuit board in 3D

    Rf iso card

    PE1RGU/hf-antenna-switch

    Remote HF antenna switch: 3 radios x 4 antennas (path to 8), outdoor relay unit with a hardware safety chain, controlled over Cat6 from a shack interface. KiCad 10, open hardware, designed together with an AI.

    4 parts2CERN-OHL-S-2.0

Similar boards

  • 2 layers72 × 121 mmTeebeutel, the printed circuit board in 3D

    Teebeutel

    entropia/Teebeutel-Hardware

    Teebeutel (eng. Teabag) is an electronic, Entropia themed con-badge for the GPN20, featuring an ESP32 microprocessor running micropython.

    201 parts1
  • 4 layers53.1 × 98 mmMarsupial, the printed circuit board in 3D

    Marsupial

    VIPQualityPost/marsupial

    2 port USB PD + data hub

    208 parts3
  • 2 layers77.5 × 118 mmBessy c, the printed circuit board in 3D

    Bessy c

    burundiocibu/esphome-prod

    63 parts
  • 2 layers167.9 × 105.9 mmIgnition, the printed circuit board in 3D

    Ignition

    cuspaceflight/OkGo

    Rocket motor ignition and valve control from far, far away

    112 parts3
  • 6 layers101.8 × 80.5 mmSN-64, the printed circuit board in 3D

    SN-64

    FantomZap/SN-64

    Snes games on the n64 or m64

    410 parts1
  • 2 layers152.3 × 128.5 mmCv depot, the printed circuit board in 3D

    Cv depot

    naokiiwakami/cv-depot

    Source of control voltages for euro rack synth system

    206 parts1MIT
  • 4 layers78 × 56 mmAlakol, the printed circuit board in 3D

    Alakol

    richardeoin/alakol

    A specialised datalogger for superpressure balloon manufacturing

    118 parts1
  • 4 layers209 × 100 mmCarControllerV3, the printed circuit board in 3D

    CarControllerV3

    Stefanhg/CarControllerV3

    Kewet/Buddy CarController unofficial V3

    233 parts1

Questions

How big is the Rf board PCB?

It measures 268 × 230 mm and has 6 copper layers, 1.6 mm thick.

What parts does the Rf board use?

357 parts, built around the PCA9539PW, LM2901, LP2985-33DBV and BSS138BK. 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 Rf board KiCad files?

From the PE1RGU/hf-antenna-switch repository on GitHub, at the commit this page was made from: the board is hardware/unit/rf-board/rf-board.kicad_pcb and its schematic archive/2x1_as/2x1_as.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Rf board design in my own project?

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