WSPR transmitter

(Please note that this example program will not run without a GPS antenna)

The WSPR transmitter example program makes the RFzero capable of transmitting on any frequency from 100 kHz to 200 MHz and beyond.

The transmission takes place in 15 time slots repeated twice per hour. There are two different transmission sequences that can be used in straight order, randomly or in a day/night sequence.

Up to 15 frequency, filter and power combinations can be used. The combinations can be made either manually for each of the 15 combinations or filled in one go using an audio offset frequency from 1400 Hz to 1600 Hz. The filter bits can control external antennas, filters, relays, matching, … via the ULN2803A driver IC on D6 to D0 or an analog voltage on A0.

The transmitted WSPR message can be either Type 1 (call sign, square and power, e.g. OZ0RF JO65 13) or Type 2 (compounded call sign and power, e.g. OY/OZ0RF IP62). Please see the WSPR documentation for more details.

A four lines and 20 characters LCD can be connected showing GPS, transmitted message and sequence data.

The configuration is done via the USB port. The square, used in message Type 2, can be be updated either manually or automatically. It is possible to wait for the RFzero to warm up for up to 255 s before starting to transmit.

When transmitting the TX LED will flash at half the symbol rate, i.e. about 0,7 Hz.

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.

A PA can be controlled on/off on D7, i.e. off during no transmission to save power.

Block schematic presentation of the WSPR transmitter functionality.


OZ0RF

From time to time OZ0RF is active from Greater Copenhagen in JO65FR. The equipment is a RFzero directly into a 1:9 UNUN connected to a 16,2 m longwire antenna. Sometimes the output is boosted to 27 dBm/500 mW. The actual location is nothing to brag about.

The RFzero as OZ0RF during the development of the WSPR transmitter example program. The picture shows the RFzero, LCD and low pass filter bank.

You can see the latest spots of OZ0RF on WSPRnet.org here.

It is easy to make an HF all-band antenna using e.g. a 16,2 m long wire, an Amidon FT-114-43 as the 1:9 UNUN and Amidon FT-114-177 as choke that are good for 25 W even into a bad SWR.

Example of a 1:9 UNUN and choke for an HF longwire antenna.


Display

The display is a LCD (20×4) that shows the UTC, the transmit frequency/skip and sequence, the transmitted message, the GPS status, the number of satellites and the  HDOP.

The LCD showing the UTC, sent message, the frequency and sequence, N = night, S = straight sequence, the GPS status, number of satellites in use and the HDOP.

The LCD while waiting and not transmitting using sequence0 in straight sequence.

The LCD when skipping a time slot and randomly using the data from sequence1.

If you want to change what is shown on the display please edit the functions in the display.cpp file.


Configuration

The configuration of the program is done 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).

If you don’t see the RFzero> or RFzero config> prompts please press the enter key. When you want to execute a command you don’t have to enter the prompt but only the command and parameters after the >.

All input to the RFzero must be in lowercase.

To enter the configuration mode please enter   config   at the RFzero> prompt, i.e.

RFzero> config

To see the available commands please enter   ?   at the RFzero config> prompt, i.e.

RFzero config> ?

To leave the configuration mode please enter   exit   at the RFzero config> prompt, i.e.

RFzero config> exit

When in configuration mode, i.e. when you see the RFzero config> prompt, the most frequent commands are

rd cfg

to see the configuration that will be used after exiting the configuration mode.

wr defaults

to set most of parameters to their default values. Please see the actual example program for the specific default values.

wr bcn CALL

where CALL is the WSPR TX call sign. The maximum length for WSPR Type 1 messages is six characters and it must include a number. The maximum length for WSPR Type 2 messages is ten characters and it must include a number. Please see the WSPR specification for more details about the message types.

wr loc LOCATOR

where LOCATOR is the locator up to eight characters, however, only four i.e. the square is transmitted and only for WSPR Type 1 messages.

wr locator

to automatically let the GPS data set the locator, however, only four i.e. the square is transmitted and only for WSPR Type 1 messages.

wr locauto ONOFF

to turn on or off the manual or automatic locator updating where ONOFF is either 0: for off/manual updating, or 1: for on/automatic updating.

wr data INDEX FREQ FILTER POWER

