Saturday, 14 December 2013

Hats off to China

As western science and ambition rests on its laurels / falls behind / looks on in in envy, China today successfully landed its "Chang'e 3" probe on the moon.


The image above is from the downward-facing camera on Chang'e 3, as distributed within China.org.cn's coverage.

Congratulations and kudos to The People's Republic - I, for one, am impressed!

...-.- de m0xpd

Sunday, 8 December 2013

R(F)duino

I mentioned in an earlier post it was my intention that - "eventually - I'll be moving to just an AVR microcontroller on a board with the DDS modules".

Well - it is accomplished...


You see above the new board on the bench, with the familiar tuning knob and display, running my "double DDS RF Generator" code for my multi-band BITX rig.

I've called the new board the R(F)duino for obvious (but still inexcusable) reasons. It uses a simple single-sided PCB...


on which is hosted an ATmega328P and the two DDS modules.

I have set up the system so that it can run the Arduino bootloader and appear to the Arduino IDE as a UNO board, via a serial interface. I've also added an ISP interface, so that more advanced users can program directly from (e.g.) Atmel Studio, via an AVRISP II or a JTAGICE 3 (or any other AVR ISP programmer).

There's also an explicit I2C interface. At the moment, this drives only the LCD display - but I have plans for hanging more sub-systems off the I2C bus.

The programming and I2C interfaces and other features are seen in the following image...


There's lots of I/O, which can be re-configured by programming, but is arranged with my own tuning and control scheme in mind. It also supports some of my ideas for CW, including an iambic keyer.

The system was set up in "Arduino" mode, through the serial port...


I use a USB to serial adapter from 4tronix which has the very considerable advantage that it has been modified for use with "Arduino clones" by the addition of a 0.1uF capacitor from the "modem's" DTR line to the RST pin. Plug 'n play!

All this is going to be (or, at least, lead to) an open-source project, with code and hardware designs available for download (and - perhaps - with hardware available for purchase). It will take a little time so - please - be patient!

For the moment, I'm back to some more experiments operating voice and CW on my new rig with its even newer Digital RF Generation scheme running on the "R(F)duino".

...-.- de m0xpd

Sunday, 1 December 2013

CW on the BITX

Having a microcontroller sit there controlling the DDS modules that make all the RF signals required for my BITX-inspired SSB rig tempts me to do more than just SSB - so today I tried some CW with great success...

