Suitcase DXPedition Station Automation Part 2 – an Arduino based SO2R Controller

Believe it or not the ham radio world, through contesting, can be ultra competitive. Yes, guys sitting in chairs for hours on end can result in world class recognition. Someone even wrote a book on the subject.

The fame, the glory, let that be me, well that’s the dream but mine has a little twist in that I’m ready to sign up to stuffing the radio station into suitcases, boarding Dreamliners (that’s a real plane) and setting up shop on a distant shore. I’m so enthused, I might even consider wading ashore Normandy style if that gets me to my destination.

The demi-gods in this ultra competitive world have many well hidden tricks up their collectives sleeves. Discovering them comes with some inquiry, patience, experimentation and an investment of time which all-in represent a key enjoyment of this journeyman’s journey.

Success boils down to one simple thing; your score. Scoring varies from contest to contest but most all reward you for not just raw volume of contacts but for nabbing contacts across the participant pool and also across different amateur radio bands. Band awareness was an Achilles heal during our Costa Rica March 2018 trip.

With all of this in mind I wanted to enhance our station to provide better band awareness amongst other things.

At first I thought a dedicated SDR receiver such as the UK’s excellent SDRPlay would do the trick (and it would) but we also determined that station redundancy was another Achilles heal which suggested bring two KX3s and so why not put the second KX3 to work.

The idea of SO2R was now on the table.

It’s definitely more of a skill found in ultra experienced contesters (which I’m not) but I like the idea of starting early and easing in to new skill and besides that out initial variation of it would have one station as the “run station” and the other as a listener, band awareness station.

Similar to the discussion on the band decoders, commercial options seemed attractive but somewhat disqualified on size and weight although not quite as black and white in this case.

Scott KX9RT, made me aware in early November of the SO2Rduino project by Paul Young K1XM’s with details available at the National Contest Journal web site. All in all this is very well documented, seemed pretty straight forward and represented something I thought I would enjoy.

img_4336
Paul K1XM’s circuit

Software is heavily intertwined with ham radio. You could live without it but much, such as computerized logging, is so much easier when done with software. Standing out from the crowd is an essential piece of contest management software created by a team of volunteers and named after its originator, N1MM.

Paul, K1XM’s design includes full integration with N1MM and this is achieved using a tiny “computer on a board” called the Arduino. Suffice it to say this Italian initiated program has been a success and the progenitor for many variations, small, large, fast, cheap of the original Arduino board. The Arduino is simply the starting point and the place where the software runs that will bring to life a separate “daughter card” that is home to all the electronic wizardry that together converts N1MMs instructions to vector audio from one radio to another and much more.

Truth is I’ve always had a bit of a love hate relationship with the Arduino. Hugely successful but as a guy with decades in the software industry I’m easily drawn to the Raspberry Pi. However the Arduino is much loved and much used not least for its simplicity versus the Linux heavy RPi and it’s one abundance of I/O ports. Maybe I balk at the Arduino as its very much like the type of device/environment I used, albeit Intel 8080 centric, at the start of my commercial career and didn’t want to go back to it. Fortunately this project taught me to really appreciate the Arduino and become a convert.

Many different proto-shields (aka daughter card) are available, some geared toward easy support for a multi pin chips, some for easy integration with the original Arduino etc. I really wanted a plain vanilla board that I could fill up with relays, transistors diodes, wire etc. and settled on a board from SparkFun in CO despite having bought many “Maker” items from Adafruit. Maybe SparkFun for the snappy red look and shorter shipping time to Cal.

First step was to map the circuit above to the 8.5 x 11 grid I draw on a piece of paper. Each row/column intersection represents a hole that can be occupied with a lead from a transistor, resistor or bit of wire. Sometimes you might as I did, stuff two leads in especially when you under estaminet the board real estate required to complete a project, which I also did.

img_4334
Each column/row intersection is a hole on the proto board. Essentially I’ve mapped K1XM’s circuit to a “build plan/layout”

The big bang theory to testing (which I sort of followed) was in hindsight naive. Building a small piece of functionality such as headphone switching using relay K1 and K2 (pink rectangles top left and center in diagram above) would have been better than trying to debug my overpacked and slum like board once completed.

However, with construction fresh in my head, I was able to troubleshoot all my hardware issues and correct them to the point I believed the circuitry was and is working.

img_4352
I was too optimistic about how much I could get on the road. Everything is too close and I’ve made it harder to see what goes where.
img_4380
Underside of board. Technique is to connect components via solder bridges
img_4400
After a bit of debugging I realized I was missing solder between two pins on underside of board
img_4379
Chaos!! Patience and my “build plan/layout” save the day

An unexpected furlough

Unfortunately for me, I had an unexpected furlough part way through the project. An eye in transition developed a torn retina which once detected and promptly operated on, had me listening to audio books and podcasts for a week. No SO2R construction  All good now but an effective  vacuum cleaner on what I was up to on the project.

Software ….something in theory I understand quite well

Paul K1XM has done an excellent job delevloping modular and readable software. Much has happened in the last 7+ years in the Arduino software library area since his code was penned and so I took the opportunity to teach myself more about Arduinos and his software by retrofitting the contemporary Serial Driver library into it. Separately, I wrote a series of “sketches”, to use the Arduino parlance, to test different functionality such as left/right audio switching, lighting up LEDs etc etc. This was invaluable. Building on that and using the Arduino Due which has two USB ports I was able to connect my completed board, modified software and enclosure to N1MM on one port and use the other as a debugging console for Serial.Println type output such as RTS asserted, CW this that and the other. The later was very insightful into what and when N1MM communicates to an external SO2R box such as Band changes etc.

The hardest part for me…..the enclosure

One of the joys of a commercial kit is it typically comes with a descent to great enclosure. I guess in the grand scheme of things, providing the final project works and meets your goals then the look and feel of the enclosure is possibly secondary.

Not so for me. I like a neat, functional and good looking enclosure and sadly the ones I have made to date for my home-brew/scratch built projects have bordered on shockingly bad!!

To this end I enlisted the help of Scott (AK6Q) owner of the necessary, practical and successful SideKX business. Scott lives near by and we have been off on many a fun SOTA activation in the San Gabriel mountains.

In China, nylon is a conductor, yes, seriously it is

Originally, I had planned to use the 8 pin connectors suggested by Paul K1XM and set to to find right angle connectors to go into the KX3 versus straight ones which generally aren’t recommended by Team Elecraft. Pricing things out I arrived at an “ah ha” moment deciding to purchase ready made and rather snappy looking ones from AMZ that came in a variety of colors; red for MIC, black for headphones etc. Cables arrived and there truly were snappy looking. Cutting and stripping the minuscule 24 gauge wires, I was shocked to discover that in China manufactures seem to think both copper and nylon wire conducts. Well, the later doesn’t and is guess included to reduce the amount of copper and save money but this makes soldering really hard. So much for my neat and tidy AMX plan. Plan B adopted and the 8 pin is ditched in favor of 6 (3 per radio) classic 3.5mm TRS/TRRS sockets on the rear and 2-3 three on the front panel. The down side is each one needs a separate hole in the metal case and lining up 6 holes and not buckling the metal is a non trivial task.

img_4471
Originally planned parts and enclosure ….8 pin connector dumped thanks to Chinese cost savings
img_4474
Rear of SO2R controller with better view of 8 pin connectors that bit the dust
img_4497
Scott AK6Q (SideKX fame) helping get the project enclosure punched for connectors, LEDs etc
img_4505
Scott squaring up the opening for the 12v Arduino connector
img_4503
Me learning a new trade!
img_4524
Connectors, Arduino etc secured to enclosure. Rats nest board in background will sit atop Arduino and be wired to connectors left and right
img_4548
It works!! N1MM tilda, back slash, control left/right arrow blend and redirect audio
img_4557
MFJ 1708 protects the second radio while the first transmits ….fine for us as we are a pseudo SO2R station

It’s alive!

After what seemed like an eternity of software, hardware and enclosure work, the little SO2R controller actually works. Wow, am I happy camper or what?

I put on hold is the CW side of things as I’ve temporarily run out of time and energy. Given I’m not, as some of you know, a very proficient CW operator it’s not too big a deal. I’d like to be but it’s a bit like wishing I was Brad Pitt, just ain’t happening any time soon!

Next step was to set it up with the KX3/PX3 combos to get a better sense of the station layout and ergonomics of using it.

img_4586
On the left…maybe not
img_4590
On the right…makes more sense
img_4596
N1MM has incredible support for multiple computers in a contest. Using the top computer for overflow info. Lower one has the two entry windows, band maps and mults windows

Lessons learnt

The executive summary is “tons”!

Small is good except when it isn’t

This was the first time I’ve used a proto-board/proto-shield and clearly I was chronically over optimistic as to what I could mount on a single board. Relays, transistors, diodes, wires etc became so densely populated it was very hard to see what was what especially when I had to debug failures. Putting similar and related functionality onto a single board (such as CW) and using multiple boards is in hindsight a better way to go.

Design for manufacturing

Starting from the outside in might have been a better idea. Had I thought about placement of connectors, LEDs etc in the enclosure then I would have orient wires connecting the board to enclosure mounted items (mic, headphone connectors, LEDs) to avoid creating a spaghetti mess of wires that I sort of have now.

