ModeX + CW + carrier

The ModeX + CW + carrier beacon program is a very special program that can be used to test a new digital mode. It is necessary to have quite a bit of insight into the parameters, symbols and sequence of the digital ModeX. If so you may also use the program for beacon purposes, where the ModeX may be your own mode, JT4, JT65, Q65, …

The program consists of only one file (ModeXcarrier.ino), and there is no configuration done over the USB port. Everything is done directly in the program file. There is no use of display either.

During the ModeX part of the sequence the TX LED will flash at half the symbol rate, during the CW part of the sequence the TX LED will flash with the CW and during the carrier part of the sequence the TX LED will be constantly lit.

When GPS signals are received the PPS LED flashes ones per second, and when the status of the GPS signal is valid the Valid LED is lit.


The default beacon sequence

When the GPS time is valid the beacon transmits ModeX, then followed by a short break of 500 ms, then the call sign and locator are sent in CW followed by a short break of 500 ms and then a carrier until the end of the sequence. Then the sequence repeats again.

If the GPS signal is invalid the beacon suspends the ModeX, and just transmits CW and a fixed length 20 s carrier.


Configuration

Unlike most of the other programs the ModeX + CW + carrier configuration is hardcoded directly in the .ino file. Furthermore, there are only a few possible parameters to configure. Please look for the // ***** CONFIGURATION ***** variables section.

It is possible to view some error messages in a terminal program via the USB port, 9600 Baud, 8 bits, no parity and one stop bit, using a terminal program (e.g. Arduino IDE Serial Monitor, Termite Terminal (Windows), CuteCom (Linux) or Terminal (Mac OS)). Please connect the RFzero via a USB data cable to your computer, and connect the terminal program to the right COM port in the terminal program. The RFzero identifies itself as an Arduino Zero (Windows Device Manager).

int frequency = 28299000L;

This is the nominal normal beacon frequency in Hz, i.e. carrier frequency. Change this to match the coordinated and allocated beacon frequency.

char call[ ] = “QW0RF”;

This is the beacon call sign. This you will have to change and remember to enter it in upper case letters.

char locator[ ] = “JO65FR”;

This is the beacon locator. This you will have to change and remember to enter it in upper case letters.

int keyingStyle = 1;

This is the keying style: 0: On-Off Keying (OOK), 1: Frequency Shift Keying (FSK).

int cwSpeed = 100;

This is the CW speed dot duration in ms. 100 ms = 12 WPM/60 LPM.

byte modeXsymbols [ ] = { 0, 1, 33, …, 22, 3, 0 };

Here you have to enter the ModeX symbols one by one and separated by commas.

The number of symbols must match the nbrSymbols value.

A symbol value must never be greater than the value of nbrTones – 1.

int nbrSymbols = 85;

The number of symbols for ModeX, max is 162.

int nbrTones = 65;

The number of tones for ModeX, max is 65.

int k = 1;

The ModeX K value. Valid values are 1 to 255.

double offset = 200.0;

The ModeX offset value relative to the nominal frequency.

int sampleRate = 12000;

The ModeX sample rate.

int freqSamples = 3600;

The ModeX frequency samples (sometimes this is also the time samples).

int prescaler = 256;

Timer counter prescaler used to interrupt the MCU for ModeX. The only valid values are 64, 256 and 1024.

int timerCounts = 56250;

Timer counts used to interrupt the MCU for ModeX.

48 MHz * time_samples / (prescaler * sampleRate), max is 16 777 215, e.g. 48 * 106 * 3600 / (256 * 12 000) = 56 250. Try to find a combination of prescaler and sampleRate values result in a timerCounts value, that is as close as possible to an integer value. If the result is not an integer round it up or down per normal rounding rules.

byte startMinute = WAIT_MIN_ANY;

Use this to set the start minute for the sequence. Only these values are valid:

  • WAIT_MIN_ANY: will wait for any minute
  • WAIT_MIN_EVEN: will wait for only even minutes
  • WAIT_MIN_ODD: will wait for any odd minutes
  • WAIT_MIN_FIVE: will wait for minutes that can be divided by five, e.g. 0, 5, 10, …
  • WAIT_MIN_TEN: will wait for minutes that can be divided by ten, e.g. 0, 10, 20, …
  • WAIT_MIN_FIFTEEN: will wait for minutes that can be divided by 15, i.e. 0, 15, 30 and 45
  • WAIT_MIN_TWENTY: will wait for minutes that can be divided by 20, i.e. 0, 20 and 40
  • WAIT_MIN_THIRTY: will wait for minutes that can be divided by 30, i.e. 0 and 30

int startSecond = 1;

The ModeX start second past the minute. Set it to zero (0) to start at the top of the minute. Valid values are 0 to 59.


Modes

Below are examples of the mode specific parameters that you will have to enter for the used mode. The actual message depends on you.

You may used RFzero Manager to help you in formatting the symbols array and calculate the metrics from Menu | Tools | ModeX symbols and metrics.

At the bottom of the page is a video showing how to get the channels symbols using the q65code.exe program included with WSJT-X. Even if q65code.exe is only relevant for Q65 the procedure is the same for the other symbols generating programs.

JT4

nbrSymbols = 207;

nbrTones = 4;

k = 1;
for A: 1, B: 2, C: 4, D: 9, E: 18, F: 36 or G: 72

offset = 200.0;

sampleRate = 11025;

freqSamples = 2520;

prescaler = 256;

timerCounts = 42857;

startMinute = WAIT_MIN_EVEN;

startSecond = 1;

You may use the jt4code.exe tool included with WSJT-X to get the JT4 channel symbols.

Example of using the jt4code.exe tool encoding “OZ0RF JO65FR”.

A zero “0” has to added to the beginning of the symbols from jt4code.exe.

JT65

nbrSymbols = 126;

nbrTones = 65;

k = 1;
for JT65A: 1, JT65B: 2 or JT65C: 4

offset = 200.0;

sampleRate = 11025;

freqSamples = 4096;

prescaler = 256;

timerCounts = 69660;

startMinute = WAIT_MIN_EVEN;

startSecond = 1;

You may use the jt65code.exe tool included with WSJT-X to get the JT65 channel symbols. Please note that the information carrying channel symbols from jo65code.exe, don’t include the synchronizing symbols. The synchronizing symbols all have the value of zero (0), and the symbols from jt65code.exe must be increased by two (2).

Example of using the jt65code.exe tool encoding “OZ0RF JO65FR”.

The JT65 synchronization vector where the “twos” must be added to the information carrying channel symbols.

0, 2, 2, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 2, 2, 2, 0, 2, 0, 0, 2, 2, 0, 2, 2, 2, 0, 0, 0, 2, 2, 0, 0, 0, 0, 2, 0,
0, 2, 0, 0, 0, 0, 2, 2, 2, 0, 0, 2, 0, 2, 0, 2, 0, 0, 2, 2, 0, 0, 2, 0, 2, 0, 2, 0, 2, 2, 0, 2, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2,
2, 2, 2, 2, 0, 0, 2, 0, 2, 2, 0, 2, 0, 0, 2, 0, 2, 0, 2, 0, 2, 2, 0, 0, 2, 2, 0, 2, 2, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0

The modeXsymbols for the “OZ0RF JO65FR” message.

0, 10, 12, 0, 0, 21, 24, 33, 0, 0, 0, 0, 0, 0, 57, 0, 6, 0, 42, 22, 16, 0, 18, 0, 0, 18, 36, 0, 40, 7, 25, 0, 0, 0, 16, 24, 0, 0, 0, 0, 12, 0, 0, 27, 0, 0, 0, 0, 8,
35, 39, 0, 0, 22, 0, 4, 0, 56, 0, 0, 19, 22, 0, 0, 27, 0, 39, 0, 33, 0, 31, 58, 0, 63, 47, 60, 7, 26, 26, 0, 0, 48, 24, 65,
6, 10, 59, 40, 0, 0, 23, 0, 34, 51, 0, 30, 0, 0, 52, 0, 27, 0, 55, 0, 58, 40, 0, 0, 55, 58, 0, 43, 47, 0, 2, 9, 64, 59, 0, 0, 0, 0, 0, 0, 0, 0

Q65

nbrSymbols = 85;

nbrTones = 65;

k = 1;
for A: 1, B: 2, C: 4, D: 8 or E: 16

offset = 200.0;

sampleRate = 12000;

freqSamples = 3600;
15 s: 1800, 30 s: 3600, 60 s: 7200, 120 s: 16000 or 300 s: 41472

prescaler = 256;

timerCounts = 56250;
15 s: 28125, 30 s: 56250, 60 s: 112500, 120 s: 250000 or 300 s: 648000

startMinute = WAIT_MIN_ANY;
WAIT_MIN_ANY, WAIT_MIN_EVEN, WAIT_MIN_ODD, WAIT_MIN_FIVE, WAIT_MIN_TEN, WAIT_MIN_FIFTEEN, WAIT_MIN_TWENTY, WAIT_MIN_THIRTY which one to use depends on the duration of the sequence

startSecond = 1;

You may use the q65code.exe tool included with WSJT-X to get the Q65 channel symbols.

Example of using the q65code.exe tool encoding “OZ0RF JO65FR”.

Video showing how to use the q65code.exe program found in the WSJT-X bin directory.