Smart SO2R Antenna Switching using Arduino and a SixPak

One improvement I had wanted to make to my station for some time was the addition of automatic antenna switching.  I’ve been using an Array Solutions SixPak to manually switch antennas in my SO2R setup and, given how many band changes I make in a typical contest, it was becoming pretty tiresome.  In longer contests, I’d sometimes find myself confused in the midst of a band change with my mind stalling out while trying to remember where to turn the SixPak controller knob.

Array Solutions SixPak

My dissatisfaction with manual switching was compounded by the fact that I use some multi-band antennas.  For a band like 20m, I have three different antenna choices I could make, all with their own pros and cons.  And to make matters worse, these antennas have the names “20m”, “15m” and “10m” on the SixPak controller.  When I’m bleary-eyed and 12 hours into a contest, this all starts to seem a bit too confusing.

So what to do?  I took a quick look at what others were doing (and selling) for antenna switching and quickly discovered two problems:

  1. My Microham μ2r controller has simple BCD band decoder outputs for both radios, but I’m already using that to switch my bandpass filters (using a couple Unified Microsystems BCD-10 boards).  I don’t have any other readily available source of band data so I need a solution that can share this one.
  2. All the solutions I’ve found seem to hard code the antenna choices for a given radio (e.g. “when radio A moves to band X then it gets antenna N”), but I wanted some logic included in the switching decision (e.g. “antenna N is the best antenna for band X so when radio A switches to that band then it gets antenna N unless radio B is already using it, in which case radio A will have to use antenna M, the second best antenna for the band.”)

It was only a few weeks before the August NAQP when I decided to build a solution for myself.  Given the short timeframe, I assumed I’d use an Arduino UNO as the brains of the thing, both because it’s SOOOO simple to quickly prototype and build this kind of solution using an Arduino board, and because I happen to have several of them lying around the shack cooing “build something with me” every time I look at them.

The Arduino UNO

“Great!” I thought,  “I’ll use an Arduino and build myself a smart SO2R antenna switching solution!”  But hang on…  The SixPak requires high side switching.  That means the switch has to source some real current to those hungry relays out there on the side of my house AND I have to deal with back-EMF from the relay coils.  I didn’t have time to start building a board covered with FETs and diodes to power my 12 relays.  So I started to look around for a pre-built board that would let me quickly and easily get the job done.

The Logos Electromechanical 4×4 Driver Shield

I eventually found Logos Electromechanical’s 4×4 Driver Shield.  It looked perfect.  You control it through a couple of cascaded, latching shift registers, so you can bit-bang your switch settings into the thing using just a couple of wires, flip the latch using another wire and, presto, the relays synchronously switch.  At $50.00, the price looked a bit high.  On the other hand, it really was an ideal solution for me, and the board looked like something I could use in many a project to come.  At any rate, I was in a hurry, so I ordered one.  The board comes exactly as it is shown here.

Controlling the 4×4 driver board from an Arduino couldn’t be simpler.  Here’s a code snippet from my own switching program:

  digitalWrite(PIN_LATCH, LOW);
  shiftOut(PIN_DATA, PIN_CLOCK, MSBFIRST, r2ant ? 1<<(r2ant-1) : 0);
  shiftOut(PIN_DATA, PIN_CLOCK, MSBFIRST, r1ant ? 1<<(r1ant-1) : 0);
  digitalWrite(PIN_LATCH, HIGH);

You just hold the latch low, shift your switch settings via serial, and then pull the latch back up, and, Bob’s your uncle!  Your antennas are switched.  The rest of my code is pretty specialized and a bit of a quick hack, so I’m not posting it here.  Let me know if you want to see it and I’ll make it available.

With the major parts of the solution chosen, I had to then figure out how to wire them all up.  Here’s a quick diagram of what I had in mind:

I’m using a pair of Dunestar 600 multi-band filters that I’ve configured for low-side switching.  This setup has monopolized the band data output of my µ2r for the past year.  In order to also drive my smart antenna switcher, I needed to split that band data output.  I looked for splitters online and found some solutions but I ended up just hard wiring a “Y” splitter myself in the box holding the Arduino board and adding an extra DB-25 connector.

The SnootLab “Power Screwshield”

One other noteworthy component in this project is the Power Screwshield, which is another item I bought from Logos Electromechanical (though I believe it’s made by another company called SnootLab.)  This board, or another like it, is a must have for interfacing an Arduino with lots of ins and outs.  In my project, I’m literally using every i/o pin on the Uno board and being able to easily and securely attach wires to them using a screw terminal is a real convenience.

The last thing I did before declaring this project “complete” was to stuff the Arduino+Screwshield into an old plastic box, wire up the DB-25s, and add a couple of buttons, a switch and an LED.  The switch is for on/off — telling the Arduino whether to switch for me or allow me to switch using the control box.  The LED is just an on/off indicator.  The buttons allow me to force the Arduino to connect a particular radio to the next antenna for the band its currently on.  So, for instance, if my beams are pointed east (from the Seattle area) when I hear Hawaii on 20m, I’ll push the button to switch to the dipole (the 3rd antenna associated with the 20m band), which will let me easily work into the pacific.

The Arduino-powered automatic antenna switcher sitting atop my TS-590.

As you can see from the picture, the final “product” isn’t too pretty, but it sure did work well for me in the contest.  It was so nice to not have to fiddle around with manual antenna switching.  There’s no going back now.  As next steps, I’d like to build a permanent version — probably just using an Atmel processor on my own board rather than an Arduino.  I’d also like to build my own switching board; one using modern chips (like the 4×4 board does) rather than a bunch of transistors and diodes.  I’d also like my switching board to support a robust control protocol that I could run over longer cables or even over wifi.  That way, I could use the board wherever I needed switching, and it could be generalized for more tasks like tuner control, rotator control, and even rig control.  It occurred to me during this project that ham radio really doesn’t have a well established protocol for station control.  I find this rather odd given the nature of the hobby, but nonetheless, it seems to be true.  I’d like to see that change.  Standard protocols and conventions for station control would be a great step forward for the hobby and for contesting in particular.  Maybe I’ll write more about that in an upcoming post…



  1. Thanks for the nice comments on our products! You are correct that the Power Screw Shield is made by Snootlab, in France. They’re a great company and I like being able to make some of their products easier to get over on this side of the pond. Thanks again!

  2. Dan Downard · · Reply

    I ran across your article while researching Arduino apps. I am doing the exact same thing using an Allen Bradley PLC and a AB Panelview. I also have a Visual Basic app for remote control. I am using Yaesu radios and a SixPak X 2 remote switch.
    I have software that will map antennas to the primary and secondary radios using a software defined matrix with a primary and secondary antenna defined for each band. Selections may be overridden by the HMI as long as the alternate antenna is no in use.
    The main reason I bought the Arduino was to duplicate my existing system without the use of the propietary hardware.
    I would be very interested in your software approach. I will be glad to send you what I have done if you are interested.

    Dan K4FXN

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: