Tuesday, September 1, 2020

Ameritron RCS-4 Antenna Switcher Project

As I started to look more toward remote operating in Ham Radio, I really didn't have the ability to even operate remotely, so I decided to look into the various options and decided on the purchase a Flex Radio 6400.  This radio is - simply put - AWESOME.  The capabilities are tremendous and I have been playing around with the remote capabilities and have been having a great time operating remotely.

Disclaimer: When I mean operating remotely, I am REALLY referring to me using my laptop upstairs on the couch while I watch TV with my wife. 

The problem is that I really can't change bands without going downstairs and switching antennas with my tried and true Ameritron RCS-4 antenna switch.  I started looking at other options, but got the idea that it might be fun to try to re-engineer the RCS-4 so that it can be operated remotely.

ESP32

I love working with the ESP32 chip and have done a number of other projects using this inexpensive and very powerful technology, so I figured I would do the same with this project.  I typically utilize one of the NodeMCU boards that have the ESP32 onboard - making it very easy.  

Discovering the many capabilities of this radio, I was always intrigued with the USB interface option. It has a couple of options that can output band data which I thought might be simple to connect to the ESP32. 

USB Cable Info

The Flex Radio can use the USB Port to output band data, which requires the use of a special cable.  This cable essentially makes use of I/O lines to provide methods to determine the band the Flex Radio is on.   The name of the cable is: FTDI C232HM (C232HM-EDHSL-0). 

There are a couple of options available to get this band data.  Of the options available, the two that interested me most are the BITS and the BCD methods of determining band and antenna use.  I chose to pursue the BCD method because I had some cool ideas of using an OLED display and thought that would be the best way to determine antenna usage.

A lot of information about the USB interface is found in a well written document found here: 

This cable information and the I/O breakout pins for the BCD option are shown below:


When looking at how the band information is presented (below), it seems like it would be easy to determine what band we are on and then determine what to do with the ESP32.

Peeling back the design of the RCS-4

The RCS-4 is a really cool and simple design.  There are likely other documents that go into the philosophy of operation of this unit, so I will just provide a high level view.  

The antenna switcher is broken down into to units - the antenna switch and the controller.  Ameritron calls the antenna switch the "station" and the controller the "console" - just in case you are trying to follow along here.  The controller unit is powered by a 12VAC transformer.  Note: this is not a DC transformer - and this is an important distinction.  The antenna switcher gets its power from the controller through the coax that runs between the units.  Based on the position of the switch, the controller will inject either a 12VAC signal, -12VDC signal, a +12VDC signal, or no/ground signal to the antenna switch.  The antenna switch will then engage a relay based on the signal received from the coax thereby connecting the correct antenna. The signal generated by the controller accomplishes this by a either allowing the 12VAC, +12VDC , -12VDC, or nothing/ground.  Here is a schematic of the controller:

Redesign

I figured I could make use of some SPST relays along with the ESP32 controller, and also an OLED display to show what antenna is being selected.  The latter wasn't necessary, but I thought it would be cooler than the throw-back LED representation.

The philosophy of operation here is that the radio will configure the lines on the USB cable that are connected to the ESP32 to show what band it is on based on the table above.  The ESP32 will use logic to decode the band data and then light up a GPIO with the corresponding relay thereby inserting the correct voltage element into the line. 

Programming

To read the bits from the USB cable, I came up with the following routine that I call from other areas of my program:

I then use a CASE statement to determine what band we are on and set up the relays how I want them as shown below.  I output the status to the serial monitor so I can verify operation and troubleshoot.  Oddly the example below shows relay4 engaged for the higher bands:



Here is a screen shot of the case statement for the lower bands:


PCB

I used Eagle to design a PCB and used JLCPCB to produce the board.  I also made provisions for LED statuses:

Because I wanted as much isolation as possible - I used Optoisolators to control the relays and kept the left half of the board on 5V, and the right half on 12V.

Here are some pictures of the board as it was coming together:


The old board next to the new one:


I 3D printed a bezel for the LCD to fit into: