Sunday 26 May 2013

Octals and Octuples

Younger readers will be amused to hear that bits once were so precious that we did't group them profligately in fours. Rather, we arranged them sparingly in threes.

The four-bit groups conveniently were abbreviated into hexadecimal numbers, now widely used in computing. The three-bit groups didn't require counting to use the rather unnatural "numbers" A : F evoked in hexadecimal, as three binary digits could simply be written in base 8, using the familiar symbols 0 : 7. We called that numerical system "octal".

Way back then, computers were often using word lengths and internal architectures which were multiples of three - so the base 8 octal system was great. Today, our digital machines usually are built around parallel groups of bits of length divisible by four and NOT by three - so octal has fallen into a dusty corner of the dictionary. Pity.

All this talk of 8 arises because I have just made what the world calls an "octal" bi-directional level converter, extending my earlier "quad" level converter (as was mentioned here). The world shouldn't call it this - it should call it an "octuple level converter", but we all know how dumb the world is!

For those wishing to brush up on the correct names of things, take a look here. 

Enough pedantry - let's look at the new gadget.

It is built as an n-tuple extension (pedant !) of the circuit originally used in the development of my Si570 DDS module . I previously had made up a plug-in module (regular readers know I have a passion for these) hosting quadruple converters but there are times when four simply isn't enough. [There is nothing to forgive when the world calls this a "quad converter", as "quad" is an abbreviation of "quadruple" - not a misunderstanding of "quartal". Pedant !]

 Here's the copper layout, for a single-sided, homebrewed, octuple converter...

 