I added straight key and iambic paddle inputs to the controlling Arduino and modified the code to read them (actually using software resources I'd developed on the "Occam's Microcontroller" project). When any key is pressed, the system generates a 600Hz signal for the CW and generates a logic output to key the transmitter (regular readers may recall I added a TTL input to my power switching scheme for just this purpose).

The key signal is controlled by a "QSK" timer, triggered by the operation of any of the morse key inputs. The 600Hz tone is generated using the Arduino's internal "tone( )" function - which makes an ugly 5V square wave - so I needed to build a filter to make it a closer approximation of a sinewave.

I first tried some simple passive filters - but these weren't up to the job - so I ended up making a second order filter with a couple of integrators and setting the whole thing up as a bandpass with a centre frerquency of 600 Hz and a Q of about 10. 

You can see (most of) the experimental set up smeared over the bench...


I ran the code on an Arduino MEGA for testing - the majority of the rig is still under the control of the ATMEGA328 in the RF Generator, with the MEGA generating the CW signals (as well as controlling "imaginary" DDS modules and interfacing to a real LCD and rotary encoder, visible in the photo above). It will eventually all run on the single chip (when I get round to re-programming it).

The low-pass filter that files the rough edges off the square wave is seen in close-up below...


It is implemented on a quad op-amp from the junk box (a TL074) and I'll be pleased to publish the schematic when I finalize it on something more permanent than the solderless breadboard.

Even though the system was in a terrible mess all over the bench, I couldn't resist having a shout - you know how it is!

I sat on 40m for a few minutes and couldn't understand why Win, dj2od, wouldn't come back to my answers to his CQ. Then it dawned on me - my rig was in LSB mode (as befits SSB voice on 40m). [On reflection, I see that this is immaterial - the far end wouldn't know / care if I was operating in upper or lower sideband]. I switched to 20m (and USB) and answered a CQ from George, kz1h.

He came straight back and gave my 4 Watts a 579 from near Boston (!!!) but he also told me that there was RF feeding back into my keying, such that I was sending a "carrier" as well as my CW. He could copy the CW well enough - but obviously it was no fun on the receiving end, so we said our goodbyes.

After the QSO, I looked at the meter on my Made From Junk "Deluxe" Versa Tuner and, sure enough, there was indicated power being radiated all the time.

A capacitor on the straight key input soon sorted that and I was back in action...

I answered Lars' CQ from his station oh6kd, near Vaasa. He gave me 599(!) and said "v nice sigs" before I'd even told him the rig was H/B (much less in a completely jury-rigged, experimental lash-up state).

I am delighted with the performance of this system which is (I argue) made all-the-more versatile by the presence of micro-control. All I need to do now is add a little more flexibility to the code (with an explicit CW mode), add in some niceties like sidetone, put all the code in the one little ATmega processor and neaten up the whole shebang - at least to the point where I'm not dogged by unwanted RF coupling!

...-.- de m0xpd

Saturday, 30 November 2013

Simplifying the VFO

The last few days have seen an annoying failure of the (clone) Arduino NANO that I was using to control the "Two DDS" RF generator system for the new SSB rig.

I ordered a new NANO and received it promptly (having paid an extra 20 pence for the privilege of first-class post) and got the system up-and-running again.

However, I also got some ATmega328 micro-controllers in 28 pin DIP packages, so I decided to rip out the Arduino and replace it with just the micro...

First, I had to program the chip - so I put it into a simple configuration emulating the circuit of my Wotduino and programmed via a USB to Serial device. The programming task was trivial, as the chip had been supplied with the Arduino bootloader already in place.


Once the device was programmed, I could pop it into the RF Generator system with only a minimal amount of re-wiring - in fact, all that was needed was a 16MHz xtal, and a couple of passives.


Notice how the ATmega328 in the DIP package is nearly as big as the Nano !

Everything was working fine...


so I was able to get on with some more operating.

I enjoyed a nice QSO with Nicola, iz1lei, on 20m, who was in Cuneo near Torino (my best dx to date with the new rig) and I had a great contact on 40m with the gb3rs station at the National Radio Centre, Bletchley Park, operated by Henry, m0zae...



Henry gave me what he emphasized to be a genuine 5 and 9 report which delighted me - this little rig really does work!

...-.- de m0xpd

Monday, 25 November 2013

BITX Developments

Things have been moving on quite nicely with the little SSB rig over the past few days (when the pressures of work allow me to steal a few moments for leisure projects!).

First, I've switched away from the initial "development" configuration of a stack of Kanga/m0xpd DDS shields for the RF generation (BFO and VFO) to just the DDS modules themselves. They are mounted, at the moment, on a breadboard - along with an Arduino NANO and a little PSU.

The idea behind the NANO is that - eventually - I'll be moving to just an AVR microcontroller on a board with the DDS modules and the Nano puts us closer to that end-point in terms of physical size! All the parts will be available from Kanga UK if anybody wishes to follow in my footsteps (and the code will be published as freeware - see below).

Here's the RF generator in its original embodiment...


The digital RF generation scheme allows easy switch not only between bands but also between LSB and USB modes - requiring a change in the BFO frequency. To test this, I made up a pair of plug-in filter modules for 20m...


Both the low-pass and band-pass filters are built to standard G-QRP "recipes"; the LPF is described here, whilst the BPF is in SPRAT (v154, p25).

The 20m conversion was a piece of cake - just plug in the filters and modify the code to switch over all the frequencies required in the transition between lower- and upper-sideband operation.

The next development added a relay-based change-over from receive to transmit (I'd used a switch in the original build last week as a temporary measure). The switch remains as one controlling input to the relay system - but I also have a parallel input for a second (/third/fourth) switch (the Rx/Tx selection is a logical "OR" of any parallel switches) AND a TTL level input, such that (one day) a micro can control the whole system...


Also visible in the picture above is a new power supply for the 5V elements (the DDS modules, the Arduino and the display) - all implemented by a 7805 regulator on the main heatsink.

Given the additional Rx/Tx switching flexibility, I added a push-to-talk switch on my toy "fist" microphone...


Why - this is almost like a "real" radio HI HI.

Next, attention turned back to the RF generator system - I knocked up a mounting for the rotary encoder to make tuning a little easier...


The two push-buttons allowed me to cobble together a new version of the "Kanga Enhanced VFO System" suitable for this new Double DDS scheme with band-change via menu, automatic selection of LSB / USB as the 10MHz boundary is crossed, Rx/Tx detection (via an input to the Arduino from the power switching on the main board) which adds Receive Incremental Tuning, etc...


Here's a close-up of the display...


I'm gong to be working up the code into something suitable for publication - so please be patient!

Here's the entire rig smeared across the bench in my habitual style...


I've had fun building it but - I must confess - I've also enjoyed operating !!

Lots of FB QSOs in the UK and into Echo India, best dx so far into Germany, but the first prize in terms of operator satisfaction goes to my QSO with the RNARS London Group's gb2rn station on HMS Belfast...


"OK, I'll hand it back to you, from MIKE ZERO X-RAY PAPA DELTA"

Sunday, 17 November 2013

Rising to the challenge

Bill Meara, n2cqr, has been hugely supportive of my recent fun-and-games with digital systems - but he's also been goading me...

"I have encouraged Paul to take a break from the microcontrollers and build something discrete and analog... like a BITX!"


Well - I've taken Bill's advice...


Above you see the (IRF510-based) PA, the LPF and BPF filters (both arranged as plug-ins - see below) and some other lovely analog, discrete stuff. 

However, try as I might to please Bill, I couldn't resist sprinkling a little "digital" into the project...

Whilst I've taken direct inspiration from Farhan's words and music for most of the transceiver, I've put together a new digital "RF generator" system, which uses two DDS modules to generate BFO and VFO signals...


This approach - I argue - mixes the best of both worlds... 

You get all the fun of "conventional" radio homebrewing and you supplement it with the stability, controllability and simplicity of Direct Digital Synthesis for generating the RF signals. Exactly the "Occam's Microcontroller" thesis - but taken to the next level with SSB. 

Here's the main board in close-up...



The band-pass filter is the ordinary G-QRP circuit (SPRAT 154, p 25), which I had knocking around on the bench as a plug-in module I'd developed for the "Occam's" rigs. This was a 40m filter and it was this - more than anything else - which dictated that this will be a BITX 40. I preserved the "plug-in" format in the output low-pass filter, so now I just need to knock up different filters and adjust the "RF Generator" to change band (try doing that with analog RF generation).

I'm calling it an "RF Generator" for want of a better name - it is far more than a VFO, because it generates the BFO signal and automatically handles the "interlocking" between VFO, BFO and "dial frequency". This makes aligning the whole system a different kettle of fish than would be the case with old-fashioned (sorry!) analog oscillators.

The whole shebang reached operational status today - so I had some nice QSOs with Steve, m5stc, Brian, gw1uju and Ellis, who was operating the gm100rsgb station.

Brian put his finger on the button - "your audio sounds a bit stifled". He's right - my crystal filter (which was thrown together with zero thought) is too narrow. I'll re-work it and try to get my audio quality up where it ought to be.

I'm going to be publishing the Double DDS "RF Generator" code when I work it up into something worthy for your attention. Now, at least, I have an SSB platform with which to work - all thanks to Farhan and (of course) to Bill.

...-.- de MIKE ZERO X-RAY PAPA DELTA


Friday, 15 November 2013

Google Chrome debases...

There is, one supposes, somebody at Google who thinks they have their finger on the pulse. They might even believe their facile messages


are witty and useful.

I do not agree. "Aw, Snap!" means less than nothing to me. Worse, it is possessed of none of the attractions which might make me learn what it means and consider owning and using it.

Better the blunt clarity of IE10's "This page can't be displayed' or the simple explanation "Safari can't find the server".

Is there, I wonder, a Google Chrome regional preference for those who prefer to speak English (as opposed to some descending, homogenised, empty babble)?

I would ask Google, but fear I would not enjoy the answer's language.

...-.- de m0xpd

Tuesday, 5 November 2013

The Well-Tempered Beacon

After the disappointments of so-called "Real-Time" Clocks, I was pleased when the postman delivered a GPS module today...


I had ordered the module from Hans, g0upl, who offers them at a fantastic price (an important consideration for a cheapskate like me).

Thanks to the excellent TinyGPS library, the module was supremely easy to interface to my Arduino-based beacon. I deliberately used the Arduino MEGA with its lavish resources to exploit an additional hardware serial interface (not wanting to get tangled up with the "UART" used for connection with the PC during the development phase) but this will run on the basic Occam's Beacon hardware with a humble little UNO.

Here's the system "on the bench" (actually, on top of a Leslie speaker - the only vacant, nearby flat surface)...


Nearby, on the cill of a north-facing window, sits the little module, powered by 5V from the Arduino and sending back, in return, 9600 baud NMEA data...


The whole shebang works like a dream - just turn on the beacon and it starts in perfect time. No more clock watching and reset pressing. O frabjous day! Callooh! Callay!'

The beacon is doing its perfectly a tempo thing on 30m even as we speak. I'll post the code once I get it tidied up and ready for your enjoyment.

...-.- de m0xpd

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