It’s fun to take a minimum of equipment out to a high place, lob a half-wave long wire antenna up into a tree, or support it with a fibreglass pole, and off you go – but such a long wire typically has a high (2.5kΩ to 3kΩ) impedance. To make it work, this needs transforming down to match the 50Ω output of a typical transceiver. This is done using a 49:1 autotransformer, built on a small toroid.

This post details my construction of the end-fed half-wave autotransformer and antenna for the 10m, 20m and 40m bands.

The antenna is very effective, can be erected in a variety of ways, exhibits low noise, doesn’t cause any RFI in the shack (use a choke balun in addition), places the feedpoint very near to your transceiver and it’s pretty easy to build.

Acknowledgements

There are many other articles out there on this subject:

There are also several other pictures of builds I’ve used to assist in this project, particularly from Ian MW0IAN and Michael G0POT. Thanks!

Introduction

I hope to add some detail and pictures for the terrified constructor in this article, but the above are my source materials. This antenna and its autotransformer are a great project for those new to construction – the toroid winding isn’t hard.

One problem I find in many projects is that they go from diagram to finished construction very quickly with insufficient detail. It’s a bit like “How to Draw an Owl”….

How To Draw An Owl

So I wanted to document what I’d done, in the hope it might be useful to others, especially if you’ve not wound toroids before. The key point is that the count of ‘turns’ relates to the number of times the wire goes through the inside of the toroid.

Parts and materials

I’m building this autotransformer on a FT-140-43 toroid, purchased as a pack of two on eBay from Spectrum Communications, for £9.50 incl P&P.

I first wrapped this in plumber’s PTFE joint sealing tape.

I’m using Maplin 0.9mm 20SWG enamelled copper wire, code YN82D. £8.49 for a small reel (the picture on their page is misleading; it’s not as small as indicated). The source articles used 1.0mm wire; this will allow higher power to be transmitted – I’m mostly QRP, and without calculating it, 0.9mm will be fine for this.

For connectors, I’m using a BNC socket, £2.49 for Maplin’s code HH18U, and a small terminal post, again £2.49 for Maplin’s code FD69A. A small black plastic box, for £3.39 code KC91Y houses the completed autotransformer. This box is a bit ‘tight’, but it does all fit. You’ll also need a 100pF 3kV ceramic capacitor, available for £0.131 each (min order, pack of 10) from RS Components.

Building the Autotransformer

Wire lengths for the toroid winding given here come from reading other articles which describe builds on the larger FT-240-43 toroid. After I’d wound on the smaller toroid as shown here, I had some waste wire that required trimming – you could start with shorter pieces of wire, and I’ve estimated possible lengths for this [in square brackets]. However please note I haven’t tested those lengths.

Measure two lengths of wire, 1.0m, and 22cm. [For the FT-140-43 toroid, and a small box as given above, you could probably use lengths of 80cm and 18cm.] Strip the enamel from the ends for about 2-3mm, clean with sandpaper and tin with solder. Solder the two right-hand ends together.

Solder the right-hand ends together

Holding the soldered end in pliers, twist the two lengths tightly together for 13cm [for the FT-140-43, 9cm may suffice], to form the bifilar winding. ‘Bifilar’ meaning ‘two filaments’, I presume. The remaining length of the shorter piece of wire (at the end of the bifilar winding) being about 6-7cm long. Let’s call this length ‘the tail’.

Now to wind the bifilar part onto the toroid.

Pass the bifilar part through the toroid from the back, so that the ‘tail’ passes under the bottom edge, and the start of the bifilar part is entirely running through the inner of the toroid.

Starting the Windings

Wind the bifilar part back round the top and outer edge of the toroid, and back through the hole. Bend it again over the top. You should have two bifilar passes through the toroid. The end of the bifilar winding (that’s the soldered-together end) will be connected to the outer/shield/chassis connector of the BNC socket. The end of the tail will be connected to the inner/centre connector of the BNC. I’ll get back to the connections later.

The Bifilar Winding

Now, there’s the rest of the toroid to wind.

Wind the long single strand of wire through the toroid so that you have six passes on the inside.

The first part of the rest of the winding

Then pass the wire over the top, and over to the other side, going under the far edge. Loop over the top, and go back through the toroid so that on the far side, you have seven passes, with the remaining end (‘the antenna end’) going under and out.

Ensure that the windings are spaced as evenly as you can.

The final winding

Now tin the connections of the BNC socket and terminal post, and fit them in the box.

Carefully trim the three wires coming from the toroid to fit; scrape off enamel (might need to unwind the end of the bifilar winding a couple of mm to do this properly), clean and tin the ends.

The toroid, trimmed, with box

Solder the bifilar winding to the outer of the BNC; the ‘tail’ at the end of the bifilar winding to the centre pin of the BNC; the ‘antenna end’ to the terminal post.

