WSPR transmitter using Arduino

What an interesting project …. assisting in the building of a WSPR beacon for ZS6CNP.
It all started from a message post in our “EARS WhatsApp Group” in April 2017 ….  “Who is interested in learning more about Arduino programming? I am prepared to pass on some knowledge gained from my project, signed JJ, ZR6JS” 

A few more posts later, “I bought a WSPR shield as an Arduino project and it came with a bag of parts / items. Anyone able to assist me building this project? Connel, ZS6CNP”

For a background, a specific supplier has available two WSPR kits both requiring assembly. The first kit is provided with a pre-programmed processor and can be housed in an optional enclosure whilst the other is provided as shield board that plugs onto an Arduino Uno. ZS6CNP chose the shield option. 


The unpopulated WSPR shield
Various options are available so as to cater for a variety of needs. 

The shield kit is supplied with all the necessary components however it is a requirement that a RF Low Pass Filter module (as applicable to the band you wish to operate) needs to be purchased. The shield includes a single RF transmitter transistor (BS170) used for generating 200mW output TX power however additional BS170’s (two) can be fitted so as to increase the TX power output. 

The VFO, another needed requirement, is a Si5351 breakout board controlled by the Arduino processor. The output of this board feeds the RF output transmitter transistor / power amplifier. ZS6CNP had previously purchased a Si5351 breakout board for use as an alternative oscillator for a can type “crystal oscillator” that is missing in a HF radio that he has. An adapter board was made to allow its connection to the WSPR shield board.

Adapter for Adafruit Si5351
The alternative is to purchase the suppliers Si5351 breakout board version. It fits directly on the WSPR shield board without the need of an adapter board however does require some assembly of certain components.  

For maintaining the accuracy of TX transmission times, an optional GPS or RTC breakout board is available. ZS6CNP purchased a locally available GPS breakout board. 

A hic-up, you need to write your own coding if you build the WSPR shield. Well never despair, Dr Google to the rescue. 

Arduino IDE was downloaded and installed for compiling the shield coding. Then it necessary to become familiar with coding steps and to understand the cause of various code error messages. I certainly had a number of error messages and quickly learnt about the difference between sizes of bytes, arrays and various definitions.  

Well there was a lot of information found however nothing specifically written for this shield so what to do next. There were some examples of what others had done but these were very different to our needs.

Firstly, we needed to have an LCD display so pin-out re-configuration of the shield needed to be evaluated. This was achieved by using Arduino pin-outs as allocated to an optional “band relay switch” module to drive the display with some re-arranging other pins to other necessary functions. This was only possible due to having to write our own code.   


Homemade adaptor for the Si5351 breakout board as 
installed. The LPF board on left not yet populated.
We went through all the information that was downloaded so as to see what appears to work. 
This was the fun part. Some coding had built in errors so never worked as per published detail. It was a matter of breaking down the code into smaller workable blocks and then following the other persons thinking to find the error.  

There were also those codes that were written in a very complicated way. I think this may have been to cast doubt between either a hardware or software problem. When stuck, Dr Google to the rescue however this time on very specific topics. The information is out there on internet, just needed to find it and we did.

Progress in coding appeared slow however a lot was being learnt. Some aspects of the learning experience are covered in following paragraphs.

There are a variety of GPS messages transmitted from orbiting satellites and one just needed to “read” a specific message via the GPS module so as to obtain your “3D” location, UTC time and date. Other messages could provide information about the transmitting satellite, speed of travel, and a lot more. 

The GPS module as used in this build provided a 1PPS (one pulse per second) signal which was used for incrementing the “time” coding of our code. Conversion of the provided GPS location to a grid location was also done in the Arduino coding so the unit could be moved around South Africa and the transmitted WSPR message can automatically be updated. Some interesting mathematics involved which could be duplicated using a standard package of MS-Excel. 

Next aspect of coding was to tackle that of controlling the Si5351 VFO to generate the required TX frequency. 

The first challenge was to understand how this is being done. The suppliers’ datasheet was found to be extremely useful however it was found later on that there was also available a datasheet of register features not specified in the original. 

Please remember it was previously said that this breakout board can be used as the replacement for a can “crystal oscillator/s” that are no longer available for older generation equipment. I would like to explore more of this aspect as I do have a need to build an accurate VFO generator.

First list of coding completed, compiled and uploaded. The test indicated I was generating the TX frequency when the Arduino was switched on however no TX frequency generation when it was time for the WSPR message to be transmitted. Found two lines of code for controlling the Si5351 swopped around. GPS sorted, TX frequency sorted, now the WSPR message. 

