I suspect I should be able to add a keyer/keyboard in the same chip. I am sure I will have lots of features to slowly add and work on. So far I am pleased with the performance. I still need to add automatic level control and support special characters like AS, BT, etc. I finally worked on auto speed tracking today so it now can track speeds from 10 WPM to 125 WPM (my test source, a keyer/keyboard) only covers that range and I think it should be adequate :) The test signal of course is "perfect", no QRN/QRM/QSB, so I am only testing the decoding and speed tracking under ideal conditions (except for the one off the air test mentioned below). I migrated Hjalmar's project to a ChipKit Max 32 board (32-bit chip, 80 MHz clock). Reply by Chuck Broadwell, W5UXH on Septemat 8:49pm
GORTZEL CW DECODER SOFTWARE
It will be very simple for others to download the software to an Arduino and have fun with your project. I need to optimize the tone frequency and level (at 600 Hz my input signal is only 1.6Vp-p) and see to what speed I have perfect decoding when the input is "perfect". With the "perfect" CW input from a test message sent by the keyboard, I have perfect decoding up to 30 wpm. Neither is as close to your 558 Hz or 744 Hz frequencies, and I expect it will work even better when optimized and with a higher input amplitude. At 600 Hz, my output p-p level does not drop as low as at 750 Hz but neither 600 or 750 is optimum. I can vary my tone from roughly 600 Hz to 750 Hz. So my output amplitude peaks near that QRG. This is a preliminary test because I use a Hi-Per Mite filter on my sidetone, centered around 648 Hz. I used a "pure" sinewave sidetone from another keyer as the CW test source. I converted one of my keyers (that already had the LCD interfaced to a ATmega328P chip) to try it out.
GORTZEL CW DECODER CODE
The code is here and has details of the buttons to press during configuration.Nice project Hjalmar. The completed project just has a 3.5mm jack socket hot-glued to the Arduino and connected to the ground and A1 pins. The magnitude default suits the ACC2 output of my TS–590. I set the default ‘N’ to 48 and the default magnitude to 20. This can help if conditions change and signals become very weak or very strong. At start-up the ‘N’ in the Goertzel algorithm and the expected amplitude of the signal can be changed. It happens to have buttons on it so I added some configuration using these buttons. Screenshot of completed projectįor the completed decoder I changed to an LCD shield. I find this more useful than watching the LED blink. The number of > chars increases with the accuracy of the tuning. I also added a LCD tuning aid – you can see this in the photo. This allows more lee-way in the Goertzel algorithm. I also let the code work with an Arduino Due which has a faster CPU than the Arduino Uno. I also changed the ADC registers to speed up reading from the analogue pin, but this had little effect. This almosts halves the time taken to write to the screen. So I changed the code to use the LiquidCrystalFast library rather than the bog-standard LiquidCrystal library. But it was actually the display to LCD which took much of the time. As reducing the bandwidth is done by iterating more in the algorithm I suspected this was the bottleneck. I instrumented the code to see where it was using up CPU as Hjalmar hints that you can’t reduce the tone bandwidth too far. I’m using an LCD of 4 lines of 20 characters which works well. The decoding quality starts falling off as the CW speed rises above 30 WPM but it’s still usable. This allows me to use a sidetone of 750Hz and a 150Hz filter on the transceiver. I use the 744Hz tone in the algorithm and a bandwidth of 140Hz. The noise reduction on the TS590-S is needed to allow this, and with NR2=20, fast AGC and reasonably keyed morse it does pretty well. Even so, the decoder has decoded plenty of signals even when drowned in HF mush. As I write, we’re in horrible HF conditions at the moment with poor propagation. I’ve not modified the circuit in any way as I can fiddle with the controls on my TS590-S transceiver to get the decoder to work. It gets its efficiency by only working for various fixed tones rather than a continuous frequency spectrum as in the FFT. The Goertzel algorithm does much the same as an FFT but in a more efficient way. The CW Decoder circuit and code come from Hjalmar, OZ1JHM and are described in his web page A VERY simpel CW decoder EASY BUILD. I came across a CW Decoder based on an Arduino Uno implementing the Goertzel algorithm, and have lashed together a prototype which works quite well.