Skip to the content
PCBKitNew board
2 layers56 × 50 mmCatvfoctrl, the printed circuit board in 3D

External VFO controller with magnetic encoder for the Xiegu G90 HF transceiver

Size
56 × 50 mm
Copper layers
2
Thickness
1.59 mm
Parts
55
Nets
35
Pads
174
Tracks, vias
561, 116
Pours
6
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
5 Jun 2026
Updated
28 Jun 2026

Overview

Catvfoctrl is an open-source printed circuit board by xflyingcat, from the xflyingcat/vfo_controller repository on GitHub, published under the MIT licence. It is a 2-layer board of 56 × 50 mm with 55 parts on 35 nets, routed with 561 tracks and 116 vias.

It is built around the STM32F103C8T6, LM1117-3.3V and FDLL4148, with the PC817XNNIP0F and SK14 among its other parts. Its parts include 19 resistors, 17 capacitors, 6 connectors, 4 ICs and 1 crystal. It belongs with the radio and wireless boards and the STM32 boards of this library.

Main components

5

README

README.md

CAT VFO Controller for Xiegu G90 (STM32 + MT6701)

VFO Controller in action

📺 Youtube video: VFO controller in action


Читать на русском языке 🇷🇺

Выносной магнитный валкодер (пульт управления) для КВ-трансивера Xiegu G90.

Проект разработан на базе неблокирующих конечных автоматов (FSM) для воссоздания классического «аналогового» и тактильно приятного ощущения плавной настройки, которого так не хватает штатным энкодерам.

Официальная страница проекта: https://xflyingcat.ru/catvfoctrl.html

🚀 Технические особенности реализации (по коду)

  • Оптимизированный тайминг (50 мс) для плавной настройки: Опрос дельты энкодера происходит с квантом времени 50 мс. Управляющий пакет отправляется в трансивер только при вращении вала. Это обеспечивает плавность настройки без задержек и исключает перегрузку шины CAT.

  • Магнитный энкодер (MT6701): Высокоточный бесконтактный датчик, настроенный на фиксированные 400 событий на оборот. При шаге 10 Гц это дает 4 кГц на оборот.

  • Аппаратный уровень (STM32F103):

    • Квадратурный сигнал энкодера обрабатывается аппаратным таймером TIM1 в 16-битном режиме.
    • Отправка САТ-команд в трансивер автоматизирована через DMA (DMA1_Channel4), что освобождает процессор от ожидания отправки байт.
    • Входящий САТ-поток принимается по прерываниям во встроенный кольцевой FIFO-буфер емкостью 128 байт с обеспечением атомарности операций при чтении.
  • Фильтрация эха: На однопроводной шине CI-V контроллер автоматически отфильтровывает собственное эхо отправленных пакетов, реагируя только на входящие сообщения, адресованные мастеру (THIS_MACHINE_ADDRESS = 0xE0).

  • Двусторонняя синхронизация (Таймаут 500 мс): Если ручка пульта статична более 500 мс, контроллер запрашивает текущую частоту у Xiegu G90 (команда 0x25 0x00). Это предотвращает «скачки» частоты при ручной перестройке на самом трансивере или смене диапазона.

  • Управление шагом (10 Гц / 1 Гц): Переключение шага происходит при длительном нажатии кнопки LOCK. При возврате с точности 1 Гц на шаг 10 Гц алгоритм автоматически выполняет математическое округление частоты до десятков ((freq / 10) * 10), убирая дробный «хвост».

  • Решение проблемы PTT Xiegu G90: Трансивер не имеет стандартного нормализованного входа PTT (под простую педаль с замыканием линии на землю). Данный пульт полностью решает эту проблему: вы подключаете обычную педаль в гнездо 3.5 мм пульта, при замыкании цепи на землю контроллер переводит трансивер на передачу по шине CAT (команда 0x1C).

  • Защита от залипания PTT (Anti-Stick Watchdog): Для линии PTT реализован таймер безопасности: при непрерывном удержании передачи более 2 минут, контроллер принудительно отключает PTT по CAT для защиты выходного каскада трансивера от перегрева.

🛠 Аппаратная часть (Hardware)

  • Микроконтроллер: STM32F103C8T6.
  • Защита цепей: Гальваническая опторазвязка линии PTT для исключения земляных петель и TVS-супрессоры на линиях RxD/TxD CAT-интерфейса.
  • Механика: Вал на двух подшипниках с преднатягом.
  • Корпус: Литой алюминиевый экранированный корпус Gainta G104 с гермовводом (дело тут не в герметичности, просто удобный способ ввода кабеля).
  • Кабель:

Cable Assembly

Единый пучок длиной 0.5 м (Питание DC, CAT Jack 3.5мм(штеккер), PTT Jack 3.5мм(гнездо)), введенный через гермоввод.

  • PCB Проект будущей печатной платы представлен в формате KiCad.

New PCB image

New PCB image

💻 Программное обеспечение процесса разработки (Software)

  • Среда разработки: XPack arm-none-eabi gcc, XPack windows build tools.
  • EDA: KiCad.

Read in English 🇬🇧

External VFO controller with magnetic encoder for the Xiegu G90 HF transceiver based on non-blocking Finite State Machines (FSM).

This project was designed to recreate the classic, tactilely pleasant "analog" feel of smooth tuning, which stock detent encoders lack.

Project Homepage: https://xflyingcat.ru/catvfoctrl.html

🚀 Code Architecture

  • Smooth Tuning Response (50 ms): Encoder delta polling occurs with 50 ms time quantum. A CAT packet is transmitted only when a physical shaft rotation is detected. This provides absolute tuning smoothness with zero lag and prevents transceiver CAT bus overloading.

  • Magnetic Encoder (MT6701): High-precision contactless 14-bit sensor configured for a fixed 400 events per revolution. With a 10 Hz tuning step, this delivers 4 kHz per revolution.

  • Hardware Level (STM32F103):

    • Quadrature encoder signals decoded via hardware TIM1 timer peripheral in 16-bit mode.
    • Outgoing CAT commands handled smoothly using hardware DMA (DMA1_Channel4), bypassing CPU wait cycles.
    • Incoming CAT stream parsed via an interrupt-driven ring FIFO buffer (128 bytes) with atomic read operation locks.
  • Echo Filtering: On the single-wire CI-V bus, the controller automatically filters out its own transmitted echo packets by validating the destination address (THIS_MACHINE_ADDRESS = 0xE0).

  • Bidirectional Sync (500 ms Timeout): If the VFO knob is idle for >500 ms, the controller automatically polls the Xiegu G90 for its current frequency (using advanced 0x25 0x00 command). This prevents frequency "jumps" if you change bands directly on the radio.

  • Step Control (10 Hz / 1 Hz): Step size switching is bound to a long press of the LOCK button. When returning to 10 Hz, the frequency is automatically rounded to the nearest tens of Hz ((freq / 10) * 10) to clean up fractional offsets.

  • Xiegu G90 Non-Normalized PTT Fix: The stock transceiver lacks a standard, normalized PTT input for simple footswitches with ground-keying. This controller completely fixes the issue: you plug any standard pedal into the VFO's 3.5mm jack, press it and the MCU instantly triggers transmission via digital CAT commands (0x1C command).

  • Industrial Grade PTT Safety (Anti-Stick Watchdog): The PTT line features a built-in safety watchdog: if the PTT remains engaged for more than 2 minutes, the transmission is forcefully aborted via CAT to protect the radio's PA stage from overheating.

🛠 Hardware Specifications

  • MCU: STM32F103C8T6 (Custom PCB is ready to order).
  • Circuit Protection: Optocoupler galvanic isolation for the PTT line to break ground loops; low-capacitance TVS suppressor arrays on the CAT RxD/TxD lines.
  • Mechanics: Custom shaft assembly utilizing dual preloaded ball bearings.
  • Enclosure: Die-cast aluminum shielded Gainta G104 housing.
  • Cable Assembly:

Cable Assembly

Integrated 0.5-meter harness (DC Power, CAT 3.5mm Jack/Plug, PTT 3.5mm Jack/Socket) routed via a cable gland.

  • PCB is presented in KiCad format.

New PCB image

New PCB image