A lot of information was found by Dr Google and there were varying thoughts about how it was best done. I however did come across an article “WSPR Coding Process” written by Andy Talbot, G4JNT indicating his steps in a very simple format.

Interesting to note, a WSPR transmission message consists of 162 symbols each with a reciprocal of the tone spacing in which each symbol length is 0.683 seconds. Total transmission time of this message is around 110.6 seconds. 

Combine all the above and the WSPR message coding into an Arduino sketch, compile and upload to the Arduino processor you now have an operational WSPR unit. That is what I thought.

A dummy load was connected to the RF output connector and peak-to-peak voltages checked using an oscilloscope. Well it was not a sine-wave as per assembly literature so into some fault finding. 

Adjustments to the bias voltage of the RF transistor made no improvement so the guessed there was a problem with the Low Pass Filter board. Many comments were made on various forums about this adjustment and RF problems however my best source of information is the datasheet of the supplier.

Part of the assembly process for the LPF board was to wind the required number of turns of wire on the provided toroid/s so as to obtain the specified inductance value. 

Well you must remember to start from the correct side of the toroid and then wind the wire in the correct direction so as to fit / match the circuit board requirements.  Next is to read the assembly instructions and count the number of turns “inside” the core and not on the outside.

An inductance “Ring Core Calculator” software package by a supplier provided the error in inductance value by not having the correct number of winding. Also of interest was this calculator indicated that a maximum diameter of wire of 0.85mm could be used. The provided wire was around 0.4mm. All very interesting!!!   

Another software package provided graphical detail of the expected band-pass using similar values to those published in the assembly instructions.

Well some new ‘insulated” wire was needed so into the scrapped electronics and found an old TV monitor circuit board. This provided some transformers and chokes. These were split open to determine the diameter of the wire that was used. The wire in one transformer was similar in diameter to that originally provided. It was then wound onto a number of spare / empty bobbins as used in the sewing machine as used by the XYL. 

Dr Google found a document “Toroid Tool.pdf” which provided a very simple tool that could be made and used for winding a toroid. What I liked about this tool was it was simple, the inner cores wires did not cross over or overlap each other, and it was possible to keep the wire reasonably tight around the toroid core.


This gadget could hold the toroid whilst adding the required turns 
of wire. It was made from an offcut piece of PVC sheeting.
With the new wire fitted to the toroid/s (and the correct number of turns counted) they were refitted to the LPF circuit board. Monitoring the RF output signal with an oscilloscope now indicated the required sine-wave signal. 

Final stage of project was to now adjust the RF output power to read 0.5W   Well I have a SWR meter and found out by reading the provided manual that to check operation of the SWR meter one can at low power reverse the direction of RF signals to the meter. Max power for reflected power was 10W when the 30W range selected. The markings of low Watt values were easy to read so that is what I did; used the SWR meter opposite way round.  0.5W was now easy to see and the back calculation of power to Vpp matched the peak-to-peak value as read on the oscilloscope. 

At 0.5W it was found that the three RF transistors were getting quiet warm so I added a “homebrew” heat sinks made out of some thin metal also obtained from the scrapped TV monitor.


Power Amplifier stage with homemade heat sinks. 
Also showing the LPF module for 20M

Another new thing learnt was 100W RF output power equates to a 200Volts peak-to-peak RF sine-wave at the radio output connector/antenna. Very much like ESKOM power except at a much higher frequency. That’s why during RAE class we were told to “be careful” not to touch an antenna during a transmission. 
If you do not believe me check the back calculation mathematics of 100W RF power into a 50 Ohm load. You will be surprized as I was.

WSPR unit now fully operational, let us get on the air. Connected the RF output to my “tuned” 20M inverted-vee antenna, again checked the RF signal with an oscilloscope and now wait. 


The first running version under test.
Well we were soon spotted by local WSPR / ZS Beaconeers (ZS6, ZS5 and ZS1 operators) and then by various operators in Europe. Other recent DX spots include Australia (VK2XN, VK2CBD & VK5AK) and more recently USA (W4HOD). This was after raising the antenna another 1 metre.


The second running version under test after
transfer to a modified “PC” power supply unit

Overall: an interesting project assisting ZS6CNP, definitely learnt a lot and I guess helping those who use the WSPR website to determine suitable propagation condition times for DX contacts.

Now to build a RF VFO unit based on the Arduino concept. It was found by Dr Google and uses all the components as used in building this WSPR unit. Should be a lot easier to build and program.

73
Des
ZS6DEZ
http://zs6dez.blogspot.co.za/


** Since the initial writing of this article, button switches have been added to the WSPR unit so as to allow the user a facility to manually change some of the setup parameters instead of having to reload the Arduino processor with modified data compiled using a computer.