EASY BUILD CW DECODER BASED ON DSP GOERTZEL CODE

If you want to build a cw decoder without using other active components than an atmel 328 - Arduino UNO , then this is sure something for you.

The magic in this code is the tone detection based on the goertzel formular, which means that you just put in the audio on an analog pin and then the processor make some calculations and if there is a tone you will get a magnitude value.

Here is a video where you can see the decoder in function ..Hardware build by OZ2HNS for use in our clubstation OZ8SMA

You can read about the goertzel formular here :

en.wikipedia.org/wiki/Goertzel_algorithm

courses.cs.washington.edu/courses/cse466/12au/calendar/Goertzel-EETimes.pdf

here you can see my test setup ...A Arduino UNO board and a LCD board and then a few components ..

The scematic is VERY simple. Just 2 10k resistors betwen gnd and 5 volts and then a capacitor in serie with the audio signal.

The code can take different kinds of displays 2*16 or 4*16 or 2*20 or 4*20 ..just connect and then the code will manage when you have done the setup..

Tell the liquidcrystal library which pins you use for the display and underneath that which kind of display you have

Then you have to set which pin you use for AudioIN and which pin you use for the Led ..

NOW YOU CAN USE THE DECODER WITHOUT ANY MORE MODIFICATIONS

But if you want another center frequency you and want to change how wide the filter shall be, you have to change the following lines also.

Be aware of that you can only chose some excact frequencies and only a specified number of samples.

For a start take the n=48 ( testdata[48] ) and then you can chose 558 hz or mabye 744 hz which are good for recieveing.

The you are ready for going ....

If you have trouble with the audio is to high og to weak yo can try to set the 2 values for magnitude .

go 50 up or 50 down with both of them in same time ...here they are 100, if your transiver shall be turned up to get the decoder working then set the values down.

If you get a lot of noise in when you have your volumen on the prefereed place then set the 2 values up with 50 ..

Here you can download the code : Download version 1.1 Right click on the mouse and chose save as...

LInks to other builders :

k2jji.org/2014/09/18/arduino-base-cw-decoder/

sites.google.com/site/chipkituno32cwdecoder/

Here you can see Mr.Chiba very fine website jh1lhv.hatenablog.jp/entry/2015/01/17/001128

And here you can see how JA9MAT Hidehiko build it with chinese letters Download Mr. Hidehiko use some code from Mr. Chiba also.

Here you can find an other danish ham which have been working on the code www.planker.dk/Projects/Arduino/Decoder/Decoder.htm

Here a project from a oz1edr oz1edr.dk/Arduino%20Uno/CW%20dekoder/Arduino%20CW.htm

And another link www.oz5bir.dk/service1/teknik/cw%20dekoder/cw_dekoder.html

and in a USA ham newspaper www.wb7qiw.org/pdfs/HARC%20October%202014.pdf