Saturday 22 June 2013

Vintage Playthings

Just back from a(nother) splendid jaunt in the heavenly surroundings of Pickering, Yorks.

The idea for the trip was conceived back when our trusty (and slightly rusty) 850 estate started to drift beyond economic repair, having traveled further than the distance to the moon...


She went off to the knacker's yard on a very sad day, made more palatable by her replacement...

We went back to see our friendly car dealer, from whom we had purchased the Volvo, intending to buy a sensible (i.e. boring) car, but were seduced by an MX5 in remarkable condition - closer to "showroom" than I've ever seen. The XYL and I couldn't resist and the Mazda became the first of the "Vintage" playthings to which my title refers (although hardly true of an MX5, "Vintage" sounds so much more friendly than "anachronistic" which, in some ways, she is).

In the years BC (i.e. before children) we had enjoyed holidaying in our MGB (which we still have "fermenting" in the garage), but years of estate cars and people carriers full of the paraphernalia of parenting and family life had tempted us into travelling with the kitchen sink. This time, we needed once again to plan before packing our bags - which made me think carefully about fishing tackle and radio tackle. The XYL similarly had to think about her telescopes and ornithological requisites. But it all fitted in surprisingly easily and we had a wonderful, comfortable blast over the top to white rose territory...


We stayed (of course) at The Limes at High Mill,


which is on the North York Moors Railway's boundary fence...


Here you see me operating m0xpd/a on 40m, using a dipole hung from the pole I got from Les, g4hzj, at AM Tools at Norbreck a few weeks back. Fortunately, the pole fitted into the car (along with the FT817, a Norcal 40, a wall-wart power supply and some keys).

The owners at High Mill, Cheryl and Mike, both worked as Radio Operators in an earlier life and so are sympathetic to our hobby - Cheryl didn't bat an eyelid when I strapped the pole to the fence!

Unfortunately, I was greeted by solid S9 QRM across the band 24/7 and didn't have much joy - best dx was to Rudy, ik4vfd, in Parma. It was nice to be able to chat to my neighbour Billy, m0jha (who lives a few clicks away from my home QTH in red rose land) and it is always a pleasure to reach Ian, g3roo, who was operating /m.

As already mentioned, the car forced a re-appraisal of my fishing tackle - an important consideration for trips to Pickering, as my readers already know. I took a three-piece modern 10-foot rod as insurance but also packed the second of my "Vintage Playthings"; a cane rod I built in the early days living in Wyoming.

I had purchased a collection of broken pieces of split cane rods in an alloy tube at a garage sale in Laramie back in the late 80's. I found three pieces that just about added up to a viable rod, stripped, varnished and added fixings and ended up with a pretty museum piece that I thought one day could grace a wall. Well - this last week - the rod came out of hibernation to perform FOR THE VERY FIRST TIME EVER its real function.

You can just see the price I paid on the alloy tube I still use as a rod case for this little treasure...


the $1 rod is hosting a Hardy Marquis #6 multiplier reel, with which it makes a very nicely balanced weapon.

It worked beautifully - I landed 122 fish in a week of fishing before breakfast and early evenings, of which about 20% were privileged to put a bend into the cane rod, as here against the background of ex-Southern loco, SR 825 (Class S15 Maunsell 4-6-0) running back to shed after a hard day's work...


[There is an interesting analogy to be drawn between the way in which a source (such as an amplifier or a fishing rod) drives its load (such as a fly line or an antenna). The source impedance of a split cane rod is very different to that of a modern carbon rod and both the load (the fly line) and the casting technique have to be modified to suit. I'll write about it one day.]

The fishing was - as ever - great at Pickering Trout Lake, as was the friendly atmosphere (although a belligerent member of the Caravan Club couldn't resist complaining about woodsmoke - I suppose it is obvious that the travelling NIMBY takes his back yard with him).

My last "vintage plaything" was triggered by sight of Sir Nigel Gresley (the A4 Class locomotive, not a ghost)...


I remembered I had a Hornby Dublo A4, "Silver King", sitting on 12 inches of 3-rail track on a bookshelf back home - a relic of my first childhood. As I'm well-and-truly into my second, I couldn't resist a peek inside the Pickering Model Shop, which sits opposite the MYMR Station, next to the equally irresistible Elizabeth Botham's TeaRoom (which I also visited - both at Pickering and at Whitby)...


Imagine my delight to discover that 3-rail track can be had second-hand at a reasonable price - a delight so intense that I couldn't just buy an oval of track, but had to buy the whole railway...


Isn't it wonderful how radios and toy railways both run on 12V - "That's the way God planned it".

BTW - I'm allowed to be honest and disparaging about "Toy" trains, 'cos I've built and operated a real locomotive...


Now Silver King has some rails to run over on the dining table back home...


All-in-all, a wonderful holiday, packed full of Vintage Playthings!

...-.- de m0xpd

Post Scriptum

Chatting to the good folks at Pickering Trout Lake, the owner said to me "...or we could just fill it in and use it as a Car Park".

I do most sincerely hope he was only joking. Come on all you anglers - you have been warned - USE IT - OR LOSE IT!

Sunday 9 June 2013

Phone !

After the frustrations of getting an analog oscillator under the closed-loop control of an Arduino, I had promised myself a rest. I decided a change would be just as good - so I took what is (for me) a very radical step. I thought about trying phone operation, rather than the habitual CW. Who says you can't teach an old dog new tricks?

The first challenge was finding a mic - such things have no place in the m0xpd shack! I ended up stealing one from the little FM bug transmitter I made (but NEVER operated - honestly Mr OFCOM) from Harry, SM0VPO's design back in the mists of time.

I decided that my restful change would see me revert to the comfort and convenience of DDS - so I planned a DSB transceiver using most of the bits already on the bench. I needed a pre-amplifier and modulator for my voice, so cooked up the following scheme, taking inspiration from the Wee Willy (amongst other sources)...

 

I found that too much Tx power was being wasted on low frequency content, so I added the 2nd order high-pass filter stage on the input. The output drives the ugly Sudden Tx, reported last week. For the receive side, I could have used the previous Rx stage, but decided to knock up a new SA612/LM386 combination, with oscillator input (to pin 6 of the 612) directly from the DDS.

The remainder of the expanded AF system from last week was still useful - so I made a common interface and just plugged 'n played! Rx/Tx switching is handled by a push-button DPDT switch, which operates the Tx "key" line and the Rx mute, as appropriate.

Here's the whole shooting match on the bench...


As you see, I didn't use the Arduino-based VFO (as its components were still hooked up to the Arduino-controlled Colpitts), using instead the pa0klt (Si570 based-) system from SDR-Kits...


I listened to the goings-on on 40m this morning with some trepidation; band conditions were reported as good by lots of ops with 400W to play with. How would my 1 Watt sneak past the big guns?

I needn't have worried - I answered the CQ from Chorley and District ARS' special event station mx0isn, operating the "Bunkers on the Air" event from Brinscall, in memory of the D-Day landings. Operator Dillon (m0ykb) made some generous remarks about my signal and gave me five and seven. Great!

 m0xpd operating phone - whatever next?
 ...-.- de "mike zero x-ray papa delta"

Sunday 2 June 2013

Arduino Controlled Colpitts Oscillator

A recent post closed in something of a "cliff-hanger" ...

"This puts me in the interesting position of being able to "close the loop" and making an automatic controller to regulate the frequency to a desired value."

Well - now I've scrambled over the top of the cliff to safety - although it certainly was a struggle.

I have assembled not only the SA612-based oscillator you've seen before, but a complete receiver and transmitter combination which - one day soon - will be a(nother) QRP rig. The Rx and Tx are improvisations on a theme established by George, g3rjv's famous "Sudden" designs, available in kit form through G-QRP sales.

The receiver section differs most strongly from the stock "Sudden" - partly because it hosts the VFO and partly because I've modified the AF section. With all due respect, I don't like the "wide open" audio response of the Sudden - so I've added a more complex audio-frequency path, including the ability to use my CW Filter. The Tx is in closer-to-stock condition, although it now is driven by the VFO in the receiver. 

Here's the whole shooting match on the bench...

 

The cliff-hanger suggestion of closed-loop control was of interest not only as a means to regulate the oscillator (so as to bring it near to the level of stability now so easily available from DDS oscillators). Also - and, perhaps, more importantly - I was interested in the controller idea in order to simplify the "calibration" of the oscillator. If I were able to run it in a closed-loop configuration, I wouldn't need to figure out what voltage to apply to my varicap tuning diode - it could figure it out for itself!

I measured the frequency output of the oscillator across the entire control range of my D-A converter, with the following encouraging result...

 

The frequency is seen to be almost a linear function of control voltage - in fact, a close-to-least-square linear fit (as shown by the dashed red line in the graph above) has equation of the form "y=mx+c" you'll remember from school...

 

I said "close-to-least-square" because it is an approximation I made by "squinting" at the data and finding a nice simple integer value for the "gradient" term, m=14. This will become important for us later when I add RiT (receive incremental tuning).

You'll see that I cover the entire 40m band (except for that "phone" stuff of which I've heard rumors somewhere above 7.040 HI HI). This isn't luck - rather it is the outcome of careful selection of the range of control voltages supplied to the varicap diode (which, in the present system, is just a Zener).

I now have arranged one of the channels of my (MCP4922) digital-to-analog converter to serve as reference voltage generator for the other channel, so I can "scale" the output voltage range to a fraction of the original 0 to 5V. 

Here's the schematic...


I'm currently using a value of 1000 as the channel B "reference value", such that the channel A reference voltage (supplied by the channel B output - see the red link in the schematic) is a little under a quarter of the 5V supply rail - my control voltages for the varicap run from zero to 1.22 volts.

The "encouragement" of the almost linear mapping between DAC arises from the fact that - for any desired frequency we would like the oscillator to produce - the squared deviation between that desired frequency and the oscillator frequency (the "squared frequency error") is a quadratic function of the DAC Code. This is shown for our "favourite" frequency of 7.030 MHz in the following graph...


As before, the dashed red line shows the result associated with my linear fit - which, when squared, gives a perfect quadratic. The blue line is real data from the oscillator - almost quadratic.

You may well wonder what is so good about a quadratic error function.

It turns out that it is easy to find the lowest value of squared frequency error (i.e. to find the DAC Code which gives the correct frequency) in the presence of this quadratic form, using simple "gradient search" methods.

Think of the shape above as a cross-section through a valley. All we need to do to find the bottom is walk downhill (as all those energetic SOTA and WOTA enthusiasts will know). For the quadratic, the gradient is a linear function of the DAC Code so, to "walk downhill" all we do is subtract an amount from the value of the DAC Code proportional to the frequency error.

We subtract to walk downhill.

Here's the code required on the Arduino to implement this "gradient search"...

 

It is - as you see - easy. The only trick is that we have to scale our updates appropriately (otherwise we'll run downhill, not be able to stop at the bottom and keep going up the other side). The parameter "alpha" in the code segment above currently has value 0.07 in my code, giving a nice compromise between update speed and no tendency to "run up the opposite side" (under-damping).

If we ask the system to "search" for a frequency outside the available range or choose too large a value for alpha, in which case we run all the way up the opposite side into the next valley (instability), the code will try to push the DAC Code value outside the 12-bit limits available on the MCP4922. To prevent this, the "constrain" function in the code above keeps the DAC fed with meaningful numbers (although it would already be a failure at this point, so the error trap is somewhat futile).

The whole Arduino-controlled Colpitts oscillator works rather well.

It has been working well with the receiver for a couple of weeks now - but when I added the Tx last weekend, all hell broke loose.

I began to wonder if it would have been better just to let go of my tenuous grip on the cliff on which we were hanging and fall to a merciful release. But I soldiered on and - this morning - finally prevailed.

I had found, you see, that the act of transmitting pulled my VFO way out-of-tune. I started the remedial treatments by putting the VFO and receiver (along with the DAC and a buffer amp) inside a metal enclosure (seen more clearly in the bench shot when the enclosure lid is on)...

 

This presented the challenge of how to make the myriad connections to my ugly development boards (preferably without opening the notoriously empty m0xpd wallet). I came up with a solution of which I'm quite proud...

A simple 3mm slot, cut in the appropriate place on the "end" of the enclosure with a slot drill in my "trusty rusty" milling machine, allows the 0.1 inch sockets already used to hook up to the boards, to protrude to the outside world for onward connections...

   

That improved things - but I still had to spend too many hours of my precious leisure time clinging to the perilous cliff, working through all sorts of boring ground and coupling issues. Eventually, early this morning, it paid off...

Now I have less than 10Hz "glitches" in the VFO output when keying the Tx and a transceiver which - unlike the Sudden - is freed from the rock-bound fetters of VXO operation. I swell with pride - but the sense of achievement is tempered by knowledge that it is SO MUCH EASIER using the DDS.

Now I need to sort out RiT before I can try for a QSO, but I'm going to take a break first - I'm exhausted from all that cliff-hanging.

...-.- de m0xpd