💻 Software Stack

  • IDE: XPack arm-none-eabi gcc, XPack windows build tools.
  • EDA: KiCad.

Parts

55
QtyValueFootprintReferences
11100Nmylib:CAP0805C1, C4, C5, C8, C10, C11, C12, C13, C15, C17, C18
6100mylib:RES0805R1, R2, R5, R6, R7, R8
610Kmylib:RES0805R4, R9, R10, R11, R16, R18
322uF 25VCTRLNLOAD:C1206C2, C7, C16
3330mylib:RES0805R13, R14, R15
34K7mylib:RES0805R12, R17, R19
2,
222PFmylib:CAP0805C6, C9
2SMBJ5.0A-E3/52 UNIPOLARmylib:SMAVD3, VD4
11Kmylib:RES0805R3
11K/100MHZmylib:L0805FB1
122uF 10Vmylib:CAP0805C14
178M05CTRLNLOAD:SOT252U2
18 MHzmylib:QUARTZ_THY1
1ButtonsCTRLNLOAD:JST3CN4
1CATCTRLNLOAD:JST3CN3
1FDLL4148mylib:MLL34VD2
1LEDSCTRLNLOAD:JST4CN5
1LM1117-3.3Vzmirt:SOT252U3
1MT6701mylib:MT6701U4
1PC817XNNIP0Fmylib:P817_SMDPC1
1PLS4CTRLNLOAD:CON1x4J1
1PTT inputCTRLNLOAD:JST2CN2
1PowerCTRLNLOAD:JST2CN1
1SK14mylib:SK14VD1
1STM32F103C8T6CTRLNLOAD:STM-LQFP48_LU1

Questions

How big is the Catvfoctrl PCB?

It measures 56 × 50 mm and has 2 copper layers, 1.59 mm thick.

What parts does the Catvfoctrl use?

55 parts, built around the STM32F103C8T6, LM1117-3.3V, FDLL4148 and PC817XNNIP0F. 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 Catvfoctrl KiCad files?

From the xflyingcat/vfo_controller repository on GitHub, at the commit this page was made from: the board is hardware/kicad/catvfoctrl.kicad_pcb and its schematic hardware/kicad/catvfoctrl.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Catvfoctrl 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).

Similar boards

  • 2 layers61.6 × 53.7 mmOsborne floppy emulator, the printed circuit board in 3D

    Osborne floppy emulator

    khaddra/osborne-floppy-emulator

    Floppy disk drive emulator for the Osborne 1. Unfinished.

    82 parts2
  • 2 layers42 × 48.7 mmSCS Interface, the printed circuit board in 3D

    SCS Interface

    JavaPowerFR/SCS

    SCS Interface

    38 partsMIT
  • 2 layers271.8 × 172.7 mmPeripherl bridge panel, the printed circuit board in 3D

    Peripherl bridge panel

    Pongkemon01/Zeabus-Elec-Circuit-Peripheral_bridge

    Bridge circuit for several peripheral

    1,176 parts
  • 2 layers60 × 34 mmMiniNDP, the printed circuit board in 3D

    MiniNDP

    bkw777/NODE_DATAPAC

    Reproduction & documentation of Node Systems DATAPAC

    21 parts7
  • 4 layers112 × 57 mmUniversalboxArm1-0, the printed circuit board in 3D

    UniversalboxArm1-0

    Solartraveler/UniversalboxArm

    PCB for experimenting with a STM32

    170 parts2
  • 2 layers47 × 55.5 mmMotor master, the printed circuit board in 3D

    Motor master

    PaulBailey-1/motor-master

    The board can also be connected to motors through the CAN bus. Connect one end of the CAN chain to the CAN connector on the board and the other end to the TERM connector, or use another termination resistor.

    52 parts1
  • 2 layers96.6 × 59.7 mmPreheat controller, the printed circuit board in 3D

    Preheat controller

    perja12/preheating_station_controller

    Controller for the Youyue 946c preheating station.

    53 parts1Apache-2.0
  • 2 layers86.5 × 33 mmPlatineA CNMB2, the printed circuit board in 3D

    PlatineA CNMB2

    maxx3105/HBW-1W-T10

    10 Kanal Temperatursensor für Homematic Wired.

    34 parts