Friday 25 October 2013

Occam's Beacon

Over the past few days I've been running a beacon system on 30m...


Partly to provide opportunity for a soak test of the first build of the Kanga / m0xpd Sudden Tx shield and partly as context to get the beacon code I promised ready for you. Both of these goals are accomplished.

You can download the Arduino sketch for my multi-band, multi-mode beacon system, 'Occams_Beacon_0v1.ino' here.

It uses the same core architecture as the Occam's Dagger rig - except it makes no use of the receiver section (nor, indeed, the automatic CQ call button!). For completeness, here's a schematic of the main components...


and here's the prototype system on the bench...


The system provides WSPR, QRSS (FSK-CW) and (QRQ) CW on a 10-minute cycle...


The band of operation (80, 40 or 30m) is selected by the rotary encoder and (although there are default frequencies included) the frequency of both the QRSS and the WSPR emissions can independently be changed using the rotary encoder, using a menu structure similar to that seen in Occam's Dagger...



If you decide to download the sketch and run it for yourself, you will need to personalize the code for your own use in three ways...

Firstly, you need to add your own call-sign (and a potentially longer message for QRQ morse) - we don't want either my call or the fictitious "x0xxx" in the code ringing out across the ether! These can be any text string (but the beacon doesn't currently support spaces)...


Note that your call in QRSS(3) morse will take quite a long time to send - so, if you have a long call (such as poor OM 2w0joy over in the principality, who I just made up) or start adding  long suffixes like "/mm", the overall timing of the beacon may need changing!

Secondly you need to insert your WSPR message ...


You can generate your WSPR message using the command line utility WSPRcode.exe, as described in this earlier post.

[I plan to modify the Arduino sketch to generate the WSPR message automatically - but I haven't had chance yet. Fortunately for us, Andy, g4jnt, has published instructions which explain the math.]

Finally, you need to set a constant which compensates for the precise frequency of your Arduino's clock (from which overall timing of the beacon is derived), by lying about the number of milliseconds in a minute!


The best way to do this is to run the beacon for a few hours and observe the timing drift (in seconds). Divide the number of seconds of drift by the number of seconds you ran the beacon for. This will give you a small fraction, which you should multiply by the current value of the constant "SixtyThousand" and round to the nearest whole number, n. If your beacon is running slow, SUBTRACT n from SixtyThousand and use that as the new value for SixtyThousand. If it is running fast, ADD n to sixty Thousand. You can repeat the procedure to refine your particular value for "SixtyThousand".

Sounds tricky - but it is easy in practice - you'll get the timing to the point where the beacon will stay in sync over many days.

As you see in the graphic above, I have used a genuine Arduino Uno, which needed a value of SixtyThousand = 59995 and a clone Arduino MEGA, which needed a value of SixtyThousand = 59961. I wonder if the clone used a cheap crystal?!?!

When I have some time, I'm planning to experiment with a simple real-time-clock for beacon timing - which might remove the need to experiment with the more expensive option of GPS! Then again, the crystal in a cheap RTC might be as bad as the crystal in a cheap Arduino clone HI HI.

You need to start the beacon such that its period begins at the start of an "even" minute (0 , 2, 4.. minutes past the hour) for your WSPR emissions to be received. In practice, this means releasing the "reset" button of the Arduino a couple of seconds before the start of the minute, to give the sketch time to start. Practice makes perfect!

The system has been working FB - here's the FSK-CW signal at pa9qv in the initial 40m test...


(you also see one of the QRQ CW bursts at the end of my QRSS call).

Here's the FSK-CW signal at pa1gsj on 30m...


and here are the last few nights of WSPR reception on 30m...



Join in the fun and use this open-source, multi-band, multi-mode beacon with my compliments!

...-.- de m0xpd

1 comment: