To interface the audio with the Arduino, consult Hjalmar’s project page for the circuit. For the Due, you can use these settings: #define GOERTZ_SAMPLING_FREQ 46872.0 The Arduino Due has an 84 Mhz clock, so the sampling frequency will be different than the Arduino Uno and Mega which both have a 16 Mhz clock. The sampling frequency is CPU dependent and there is a mathematical relationship between the sampling frequency, target frequency, and number of samples. Prior to making changes, please read the notes in the source code. #define GOERTZ_NOISE_BLANKER_INITIAL_MS 6 Goertzel.h contains several settings: #define GOERTZ_SAMPLING_FREQ 8928.0 The DSP audio tone decoder requires two library files: goertzel.h and goertzel.cpp. When using this option the input pin is cw_decoder_audio_input_pin itnmust be an analog pin, such as A1, A2, A3, etc. The code used in the CW keyer was originally written by Hjalmar skovholm Hansen, OZ1JHM and is described further on his project web page. This option compiles in a Goertzel DSP audio detector. To activate the audio tone decoder in software, activate OPTION_CW_DECODER_GOERTZEL_AUDIO_DETECTOR. Drive it low (0V) when there is a CW signal, and high (+5V) when there is no CW tone. If external tone decoding hardware is used, cw_decoder_pin is a straight digital input. The CW decoder can be interfaced two ways: External Tone Decoder Hardware This is especially useful with the DSP Audio Decoder described below, driving an LED indicator. If you wish to have a indicator to assist in tuning in the CW signal and setting levels, define this output pin: #define cw_decoder_indicator 24 The input pin for the CW decoder is defined in keyer_pin_settings.h: #define cw_decoder_pin A11 The decoded character are displayed in both the Command Line Interface (CLI) and LCD display, whichever is configured. Alternatively you could connect a microphone with a preamplifier to the input to 'hear' morse from virtually any nearby source.The keyer can be configured to decode off the air CW using FEATURE_CW_DECODER. The audio input can be fed directly from any suitable audio output (speaker, aux or headphone socket) on your radio. The WPM=xx value on the LCD is the calculated wpm speed of the incoming morse. Values are: FO (Off), F5 (5 wpm spacing) or F8 (8 wpm spacing). ![]() The farnsworth setting is displayed as Fx where x is the selection for the spacing between characters. This allows a student to learn to recognise the pattern of the incoming characters at a more relistic speedspeed while still allowing enough time to think between characters. Farnsworth settings are used for morse training by sending morse characters at a higher speed (say 10 wpm) while the character spacing is around 5 or 8 wpm. Press the Fansworth switch to set the Farnsworth value. The default value of 201 represents a tone frequency of around 400Hz. The filter value is displayed on the LCD as T=xxx where xxx is the filter value. The function will sweep up and down until a lock is made on the incoming tone frequency. Press the SWEEP (Right) switch to tune the digital pot attached to the LM567 tone decoder. Increase the value on noisy signals to improve readability. The larger the value the greater the delay. The filter introduces a delay when reading the morse input in order to reduce the effect of noise pulses on the input signal.The filter value is displayed on the LCD as Fl=x where x is the filter value from 0 to 8. Press the FILTER (Left) switch to adjust the noise filter value. INSTRUCTIONS FOR USE OF THE MORSE DECODER So if you are in a situation where after a while you cannot seem to correctly decode morse, simply press the sweep button which will retune the decoder input frequency to the current tone value AND reset the timers and default values. To correct this I simply reset these values whenever the SWEEP button is pressed. I found that the values of the 'startUpTime' and 'startDownTime' variables became very large whenever there was a delay in receiving any morse input. Budd also indicated the reset should be used occasionally. The only way to fix it was to press the reset button. This was most apparent when there had been no morse input for a while. ![]() When running the original WB7FHC version it used to get itself into a mode where it would no longer decode morse. Ive also removed the sidetone and speaker connection as I prefer a softer sine-wave side tone which I can generate externally. These include a 'live' adjustable farnsworth setting, a much faster sweep tuning function by reducing the tuning range, and changes to the general operation and LCD layout. ![]() I have made some software changes to suit my circumstances. The CW decoder uses the same basic LM567 circuit designed by Budd Churchward WB7FHC which is connected to an Arduino Nano. A Morse Code Decoder based on WB7FHC's Simple Morse Code Decoder.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |