Tiny Morse Code USB Keyboard

We’ve featured quite a few of [mitxela]’s projects here in the past, and many of them have the propensity to be labelled “smallest”. His Morse Code USB Keyboard Mk II adds to that list. It’s a Saturday afternoon project, with a few parts slapped onto a piece of perf-board, that allows using a Morse key as a USB keyboard. This project isn’t new or fresh, but we stumbled across it while trying to figure out a use for a Morse key lying in the author’s bin of parts. You can practise transmitting, by reading text and typing it out on the key, and then look it up on your computer to see if you made any mistakes. Or you can practise receiving, by asking a friend to punch it out for you. Either way, it’s a great way to hone your skills and prepare for your radio operators license exam.

The project is a follow up to his earlier one where he hooked up the Morse key via a RS-232 — USB converter directly to a computer and let the code do all the work. That turned out to be a very resource hungry, impractical project and made him do it right the next time around. The hardware is dead simple. An ATtiny85, a piezo buzzer, some decoupling capacitors, and a few resistors and zeners to allow a safe USB interface. The design accommodates a straight key, but there is one spare pin left over in the ATtiny to allow for iambic or sideswiper keys too. There is no speed adjustment, which is hardcoded at the moment. That isn’t very user friendly, and [mitxela] suggests adding a speed potentiometer to that last remaining pin on the ATtiny. This would prevent use of iambic/sideswiper keys. Or, you could use the RST pin on the ATtiny as a (weak) IO. The RST pin can read analog values between 5V and 2.5V, and will reset when voltage falls below 2.2V. Or just use another microcontroller as a last resort.

For the USB interface, [mitxela] is using the V-USB library after wasting some time trying to reinvent the wheel. And since this is designed to work as a HID, there are no drivers required – plug it in, and the OS detects it as a keyboard. He’s borrowed code from the EasyLogger project to use the internal oscillator and help free up the IO pins. And to detect the characters being typed, his code uses a long string of compare statements instead of a dictionary lookup. Writing that code was tedious, but it makes the identification quicker, since most characters can be identified in less that five comparisons (one dit = E, two dits = I, three dits = S and so on). This “tree” makes it easier to figure it out.

If you’d like to look up some of his other “tiny” projects, check out The smallest MIDI synthesizer, Smallest MIDI synth, again! and the ATtiny MIDI plug synth.

Continue reading “Tiny Morse Code USB Keyboard”

A Beautiful Morse Key From A Hard Drive Actuator

Morse code, or CW, is a subject that divides the amateur radio community from top to bottom. For some it’s a faded anachronism, while for others it’s the purest form of the art. With it no longer in significant commercial or military use it is radio amateurs who keep it alive, and those for whom it is a passion devote considerable effort to its continuing use.

With well over a century of history behind it there are a huge array of morse keys available to the CW enthusiast. From vintage telegraph keys through WW2 surplus military keys to sideways “bug” keys and modern boutique handcrafted keys, many operators will amass a collection for the love of it, and regularly use them all.

Just one of the hand-drawn illustrations for this project.
Just one of the hand-drawn illustrations for this project.

Other operators create their own keys, either crafting them from raw materials or using whatever materials they have at hand. Keys have been made from every conceivable piece of junk that will conduct electricity, and made contacts to all parts of the world.

[H. P. Friedrichs, AC7ZL] has produced such a home-made key from surplus material, but it has nothing of the junkbox about it. He’s used the head actuator from a surplus hard drive as the arm of a straight key, and the result is an item of beauty.  The actuator bearing is the pivot point, and the business end of the key replaces the hard drive’s heads. The spring is provided by the repulsive force between magnets, the connection at the rear is provided by a piece of guitar string, and the contacts themselves are taken from a surplus power relay. Even his write-up is a thing of beauty, a compelling read with hand-drawn illustrations. If you are not a Morse enthusiast it’s still an engaging project.

We’ve featured many keys here over the years, and this isn’t the first one using a hard drive actuator, as this mint tin paddle shows. Among others we’ve linked you to a collection of unorthodox keys, and of course shown you a vintage telegraph key with a Raspberry Pi decoder.