
Rf 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.

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.
Shack interface 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 4-layer board of 159.6 × 161 mm with 290 parts on 180 nets, routed with 2,459 tracks and 1,377 vias.
It is built around the ESP32-C3-DEVKIT-RUST-1, 74LVC1G08Z and TLP176AM(E, with the TLP4176G(F), 74LVC1G14Z and 74LVC1G74GT among its other parts. Its parts include 94 resistors, 56 capacitors, 36 diodes, 27 ICs and 13 transistors. It belongs with the radio and wireless and interfaces and adapters boards and the ESP32 and RISC-V boards of this library.
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.
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.
| Radios | 3, each with its own transmit antenna and receive antenna |
| Antennas | 4 per unit; a second unit adds 4 more |
| Frequency range | 1.8 to 54 MHz |
| Power | 100 W, SWR up to 3:1 |
| Relays | 37 × TE RT1, one type everywhere |
| RF board | 6 layers, 50 Ω coplanar lines |
| Link to the shack | One Cat6 cable, four opto-isolated current loops |
| Outdoor case | Milled aluminium tray, 288 × 250 × 66 mm |
| Shack case | Hammond 1455T1601 extrusion, PCB end plates |
| Controllers | ESP32-C3 in the box and in the shack |
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.
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 --> RFThe 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 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 (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 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.
Front and rear of the shack interface (SolidCraft views).
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.
Radios R2 and R3 transmit only after a handshake with the box: request, state check, relay set, read-back, permit.
All logic, timing and flow diagrams:
| Diagram | Content |
|---|---|
| L1 | SAFE loop |
| L2 | Box safety gate |
| L3 | Shack latch and radio port |
| T1 | Box start-up timing |
| T2 | SAFE stop timing |
| T3a, T3b | TX start and TX end timing |
| T4 | R1 PTT loop timing |
| F1 | Box firmware flow |
| F2 | TX handshake for R2 and R3 |
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.
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:
It runs in a terminal on macOS, Linux and Windows:
cd firmwarecargo run --release -p sim-shackfirmware/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.
| Part | State |
|---|---|
| Requirements and architecture | Requirements in draft, architecture rev C |
| Schematics, all boards | Generated, ERC clean, logic checked by script |
| RF board layout | Placed and routed, DRC clean |
| Controller board layout | Placed and routed, DRC clean |
| Shack interface layout | Placed and routed, DRC clean; end plates drawn |
| Cases | Outdoor tray and shack end plates drawn; 3D fit checked |
| Firmware, shack interface | Runs in the emulator: permits, handshake, host protocol, display, stored settings; tested against the hardware logic |
| Firmware, box controller | Not started; a scripted box stands in for it in the emulator |
| Bench tests | Not started; see docs/test/test-spec.md |
The CHANGELOG has the details per revision.
| Document | Content |
|---|---|
| docs/requirements.md | What we build and what is important |
| docs/architecture.md | System blocks, interfaces, main decisions |
| docs/design/ | Detailed design, one document per board |
| docs/test/test-spec.md | How each requirement is tested |
| design-log.md | Every decision, assumption, calculation, standard and measurement, with its reason |
| CHANGELOG.md | Changes per revision |
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)mplusfonts crate), under the SIL Open Font License 1.1.Source Location (required by CERN-OHL-S): https://github.com/PE1RGU/hf-antenna-switch
73 de PE1RGU
| Qty | Value | Footprint | References |
|---|---|---|---|
| 21 | 1n C0G | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C211, C212, C213, C214, C216, C217, C218, C311, C312, C313, C314, C316, C317, C318, C411, C412 +5 |
| 21 | PESD15VL1BA | Diode_SMD:D_SOD-323_HandSoldering | D211, D212, D213, D214, D216, D217, D218, D311, D312, D313, D314, D316, D317, D318, D411, D412 +5 |
| 17 | 10k | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R38, R207, R214, R215, R216, R217, R307, R314, R315, R316, R317, R407, R414, R415, R416, R417 +1 |
| 17 | 1k | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R37, R47, R61, R62, R210, R211, R212, R213, R310, R311, R312, R313, R410, R411, R412, R413 +1 |
| 16 | 1u 16V X7R | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C7, C61, C62, C63, C72, C73, C74, C75, C76, C77, C201, C202, C301, C302, C401, C402 |
| 12 | DNP | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R218, R219, R220, R221, R318, R319, R320, R321, R418, R419, R420, R421 |
| 11 | 100k | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R15, R25, R35, R63, R72, R201, R202, R301, R302, R401, R402 |
| 8 | 47R | Resistor_SMD:R_MELF_MMB-0207 | R11, R12, R21, R22, R31, R32, R41, R42 |
| 8 | DNP 1n 1kV | Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder | C22, C23, C24, C25, C26, C27, C28, C29 |
| 7 | 74LVC1G08 | Package_TO_SOT_SMD:SOT-23-5 | U8, U201, U202, U301, U302, U401, U402 |
| 6 | 1N4148W | Diode_SMD:D_SOD-123 | D33, D43, D71, D201, D301, D401 |
| 6 | 240R | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R203, R205, R303, R305, R403, R405 |
| 4 | 2036-09-B2LF | shack-interface:GDT_3Pin_P4.40mm_Bourns-2036-B2_Littelfuse-SL1003A-R | GD1, GD2, GD3, GD4 |
| 4 | 22k | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R14, R24, R34, R44 |
| 4 | 2k2 | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R75, R204, R304, R404 |
| 4 | 51u CMC | shack-interface:L_CMC_TDK_ACT45B | L1, L2, L3, L4 |
| 4 | 56R | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R13, R23, R33, R43 |
| 4 | BC857B | Package_TO_SOT_SMD:SOT-23 | Q12, Q22, Q32, Q42 |
| 4 | BCP53-16 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | Q11, Q21, Q31, Q41 |
| 4 | SMBJ15CA | Diode_SMD:D_SMB | D11, D21, D31, D41 |
| 3 | 100n 50V X7R | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C3, C64, C71 |
| 3 | 10n 1kV | Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder | C205, C305, C405 |
| 3 | 2k2 | Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolder | R206, R306, R406 |
| 3 | BSS138BK | Package_TO_SOT_SMD:SOT-23 | Q13, Q23, Q33 |
| 3 | BZX384-C5V1 | Diode_SMD:D_SOD-323_HandSoldering | D202, D302, D402 |
| 3 | DIN1 | TestPoint:TestPoint_Pad_D1.5mm | TP201, TP301, TP401 |
| 3 | DIN2 | TestPoint:TestPoint_Pad_D1.5mm | TP202, TP302, TP402 |
| 3 | DIN3 | TestPoint:TestPoint_Pad_D1.5mm | TP203, TP303, TP403 |
| 3 | DIN4 | TestPoint:TestPoint_Pad_D1.5mm | TP204, TP304, TP404 |
| 3 | DIN6 | TestPoint:TestPoint_Pad_D1.5mm | TP206, TP306, TP406 |
| 3 | DIN7 | TestPoint:TestPoint_Pad_D1.5mm | TP207, TP307, TP407 |
| 3 | DIN8 | TestPoint:TestPoint_Pad_D1.5mm | TP208, TP308, TP408 |
| 3 | FEED SEL | Jumper:SolderJumper-3_P1.3mm_Open_RoundedPad1.0x1.5mm_NumberLabels | JP203, JP303, JP403 |
| 3 | GND BOND | Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm | JP204, JP304, JP404 |
| 3 | INH LEVEL | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | JP201, JP301, JP401 |
| 3 | PC817X | Package_DIP:DIP-4_W7.62mm | U205, U305, U405 |
| 3 | PIN1 SEL | Jumper:SolderJumper-3_P1.3mm_Open_RoundedPad1.0x1.5mm_NumberLabels | JP202, JP302, JP402 |
| 3 | SENSE A | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | JP205, JP305, JP405 |
| 3 | SENSE K | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | JP206, JP306, JP406 |
| 3 | TLP176AM | shack-interface:SOP-4_P2.54mm_PhotoRelay_LongPad | U204, U304, U404 |
| 3 | TLP4176G | shack-interface:SOP-4_P2.54mm_PhotoRelay_LongPad | U203, U303, U403 |
| 2 | 0R | Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolder | R5, R6 |
| 2 | 100R | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R36, R46 |
| 2 | 10u 16V X7R | Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder | C4, C5 |
| 2 | 5k1 | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R64, R65 |
| 2 | 680R | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R73, R74 |
| 2 | 74LVC1G14 | Package_TO_SOT_SMD:SOT-23-5 | U7, U10 |
| 2 | 74LVC1G74 | Package_SO:VSSOP-8_2.3x2mm_P0.5mm | U4, U9 |
| 2 | BC847B | Package_TO_SOT_SMD:SOT-23 | Q34, Q44 |
| 2 | TPS3823A-33 | Package_TO_SOT_SMD:SOT-23-5 | U3, U6 |
| 1 | +13V8 | TestPoint:TestPoint_Pad_D1.5mm | TP1 |
| 1 | +3V3 | TestPoint:TestPoint_Pad_D1.5mm | TP3 |
| 1 | +5V | TestPoint:TestPoint_Pad_D1.5mm | TP2 |
| 1 | 13.8 V IN | Connector_AMASS:AMASS_XT60PW-M_1x02_P7.20mm_Horizontal | J3 |
| 1 | 22u 16V X7R | Capacitor_SMD:C_1210_3225Metric_Pad1.33x2.70mm_HandSolder | C6 |
| 1 | 330n 50V X7R | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C2 |
| 1 | 47u 35V | Capacitor_THT:CP_Radial_D6.3mm_P2.50mm | C1 |
| 1 | 500mA T | Fuse:Fuse_1206_3216Metric | F1 |
| 1 | 74LVC1G02 | Package_TO_SOT_SMD:SOT-23-5 | U11 |
| 1 | DISPLAY | Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_Vertical | J15 |
| 1 | ESP32-C3-DevKit-RUST-1 | shack-interface:ESP32-C3-DevKit-RUST_Socket | A1 |
| 1 | Front panel | Connector_JST:JST_XH_B4B-XH-A_1x04_P2.50mm_Vertical | J6 |
| 1 | KILL state | Connector_JST:JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical | J7 |
| 1 | KILL switch | Connector_JST:JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical | J2 |
| 1 | L7805CV | Package_TO_SOT_THT:TO-220-3_Vertical | U1 |
| 1 | LD1117S33CTR | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U2 |
| 1 | M3 CHASSIS | MountingHole:MountingHole_3.2mm_M3_Pad | H1 |
| 1 | PCA9539 | Package_SO:TSSOP-24_4.4x7.8mm_P0.65mm | U5 |
| 1 | R1 mini-DIN | shack-interface:MiniDIN-8_SameSky_MD-80SM_Horizontal | J11 |
| 1 | R2 mini-DIN | shack-interface:MiniDIN-8_SameSky_MD-80SM_Horizontal | J12 |
| 1 | R3 mini-DIN | shack-interface:MiniDIN-8_SameSky_MD-80SM_Horizontal | J13 |
| 1 | RJ45 LINK | shack-interface:RJ45_8P8C_Unshielded_TabDown | J1 |
| 1 | SDA SEL | Jumper:SolderJumper-3_P1.3mm_Bridged12_RoundedPad1.0x1.5mm_NumberLabels | JP61 |
| 1 | SMBJ16A | Diode_SMD:D_SMB | D2 |
| 1 | SS34 | Diode_SMD:D_SMC | D1 |
| 1 | USB4105-GF-A | Connector_USB:USB_C_Receptacle_GCT_USB4105-xx-A_16P_TopMnt_Horizontal | J14 |
| 1 | USBLC6-2SC6 | Package_TO_SOT_SMD:SOT-23-6 | U61 |

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.

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.

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.

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.

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.

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.

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

Diode663/ESP32_4-20mA_Sensor
Single-channel industrial 4-20 mA current-loop reader for ESPHome / Home Assistant. ESP32-S3 + INA226, USB-C powered, 24 V loop supply with a constant-current limiter. KiCad 10, generated from Python.

EnesAyaz/KTH
This repository is opened to be archival information for my coming Ph.D studies at KTH.



felixheld/qspimux
QSPI flash multiplexer - connect a SPI NOR flash to either an embedded system or a programmer for remote firmware tests


It measures 159.6 × 161 mm and has 4 copper layers, 1.6 mm thick.
290 parts, built around the ESP32-C3-DEVKIT-RUST-1, 74LVC1G08Z, TLP176AM(E and TLP4176G(F). 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.
From the PE1RGU/hf-antenna-switch repository on GitHub, at the commit this page was made from: the board is hardware/shack-interface/shack-interface.kicad_pcb and its schematic archive/2x1_as/2x1_as.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
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).