to fill one record in the transmitter data array with frequency, filter and power, where

  • INDEX is the array index 0 to 14
  • FREQ is the frequency in Hz from 100 kHz and up
  • FILTER is the bit pattern on D6:0 in hex and without the 0x preamble, e.g. 0101010 => 2a (bin to hex table)
  • POWER is the power level in dBm and only these values
    • 0 dBm = 1 mW
    • 3 dBm = 2 mW
    • 7 dBm = 5 mW
    • 10 dBm = 10 mW
    • 13 dBm = 20 mW
    • 17 dBm = 50 mW
    • 20 dBm = 100 mW
    • 23 dBm = 200 mW
    • 27 dBm = 500 mW
    • 30 dBm =  1 W
    • 33 dBm =  2 W
    • 37 dBm =  5 W
    • 40 dBm =  10 W
    • 43 dBm =  20 W
    • 47 dBm =  50 W
    • 50 dBm =  100 W
    • 53 dBm =  200 W
    • 57 dBm =  500 W
    • 60 dBm =  1 kW

e.g. to fill index 7 with 14 097 123 Hz, 0101010 FILTER bits (bin to hex table) and 40 dBm as the power level

wr data 7 14097123 2a 40

will make a single entry in the data array like below.

Example of the transmitter data array after using the wr data 7 14097123 2a 40 command. The gray cells are not affected.

The FILTER bits (bin to hex table) are connected to D0 to D6 that are also connected to the ULN2803A that can be used for controlling e.g. a low pass filter bank. See more about the ULN2803A in the tutorials.

For more information on how to use the filter bits to control a filter bank please see the “Filter mode, bits and control” section below.

wr auto OFFSET POWER

to automatically fill the transmitter data array with the default WSPR frequencies and where OFFSET is the audio frequency (AF) offset form 1400 Hz to 1600 Hz and POWER is the power level in dBm like in the list above, e.g.

wr auto 1456 13

will make the data array look like below.

Example of the transmitter data array using the wr auto 1456 13 command.

The FILTER bits (bin to hex table) are connected to D0 to D6 that are also connected to the ULN2803A that can be used for controlling e.g. a low pass filter bank. See more about the ULN2803A in the tutorials.

For more information on how to use the filter bits to control a filter bank please see the “Filter mode, bits and control” section below.

wr filter MODE

to set the filter MODE where:

  • 0: no filter control
  • 1-7: the number of bits to use from the filter values in the transmitter data array
  • 8: analog voltage on A0 in seven bits resolution taken from the filter values in the transmitter data array

The filter bits are connected to D0 to D6 that are also connected to the ULN2803A that can be used for controlling e.g. a low pass filter bank. See more about the ULN2803A in the tutorials.

If using filter mode 1 to 6 the unused D#-pins may be used for other purposes.

wr seq SET BAND0 … BAND14

to set which band to use in the time slots/start minute, where SET is the sequence number zero (0) or one (1) and BAND# is the band without the unit, e.g. 2 for 2 m, 4 for 4 m, 6 for 6 m, 10 for 10 m, … to 2200 for 2200 m or s for skipping the time slot/start minute. Values for all 15 time slots have to be included in the sequence command.

E.g. to configure sequence 0 with bands form 10 m to 160 m and skipping every third time slot

wr seq 0 160 80 s 60 40 s 30 20 s 17 15 s 12 10 s

Example of sequence 0 using the wr seq 0 160 80 s 60 40 s 30 20 s 17 15 s 12 10 s command. The gray cells are not affected.

wr tx MODE

where MODE is the transmission mode number

  • 0: transmit using the sequence 0 in straight order
  • 1: transmit using the sequence 1 in straight order
  • 2: transmit using the sequence 0 in random order
  • 3: transmit using the sequence 1 in random order
  • 4: transmit using sequence 0 during the day and using sequence 1 during the night both in straight order

wr warmup SECONDS

where SECONDS is the number of seconds to wait for the RFzero to warm up.

More commands are available so please enter a question mark (?) at the RFzero config> prompt to see them.


Filter mode, bits and control

The WSPR transmitter has the possibility to control PA(s), both when to transmit, but also which antenna/band/filter to select,  and/or a filter bank, typically low pass filters. There are three different ways to control the filters.

  • Digital
    • One bit per filter. There are up to seven bits, D0 to D6, available resulting in max seven possible combinations
    • Encoded bits that are converted in the filter bank. There are up to seven bits, D0 to D6, available resulting in max 128 possible combinations
  • Analog
    • An analog voltage on A0, in seven bits resolution, resulting in max 128 possible combinations

The filter mode controls which way is used and how many bits are used in the digital modes. How the bits are used is entirely up to you. The bit are set using the

wr data INDEX FREQ FILTER POWER

MMI command where FILTER is the bit pattern/analog value (bin/analog to hex table).

Digital control

If digital control is used the ULN2803A, on the RFzero, may be ideal, because it can be used to control the RF filter relays in a safe way.