Metal work

De-burring tool, well that is just one of the things that Scott taught me along with filling to make a rectangular opening and then some.

Commercial services exist and this one was written about in QST a few years ago that at some point seems worth trying. However, I think it comes with a steep learning curve and and equally steep price to pay for rework if I’ve messed up the original measures for example on the USB to 12v connector s on the Arduino.

img_4509
De-burring tool

What’s next

This is the second of my 2019 Station Automation projects (Elecraft KRC2 was the first) and I need to see that through to fruition,  especially part 3, the 2×6 antenna switch I have planned. Later in the year, I’ll take a run at iteration 2 of this project and use my lessons learnt section as a guide.

These are a few of the things for me to bone up on for that and properly wrapping up this project.

GIT – Torvald’s finnest 

I’ve modified Paul K1XM’s code and at some point sooner than later should publish it on GITHub. GIT is an unfortunate name if you are from the UK as its a derogatory term for a person and it couldn’t be more inappropriate for what is a great software development tool. Basically, it allows software changes, revisions etc to be managed successful such that people know a history of changes and can add, delete or use changes in a transparent way.

Poor source code management is the bane of the software world.

Fritzing

The name suggests it could be German and it is. An Arduino/Raspberry Pi maker centric system that allows/facilitates people to map out parts and connections on a proto board. This is an electronic version of what I drew on my 8.5″ x 11″ paper. The upside to Fritzing is that once done you can create inventories and better still gat a PCB created that matches the layout.

Version 2

Size counts when transporting stuff in a suitcase. The motivation for version 2 is primarily around trying to absorb the KRC2 functionality into the SO2R controller box and hence dispense with 2 KRC2s in my suitcase.

Given N1MM communicates band changes to the SO2R controller I think this might be sufficient to then drive external lines that instruct an interlock 2×6 antenna to tie an antenna to one of the two radios.

The Arduino Due which is faster but more importantly has many more I/O pins is an attractive selection for version 2 and of course putting different functionality on different proto boards a must for version 2.

img_4522
Version 2 – Arduino Due (much faster processor, many more I/O pins) with 3 stacked blank proto boards

Was it worth it?

It did take a long time to get to a working home-brew SO2RDuino controller, maybe longer than I anticipated. I spent a fair chunk of change buying parts, enclosures, Arduinos, funky Chinese “nylon” wire but in fairness I bought on the basis I would either break something or built two versions, so I have much toward version 2.

I thought long and hard about buying something like MicroHam uSO2R controller but refrained even at my darkest debugging moments. Realistically what they offer is great and far more than I delivered in version 1 and all told cheaper than what I have spent.

At the end of the day there is an enormous intangible associated with building your own gear but maybe more importantly I learnt so much, had a bundle of fun and these I firmly belief make for a better life.

I made the right decision, no, if, buts or maybes.

 

5 comments

  1. Paul I am so exited to see this working! I am privileged to have been a small part of this project. Thanks for the kudos and great explanation of your adventure! 73 Scott AK6Q

    Like

  2. Excellent article. I have looking for ‘budget’ KISS based devices or projects to manage same things what are also your objectives. Yes, there are plenty commercial products, but covering all functionalities with different vendors products may be a dragon nests. Or these have too many functionalities to cover too many scenarios making configuration and co operation too complex.

    I like your approach and will follow your interest with great interest.

    Been also a long time on IT and SW. For my remote station, I did 10 Beverage antennas and 3 hubs control system using RPi3, external relay board and coding UI using Qt. Take a lot of time, frustration, learning curve but eventually makes mega kicks when everything worked as planned.

    Good luck !

    Br, Tom Oh2ben

    Like

    1. Tom, Thanks for the feedback and you are right that the maker community has many options all with unique values. I love the simplicity of the Arduino but sometimes the diversity of RPi is welcome.

      Paul

      Like

  3. Hi Paul. Good to see that you pursued the project. I too have been wanting to dip my toe in the SO2R bucket starting with the Arduino code. I am not clear why you are using the MFJ T/R switch. If I understand correctly that would only allow you to receive on one radio at a time. If I do ever try this, I was thinking of running separate antennas on different bands to the two radios. Basically dedicate a 20M for one and 40/80 for the other (State QSO Party). Scott, KX9RT

    Like

    1. Scott, thanks for the comment and I’m easing into SO2R and the first iteration is to have two radios with one being the run station and the other being the S in S/P. I’ll keep an eye on band openings and search with the second radio but I currently don’t have my planned 2×6 antenna switch in play with filters etc and hence protect the S/P (radio 2) when radio 1 transmits via the MFJ.

      Like

Leave a Reply

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

WordPress.com Logo

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

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.