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 ModeX.

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

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.

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 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 is sent in CW followed by a short break of 500 ms and then a carrier until the full minute. 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, it only has 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 B 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 = 800.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. 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 five, 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.