Morse in a New Year

One of the things I’ve done in the past few weeks is build a new keyboard for this computer. It’s what’s called a straight key in radio circles.

Telegraph key being used as a USB keyboard on my computer.

Yep, it’s real. And it works. I actually used it to type (key?) in some of this blog post. It’s literally just an USB cable, a Teensy 3.1, and a Morse code key. I’m going to mount the Teensy in the bottom of the board, but for now it’s on the protoboard until I get all my code changes done.

So, why? What the heck would I do that for when I have a perfectly good computer keyboard?

At the start of 2018 I was once again thinking I wanted to find a way to really make myself learn Morse Code. A way that would guarantee I would learn it.

Among other times, I want to use my mobile radio when I’m out and about but don’t have the computer with me. Normally, I use PSK-31 which is computer-to-computer via amateur radio. For that, obviously, I have to have a laptop with me. The thing is, I don’t always have one with me and sometimes I will be out in the Owyhees at a spot where I’d like to see if I can have a QSO (conversation) on the radio. No laptop, no QSO.

The obvious question is, why don’t I just sit down and learn it?

Well, I could, but I’m lazy and I know it. Also, I already know about half the alphabet and numbers and a punctuation mark or two. So, what’s the problem? It’s no fun for me just sitting and memorizing the International Morse Code. I can, but that’s boring.

I began to wonder if I could somehow replace my QWERTY keyboard with a straight key. I took the path of least resistance and started searching online to see if anyone had done something like this with an Arduino or Teensy. It turns out several people had and made their code and schematics freely available.

After studying a few of them, I zeroed in on Nomblr’s rebuild of her dad’s old telegraph key. Her code was clean and the schematic about as simple as it ever gets so I leveraged off her work. The good thing was I happened to have a Teensy 3.1 in my “hell box” (as in “where the hell is it?”).

I dug out the Teensy 3.1, connected the straight key to the Teensy, plugged the USB cable into the Teensy and the computer. For testing, I simply downloaded Nomblr’s code to the Teensy, opened up Notepad++, and tried the key. I used the programmer’s holy first test: …. . .-.. .-.. — .– — .-. .-.. -..

To my immense pleasure, the letters started showing up in Notepad++ right away: hello world.

OK, so I had to look up two of those letters. That’s the whole point. I can now use the telegraph key to write on the computer, and to do so, I have to learn the Morse code letters I don’t know. Sure, it’ll be slow for a bit here and there but over the next few days or weeks I’ll be up to speed. And I’ll have learned the International Morse Code much faster than otherwise. Much.

I have already made some tweaks to her code and am in the process of adding some extra bells and whistles that I think will be useful to me. For example, I’ve added in a couple of prosigns like CQ and SOS. Keying in SOS, for example, corresponds to pressing F1 on a QWERTY keyboard. I’ve added in the punctuation from the International Morse Code table, and I’ve set up “……..” which is Morse for “error” to mimic pressing the backspace key on a regular keyboard.

Now I’ve got a fun and productive way to learn Morse code. One that not only ensures I’ll learn it, but also lets me practice sending and have fun doing so.

Soon, I’ll be on the airwaves with CW.

Future tweaks to this setup include adding a way to adjust the words-per-minute of the program. Currently it’s hard-coded and to change it to work smoothly with a faster or slower WPM I have to modify the code and dump it to the Teensy. Not difficult, but also not ideal, especially as my speed improves.

I do want to increase my speed, but one caveat is that I need to ensure that I don’t send faster than I can receive. For that reason, among others, another mod is to add a display to show what my actual WPM is as I use the key.

As to why a straight key instead of an iambic paddle…I’m of German descent, which gives me a Stubborn bonus of +4. 😉