CW-Keyer project

The low-frequency output signal of the transceiver has a frequency range of approximately 300 – 3000 Hz, the speech area. Many CW signals fit within this frequency range, all with a slightly different frequency (leaving SSB out of consideration). That is why we use CW filters that can distill a much smaller area from this broad low-frequency signal, making it much easier to “read” the desired CW signal. In order to filter out that “one” desired CW signal, we use the best filter that exists, namely our hearing. Whatever discrete or active filter, it is not able to match our hearing on this point, let alone improve it. If we master CW, we are able to “read” the signal.

In the 40 meter the CW filter is tuned to Bandpass 1.01 kHz@-6dB and tuned to a CW signal.

As an example, the WebSDR was tuned to a CW signal and a bandwidth was set to 1.01 kHz at -6dB. Even then, sometimes multiple CW signals are audible, each with a slightly different pitch. As said, our hearing can process this quite well, but for a CW-decoder this is hardly possible without special precautions.

What does a CW-keyer do?
Actually nothing more than converting a received “tone frequency” signal that comes from the receiver into a signal that can be processed by the processor. Thus from an analog signal to a digital signal. In other words, the core business of every CW-decoder project is based on the conversion of one or more predetermined (tone) frequencies into their digital representatives and that as efficiently as possible.
For the conversion of the signal we use System on Chip’s (SoC). These can be “field-programmable gate array” FPGA, specialized chips such as for “dual tone multi frequency signaling” (DTMF), used in for example the push button telephone.
For the CW-decoder project we use SoC’s such as the Arduino or for example a “Programmable Interrupt Controller” PIC.
But all these different possibilities do only one thing, namely filtering a desired signal from a frequency spectrum. And this is where “Digital Signal Processing” comes in.

The story begins with knowledge of “Digital Signal Processing”, DSP. A fairly complex area of ​​knowledge. An informative free book has appeared on the internet about this that can be downloaded. It is called “The Scientist and Engineer’s Guide to Digital Signal Processing” by Steven W. Smith, Ph.D.

For the CW-decoder project, learning (or studying) “Digital Signal Processing” and “discrete Foerier transform” goes very far. That is why we are looking for simplification. We find that in the “Goertzel Algorithm”, a set of formulas with which the desired calculations for determining a desired tone frequency signal can be efficiently performed.
If you want to understand anything about one of the many CW-decoder projects of K5BCQ, K3NG, OZ1JHM and many others, you will need to know something about this algorithm.

The algorithm was first described by Gerald Goertzel in 1958. The Goertzel algorithm is defined as a technique in digital signal processing (DSP) for efficient evaluation of the individual terms of the discrete Fourier transform (DFT). Quite a mouthful, but as mentioned, the bottom line is that the Algorithm is capable of very efficiently detecting a “tone frequency” signal and converting it into a digitally processable signal.

Based on the Goertzel Algorithm, Kevin Banks – August 2002 wrote an article entitled “The Goertzel Algorithm”. In it he describes a “tone detection” method applicable to the “System on Chip” (SoC) processors. It is the method that OZ1JHM used in his Arduino Uno based simple CW-keyer project. The project to which many others have added their ideas. The article is a must read and can be found here.

As mentioned, the further development of the CW-keyer by K5BCQ and many other adepts is based on the software developt by OZ1HJM.

Essentially, the many software programs are a wrapper around the previously mentioned core program of OZ1HJM.

The software of K5BCQ is very large in size and contains much more than necessary for CW recognition. Especially the essays in the software are completely unnecessary.

We will successively discuss the Goertzel Algorithm as described by Kevin Banks to continue with the CW-keyer described by OZ1HJM. Then we will discuss the Keyer of K5BCQ and the modifications to it.
Based on these designs I will discuss problems encountered such as:
–  fading; the signal changes in frequency and strength.
–  the narrowband tone frequency that makes tone detection not easy and what can be do about it.
–  irregular cw handwriting; that is, the dots and dashes are in time not conform to the norm.

So the project is divided into three parts and will be continued on the following pages:
– The Goertzel Algorithm page you will find here.

– The CW-project of Hjalmar Skovholm Hansen OZ1HJM you will find here.

– The CW-project Kees Talen K5BCQ you will find here (In progress)