The two lines of 0.1 inch pitch pins are 0.6 inches apart (making the plug-in module like a "wide" DIP) but the overall board width isn't nearly as attractive as the commercial equivalents of this device, due to the constraints imposed by my clumsy, single-sided PCB. That's the price you have to pay for being a cheapskate! (Note, if you followed that "commercial equivalents" link, that Lady Ada doesn't fall into the "octal" misnomer trap, staying safe with "8-channel".) 

Here's the finished module, along with its quadruple smaller sibling...

 

You might be able to see from the photo above that my new octuple module is less than twice the "length" of the quad, which is why I made the 8-channel version. I've already made three quads (hard for me to say as the father of twin daughters), but they're wasteful of breadboard area (the modules - not the twins!). The new octuple squeezes more into less.

Note also there are a couple of unpopulated boards lurking in the background, waiting for the next time I feel strong enough to engage in some microscopic work. That work has been greatly eased by the purchase of some Xcelite 412 "anti-tweezers" (as Tom and I call them), which give me some chance of holding the tiny devices for long enough to solder them in place. Get yourself a pair - they work well.

The imminent arrival of new spectacles (currently being made up at the opticians) might even allow me to see the objects I'm trying to solder too!

 ...-.- de m0xpd

Sunday 19 May 2013

VFO Pulls No More!

My troubles with the SA602/612-based VFO are over - now she is completely oblivious to large signals, keeping on oscillating at just the same rate as when tickled by weak signals or nothing at all!

The "fix" was motivated by various correspondents (particularly members of the G-QRP Yahoo Group) who pointed to the varicap diode as the most likely origin of my problems. I tried replacing it with a conventional capacitor and - sure enough - the "pull" was gone.

Now - there's nothing intrinsically wrong with varactor / varicap diodes; they have been seen to work as tuning capacitors in many radios before. What was wrong with my experiment turned out to be the physical separation between the diode, the (trimmer) potentiometer used to derive its tuning "bias" voltage and the regulated power supply providing the input to this voltage divider, as seen in the photo below...


I tried generating the control voltage local to the varactor and - sure enough - the oscillator was as solid as when controlled by the "real" capacitor.

I don't know exactly what was causing the problem when the control voltage was remotely generated - John, g8ozh, had suggested ground impedance problems and I'm inclined to agree with his explanation. Whatever the precise cause, I now had a resolution of the issue, which prompted me to modify the ugly circuit close to the tank, adding a socket into which I could plug various capacitors and their tuning means, close to the coil. I also provided a local voltage regulator...

   

With this simple interface socket I could confirm the stability of a "pukka" trimmer and the viability of a locally-controlled varactor. I could also move in my intended direction, adding a digital-to-analog converter to achieve digital control of the oscillator...


The most "complex" of the tuning plug-ins includes an MCP922 12-bit DAC, which is controlled over a serial interface. You can see the whole shebang in action on the bench...

 

The Arduino seen above is running code to generate d.c. voltages on the MCP4922, used as control voltages for the varactor, in response to my inputs on a rotary encoder. I also took the opportunity to add a frequency counter to monitor the oscillator, using the Frequency Counter library provided by Martin Nawrath (whose excellent FFT library I have also used). This allows direct monitoring of the oscillator on 40m (higher bands will need a divider / pre-scaler to operate correctly).

The LCD screen now displays not only the varicap control voltage but also the resulting frequency...


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.

Can I be bothered - or will I remain seduced by the simplicity of the DDS ?

...-.- de m0xpd

Sunday 12 May 2013

VFO Pull

Now here's a pretty problem. Actually, it has been a living nightmare, spoiling my "playtime" these past few weekends!


Having been in raptures over the elegance and efficiency of the DDS synth module recently, I decided that I ought to investigate alternatives. Both for the sake of "balance" and to demonstrate (not least to myself) that I'm no one-trick pony.

The alternative means of frequency-generation was to be a simple VFO of the sort that can be implemented on the near-ubiquitous SA602/612.

I took as my starting point George, g3rjv's "Sudden" direct-conversion receiver, made for 40m.

Now - before we go any further - let me be careful to explain that none of what follows is, in any sense, a criticism of the Sudden, the SA602/612, or anything else. It is just a story about my self-education and recreation.

Here's my (very) ugly experimental system...

   

It is a fairly conventional embodiment of the "Sudden" - with the only exception being the fact that it is tuned using an MVAM109, ultimately to be controlled by a DAC (as described in this earlier post) but here controlled by a stable d.c. source. Not seen in the photo above is the input RF network (more of which later).

I was surprised (/shocked / intrigued / startled / depressed - call it what you will) by an unexpected aspect of the performance of the system, which has become the subject of the "living nightmare" I refer to above. The receiver was found to "chirp" very badly on receiving strong signals - CW, of course (I have heard rumor there are other modes).

Some investigation with my old Racal-Dana Universal Counter Timer revealed that the VFO was being pulled by such strong signals. I didn't expect that!

I contacted George, who told me that he had "not heard of VFO pulling as a common problem" - and suggested that "The best route is probably the input attenuator".

A quick experiment confirmed that reducing the signal level did indeed stop the pulling - but I wanted to try to understand what was causing this unexpected behaviour - partly because I believe it must be one of the limitations on such a receiver's ultimate performance in dealing with weak signals on an overcrowded band, where consideration for not treading on the dainty toes of QRP signals isn't at the top of everybody's agenda.

I made a few experiments and arrived at what remains (for me) a rather surprising conclusion.

I started with a "vanilla" Sudden...


This system displayed the "chirp" on receiving strong signals and acted as a reference.

Next, I started to wonder what might be the mechanism behind disturbance of the VFO's action. The first thing I tried was to produce a stabilized power supply for the mixer / oscillator - as has been done with the "Sudden 2"...

 

This made no significant difference - so I sought to increase the decoupling between the oscillator and the remainder of the receiver as much as possible.

To achieve this, I buffered and amplified the oscillator signal (derived from the unused winding on the transformer, the other side of which was used as the oscillator coil) using my popcorn buffer module and used this to drive a second SA612, working only as mixer...

 

 In this test, I also used a second LM386, distant from the SA612 used as oscillator, as seen in this photo...


This functional separation of oscillator and mixer between two SA612s and the physical separation between the oscillator '612 and the LM386 also persuaded me that the ability of strong input signals to pull the VFO - STILL PRESENT IN THIS TEST - was not caused by consequences of the "layout" of my circuit. I was baffled.

At this point, I speculated that there might be some coupling between the RF and AF stages - perhaps caused by the rather long speaker leads. So I replaced the speaker and its long lead with a 15 Ohm resistor, right on the LM386 output - with no change - the VFO was still pulled.

The system was being powered by a nice old Farnell linear power supply, with a big analog meter to monitor output current. I could see that the current increased (from around 50 to 55 mA) on receiving a large signal. I disconnected the loudspeaker (such that there was no increase in current - the additional current was all associated with driving the audio frequency load) AND THE VFO PULL DISAPPEARED!

The same - not surprisingly - was true if I powered down the LM386.

This really was odd - I could not measure ANY change in power supply conditions at the oscillator - the voltage was constant to better than 100 microvolts (i.e. better than one part in 50000), given the locally regulated 5V supply.

Then I tried provoking the same outcome (a change in VFO frequency) by changing not the input signal - but the AF signal. Previously, the increase in the AF power was caused by an associated increase in RF signal. Now, I tried driving the LM386 input with an AF signal, to dissipate the same AF power in the speaker.

I COULD GENERATE THE VFO PULL !!!

I have no idea how/why this is happening - there is no measurable change at the oscillator's local power supply. It is driven by the same RF input. It is loaded by the same load impedance presented by a (powered but unloaded) LM386 - but it is still pulled when I apply AF from a separate signal source to the input of the other LM386.

[Note: whilst ordinary linear concepts like correlation and coherence don't have any meaning in the context of the non-linear operation of "mixing", bear in mind that the AF oscillator is independent of the SA612 oscillator and any RF going into it {I hope!}]

So - a living nightmare. The sense that reason is power-less. The frustration and futility of banging one's head against a hard object for too long.

All I can hope to do is present some evidence, in a form capable of independent verification (by YOU) and hope that you'll be able to shake me out of my bad dream. Here's the evidence...

I'll set up the vanilla Sudden once again - but with a 50 Ohm attenuator on the input, rather than the stock 10k potentiometer (we're trying to deal with too many variables already here - I don't want the potentiometer changing the source impedance of the RF).

Here's my input arrangement - signals derived from the Norcal S9 Generator (or, rather, my "sincerest form of flattery" version), going through a switchable attenuator...

 

We'll tune the receiver and switch the input through 20dB - first with the speaker loading the LM386, as per normal use. The audio is monitored on Spectran...

 

You can see where I switch the level. You can see the consequence of the change (the VFO frequency goes DOWN with increasing signal amplitude). The frequency change is about 30Hz, which assuming a reference of 650Hz, is a ratio of 4.6% which, for the musically literate amongst you, is close to a semitone (2^(1/12) is approximately 5.9%). In more extreme cases, I have observed frequency pulls exceeding 90Hz (greater than a whole-tone).

 Now, if we disconnect the speaker (leaving only the fairly high-Z load from direct connection to the computer soundcard) and make the same test...

 

Sure, the charming analog VFO is doing its wonderful slow "drift" thing - but it is completely agnostic to input level.

So - tell me - what does your Sudden do when you've got the input attenuator set too high?

Of course it distorts - but does its VFO get dragged around too? 

I'd like to know - but I'd LOVE to understand WHY!

 ...-.- de m0xpd

Post Scriptum:

In the course of the above, I started to use the 10mm "Toko 10k replacement" coils produced by Spectrum Communications and available (to members) from the G-QRP club.

I couldn't find these as an Eagle part - so I built one from scratch.



This allowed me to make up a PCB for a generic band-pass filter (see George's recipe in the current number of SPRAT, vol. 154, p. 25).

Here's one made up for 40m...

I'll be pleased to share the library with anybody that needs it - only Cadsoft still haven't remembered me (despite an email request sent over a week ago), so I can't post on the official download page (along with my Toroid library for inductors and transformers wound on toroidal cores).

Get in contact directly if you want an early copy of my new "inductor-spectrum.lbr" library.