Tuesday, July 9, 2019

Arduino Keyer Analyzer



Every ham who programs MCUs and enjoys CW will probably do a keyer or two over time. My first was on the 6502 contained within my Atari 800 back in 1987.

We all know the basic ratios and WPM calculations, but there's a lot of other stuff involved in the logic of keyers. They aren't all the same - we have iambic, Ultimatic, Modes A & B and other variations.

Even if you have the above characteristics nailed down, there are still some subtleties hidden within the black box. For example, if you are sending a string of dits, how long do you have to release the paddle after the last dit before another one latches in?

I was working on programming a keyer and decided to put it on hold long enough to take on another programming project - to create a gizmo that would connect to a keyer's paddle input and keyed line output and make the timing measurements to answer my questions.

It determines dot, dash and space times in milliseconds and reports ratios and WPM. It determines logic type Ultimatic and iambic Mode A or B. It determines and reports the point at which another element latches in. It finds the delay between paddle closure and TX keyed line closure and measures the first dit to see if it is shortened. It will also send a string the user inputs on the tested keyer.

In reality, several of the attributes of a keyer can be determined just by playing with it for a bit, but others require a device such as this one.

To keep it as simple as possible, I/O is via a serial terminal screen such as the one integral with the Arduino IDE. Nothing more than an Arduino is required. The device is powered by the USB connection. I also incorporated an option for the device to report results in Morse (via your own keyer!), so the serial terminal would not be required.

An issue does arise when you want to test the keyer built in to your transceiver, since you don't have access to its keyed line out port. I dealt with this by making a little circuit to sample the RF from the transceiver while it transmits into a dummy load.

What about compatibility of the voltage level from the keyer's paddle jack to the Arduino? Well, I don't want to exceed 5 V input so I checked several keyers and they all passed the test. Here are some examples:


Keyer                                    Volts
K3                                         5.0 V
WA5BDU                             5.0 V   
Super CMOS II                    4.5 V
FT-991A                               3.3 V
Winkeyer 10                         5.0 V  
K3NG Arduino                    5.0 V


The "WA5BDU" is my Arduino keyer. I also tested the KX3 and the ATS-3 QRP transceiver and they were OK too.

Here's the menu which appears on the terminal screen:

WA5BDU Keyer Analyzer V1.0

Select:

   0 - Verify functionality
   1 - Timings, speed, ratios
   2 - Check Iambic & Ultimatic operation
   3 - Check Mode A or B
   4 - Check time for same element latch
   5 - Dot paddle open/close
   6 - Dash paddle open/close
   7 - Send PARIS for WPM
         * - Send serial port text

Here are some outputs from various requests from the menu:

Key Out idle state: HIGH
Dot length ms is 61
Dash length ms is 181
Space length ms is 61
1st dot length ms is 61
Speed: 19.7
Dot Ratio: 1.0
Dash Ratio: 3.0
Time to close TX line ms is 14
Time to get off paddle is 47
This is 77% of a space.
Speed using PARIS: 19.7


  The above are responses to menu items 1, 4 and 7.

Below is a table of results for various keyers I tested:

Keyer
Dot-R
Dash-R
Iambic
Mode
Latch wait
DLY to TX
WPM_20
WA5BDU
1.0
3.0
YES
B
53%
0 ms
19.7
WinKey 10
1.0
3.0
YES
A
98%
1 ms
**
Super CMOS II
1.0
3.0
YES
B
102%
9 ms
19.9
ATS-3
1.2
3.5
YES
B
98%
1 ms
19.3
FT-991A
1.0
3.0
YES
B
73%
17 ms
19.5
K3 (QSK)
1.0
3.0
YES
B
79%
121 ms
19.6
K3 (Semi)
1.1
3.1
YES
B
81%
13 ms
19.6
KX3 (Semi)
0.8
2.7
YES
B
76%
14 ms
20.8
K3NG Arduino
1.0
1.0
YES
B
102%
15 ms
19.9
K3NG U-Mode
1.0
3.0
NO
A
100%
15 ms
19.9
PK-Basic
1.0
2.9
YES
B
100%
6 ms
20

Below is my schematic for the keyer analyzer. There's not much to it until you add the circuit for sampling a transmitter's output.



So there it is. If you'd like to try it, an Arduino can be had for around $3 to $8 and my software is free to you. I've also written a manual for the thing with a great deal more detail. I've got the manual and the source code available in this shared Dropbox folder:

https://www.dropbox.com/sh/rsa4bb0ekdf69q0/AACfWsGcNrRTZgxEP4WOQyyAa?dl=0

I hope you enjoyed reading about it and possibly even trying it.

73,

Nick, WA5BDU

No comments: