Saturday, 21 November 2015

Bridge Measurements

The little bridge you saw back in September is now producing - in concert with the AD 7896 analog to digital converter and a few other little wrangles - some nice, calibrated measures of reflection coefficient (and, in other programs, other metrics - but I'm only going to show Reflection Coefficient here).

Impedances under test are connected to the bridge at the point labelled "test port" in the photo above.

To start with - rather in the way of  the limbering up exercise that athletes do before they make any real effort - here's a measurement of the limiting cases of open- and short-circuit conditions...

Apologies for the poor photos - it isn't easy to photograph the little 2.4 inch TFT screen. In these limiting cases, the signal returned from the "perfectly UN-matched" termination is exactly equal to the signal applied; there is no return loss. The reflection coefficient (which is the negative of the return loss) is also zero. You see this zero result from 6 to 8 MHz in the plots above.

Next, the rather more interesting cases of a 100 Ohm resistor and the (perfectly matched) 50 Ohm case...

The theoretical reflection coefficient from a 100R resistor is -9.55dB, so you see the measurement is doing a pretty good job. The perfectly matched 50R resistor should give no reflection and a -inf reflection coefficient. I arranged for my graphing routine to clip everything to -40dB to neaten up the bottom of the (finite) dynamic range of my system (-40dB reflection corresponds to a VSWR of 1.02, so this is an entirely adequate dynamic range).

So much for "validating" measurements - what about real applications?

Here is a measurement of the reflection coefficient from the feeder to my antenna system at the shack, over the same frequency range, both direct and then tuned...

The system un-tuned (left) offers VSWR above 2. However, when seen through my "Made from Junk" MFJ-969, the  antenna offers a well matched load in the CW portion of the 40m band - just as my settings of the tuner asked it to!

This is now a working "measurement" system - if measurement isn't too grand a word. It involves a few neat tricks, which are going to be published in magazine / journal articles, so watch out for those in the usual places over the coming six months or so. There will be more to say in these pages on related issues as well.

Amazin' what you can do with a DDS and a diode!

...-.- de m0xpd

Sunday, 8 November 2015

ADC Converter Accuracy in the Arduino DUE

I've been playing with the analog to digital converter in the Arduino DUE, using it to read the output of a simple RF detector. I am interested in measuring the lowest possible voltages with both the detector and the micro-controller.

There are some interesting behaviours at the low end of a diode detector's response - but that's the subject for another day. Today, I want to focus on the analog to digital conversion to read the data into the micro-controller...

I have found that the 12-bit ADC in the Arduino DUE has rather poor linearity at the extremes of its range. As I'm interested in accurately converting very small voltages (in the 0.01V range) to get best accuracy and dynamic range from my diode detectors, this is a problem.

Specifically, the response of the ADC follows something like the following deliberately exaggerated characteristic in the sketch below.

Instead of a linear relationship between the applied voltage and the resulting code from the ADC, suggested by the dashed line in the sketch, there is instead something of a sigmoidal shape, as shown in blue. This indicates inaccuracy in the analog to digital converter integrated into the DUE's Atmel AVR SAM3X8E processor.

To get round this, I tried hooking up a simple 12-bit converter from Analog Devices - the AD7896 (which just happened to be in the "junk" box). The resulting lash-up is seen below...

I wrote some code to drive the external converter (a listing of the function is given below) and then set up a test in which both the external AD7896 and the SAM3X8E were set to convert the same analog voltage. The results were converted from a code into a voltage (in milliVolts), allowing the performance to be compared with the voltage as shown on an external meter.

The poor performance of the DUE's internal converter is seen in the following images, in which the ADC results are photographed from the little colour TFT screen seen in the bench shot above and compared with the voltages as measured on a voltmeter...

At voltages below about 10mV, the DUE returns a zero result (but the AD7896 works FB)...

At slightly higher applied voltages, the DUE at least produces a non-zero conversion result - but it is below the true voltage (as shown in the sigmoidal curve falling below the ideal linear dashed line in the sketch of the conversion characteristic, above). Once again, the Analog Devices converter does a good job...

Here's the function I used to interface to the AD7896 - all simple enough...

The moral of this story - don't use the internal ADC of an Arduino DUE if you want accurately to measure voltages. My meter project just got a a little more complicated!

Interestingly, Tex Swann, g1tex, is talking about reading diode detector voltages into an Arduino (UNO) in the December number of Practical Wireless which  was delivered to m0xpd yesterday - but he is more interested in large-signal behaviour.

...-.- de m0xpd

Saturday, 7 November 2015

Channel Separation in Parallel IF Receivers

The "Parallel IF" scheme, developed in this receiver, described in the January, 2015 edition of RadCom and described and demonstrated at FDIM 2015, steers the incoming signal in a superhet receiver through one of two Parallel IF filters. These two filters allow the rig to switch between receiving bandwidths appropriate to (e.g.) SSB and CW operation, just by change of IF frequency.

Whilst the theoretical separation between the two IF paths is high, any practical realisation will have only a finite degree of isolation - there will be some breakthrough on the "unintended" IF path when the other is in use.

This was noted in the RadCom article, which states: "Very little of the signal from the tuned station passes through the other, ‘unintended’ IF filter (whose response is drastically attenuated 2MHz away from its passband)." It has also been my experience in using the method - pulling the "operational" filter out of circuit (easy to do with my plug-in modular filters) effectively muted the receiver. However, I decided it was important to make some measurements to test this separation in a practical Parallel IF rig.

I used the plug-in BITX as the test platform, and applied a 7.03 MHz signal from a DDS, via an attenuator, directly to the antenna input...

I tuned the radio so as to achieve an output at 1 kHz and monitored the output voltage on a PC analyser called "Visual Analyser". I coupled the receiver to the PC soundcard using an isolating transformer, to reduce problems with mains/line hum.

Here's the system output as measured through the CW IF filter (which uses a 12 MHz IF path)...

I disconnected the input to the 12 MHz CW filter, leaving the IF set at 12 MHz and the other (10 MHz) filter in place. The input was still applied to the receiver. The response changed...

Note that the signal is now 48 dB down on the original - down in the noise floor. It is inaudible.

When I switched to the SSB IF filter (at 10 MHz), the signal re-appeared...

Note that it is matched closely to the level achieved through the other IF path (it is roughly 1.5 dB down), suggesting that the gains of the paths are well-matched (as confirmed by listening). However, the wider bandwidth of the SSB filter has admitted more noise and increased the level of harmonics of the 1 kHz signal (possibly as the wider filter bandwidth causes the stages after the filter to be driven harder).

Interestingly - and quite by accident - I discovered that  separation between the two IF paths was poorer if I completely removed one of the filters. Here's the response when the system is set to use the 12 MHz) CW filter, but that filter is removed...

The "breakthough", coming past the remaining 10 MHz SSB filter, is now only 36 dB down on the original level. Remember (from above) that when the filter's input was open-circuited, the residual was 48 dB down. Here, when the filter is completely removed from the circuit, the performance is poorer.

These measurements have confirmed my subjective impression - derived from experience - that a practical Parallel IF receiver (even one made within the poverty of my construction skills) can achieve channel separation entirely adequate to its intended use. It can also match the in-band gain of the two paths.

What a relief!

... -.- de m0xpd

Sunday, 18 October 2015

Powermaster Rectifier Replacement

After last week's RSGB Convention I called in at my Father-in-Law's, to be rewarded by a brace of vintage train controllers...

These devices, made by Hammant and Morgan Ltd, formerly of Watford, are the boat-anchors of the UK train controller world. They are old and heavy and made-to-last, unlike modern equivalents (in at least the first two attributes).

Fortunately I have a quiet obsession for collecting and operating old, heavy toy trains which have demonstrated their ability to last for over half a century...

so these controllers were ideal for my applications.

Of the two newcomers, the Duette offers two "channels" of control, whereas the Powermaster offers only one controllable output (plus some sector switching gear). It might appear that the Duette wins hands-down. However, the Powermaster is an entirely superior device, offering a genuine variable output voltage (rather than a single output voltage with a variable source impedance). This is achieved by a transformer with exposed secondary, over which a wiper can pass to tap off a desired voltage - rather like the way an antenna tuner with a "rollercoaster" inductor works. The result is something like a Variac (but not, in this case, an autotransformer).

There's a (flawed, but useful) description here, along with some interior photos of a newer generation of Powermaster, showing the variable transformer. Having linked to that site, it is important to repeat - the Powermaster is NOT an autotransformer. There is isolation between the mains voltages on the primary side and the SEPARATE secondary.

On test, the Duette still worked as intended. However, the Powermaster worked on its "reverse" output range, but not on its "forward" voltages, producing an output voltage reading on a meter, which quickly collapsed to zero under load (a 50 Ohm dummy load). Obviously it was not doing its job of working as a voltage source having low source impedance.

In light of the asymmetry described above, I suspected a fault in the old Selenium rectifier or the polarity change-over switching and associated wiring. Unfortunately, I could find no detailed descriptions of the Powermaster on the internet, so these notes describing my repair may be of interest to others caught in the same boat...

I removed the rectifier and figured out what the connections did (by visual inspection)...

To check my diagnosis, I lashed-up a temporary replacement outside the case - all the wires were sufficiently long to pass through the many holes conveniently available in the back of the case...

Having confirmed that this was all working fine, I made a (slightly) more permanent solution on a scrap of copper-clad board, with some pads formed by whittling away Cu in judicious places and a sprinkling of diodes (I had 1 Amp 1N4003s to hand and have used those for the moment)...

The holes in the PCB are arranged such that I can just screw this new home-brewed rectifier in place of the old selenium unit.

The wiring is self-evident - the only possible confusion being in connecting the Half/Full-wave rectification switch identified here on the front panel by a dashed red circle...

The switch is connected as follows...

The result? A perfectly-operating Powermaster, giving my 50-year-plus old toy trains slow speed performance which they never had before - all from a "period" controller.

Anybody seeking to make such a repair in their own vintage controller should attempt it only if they are appropriately qualified and then only at their own risk. I don't need your burnt-out armatures, house fires or electrocution on my conscience.

These controllers have another nostalgic significance for me - back in my childhood, they were the most convenient power supply to hand. A perfect place to start with some electronics experiments. Guess where the young m0xpd used to get his LT from!

In fact - I'm pretty sure the Duette IS one of my childhood controllers, inherited from my cousins, passed on to Father-in-Law - and now passed back with interest in the form of the Powermaster.

Now - time to play with some of that new slow-speed performance. Thanks Malcolm!

...-.- de m0xpd

Monday, 12 October 2015

RSGB Convention

Just back from the RSGB Convention...

where I managed to avoid having too much over-ripe fruit and vegetables thrown at me by hecklers in my lecture, just before lunch on Saturday...

In fact, rather than hecklers, I was honoured by an enthusiastic and engaged audience, who listened to me rambling on about Arduinos and DDS modules very attentively.

The Buildathon on Saturday afternoon saw builders tackle the new Acorn II, which provides the hardware front-end of an SDR Receiver for HF. This was the first ever Buildathon at an RSGB Convention and was, in consequence, something of an experiment.

Those who signed up for the Buildathon tackled it with great enthusiasm and competence...

inspired and assisted by Steve, g0fuw, Dan, m0tgn and Lewis, g4ytn, who were the all-important mentors (without whom Buildathons don't exist) and Dennis, g6ybc, from Kanga, who was there to make sure the kit "delivered".

As well as those actually building, many people popped their heads round the door, looking at what was going on, during the course of the build.

The first receiver to be completed worked first-time...

In contrast, when I went to demonstrate my VFO to the builder of this new Acorn II, my VFO completely failed.

On return home, I re-loaded the code into the VFO system's Arduino UNO and it now works FB again (with no other changes / fixes required)...

This is interesting - it is the first time in my two and three-quarter year history of playing with Arduinos that I have ever experienced such a firmware "corruption" issue.

The Buildathon was declared a great success.

Indeed, the whole event was a pleasure to be part of, presenting as it did an opportunity to catch up with some familiar faces, to meet some new ones and to chat about matters of mutual interest. Better than the average Saturday afternoon!

...-.- de m0xpd

Saturday, 3 October 2015

The URMSTON Regen Receiver

Now that the cat has been let out of the bag on the Kanga website, I guess it is OK to tell you - the second of the two receivers I was playing with a few weeks back is now revealed to be a collaboration with George, g3rjv, and friends at the G-QRP club...

As you see above, the receiver looks pretty in her first production build (even though I say so myself).

The new receiver has been developed particularly for the Buildathon at this year's Rishworth mini-convention, so the PCB layout has been made with special attention to the needs of first-time builders. There's lots of space between the components and plenty of elbow room for the soldering iron - no surface mount technologies here!

Also, I wanted participants at the Buildathon to be able to put together a practical receiver with controls on a real front panel. I  like the form-factor of some of Tim Walford, g3pcj's kits - but didn't think that a fixed front panel would be the best option for a raw tyro in a Buildathon, where time is tight and quick access for trouble-shooting might be invaluable. So I came up with a design that could be made in two parts and quickly plugged together - or pulled apart.

The result is seen here from behind...

The system relies on simple latching connectors for the controls (the female headers are supplied with lengths of cable ready-connected in the kit, so the builder only has to trim to length and solder to the controls) and brackets to fix the main PCB to the front panel PCB. But what could I use for the brackets?

Well - modesty almost forbids me from telling you,

After looking around the workshop for a while and scratching my head, I settled on the idea of using these abominations...

They are - I believe - called "modesty blocks" and they stand in place of carpentry skills in this era of particle board furniture.

They are available in a bag of a hundred for the price of a pint of fancy beer in a city-centre drinking establishment - which is to say they cost a few pence each, retail. They are made of a hard plastic and have two holes on 18mm centres in one plane and a single hole, midway between the other two, normal to them.

They make perfect brackets for the two PCBs of the little regen...

Here's a rather immodest view of the assembled unit...

In times of trouble, unscrewing two screws and pulling off five header connectors will separate the two sub-assemblies. But when fixed together, the blocks make the front panel perfectly rigid.

The front-panel ground-plane is connected to the rest of the receiver via one of the leads - without which the notorious hand-capacitance allows the unit to revert again to its secondary role as a Theremin!

The receiver is great fun to operate - pulling in AM, CW and (if you are patient and skillful) SSB signals on a piece of wet string. It is very sensitive. It is also VERY unlike the other types of receiver we are more used to playing with today. Fortunately I had developed some experience with regens from playing with my Paraset, but for regen virgins, this could be a surprise.

It has been a joy to be working directly with one of George's designs, on an "official" commission from George and Graham at the G-QRP club.

As a further joy (or embarrassment), Dennis at Kanga has named the kit The "URMSTON" - which is the postal town near which I live. Presumably the word is stuck in his mind after mailing so many things to me.

The kit is going to be launched at the G-QRP Buildathon on Friday 23rd October and will be available for general sale at the mini-convention on Saturday 24th and thereafter from Kanga.

I am pleased that my two receivers will be "cannon fodder" at the two big forthcoming Buildathons at UK Radio events this month - I only hope the participants will be pleased too!

...-.- de m0xpd

Sunday, 20 September 2015

Acorn II

Eagle-eyed readers in the UK with their fingers on the pulse will have noticed that one of the receivers discussed in prototype on the bench a few weeks back, the "Acorn II", is to be the subject of the buildathon at next month's RSGB Convention.

Those wishing to learn more about the Acorn II should see Dan, m0tgn's build video. Those wishing to get hold of one can do so at (or after) Kanga's launch at next week's National Hamfest.

One of the key features of the Acorn II is the provision of the external oscillator input. Having provided the input, I thought I better show the world how to make best use of it - so I have written some code to drive an Si5351 to work as a local oscillator, with rather more flexibility than the temporary, jury-rigged arrangement I had set up before...

Here's the Acorn II set up on the bench, along with an adjustable L.O. system (so much better than a fixed crystal HI HI)...

The oscillator consists of a Kanga/m0xpd Si5351 shield (of course - I'm biased) sitting on an Arduino UNO, with a user interface formed by a rotary encoder and an alphanumeric display.

The encoder allows the user to tune the radio across all of the 40m band (and the code includes all the support to switch to other amateur bands - but these require the two push buttons of the standard m0xpd interface used on all my rigs and VFOs, which I hadn't hooked up - no problem as the Acorn II only suppots 40m on the board, other bands needing external filters).

The display shows the effective LO frequency, but the oscillator produces the signal at four times this frequency, as is required to drive the standard quadrature detector on the SDR.

Here's the display (which is notoriously difficult to photograph), set to be appropriate to listen at the CW end of the 40m band...

While writing this post, I changed the oscillator up to 7.13 and listened to gb2eaa - the Essex Air Ambulance Special Event Station - on 7.12 MHz LSB. Just the sort of thing that is infinitely easy to do with this flexible oscillator - and (potentially) impossible to do with fixed crystals.

The code is not ready for public release yet - but I shall make a copy available eventually.

As the bands are a bit of a movable feast - particularly in a buildathon context, I have also knocked up a system I've called the "Buildathon Beacon", which just pumps out "QRP" in CW on 7.03 MHz directly from the output of a DDS module. There's enough radiation from a four inch length of wire for a receiver in the same room to pick it up easily.

Here's the "Buildathon Beacon", with its massive antenna looming towards the camera...

As you see, it is made from an early prototype of the m0xpd DDS shield atop a MEGA - these happened to be lying around.

Here's a screenshot of the output of the Acorn II running into HDSDR, with two foot of wire for an antenna, receiving the Buildathon Beacon...

I had done nothing either to match the two audio channels of the receiver (there's a ten-turn pot for gain adjustment) or to up the software to correct for gain imbalance - I just turned it on and "ran". Accordingly, you can see an attenuated image of the beacon at 7.05.

The Buildathon Beacon was actually developed to assist with the second of my two receivers - but that is a piece of news which hasn't broken yet.

Watch this space!

...-.- de m0xpd