"Occam's Microcontroller" is my article in the Autumn 2013 edition of the G-QRP Club's "SPRAT" Journal - and the subsequent presentation at The G-QRP Club's Rishworth QRP Convention, 26th October 2013
If you read the pages of this blog with interest, you probably are a member of G-QRP. If not, I heartily recommend that you join.
SPRAT's editor George, g3rjv, kindly gave me permission to make a local copy of the article available through this website - you can download such a copy here and the associated double-page graphic here.
This page exists to provide supporting resources for the article (and for subsequent presentations associated with it). These resources include code, schematics and PCB design files.
This is a work-in-progress - there's a sufficient set of resources here now, but it is being added to over time.
Neither the article nor the initiatives connected with it deny or detract from the work which experimenters with special digital interests and expertise are conducting in the area of
"QRP Computing" -
"If I have seen (any distance at all) it is by standing on the shoulders of giants."
The present Occam's Microcontroller article deals in simple, accessible ideas of interest to all QRP experimenters, especially those contemplating taking their first steps with digital methods.
The Occam's Microcontroller RigThe intention of the article is to highlight opportunities presented by incorporating simple modern digital methods in the design of SPRAT-style radios - not to promote one particular design.
The ideas in the article have been demonstrated in the construction of a simple rig, a picture of which appears on the front cover of SPRAT 156 and is repeated here...
The example schematics presented in the article, and the "General Arrangement" in the main double-page graphic, all relate to this little rig.
The rig has few merits other than the facts that
- it works (I've had lots of QSOs on 80, 40 and 30m with it)
- it embodies the "Occam's Microcontroller" ideas (and displays them through its transparent "enclosure") and
- it provided me with hours of fun in pursuit of my "self-training in radio communications"
Remember: you are welcome to copy any of the ideas on this page but that's not my intention. My intention is to encourage you to use the general principles in your own rigs.
SOFTWAREThe arguments in the "Occam's Microcontroller" article are agnostic to the particular microcontroller being used. However, the article does describe the recent revolution in access to microcontroller technologies embodied in the "Arduino Electronics Prototyping Platform". All the resources presented on this page (and used in the original rig) are expressed in the context of the Arduino.
Those with appropriate experience can use any number of alternative microcontrollers (such as PICs) or physical computing platforms (such as the Raspberry Pi) to good effect. But I recommend that beginners seeking to follow the "Occam's Microcontroller" ideas start with the Arduino.
You can learn about Arduino and download the Arduino software from here.
There are useful tips and tutorials, explaining how to get started here.
Don't be discouraged if you are new to digital systems - "The Arduino programming environment is easy-to-use for beginners, yet flexible enough for advanced users to take advantage of as well".
Arduino programs are called "sketches". There are many simple sketches for beginners on the Arduino website - but Radio Amateurs also should see my Iambic Keyer example, which will give opportunity to learn in a more relevant environment.
You can download the sketch which drives the original Occam's Microcontroller rig from here.
You can also find a sketch to run a quick test on the DDS module (setting it to 1 MHz output) here.
There's a new version of the Occam's Microcontroller rig, using a 16*4 alphanumeric display - description appears lower down this page.
There's an even newer, enhanced version of the rig, called "Occam's Dagger", which is described here.
There is also a multi-mode beacon system, called (predictably enough) "Occam's Beacon", which uses the physical resources already introduced to generate various beacon mode signals (QRSS and WSPR), as described here.
HARDWAREThe "Occam's Microcontroller" rig is built around a stack of four PCBs, as seen in the photo below. The bottom of the stack is an Arduino and the upper three boards are Arduino "Shields"...
In truth, the bottom of the stack is not an Arduino proper - rather it is a "Wotduino" - my homebrew Arduino clone, which is described here. Eagle design files for a single-sided PCB version of the Wotduino can be downloaded from here should anyone wish to use it (Arduinos are so cheap it might not be worth the trouble!)
The other PCBs in the stack all share the same "Shield" format - Shields "are boards that can be plugged on top of the Arduino PCB extending its capabilities", as you can learn on the Arduino website. The DDS, Receiver and Transmitter shields are described below.
In fact, these three shields have an additional common feature; a common "bus" structure carrying RF signals. I've built an Eagle library including this component, 'm0xpd-Arduino.lbr', which can be downloaded from here.
The four boards - and the RF Bus - are seen in this "General Arrangement" drawing...
The DDS Shield
The "Occam's Microcontroller" rig is built upon a direct digital synthesis module which carries the AD9850 device. This module can be interfaced directly to an Arduino - but, for convenience, I have mounted the module on a new Arduino shield, as originally described here.
The schematic for the DDS shield is shown below.
Eagle design files for a single-sided PCB version of the DDS Shield can be downloaded from here.
The Arduino DDS shield is now available as a kit from Kanga.
The combination of an Arduino and the DDS shield can be used as an RF signal generator or a flexible VFO, as described here.
The Transmitter Shield
The "Occam's Microcontroller" rig used a transmitter built on an Arduino shield, as shown in the photo below and originally introduced here.
The transmitter followed the same core design as that in my "Funster Plus" rig, itself derived from Todd Gale's Funster 40 (itself derived from the "Ugly Weekender").
The schematic for the Tx shield is shown below.
Eagle design files for a single-sided PCB version of the Transmitter Shield can be downloaded from here.
I've since made a transmitter shield based on the Sudden Tx circuit, as described here.
The Arduino, plus DDS shield plus transmitter shield add up to a flexible beacon system or a CW transmitter.
The "Occam's Microcontroller" Rig used a simple 5th order low pass filter on the output - an Eagle design file of a single-sided PCB version of which is available here. Printed circuit boards for a 7th order low pass may still be available from Kanga.
The Receiver Shield
The Rx section of the "Occam's Microcontroller" rig is a development of the receiver section of Roy Lewallen's beautiful "Optimised Transceiver for 40m" - a favourite rig of mine. It was originally described here.
The full schematic is shown below...
The original shield is a bit of a mess - as you can see here...
The mess is due to the relatively high component density, the poverty of my homebrew PCB making skills but - mainly - my poor PCB design! Nonetheless, Eagle design files for a single-sided PCB version of the Receiver Shield can be downloaded from here.
The original "Occam's Microcontroller" rig includes a break-out from the audio path to incorporate one of my CW filters (SPRAT, Spring 2011 and see also the description here) as I don't like wide-open audio. You can see the filter's bandwidth control knob and bypass pushbutton on the lower left front of the rig's transparent enclosure (in the photo near the top of this page).
The original "Occam's Microcontroller" rig used a 12 digit numeric display with a serial interface - my motive was to reduce load on the Arduino UNO's limited pins. I reported finding the display in my "junk box" - but there's a certain appeal to poetic license in that story; my junk box contains some useful stuff (which only the XYL calls "junk"). In particular, it seems I picked up a handful of these displays from Kanga at a Rishworth convention a few years back.
Here's the unit in question, seen from both sides...
The unit carries the identifier "KTM-S1201" on the little white label. At the opposite end of the PCB are holes for a 5*2 0.1 inch header.
Of these 10 pins, one is unused and three are "power" lines (at least, they are for fixed dc voltages). Of the remaining six, one is a "busy" output from the LCD controller which is not used in the original rig, one is a serial data line (shared with the serial data line to the DDS module) and one is a reset line (shared with the Arduino reset). The remaining three are associated with Arduino I/O pins, as follows...
const int disp_clock=A2;
const int disp_cd=A4;
const int disp_cs=A5;
A useful set of notes, describing the display module, are available here.
The LCD module is - in keeping with Occam's Razor - simple but effective in terms of the functionality required for the original rig. However, I am going to be publishing a series of more complex systems (thereby offending against William's good advice of not multiplying entities) for which the numeric display is inadequate. These will use a multi-line alphanumeric display, connected via the Arduino's I2C interface - watch this space!
New Version with Alphanumeric Display
Kanga no longer has stock of the numeric display used in the original "Occam's Microcontroller" rig (described above), so a new version of the code has been produced, allowing the use of a 16*4 alphanumeric LCD...
This code is a straight hack of the original version to substitute the new display - it duplicates only the functionality of the original rig. [An enhanced version of the original rig - with considerably more functionality - is described here.]
In order to maintain the low loading on the Arduino's I/O pins, the display is connected via I2C. Several I2C to LCD modules are commercially available - this project uses the module from Kanga.
A library for the Kanga I2C to LCD module is available for download here. This library already has been modified for use with the Kanga module and will not work with other units.
The organisation of the modified rig differs slightly from the "general arrangement" drawing reported above (and in the article) - a new schematic showing the principal user interface components is shown below...
The Arduino sketch for the 16*4 display version of the "Occam's Microcontroller" rig is available for download here.