Tuesday 29 October 2013

Beacon Clocks & Chocolate Teapots

Well - the "Real-Time" clock isn't nearly so accurate as one might hope...


It has been gaining 8 seconds per 24 hours - exactly the same order of error as I was experiencing with the Arduino timing itself (on its internal clock) BEFORE ANY CLOCK TRIMMING.

As trimming the RTC module (e.g. by deliberately throwing away a second every three hours) would only help when the beacon system actually is running, I've decided to abandon the whole "Real-Time" Clock idea...

Despite these timing challenges, the beacon has been performing well (as I've forced a clock re-sync every 8-12 hours). Here's the WSPR performance over the past 24 hours on 30m...


For the moment I've gone back to my original "Occam's Beacon" code, which derived timing from Arduino's "millis()" function. 

For the longer term, I've ordered a GPS module - Hans g0upl lists them at an attractive price.

"Time gentlemen please" de m0xpd

Sunday 27 October 2013

The New Gold Standard in QRSS Grabber Aggregators

In the course of testing "Occam's Beacon" with the new Real Time Clock, I just stumbled upon Scott Harden's excellent "QRSS Plus" aggregator...


Scott has sorted the wheat from the chaff by detecting those grabbers that are active and gathering them all together on one automatically updating page. Brilliant.

I contacted Scott to say "thanks" and was embarrassed to learn that QRSS Plus has been up-and-running for 6 months. I know I'm not exactly an early adopter but this is ridiculous!

In Scott's own words, "It's an entirely server-side PHP script with a cron job that updates every 10 minutes. If images differ (based on MD5), the grabber is assumed to be active. It was so simple, I'm amazed no one has done this before me :)".

In my own words, "this is the new gold standard"!

Well done and thanks Scott, from one very satisfied new customer,

...-.- de m0xpd

Beacon Real Time Clock

Today I lashed up a Tiny RTC module to the "Occam's Beacon" system...


The RTC uses the Maxim DS1307 chip and communicates with the Arduino over I2C, which it shares with the LCD display. There's a battery on the module to keep the clock ticking when the system is turned off.

I've arranged for the code to start the beacon cycle on the next "even" minute after power up - all that remains to be seen is how accurate the long-term time keeping is! If the clock drifts I can correct things as I've added the ability to sync to the "top of the minute" with a button press. The code is a "provisional" version, which I'm still testing - I'll publish when I'm satisfied that it is worthy of your consideration!

tick-tock de m0xpd

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

Tuesday 22 October 2013

Arduino Sudden Tx Shield Available Now!

I am delighted to see Kanga's announcement that the Arduino "Sudden" Transmitter Shield is to be launched at the Rishworth G-QRP Mini-Convention at the weekend...


You met my prototype in this post, where I promised that, once the commercial kit was ready, I would "post the complete schematic, in true open-source spirit".

Well - here it is...


As you see from the schematic, the shield hosts not just George's transmitter circuit but also a power supply (to derive 5V system power from the "12V" radio supply) and a flexible input buffer/amplifier arrangement, to allow the transmitter to operate with a range of RF signals (including - of course - those from the Kanga / m0xpd DDS Shield).

The transmitter puts out just under 2W - as I confirmed yesterday by sending WSPR signals on 30m which were received in Tasmania (again) and Venezuela!

There are complete design files (including an Eagle PCB design, suitable for single-layer construction - as in the prototype) on the "Occam's Micro" support page

You can meet the new transmitter shield on the Kanga Products stand at Rishworth.

See you there!

...-.- de m0xpd

Sunday 20 October 2013

Occam's Dagger

You've heard about his Razor - well now William is tooled up with a new blade - meet "Occam's Dagger"...


It is just as sharp as the original "Occam's Microcontroller" rig, but it packs a much bigger punch in terms of functionality.

Using the extra opportunities presented by the 16*4 alphanumeric display and three push buttons (which could be added to the mix as there were some I/O pins freed up by the display's I2C interface), I've built a menu-driven User Interface. This takes the "root" display from the Kanga Enhanced VFO project, as recently hacked to make a beacon...


and adds Receive Incremental Tuning...


the ability to switch between two "VFOs"...


the choice of CW or CW(Reversed) modes...


band selection (top band through 20m)...


choice of automatic CQ message (CQ, CQ(/a), CQ(/p), CQ QRP and CQ FISTS)...


and keyer speed ("dit" length in milliseconds)...


All of this functionality is controlled with the main rotary encoder and the three buttons...


In normal operation, the rotary encoder changes frequency whilst the left and right buttons move the frequency cursor (to change the digit which the rotary encoder is adjusting). Pressing the "CQ" button initiates an automated CQ call, which can be aborted by touching the key or paddle. Pressing the rotary encoder's push-button invokes menu mode...

In menu mode, the left and right buttons navigate between menus, whilst the rotary encoder selects values in each menu - either adjusting a continuous variable or selecting from a list. Pressing the rotary encoder's push-button exits menu mode.

The rig uses the "stack" of shields  familiar from the original "Occam's Microcontroller" rig...


but, unlike the original rig, Occam's Dagger uses the recently prototyped Sudden Tx shield and a new Rx shield based on g3rjv's "Sudden" receiver, now under development. 

Here's the prototype PCB for the new Rx shield, produced by a guy who was offering a PCB milling service through ebay (seems the service isn't available at the moment - so I can't give you a link)...


More details on the receiver will follow in a later post - suffice to say (for the moment) "it works"!

All of the above was produced to illustrate the principles described in the "Occam's Microcontroller" article, which is an open-source project. The components of the user interface which distinguish it from the previously published rig are shown in the following schematic...


The Arduino sketch which powers Occam's Dagger ("Occams_Dagger_0v1.ino") is available for download here . Copy it if you like or - better still - adapt the methods for use in your own experimental rigs!

I unsheathed the dagger for the first time yesterday afternoon, and answered a CQ from g3mck. Turns out that Gerald (who gave the Dagger 559) was in "Oakham" - not "Ockham", but remarkably close!

You can come and meet Occam's Dagger at the G-QRP Rishworth convention next Saturday - see you there!

...-.- de m0xpd

Saturday 5 October 2013

Following Noble Tyre Prints

Having quoted from the book in my recent article in SPRAT, I was pleased to spend last week in "Five Red Herrings" country.

I was staying just outside Gatehouse of Fleet, at the West Lodge of the Cally Estate - a beautiful place for a holiday (although persons of a nervous disposition might find the interior decor a little overwhelming).

One day, the XYL and I decided to follow the suggestion Wullie Murdoch had given to Lord Peter in Chapter 2...
"Ye maun tak’ the coast-road through Creetown to Newton Stewart ... and turn to the richt over the brig and then to the richt again at the signpost along the road to Bargrennan and juist follow the road till ye turn over a wee brig on the richt-hand side over the Cree and then tak’ the richt-hand road.

We, of course, were starting from Gatehouse rather than Kirkcudbright, but we followed the route as best we were able from there on. Words in italicized yellow are from DLS, the remainder from me.

"(W)e passed through Gatehouse, waving a cheerful hand to the proprietor of the Anwoth Hotel...


As you see, the Anwoth is now called "The Ship Inn".

Next, we "climbed up beneath the grim blackness of Cardoness Castle"...


Joining the west-bound A75, we "drank in for the thousandth time the strange Japanese beauty of Mossyard Farm, set like a red jewel under its tufted trees on the blue sea’s rim"...


Mossyard now farms not just cattle and sheep but also tourists, with cottages and lodges for rent. Its "strange Japanese Beauty" is a reference to the conspicuous stand of sycamores, visible from the main road. Unfortunately, the equally conspicuous red barn (which, I was told, explains Dorothy's "red jewel" similie) has recently been demolished. 

We pressed further along the A75 to find "the Italian loveliness of Kirkdale, with its fringe of thin and twisted trees and the blue Wigtownshire coast gleaming across the bay".  


Unfortunately, much of  Kirkdale's Italian loveliness was obscured by typically dreich Gallovidian weather! 

Behind Kirkdale (and actually before it in a strict, sequential itinerary) is "the old Border keep of Barholm, surrounded by white-washed farm buildings"


Recent renovations have seen the grim granite painted - diluting the contrast with the adjacent farm buildings.

Following the text, we drove on west, always aware of "the huge hump of Cairnsmuir rising darkly over Creetown."


Whilst we were aware of it, we couldn't see Cairnsmore at this point - the picture above was actually taken a couple of hours later from the road between Creetown and Gatehouse Station, near Falbae.

"Then the open road again, dipping and turning – the white lodge on the left, the cloud-shadows rolling, the cottages with their roses and asters clustered against white and yellow walls; then Newton Stewart, all grey roofs huddling down to the stony bed of the Cree, its thin spires striking the sky-line. Over the bridge..."


"and away to the right by the kirkyard, and then the Bargrennan road, curling like the road to Roundabout, with the curves of the Cree glittering through the tree-stems..."



"...and the tall blossoms and bracken golden by the wayside. Then the lodge and the long avenue of rhododendrons – then a wood of silver birch, mounting, mounting, to shut out the sunlight. Then a cluster of stone cottages – then the bridge and the gate..."



The bridge is reached from a right turn off the A714, some 8 miles north of Newton Stewart, near a place called "Clacheneasy" and - fortunately - it is no longer gated!

We followed DLS' description of the route, climbing "the stony hill-road, winding between mounds round as the hill of the King of Elfland, green with Grass and purple with heather and various with sweeping shadows". 

Just like Wimsey before us, we "pulled up as (w)e came to the second bridge"..


where we found not just The (Water of) Minnoch but - surely - the self-same point on that river where Campbell's corpse was discovered (in fiction, at least).

I had always read FIVE believing "The Minnoch" to be a product of Dorothy's imagination. 

Last year, whilst holidaying in nearby Ballantrae, I discovered it is a real river. 

This year, simply by following what turned out to be clear instructions in the text, I found what I am convinced is THE PLACE - a beauty spot which Dorothy surely visited as a tourist herself some 75 years ago.

Here's The Minnoch, looking upstream (i.e. North) from the "second bridge"... 


The Minnoch was in glorious spate after rain the night before. There were any number of points where an artist might wish to erect an easel and from which might slip to an unfortunate accidental death - or from which (s)he might push an already dead fellow artist's corpse to simulate the same accident!


For others repeating this pilgrimage, the second bridge actually takes you across The Minnoch to the visitor centre at Glentrool (or, at least, a mile-or-so east of the village of Glentrool)...


We managed to park our car rather more easily than Lord Peter did, as grass verges are now supplemented by a car park, and the visitor centre provided a fine bowl of soup and pot of tea. Our "cup of happiness was full. (We were a couple) who loved simple pleasures

...-.- de m0xpd