Solder a 100pF 3kV ceramic capacitor between outer and centre connections of the BNC. Use a hot glue gun to fix the toroid to the inside of the box (not shown).

The assembled autotransformer

Put the top on the box, and there you have it.

The completed autotransformer

Building the antenna

There’s a long antenna wire attached to the autotransformer terminal post, followed by a coil and a further bit of wire. I used fairly rugged plastic-insulated wire; the outer diameter is 2mm, bought years ago on a 100m reel, probably from Maplin.

-----+                                                           
auto |         Length L1           Coil in uH    Length L2  (fibre-
xfor-|=----------------------------|\\\\\\\\\|------------|  glass
mer  |                                                    |   pole)
-----+                                                    |

For 80m+40m+20m+15m+10m, L1 is 20.35m, the coil impedance is 110μH, and L2 is 2.39m.

For 40m+20m+10m, L1 is 10.1m, the coil is 34μH, and L2 is 1.85m. I built this variant.

These lengths are taken from the diagrams in the PD7MAA article. Also see PA3FRP’s notes.

I had a length of plastic tube with an outer diameter of 15mm; I wound 141 turns of the Maplin 0.9mm 20SWG copper wire on this, and measured 34μH. This was very much a trial and error exercise; I had no idea how many turns it would take, so the initial length was extended by soldering more on, several times.

Testing

I attached the far end of the wire to the top of my 7m SOTABeams fibreglass pole, and fed the wire out so that the autotransformer was on the ground – imagine a right-angled triangle with a bowed hypotenuse; I also lifted the autotransformer up onto a small table.

Measurements with an antenna analyser show very favourable SWR readings for the three bands I’m interested in:

  • At 7.305MHz, SWR is 1.21:1
  • At 14.318MHz, SWR is 1.14:1
  • At 27.780MHz, SWR is 1.15:1

With a bit of adjustment, and appropriate positioning – it does seem sensitive to its location above ground (this is explained in the test article by John Huggins) – I think it’d be fine to transmit into this. I’d ideally like to tune it a little more, so I can use it on the exact frequencies I frequent without an ATU.

Advertisements

I sometimes want to operate using the JT65/9 modes from local hills, as my home QTH is close to sea-level. However, doing so is not so easy, due to the quantity of kit I’d have to take:

  • Battery
  • Laptop
  • Phone (for Internet access and NTP sync of laptop)
  • HF Transceiver
  • USB external sound card / rig interface
  • Antenna and associated matching unit
  • Antenna mast/fibreglass pole/guy lines

This does not all fit in a single rucksack, as a CW QRP system might. So, I’m thinking about what a self-contained JT-modes transceiver might look like, so that I just take:

  • Battery
  • Self-contained JT-modes transceiver
  • Phone
  • Antenna and associated matching unit
  • Antenna mast/fibreglass pole/guy lines

So what would be in the box? I think this could be developed in two phases.

  • Phase 1: Merge the transceiver and USB interface.
  • Phase 2: Add the computer.

So for phase 1:

  • Arduino Micro (my board of choice) presenting multiple devices via its USB connector: a 16 bit 8000kHz mono sound card; a serial interface for CAT commands (to change operating frequency); a serial interface for diagnostics/control via a terminal emulator.
  • The Arduino would be connected to a 16-bit digital-to-analogue converter, which, when transmitting, would provide the analogue signal to the transmitter (as sent from the main computer).
  • Also, an analogue-to-digital converter which passes the received audio in receive mode back through the USB sound card to the main computer.
  • The USB CAT interface would control the output frequency of a direct digital synthesis (DDS) unit, for precise generation of the correct frequency for the JT-modes section of the band.
  • Transmitter/PA and receiver system suitable for the transmission and reception of JT-mode signals.
  • Possibly monitoring of SWR forward/reverse measurement, and PA transistor temperature; triggering of a cooling fan.

This phase 1 system could be connected to my existing OSX laptop and appear as a CAT-controllable USB sound card, with decode/generation of the JT-mode signals being done by the ‘proper’ WSJT-X software.

Phase 2 could extend phase 1 by adding:

  • A touch screen, connected to…
  • A Raspberry Pi Zero W, running a cut-down/embedded Linux, a customised version of WSJT-X optimised for the touch screen, and WiFi/Bluetooth connection to an optional Bluetooth keyboard and phone (for NTP sync). USB connection to the phase 1 ‘sound card/CAT’ transceiver.

Risks/things I don’t yet know:

  • How to make an Arduino provide multiple devices; It provides a single serial interface ‘out of the box’ – I require two discrete ones, and a sound card.
  • How to provide a USB sound card interface.
  • The design of the transceiver capable of digital modes, in much more detail than a basic SSB transceiver block diagram.
  • How easy it’ll be to customise WSJT-X for the phase 2 system.

So to address the first two, it should be possible to provide the two serial interfaces wired ‘back to back’, so that anything you send on one, gets received by the other, and vice versa.

The sound card could just send a varying-pitch sine wave (simulating the ‘receiver output’), or send back what it has been receiving (on its ‘microphone’ when ‘transmitting’).

The transceiver itself could be based on existing SSB DDS-driven systems, possibly the BIT-X, or the QRPver (replacing the VFO with DDS). This is the riskiest part of the entire endeavour, as I’m a very amateur amateur, and something of a beginner at RF electronics design.

To be continued….

 

This is part 2 of my series on building a cheap loop antenna. If you haven’t read part one, it’s here. In this second part, I’ll cover the building of the tuning capacitor.

Obligatory Safety Notice

This article describes machinery and tools, workshop practice and construction that if not performed carefully and with the appropriate protective equipment (goggles, etc.) – could lead to serious injury. Please take care. I won’t be held responsible for your accidents!

Tools Required

In addition to keeping the material costs of the antenna as low as possible, it should also be buildable with a minimum of specialist tools. The following were used in constructing the capacitor:

  • Superfine permanent marker (Staedtler Lumocolor S)
  • Compass with universal adapter to take these pens (Staedtler Noris Club 550 01)
  • Metal / plastics drill (Dremel 3000)
  • Drill bit 3.2mm (Dremel)
  • Drill press (Dremel 220 workstation)
  • Thin circular metal file, flat metal file (Stanley warding file set)
  • 8mm spanners for M5 nuts
  • Junior hacksaw
  • Fret/coping saw (Stanley fatmax)
  • Centre punch
  • Two C-clamps for holding things whilst cutting (a vice would be far better)
  • Straight aviation tin snips

Materials

Item Cost each Total cost
9mm thick IKEA Legitim Chopping board £1.00 £1.00
Stainless steel washer M5 100 pack (Toolstation 79167), x2 £0.96 £1.92
Stainless steel Threaded Bar M5 (Toolstation 61139) £1.78 £1.78
Stainless steel Lock Nut M5 100 pack (Toolstation 64158) £1.58 £1.58
Stainless steel Spring Washer M5 100 pack (Toolstation 92679) £0.97 £0.97
0.9mm thick Aluminium (grade 1050) plate sheet, 300mm x 200mm, protective coating on one side £3.80 £3.80
£11.05

Well, there you go, I wanted CHEAP, and you can’t get much better than £11.05!

I chose M5 threaded rod, nuts and washers as it would be mechanically substantial, and not present too much resistance to RF. I considered M3, but it would introduce greater loss, despite being easier to drill for. The Dremel drill I use is excellent, but does not drill holes with a diameter greater than 3.2mm. I thought of drilling this size, then increasing the hole size with a burr, but this did not work out well, so I reverted to filing out to 5mm. Another reason for going with M5 hardware is that Toolstation in Tunbridge Wells stock M5, but not M3, and they’re really quite reasonable as the table above shows.

I initially considered Aluminium Warehouse for the plate, but their shipping cost was £15, so scratch that! I mentioned this to my wife, who suggested Amazon…. which turned out to be an excellent idea, as Hardware Outlet sell it for £3.80 with free postage. Nice.

Design

The diagram below shows the design of the rotor/stator vane plate (six of which are cut from the aluminium sheet), and end plate (two of which are cut from the 9mm thick cutting board). This layout comes from the article Magnetic Loop Antennas, by Tony ON4CEQ. The rotor and stator are cut from a single piece of aluminium with a minimum of tricky cuts. Other articles have separated them with Dremel cutting disks, which I had bought, intending to try – but managed to cut out Tony’s design easily.

Construction

In hindsight, it would have been better to make the end plate a few mm taller, as the rotor is exactly the same diameter as the end plate’s height (8cm), and if not raised, touches the desk as I rotate the finished capacitor.

I cut the end plates out using the above fret/coping saw, along with some extra pieces used to clamp things in my drill press. The holes for the threaded rod, forming the stator arms and rotor were drilled out with the Dremel’s 3.2mm drill bit then filed out to 5mm diameter.

I marked out the aluminium on its protective layer, using the microfine permanent marker and compass as shown. I left a 5mm gap between each plate (see detail below), thinking that the extra metal would prevent the drill from tearing the thin aluminium when drilling or increasing the size of the holes from 3.2mm to 5mm. I need not have done this; increasing the size of the holes was best done with a file, which was tedious. The vane panels could have been laid out directly next to each other; cutting each panel out was easy with the junior hacksaw. Each hole was centre-punched, which made drilling far easier.

Drilling was straightforward, although the Dremel workstation tends to allow the drill to move slightly. Centre-punching is essential.

The stator and rotor are cut from the panel easily; the diagonal cuts toward the centre are easily done with a junior hacksaw; the short cuts near the rotor axle, joining the diagonal cuts are done with the fret saw shown above (which is probably only supposed to cut wood; it handles 0.9mm aluminium well too).

Tin snips are then used to cut the unwanted parts of the rotor blade away, to yield its circular edges.

Burrs are filed off, edges and corners smoothed to remove any sharp points that could a) cut you and b) offer a point of voltage breakdown and arcing.

I then cut four 85mm lengths of M5 threaded rod for the four corner stator attachments, and a single 105mm length for the rotor. I then assembled the frame with the plastic, rod, spring washers, washers and nuts.

I assembled the rotor on the longer length of threaded rod. The washers I’m using to separate the vanes are exactly 1mm thick. Initially I used five of them, to make absolutely sure I’d have the inter-vane gap I’d need, but found the capacitance to be too low. So I rebuilt with four washers between vanes, and achieved a capacitance much closer to that needed.

The stators were assembled onto the frame, and roughly aligned with each other.

The rotor then fits snugly inside the stators and its axle fits in the centre hole. It’s hard to make out the end plate due to the perspective here, but it’s there.

Flat washers are fixed on either side of the rotor/end-plate mountings, in lieu of bearings. The top plastic end plate is then added, and everything tightened up. There’s a certain amount of adjustment of the stators and rotor to ensure that the rotor rotates freely within the stator plates, and that there’s an equal gap between rotor and stators. This adjustment is mostly done via the nuts mounting the stators, but there might also need to be gentle bending of the various plates.

Measurement

After construction, I measured the capacitance, and read 0.006nF (6pF) for completely unmeshed, increasing to 0.043nF (43pF) for completely meshed – close to the upper value I need – 46.311pF from the first article in this series.

Conclusion

There’s a bit more mechanical tweaking to do, but that’s the risky part of the magnetic loop project done. Next time, I’ll assemble the rest of the loop and think about manual/automatic tuning.

Here’s a short clip of the capacitor being tuned and measured…..

Stay tuned!

73 de Matt M0CUV

I’ve been wanting to try a different aerial for 20m for some time. I currently either use a dipole in the loft, or a temporary SOTAbeams linked dipole on a 7m fibreglass mast. The magnetic loop antenna appeals because it’s compact, and if designed/built for efficiency, gives excellent performance.

They’re also expensive. One well-known UK dealer is selling the Ciro Mazzoni baby loop for £1299; another dealer sells the MFJ-1782X for £439; the Chameleon CHA F-Loop is available from a third dealer for £399. All are far, far outside my budget.

It’s not called amateur radio for nothing, and what I describe in this series of articles is truly amateur. I’m going collate my research sources, and try building a magnetic loop antenna (properly called a small transmitting loop antenna) using bits from my junk box, making good use of the things that I find, things that the everyday folk leave behind. I don’t have all the parts, but whatever I need to buy must not break the bank. Similarly, tools: I’ll need some, but they must be cheap 🙂

(more…)

Abstract: Oracle is shutting down Kenai and Java.net on April 28, 2017, and as one of the open source projects I’m a member of was formerly hosted there, we needed to move away. This move comprises source code and mailing lists; this post concerns the former, and is a rough note on how I’m migrating svn repositories to git (hosted on github), with the method, and a script that makes it easier.

It’s an ideal time to migrate your subversion repositories to somewhere else, and since git/github are the de facto/fashion standards these days, you may want to consider converting your entire history to git, and hosting it at github. (Disclaimer, I prefer mercurial and bitbucket, and some of the below could be used there too…)

To convert a svn repo to git, and push to github, there are several stages. I did this on OS X – I’d do this on some form of UNIX, but you may get results with Windows too.

I’m going to use svn2git, so let’s get that installed:

Following the installation instructions at https://github.com/nirvdrum/svn2git

I made sure I had ruby, ruby gems, svn, git, and git-svn installed (these package names might not be precise for your system; they’re from memory)
I can do:


$ cd /tmp
$ mkdir foo
$ cd foo
$ git init
$ git svn
git-svn - bidirectional operations between a single Subversion tree and git
usage: git svn [options] [arguments]
… blah blah …

So,

$ sudo gem install svn2git

The conversion from svn to git makes a lot of network access to the svn repo, and so to reduce this, let’s “clone” the svn repo onto the local system.
Mostly following the notes at https://journal.paul.querna.org/articles/2006/09/14/using-svnsync/, first, initialise a local repo:


$ mkdir svnconversion
$ cd svnconversion
$ svnadmin create svnrepo

Note that git’s svn code expects the subversion repo it converts to have a filesystem format version between 1 and 4, that is, up to Subversion 1.6. So if you have a version of the svn client that’s more recent than that, you’ll have to use the command:


$ svnadmin create —compatible-version 1.6 svnrepo

