Skeyer
A minimalistic WinKey-compatible CW keyer
Whenever I do portable contest operations, I really like to have a compact computer-controlled CW keyer. I do not need buttons or a speed-pot, as these settings are managed by the logging application (see matlog). I just want a thumb-drive form-factor that provides a 3.5mm jack towards the TRX and optionally allows for connecting a paddle to the keyer. It should also be powered via USB, as if there is any other reasonable alternative. In general, it should be small and robust and implement the WinKey protocol, so every other logger plays nicely with that keyer too.
There is are a lot of Arduino based WinKey implementation out there. All use the K3NG Arduino CW keyer firmware, but none provides the minimalistic approach of doing exactly one job. To this end, I (as usual) just resorted to building my own. Fortunately, K1EL provides a detailed documentation of the WinKey protocol, allowing to implement it easily.
As the hardware design should be minimal, only the choice of MCU was left. I first thought (and tried) to implement it using a 8-bit Atmel MCU and tinyUSB library. Unfortunately, this was not possible. A proper CDC ACM implementation was needed (serial over USB). I did not want to resort to a two-chip solution with a dedicated USB-to-serial chip. So I decided to go for the STM32F1 series. It is a fast, 32bit MCU with proper USB 2.0 support, while being cheaper than the common Atmel MCUs. The availability of cheap dev boards (blue pill) made the firmware development a chilled afternoon activity.
Hardware
The hardware is designed around the STM32F103C8T6, a small 48pin LQFP MCU providing propper USB 2.0 support, while still being somewhat hand-solderable. All other features of this CPU are ignored. I just need some IO pins for keying and reading the paddle.
To be on the save side, the key-out jack is isolated from the MCU and therefore from the computer via an opto-coupler. The paddle-jack, however, is referenced to the MCU's ground plane. Two TLVs ESD-protect this input.
Firmware
The firmware is organized in 4 parts:
- First, there is libopencm3 providing some level of hardware abstraction for the MCU.
- Then, there is a bootloader, which will be written into the first 8kbs of flash memory. It can be activated by pressing the left paddle while connecting the keyer to the computer. The keyer is then presenting itself as a DFU device, allowing to flash new firmware versions easily using standard tools.
- The platform specific hardware abstraction like CDC-ACM, IO and timers are implemented separately.
- Finally, there is the application code. This part contains all the logical, platform independent code. It implements the utterly complex state-machine that is the keyer.
Licenses
The hardware and firmware can be found at the Codeberg project page. All hardware files are licensed under CC BY-SA 4.0 while the firmware is licensed under GPLv3+.