Unless the ULN2083A is being used please remember that the RFzero operates on a 3,3 V level. Therefore some kind level translation, to increase the voltage to e.g. 5 V or 12 V, may be necessary.

Example of a digital 3,3 V to 5 V level translation. The 5 V can safely be changed to 15 V if required.

In case the filters are controlled when “active low” you may have to invert the bit patters, i.e. 010 (active high) becomes 101 (active low).

A more advanced way to use the filter bits is to use some for filter control and others for antenna control, even on the same band, e.g. three bits, D4 to D6 are used for antenna control, and four bits, D0 to D3, are used for amplifier band and filter control.

One bit per control

The simplest way to control the filter bank is using one bit per filter. In this case the seven FILTER (bin to hex table) values are:

  • 0x00 (D6:D0 000000)
  • 0x01 (D6:D0 000001)
  • 0x02 (D6:D0 000010)
  • 0x04 (D6:D0 000100)
  • 0x08 (D6:D0 001000)
  • 0x10 (D6:D0 010000)
  • 0x20 (D6:D0 100000)

Example of a filter bank controlled using seven bits, i.e. one bit per filter. The filter mode is 7. The RF path is not shown.

Encoded bits control

The digitally encoded bits control is a bit more complex at the filter side. This is because it the encoded bits to be converted into which filter to control. So a decoder is needed, e.g. the 74138 that can convert up to three bits into eight positions or the 74154 that can convert four bits to 16 positions.

Example of a filter bank controlled using three encoded bits. The filter mode is 3. The RF path is not shown.

If using three bits the FILTER (bin to hex table) values are:

  • 0x00 (D2:D0 000)
  • 0x01 (D2:D0 001)
  • 0x02 (D2:D0 010)
  • 0x03 (D2:D0 011)
  • 0x04 (D2:D0 100)
  • 0x05 (D2:D0 101)
  • 0x06 (D2:D0 110)
  • 0x07 (D2:D0 111)

If using seven bits some of the FILTER (bin to hex table) values are:

  • 0x00 (D6:D0 0000000)
  • 0x01 (D6:D0 0000001)
  • 0x18 (D6:D0 0011000)
  • 0x7E (D6:D0 1111110)
  • 0x7F (D6:D0 1111111)

Analog control

The analog way to control the filters requires a conversion of the analog voltage to a digital representation, e.g. using an ADC or LM3914 like done by ICOM.

Example of an analog control of a filter bank. The filter mode is 8. The RF path is not shown.

In the above example the voltage made by the RFzero should be in the middle of the voltage interval for each filter, i.e.

  • 0 V to 0,4 V => 0,2 V => 0x08
  • 0,5 V to 0,9 V => 0,7 V => 0x1B
  • 2,9 V to 3,3 V => 3,1 V => 0x77

To convert a target voltage (U) to the FILTER value (analog to hex table) please use this formula

FILTER = 127 x U /  3,3

e.g. if the target voltage is 0,7 V

FILTER = 127 x 0,7 / 3,3 = 26,9 => 27 => 0x1B

If the analog voltage needs to be amplified an operational amplifier (Op Amp) implemented as a DC-coupled and non-inverting amplifier is a good solution, e.g. LM324 see section 8.2.1.

Example of a DC amplifier using an LM324 Op Amp in non-inverting configuration. Picture courtesy Texas Instruments and own work.

Output voltage range
[V]
Amplification
ratio
R1 (E96, 1%)
[kΩ]
R2
[kΩ]
R2 (E96, 1%)
[kΩ]
0,0 - 5,01,52105,15,11
0,0 - 8,02,421014,214,3
0,0 - 12,03,641026,426,1
0,0 - 13,84,181031,831,6

Ferenc, HA6QL, has made a solution using an LT1013 Op Amp, an LM3914 and using discrete components to switch the relays.

Using ICOM compatible devices

If you want to use your RFzero together with ICOM compatible devices, such as a low pass filter, you will have to amplify the analog voltage from the RFzero to 0 V to 8 V level as described above. You will also have to set the FILTER values according to the table below.

Band
[m]
ICOM ACC2-4 voltage
[V]
RFzero voltage
[V]
FILTER
[hex]
103,51,438
154,31,844
205,02,14F
300,00,000
406,02,55F
806,62,769
1607,53,177

Update the WSPRnet locator database

You can use this input form to manually update your locator in the WSPRnet.org database in case it is incomplete or wrong. Please don’t change another station’s locator.

Your own call sign :   3-10 characters and must be ITU compliant
Your own locator :   format JO65HQ
Call sign of WSPR inventor :   anti spam check and confirmation of intention