(see http://svnbook.red-bean.com/nightly/en/svn.reposadmin.create.html for details)


$ ls -l svnrepo
total 16
-rw-r--r-- 1 matt staff 246 1 Sep 22:58 README.txt
drwxr-xr-x 6 matt staff 204 1 Sep 22:58 conf
drwxr-sr-x 15 matt staff 510 1 Sep 22:58 db
-r--r--r-- 1 matt staff 2 1 Sep 22:58 format
drwxr-xr-x 12 matt staff 408 1 Sep 22:58 hooks
drwxr-xr-x 4 matt staff 136 1 Sep 22:58 locks

$ cd svnrepo

Now create the pre-revprop-change hook:

$ echo '#!/bin/sh' > hooks/pre-revprop-change
$ chmod 755 hooks/pre-revprop-change

Let’s prepare to sync the svn repo here:


$ svnsync init file:///tmp/svnconversion/svnrepo https://svn.java.net/svn/name-of-remote-svn-repo

Now let’s do the actual sync. This is what takes the time on large repositories…


$ svnsync --non-interactive sync file:///tmp/svnconversion/svnrepo
# Make tea…

OK, now we have the “clone” of the svn repo, so let’s convert it to git. The first thing you’ll need is an author mapping file. This converts the short author names used in svn commits into the longer “name ” form used by git.

Note there are many possible structures for svn repos, with the ‘standard’ layout having branches/tags/trunk. This page assumes that your svn repo looks like that. If it doesn’t, then see https://github.com/nirvdrum/svn2git where there are many possibilities documented to aid your conversion.

See the svn2git github page for details of how to create this authors.txt file.

Converting to git is as simple as:

$ cd /tmp/svnconversion
$ mkdir gitrepo
$ cd gitrepo
$ svn2git —authors ../authors.txt file:///tmp/svnconversion/svnrepo

Then create a new repository using the GitHub web UI, add it as a remote, and push, mirroring all branches to the remote:


$ git remote add origin https://github.com/your-repo-name.git
$ git push --mirror origin

The following is a script I wrote to make it easier to perform the above steps repeatedly, as I had several repositories to convert. It assumes you have exported the GITORGANISATION environment variable.

#!/bin/bash


usage() {
	echo "svn-to-git-conversion [syncsetup|sync|convert|push] http://url/of/svn/repository local-repo-dir-prefix ~/path/to/authors"
	exit 1
}

PHASE="$1"
# syncsetup, sync, convert or push

SVNURL="$2"
# https://svn.java.net/svn/jxta-c~svn

LOCALREPODIRPREFIX="$3"
SVNREPONAME=${LOCALREPODIRPREFIX}-svn
GITREPONAME=${LOCALREPODIRPREFIX}-git
# prefix of relative folder (eg jxta-c) where repository will be svnsynced to eg jxta-c-svn
# and of relative folder where repository will be converted eg jxta-c-git

AUTHORS="$4"
# path to author mapping file

if [ "$PHASE" != "syncsetup" -a "$PHASE" != "sync" -a "$PHASE" != "convert" -a "$PHASE" != "push" ]
then
	usage
	exit
fi

SVNREPOFILEURL="file://`pwd`/$SVNREPONAME"
echo local svn repository url is $SVNREPOFILEURL

if [ "$PHASE" = "syncsetup" ]
then
	svnadmin create --compatible-version 1.6 $SVNREPONAME
	echo '#!/bin/sh' > $SVNREPONAME/hooks/pre-revprop-change
	chmod 755 $SVNREPONAME/hooks/pre-revprop-change
	svnsync init $SVNREPOFILEURL $SVNURL
fi 

if [ "$PHASE" = "sync" ]
then
	svn propdel svn:sync-lock --revprop -r 0 $SVNREPOFILEURL
	svnsync --non-interactive sync $SVNREPOFILEURL
	echo Users in the SVN repository to be added to the $AUTHORS file:
	svn log --quiet $SVNREPOFILEURL | grep -E "r[0-9]+ \| .+ \|" | cut -d'|' -f2 | sed 's/ //g' | sort | uniq
	echo Top-level structure of the SVN repository: 
	svn ls $SVNREPOFILEURL
fi

if [ "$PHASE" = "convert" ]
then
	mkdir $GITREPONAME
	cd $GITREPONAME
	svn2git --authors $AUTHORS $SVNREPOFILEURL
fi

if [ "$PHASE" = "push" ]
then
	cd $GITREPONAME
	git remote add origin https://github.com/$GITORGANISATION/$GITREPONAME.git
	git push --mirror origin
fi

In the previous article, I covered the Arduino controller for the transceiver, and in this one, I was hoping to describe the direct digital synthesis and buffer board – but since I shorted the DDS board, and the buffer wasn’t working quite as I’d hoped, I’ll need to revisit that…. Undeterred, this article focuses on the bandpass filters of the transceiver, and how I’m going to test them.

[See the full list of articles in this series HERE]

In the original circuit, the receiver was fed by a bandpass filter, constructed from two Toko KANK3333R coils. (Note: these are no longer manufactured, but compatible coils are available from Spectrum Communications). The transmitter output led into a low pass filter made from two T50-2 toroidal inductors.

The receiver input is filtered to attenuate strong out-of-band signals that might desensitize the receiver, making it harder to receive the in-band signals. Considering the noisy, unfiltered spectrum around the 20 metre band at M0CUV, shown below, there is a definite need to reject anything loud! The peak at 13.557 MHz is some local QRM.

The transmitter is filtered to attenuate harmonics generated by the VFO/buffer/PA.

In this revised project, since I’m replacing the VFO with a DDS module which generates harmonics – see page 9 of the AD9850 data sheet – there’s an even greater need for output filtering. I mustn’t transmit out-of-band, but also don’t want harmonics appearing in other amateur bands.

To simplify the design a little, rather than having separate receive and transmit filters, I chose to have a single bandpass filter just after the antenna input. This is switched between receive and transmit by opto-isolated relays. Since this is a three-band transceiver, I will also be switching the appropriate filter in, also by opto-isolated relays. The three filters are to be built as swappable boards, so I can explore the whole amateur HF spectrum.

This article doesn’t cover the detail of the filters, or the switching arrangement: it’s about testing the filters, to ensure that their passband covers the amateur band, and that the filter drops off as sharply as possible out of that band.

The approach I’m taking is to generate a broadband noise signal, and inject this into my “spectrum analyser” … Assuming that this shows a nice noisy signal across the band in question, and a little off the ends of the band, I will compare the noise with the filter in- and out-of-line, and adjust the filter to ensure good coverage of the band, and rejection outside it.

Since I can’t justify an expensive spectrum analyser, I’m using a somewhat cheaper solution – an RTL-SDR R820 dongle, preamplifier, and upconverter kit from CosyCave – which cost around £26 if I recall.

The noise source is is connected to the dummy load port of my KP4MD Dummy Load/40 dB Attenuator, and its attenuator port connected to the Preamplifier-Upconverter-Dongle chain.

Note: I was initially thinking of building the switchable attenuator from Hans Summers’ spectrum analyser project, but the 40dB from the KP4MD project was sufficient, cheaper and easier to build.

I read N5ESE’s article on using a noise source in this way, which led to this part of the project.

The noise source is a circuit by Tom N0SS, now sadly SK. His page on the project may be found in his Elecraft Kits page, with build instructions in PDF here. I have a cached copy of this file here.

The circuit of the noise source is shown below:

Construction

I built this on good old prototype board, using the rough layout shown below, and mounted it in an Altoids-style tin, with switched 9v battery power and a BNC socket output connector:

Testing

Measuring the noise on my old oscilloscope, I saw:

I’m using the excellent RTLSDR-Scanner software on Mac OS X to use the RTL dongle as a poor man’s spectrum analyser. The necessary pyrtlsdr wrapper software needed by it is cloned from its GitHub repository, and for the Python 2.7 I have installed on my OS X Lion system, I had to checkout this commit (if memory serves – I think the authors are trying for mixed Python 2.7/3.0 compatibility, and the HEAD commit isn’t working on 2.7 for me… so, wind back a bit.) This program is cross-platform, so should work well on all platforms, given the right dependency setup.

If you’re using Linux, you may also find Claudio Giuliani’s RTL-SDR Wide Spectrum Analyser project worth investigating.

The noise measured from 1 to 30 MHz (with noise source connected directly to SDR chain, and output level reduced) looks like:

The blue trace is what’s received with the SDR terminated with a 50Ω dummy load; the green is the noise signal.

Conclusion

I’m hoping this will provide a low-cost method of testing filter response.

Acknowledgements

Next…

I’ll either be rebuilding the DDS/Buffer amplifier board, or winding toroidal inductors for the filter construction.

In the previous article, I started the construction of the EasiBuild Mk 2 with the power regulation and supply board. In this article, I detail the digital controller of the transceiver.

[See the full list of articles in this series HERE]

In the original circuit, switching between receive and transmit was done manually with a switch (and was frequently forgotten!). The transceiver was a VFO-based (variable frequency oscillator) single-band design with a front panel scale around the tuning capacitor indicating frequency. RIT (receiver incremental tuning) was a front panel potentiometer, and the sidetone was generated by its own circuit and injected into the audio amplifier.

In this revised version, RX/TX switching is performed automatically when the key is pressed. A paddle is also supported with proper keying signals and timing being generated. Three bands are available, with swappable filter blocks: you can configure which filter is in which socket via the menu. The VFO/buffer is replaced by an AD9850 DDS (direct digital synthesis) module and buffer amplifier. Tuning and band switching is done automatically via a front panel rotary encoder and its pushbutton. Frequency display and other information is via a front panel 16×2 LCD display. The sidetone is generated when the keying signal is sent, as a shaped PWM (pulse width modulation) signal, converted to audio by an RC network, and injected into the audio amplifier. All the above is orchestrated by a microcontroller. Connections to the other modules in the transceiver are via 2.54mm pin headers.

Schematic

The schematic for the control board is shown below (click diagram for a slightly larger version):

Design

The purpose of this module is to hold the microcontroller (mounted on 2.54mm female headers), and to connect its various pins to groups of 2.54mm male pin headers that lead off to other modules in the system, for neatness. There’s no extra logic, driving, buffering or opto-isolation circuitry in this module, everything connecting in here is TTL, and the audio sidetone output. This makes it easy to test in isolation from the rest of the system.

I chose the Arduino Micro as it had just enough I/O capacity for this project, and I’d used it before in my antenna analyser project. Other members of the Arduino family would give more flexibility.

Thanks to Bouni for the diagram of the Arduino Micro pinout above (click diagram for a much larger version).

Please note that there are several errors on the diagram, I’ve notified Bouni and will update this post when a corrected diagram is available. The errors affecting this board (there are other errors) are:

  • A0 is D18, not 14.
  • A1 is D19, not 15,
  • A2 is D20, not 16,
  • A3 is D21, not 17,
  • A4 is D22, not 18,
  • A5 is D23, not 19,

The discussion below will refer to the corrected micro’s pins by the coloured names in the diagram.

Digital input pins are mapped to their functions in the transceiver as follows:

  • 12/DAH from paddle or DOWN from straight key
  • 11/DIT from paddle or DOWN from straight key
  • 10/ENCR, the right quadrature signal from the rotary encoder
  • 9/ENCL, the left quadrature signal from the rotary encoder
  • 8/BTN, the pushbutton on the rotary encoder

The Arduino’s internal, software-controllable pull-up resistors are enabled for all these input pins. This group of pins are used for digital inputs, since all their states can be discovered by a read of the PINx locations in an interrupt handler, which I’m doing in the sidetone generator’s timer ISR. I considered using the AVR’s pin change interrupt: one interrupt occurs when any of the pins change state. Pins 8-11 use the “PIN B” interrupt, and pin 12 uses the “PIN D” interrupt. Since the USB RX/TX (specifically, RX) are likely to generate interrupts on USB traffic, and I intend to provide a back-panel USB connector, possibly for diagnostics or even CAT control, I’ve not used the pin change interrupt, so this led me to a simple read of PIN B and D under a regular timer interrupt. Debouncing is done in software.

It remains to be seen whether I skimped a bit on control push buttons – I have pin 13 available that I might make use of.

I’ll go into the software design in a later article, so no more on that now.

Digital outputs are mapped to their functions in the transceiver as follows:

  • 18/DDS_RESET for AD9850 control (14 is erroneous on the diagram)
  • 19/DDS_DATA for AD9850 control (15 is erroneous)
  • 20/DDS_UPDATE for AD9850 control (17 is erroneous)
  • 21/DDS_CLOCK for AD9850 control (16 is erroneous)
  • 22/BAND3 for switching the third bandpass filter in circuit (18 is erroneous)
  • 23/BAND2 second bandpass filter (19 is erroneous)
  • 7/BAND1 first bandpass filter
  • 6/RX/TX for switching between receive and transmit
  • 5/TONE, PWM output for the sidetone, via an RC network
  • 4/KEY for switching the PA on, in transmit mode
  • 3/SCL connection to the LCD via I2C-to-parallel adapter
  • 2/SDA          ”        ”

Although the power module provides a 5v supply, which could be used to supply the LCD I2C module, I’ve chosen to power the I2C module with the 5v supply generated by the Arduino.

The RC network on pin 5’s PWM output converts the PWM signal to audio, as described in the MicroChip application note Using PWM to Generate Analog Output.
From the application note, I want an upper frequency for the low pass filter of 1.5kHz, and choosing K=5, and the -3dB point at 1.5kHz:

  • RC= 1/(2 π f)
  • RC= 1/(3000 π)
  • With C as a 0.01μF, R would be about 10kOhm.

Use a polyester capacitor for C, as per Dave Richard’s advice in the hi-per-mite forum.

Construction

Again, I’m using prototype board for this module.

The board layout I used is shown below (click diagram for a larger version):

This is the view from the component side; I mirrored the above bitmap horizontally in GIMP and printed it to ensure I got the wiring on the underside right.

I’m using Eagle to design these schematic and board diagrams. Eagle is an excellent CAD system available in a freeware version for non-profit use. However, it is intended to aid design of “proper” printed circuit boards: it has no built-in knowledge/rules for working with prototype board or stripboard. I’ve adopted some conventions for using it with these boards.

Blue lines are wires on the underside. The holes of the prototype board coincide with the intersections of the grid lines. I’m supplying a screen grab of the board layout, as Eagle’s normal export-to-bitmap omits the grid: I can’t lay out prototype board without it!

The board layout is somewhat idealised: Looking at the left-hand side of the board layout, Arduino pin 22/BAND3 (A4 on the Arduino component) is broken out to a connecting wire that isn’t exactly on a grid intersection. In the actual build, it is, but the wire is bent a bit at the end – you’ll see in the photos at the end. Also, the top-right digital inputs on the Arduino look bent at right angles, and also not on grid intersections – they’re actually completely straight on the board. This is so I can fit all the wiring and pin headers on the 18×24 prototype board. Note that all wiring on this board uses insulated 1/0.6 wire – apart from the GND connection on the right hand of the Arduino: there are two junctions there.

Solder all pin headers in place first, then do the wiring. The Arduino sockets are made from four 10-pin female 2.54mm headers, two of which are cut down to 7 pin, and sanded to fit alongside the 10-pin header.

The picture below shows the wiring about half-complete.

I should have taken a picture earlier than this (sorry), as the white (band select) and red (+5v to panel) wires obscure the connections between the power header and Arduino (row 6 and 7 on the right hand side of the Arduino). The ground connections, sidetone RC network, and TX key header are tricky (rows 9 to 12 on the left hand side of the Arduino). They get obscured in the next pictures….

Of course, it’s only after spending a few weeks’ spare time designing the board in Eagle and several hours building it, then looking at these photos that you realise that you could have routed these wires underneath the Arduino, inside its pins rather than outside. Thinking outside the box requires you to realise that there is, actually, a box. Or not, in this case. You also realise after the construction that the RC network’s capacitor should have been polyester, not ceramic, as ceramics tend to introduce microphony into audio circuits. It’s what I had on the bench when building… and it was a 0.1μF I used, not a 0.01μF, as per the schematic. I’ll change it later. As the philosopher Homer exclaimed on more than one occasion: “D’oh!”. Hopefully this won’t be a big problem.

Here you can see the rest of the panel input connections.

The finished board.

Without an Arduino you can make out the sets of 10-pin headers.

Finished!

I haven’t chosen a case in which to mount the modules yet; one point to note is that there will need to be about 3cm clearance at the top of this board to take the USB adapter cable that will be mounted on the back panel.

The components for the front panel (rotary encoder, paddle 3.5mm jack connector, and LCD I2C board) should all be connected to the panel connector.

Parts List

Part Value
C1 0.01μF polystyrene
R1 10k
FROM_PWR 2-pin male 2.54mm header
BAND_SELECT_TO_FILTERS, TO_DDS 5-pin male 2.54mm header
KEY_TO_TX, SIDETONE_TO_AF 2-pin male 2.54mm header
PANEL 9-pin male 2.54mm header
HDR1, HDR2 10-hole female 2.54mm header
HDR3, HDR4 10-hole female 2.54mm header cut down to 7-pin

Testing

Before inserting the Arduino, check all points for continuity and shorts, then add Arduino, attach to power board, and ensure 5v is present on panel connector, and that Arduino boots.

The firmware permits compilation in ‘test harness mode’, by defining one of several preprocessor symbols. See the EasiBuildMk2.ino Arduino file in the code repository. There are several harnesses:

  • Input signals: BTN, DIT, DAH, ENCR, ENCL as a binary / hex number. Touch the controls, see the pins change.
  • Output signals: BAND1, BAND2, BAND3, RX/TX, KEY, DDS_RESET, DDS_DATA, DDS_CLOCK, DDS_UPDATE. Use the rotary encoder to switch to a different signal, or wait and it’ll loop through the set, toggling the pin shown on the LCD once per second. Test with meter, logic probe or scope.
  • Sidetone: use rotary encoder to adjust volume, press button to switch to use rotary encoder to adjust pitch.
  • Events: detection, debouncing of input signals and conversion into ‘events’ that are pushed onto a FIFO, that are decoded and displayed on the serial console.

Conclusion
After some initial teething issues, with incorrect pin numbering on the diagram I was following, the board tests out fine, and is now allowing me to build the UI framework I need to write the firmware. I’ll write a separate post about the firmware, its design, and test-driven development of Arduino code (without an actual Arduino).

Stay tuned….

Acknowledgements
Thanks to Bouni for the Arduino pinout diagram; Jenny List G7CKF and Dr. Lucy Rogers for advice on working with Eagle; Bill W0WCA and Dave Richards AA7EE for advice on use of polyester capacitors in audio circuits (that I completely forgot when I came to build!); Mike N2HTT for his 3-band VFO project, and details of the rotary encoder which I’ve used in this project; Colin M1BUU for showing his DDS signal generator, illustrating connection details, construction techniques, and for advice on driving the LCD; Mark VandeWettering K6HX for info on using PWM for audio.

In the next article, I’ll get into the actual radio hardware design, with the addition of the direct digital synthesis and buffer amplifier.