WSPR TX Exciter - Arduino Nano ESP32 + AD9850 DDS + NEO-6M/8M GPS
This is a WSPR Transmitter exciter that uses an Arduino Nano ESP32 to control an AD9850 DDS module. It also allows automatic position location using a NEO-6M or 8M GPS module.
Please see the separate document with a diagram and photo of a working system.
The output of the exciter is a WSPR transmission that covers the HF bands and 6m. The output is quite low – at or around 1mW (0dBm), therefore an amplifier is required to transmit usable WSPR signals. A linear amp with a gain of about 30 to 36 dB will provide an output of between 0.5 and 4 Watts (27 to 36 dBm).
It is best to house the TX exciter in a metal case. Leave a slot for a USB-C cable to connect to the Arduino and connect a BNC or similar connector to the output of the AD9850 via a 4:2 transformer based on a 4:2 turn FT37-43 toroidal core. This transforms the output to about 50 Ohms. Once wired up according to the diagram you are ready to program the Arduino.
Programming the Arduino
1. If you haven’t already done so install the Arduino IDE (from https://www.arduino.cc/en/software)
2. Connect the Arduino to your PC
3. Find which COM port it is connected to (you can find this by entering the Device Manager and looking for Ports COM).
4. Download the software from the “Arduino_WSPR_TX” folder on Sourceforge at: https://sourceforge.net/projects/wspr-scheduler/files/Arduino_WSPR_TX/
5. Unzip it and then open the .ino file in the Arduino IDE.
6. Under Tools select Board and then Boards Manager
7. In the search bar enter: Arduino ESP32 – this should be installed – if not install it.
8. In the IDE under Tools select Port
9. You should see the Arduino Nano ESP32 here – so select it and make sure that it’s the one displayed at the top.
10. Under Programmer in Tools – this should be “esptool”
11. Once you have the connection to the board select the Upload button (the right facing arrow to the top left of the IDE)
The app will load to the Arduino.
12. Once uploaded select Tools and Serial Monitor.
13. Ensure that the baud rate is set to 9600 (right hand side of the monitor)
14. At the monitor prompt enter: HELP
A list of serial commands will be displayed as follows:
SET CALL <callsign>
SET LOC <locator4/locator6>
SET 4/6
SET PWR <dBm>
SET BAND 160, 80, 60L, 60H, 40, 30, 20, 17, 15, 12 or 10
SET OFFSET 0-200Hz
SET ONETX y/n
SET INTERVAL 0, 2, 4, 6, 10, 14, 20, 30, 40 or 60
SET DEFAULT
SET TX ON/OFF
TXNOW
TXSYNC
TEST
GPS ON/OFF
SCAN
SET SSID
SET PASS
STATUS
REBOOT
ERASE EEPROM
Connect to your Wifi
1. In order to communicate with the web interface you will need to connect the Arduino to a wifi network. To do this:
i) Enter: SCAN
This will scan for wifi networks and you should see your own wifi network (SSID) in the list if you have one of course.
ii) To connect to the network enter:
SET SSID yourwifi
(where yourwifi is the name of your wifi network (it is case sensitive))
iii) Next you’ll need to enter your wifi password:
SET PASS password
(where password is your own password for your wifi)
The Arduino should then connect to your wifi.
To check the status of the wifi and other settings enter: STATUS
Initial Configuration
1) You will need to set your own callsign – enter SET CALL callsign
Where callsign is your own call, eg. SET CALL AB1XYZ
2) To set your locator enter: SET LOC locator
Eg. SET LOC AB10
This may be 4 or 6 digits, but if it is 6 then it will be ignored unless you enter:
SET 6 (or SET 4 to return it to 4 digits)
3) To set the nominal power enter: SET PWR dBm
Where dBm is a numerical value from 0 to 60
eg. SET PWR 30 (for a 1W TX)
Only recognised values are allowed in WSPR:
0,3,7,10,13,17,20,23,27,30,33,37,40,43,47,50,53,57,60 (from 1mW to 1kW)
this setting does not change the TX power (that’s determined by your amp) , but is used in the WSPR message.
4) To change to a particular band ready for transmitting:
SET BAND band
Where band is a WSPR band in metres, eg. SET BAND 40
for 40m (7MHz)
Allowed bands are 160, 80, 40,60L, 60H, 40,30,20,17,15,12,10 (and 6)
60L represents the WSPR frequency of 5.2872 MHz and 60H 5.3647MHz
5) You’ll need an offset between 0 and 200Hz to place your signal somewhere int eh WSPR passband. To set this enter: SET OFFSET Hz
Where Hz is the offset, eg. SET OFFSET 20 (offset of 20Hz)
6) To switch the TX on ready to transmit enter: SET TX ON
(and SET TX OFF to switch it off)
Transmitting
1) To start transmitting now enter: TXNOW
This will start sending a WSPR message, but won’t wait until the next even minute – so if you intend someone to receive it you need to enter this on exactly an even minute.
2) To transmit a WSPR transmission from the next even minute enter: TXSYNC
This will wait until the next even minute before transmitting the WSPR message.
Note: make sure that the clock is synced to the nearest second if you use this. If you are using the GPS and it has obtained a fix then the time should be correct.
3) To run a short 30 second test enter: TEST
This will just transmit a carrier for a short test of the TX.
4) If you wish the TX to repeat transmissions you can set a repeat interval in even minutes: SET INTERVAL mins
Where mins is the interval and one of the allowed values:
0, 2, 4, 6, 10, 14, 20, 30, 40 or 60
A value of 0 will switch off repeats.
5) If you are using a compound call (one with a suffix or prefix) or a 6 digit locator (and SET 6 has been configured WSPR will send two transmission to send the call, power and locator information. The first message a standard type 1 (call, locator, power) and the next a type 2/3 (compound call, locator).
However if you enter SET ONETX y
The compound callsign, locator and power will be sent in one type 2/3 transmission instead of two, but if you want to send it in two messages enter: SET ONETX n
Other Serial Commands
STATUS - Display the current settings
GPS ON/OFF - this will allow you to get the time and position from the NEO-6M module
GPS ON to switch it on and GPS OFF to switch it off
Note: that with the GPS off you will need to enter the locator manually and ensure that the clock is correct.
SET DEFAULT – this will change all settings to the defaults shown at the top of the Arduino sketch – this means that the calla and locator etc will be wrong unless you manually change the defaults in the Arduino program.
REBOOT – as its name suggests this will reboot the Arduino (it won’t lose the values that you have stored)
ERASE EEPROM – this will erase the Arduino eeprom and you will lose your configuration settings.
Note: this can be useful if you make changes to the structure of the database in the Arduino app.
Connecting to the Web Interface
Once you have connected the Arduino to a wifi network you can find its IP address from the STATUS command.
Open a web browser and just type in the IP address of the Arduino in the address bar.
A web interface will open and you can make changes using a mouse or using a smartphone or tablet. Most of the settings available in the serial interface are available in the web interface.
Note: that you shouldn’t use both the web interface and the serial interface to make configuration changes at the same time – it’s one or the other, but once you’ve got the web interface working you close the serial monitor (or disconnect Putty) and use the web interface instead.
However, it is best to use the serial interface for more advanced troubleshooting.
Using Putty to Connect to the Serial Interface
Once the app has been transferred to the Arduino and it is working you can use a terminal emulator app such as Putty to connect to the serial interface of the Arduino.
You can obtain Putty from: https://putty.org/index.html
You either install or run it.
To connect using Putty:
1) Connect the Arduino to your PC USB port.
2) Make sure that the Arduino IDE isn’t running (or at least the Seral Monitor is closed)
3) Find the COM port that the Arduino is connected to your PC.
4) Start Putty
5) Under Session select the Serial button and enter the com port number, eg. COM4
6) Select Terminal and then select Force On for Line discipline options (this will allow commands to be echoed back to Putty)
7) Then select Open
8) Enter status and you should see the current settings of the Arduino TX
You can enter all of the other commands here too.
The Arduino App API
As well as a serial and web interface the Arduino WSPR app has an Application Program Interface (API) that allows third party web based apps to interact with it. The serial commands can be used over an IP connection from the other app. WSPR Scheduler can use the API, but you can also enter commands from a web browser.
The syntax of the commands that can be entered in the address bar of a browser is:
http://<ip_address>/api/cmd?c=<command>
For example, to start the transmitter enter: http://<ip_address>/api/cmd?c=TXNOW
An example might look like this:
http://192.168.1.2/api/cmd?c=TXNOW
The commands can be chained by separating them with a semicolon – for example:
http://192.168.1.2/api/cmd?c= SET FREQ freq;SET CALL call;SET OFFSET offset;SET LOC grid;SET PWR pwr
Please see the document “Installation_and_Configuration_Vx.pdf” in the WSPR Scheduler Sourceforge files for information on how to use the API to control the Arduino WSPR TX. The relevant setting for this app are shown below.
WSPR Scheduler settings to talk to the Arduino WSPR TX
(and any similar one with an API)
TCP or UDP Connection
If the transmitter has a TCP (or UDP) connection you can enter its IP address and port number (if it is using a web based interface then it is normally TCP port 80, but you can change it in your TX software).
The external TX should have a web based Application Program Interface (API). You will need to enter the command that calls the API. Normally it starts with “http//<ip address>:<port no>/. You only need to add the rest of the command to call the API commands in the “API URL” text box. An example of this is: “api/cmd?c=”. When combined with the header the call to the API becomes: <http://<address>:<port no>/api/cmd?c=”
The header, including the, IP address and port number, will be automatically entered for you from the information you entered in the protocol, IP and port boxes above. An example output to the TX might be: http://192.168.1.2:80/api/cmd?c=”
Next in the “TX command” box you enter the commands that will change the TX frequency and any other commands, separated by a semi colon.
For example:
SET FREQ freq;SET CALL call;SET OFFSET offset;SET LOC grid;SET PWR pwr
These values (eg. freq, offset etc.) will be substituted for the values taken from the slot database (or if not using that from the TX Config tab) – of course the call and locator will be those set in the TX Config tab. Note that the power setting does not modify the TX power in most cases – you should set this to the power that your TX uses (ie. if you set the pwr to 40 and your WSPR TX amp is a 1 Watt amp – you won’t get 10 Watts out of it! – you’ll need to set this value to match the amp). Also note that if the TX has a GPS module it may override the locator (grid) setting.
In the “Command to start TX” box you should then enter the API command that starts the WSPR transmission. For example: TXNOW
In the “RX Command” box enter the command to return to receive. For example: STOP
Arduino Nano + AD9850 WSPR TX Exciter project:
Note: the above commands have been tested with an Arduino Nano ESP32 driving an AD9850 DDS module to generate a WSPR transmission. A NEO-6M GPS module is used to provide accurate locator information. A diagram of this is shown in the “Arduino_WSPR_TX” folder on Sourceforge where you will find a diagram of the WSPR TX exciter and Arduino source code. This software when uploaded to an Arduino Nano ESP32 has a serial interface, a web interface that can be accessed from a web browser and an API that can be used by third party software such as WSPR Scheduler to control the WSPR TX.
A separate user document will be available to set this up.
Once you have connected your Arduino WSPR TX to wifi you can then setup WSPR Scheduler under the Non rigctl tab as follows:
a) Add a new TX
b) Enter a name (eg. “WSPR nano AD9850 TX”)
c) Select TCP
d) Enter the IP address of your TX module
e) Enter port 80
f) In the API URL field enter: api/cmd?c=
g) In the TX command field enter:
SET FREQ freq;SET CALL call;SET OFFSET offset;SET LOC grid;SET PWR pwr
h) In the Command to start TX filed enter: TXNOW
i) In the RX Command field enter: STOP
j) Hit Save to save the settings.
k) To use the new TX double click on it in the list so that it becomes the selected rig.
l) From the “Rigctl rigs” tab check the box “Do not use rigctld…”
You can now use the TX.
This is an Open Source project that is free to use under the GNU GPL v3 license.
It uses other libraries that are acknowledged within the code.