Meteor M-N2 Images

Tuesday, 31 December 2013

Arduino & AD9850 based WSPR transmitter - continued

Arduino & AD9850 based WSPR transmitter - continued




I have been improving the WSPR transmitter. I noticed that when setting it to transmit every other minute the code did not actually work. I think this was because after the tx period had ended the time that was in the serial buffer from the GPS was from before the tx period started. This consequently caused all sorts of problems.

There is no way to flush the serial buffer so I solved this by reading the time from the GPS for 1000ms after the tx period has completed. This allows the stale time to be read and discarded and the up-to-date time to be captured. After this 1000ms period a variable is reset to change the read time of the serial buffer back to 250ms.

The other significant change I have made is to what happens when the tx period has ended but it is not required to transmit in the subsequent 2 minute period. In the old version this was implemented crudely by using a delay of 5 seconds. This actually doesn't work because the tx period ends at around 51 seconds of the odd minute. Thus the delay actually needs to be around 15 seconds, to 5 seconds past the even minute to miss the tx period. I have now implemented this in code, this means that I can start to think about implementing a web based front end.

I don't intend to replace the delay of 682ms used to transmit each WSPR tone at the moment. As this is so time critical I will avoid it for now!

The code for the latest version (v6) can be downloaded here.
Note: you will also need to download and install a few libraries:


I made a homebrew Arduino shield incorporating the AD9850, the MAX232 chip and relay to switch the amplifier on, as shown below.



No comments:

Post a Comment