Hi there,
this blog post belongs to my latest project, a Remote Keying Interface for the Flex 6000 series radios running on macOS.
I have written an introduction to this project in another
post.
This post is about interfacing a straight key or an external keyer (like a Winkeyer) to the Mac computer.
There is a
Remote Keyer Interface project for Windows computers from Matt, NQ6N which uses a serial port for the keyer interface. Maybe I was to lazy to build that simple interface so I looked for another solution. And I discovered the
Teensy family of micro controllers which sparked my interest as the USB interface on these controllers can present themselves as a MIDI device to the computer. And the Mac has low latency MIDI "on board".
This post is not about installing the development environment (Teensyduino) on the Mac. For this you'll find a lot of information on the
Teensy pages.
So as a start I bought a Teensy 2.0 board and wired a simple interface on a breadboard (just KEY/PTT or left/right paddle and GND to the controller):
It's just the Teensy and a 3.5-mm stereo socket with the following connections:
- Ground connects to GND on the Teensy
- the Dah paddle contact (or PTT for the simple interface) to input pin 0 on the Teensy
- the Dit paddle contact (or KEY for the simple interface) to input pin 1 on the Teensy
Then I programmed a simple Sketch for using the Teensy as a simple interface for connecting a straight key or an external keyer. Later I added a simple Iambic keyer to the sketch so I could toggle between these two modes.
You can find the sketch on GitHub
here. It uses the Bounce2 library which you have to install in the Library Manager of Teensyduino.
Please make sure that you select your Teensy board in the Teensyduino IDE (Tools - Board) and that you select "MIDI" as the USB-Type (Tools - USB-Type).
After this was working I came across the information that on the "bigger" Teensy boards the USB-Type "Serial + MIDI" was possible and the idea was born if I could use the USB interface as a serial interface as a Winkeyer connection to a logging program and a MIDI interface for connecting to xKEY at the same time.
To try this out I bought a Teensy 3.2 board and wired the same simple connections like above:
I used the Teensy 3.2 but there are other Teensy boards which have this feature as well (but the Teensy 2.0 has not). These are just the boards I have tested and it is sufficient to buy the "bigger" board which can run both sketches. So I wasted some money buying the Teensy 2.0... đ
Looking for a place to start I remembered the work of Goody, K3NG who implemented an
Arduino based CW keyer which can interface to logging and contest programs via K1EL Winkey 1.0 and 2.0 interface protocol emulation. As Goody made the
source code of his keyer available on GitHub I started to added code for the MIDI interface to this keyer creating a version you can find on GitHub
here. In this archive I have deleted I lot of the files/headers for specific hardware or configurations which can be found on the original GitHub page. Most of the Libraries are still included (but not used at the moment) so that future enhancements of the keyer (speed potentiometer, display etc.) will be possible.
When you compile and load the sketch again make sure that you select your Teensy board in the Teensyduino IDE (Tools - Board) and that you select "Serial + MIDI" as the USB-Type (Tools - USB-Type).
The xKEY application detects which kind of MIDI keyer is connected (which sketch is running on the board) and behaves accordingly.
All in all it was fun to play with these kind of boards for the first time and create the possibility to use CW remotely at the same time.
More to follow...
Thanks and 73
Mario, DL3LSM