Station Control & Automation at G4IRN

This initiative has developed over time at my remote ham station.  Here,  I describe how I have tackled various switching challenges with antenna switching and amplifier band changing.

The basis for all most of my station switching is web controlled relays i.e. relays that can be controlled using http from a browser (like calling a web-page) OR some other program.

When I first started using web controlled relays I purchased a control board from RemoteSwitch.de which used cheap Chinese plug-in relay boards off Amazon, like <this>. They worked very well and provided a cheap solution, however as my station matured I switched to the KMTronic 8-way web controlled relay board. Although more expensive, I found them easier to wire up (the connections are larger than the cheap Chinese relay board) and at the time, the documentation was better.

Antenna Switching


At my remote station I have an Array Solutions Rat Pak antenna switch allowing me to select one of six antennas into a single coax line to the shack.  In the Rat Pak unit, an antenna is selected by applying 12v to the corresponding relay; no more than one relay must be engaged at a time.

The Rat Pak is controlled via a 7-core cable (6 control wires + earth) – each of the 6 control cables corresponds to one of the antenna outputs.

I apply 12v to the required antenna relay on the Rat Pak  using a KMTronic 8-way relay board - 6 relays are used, one for each of the Rat Pak control lines.

The relay board and Rat Pak are set up to control antennas set up as follows:

Rat Pak Port:

1.              160m / 80m Vertical (common coax feed)

2.              80m / 40m Dipoles (common coax feed)

3.              40m Vertical

4.              60m / 30m Vertical (common coax feed)

5.              20m – 10m Hex Beam

6.              6m Yagi

On two bands (80m and 40m), I have a choice of two antennas.

Selecting the relay on the relay board (Manual Selection)

The KMTronic relay board is ‘web enabled’ – it has an Ethernet port and is allocated an IP address by the router and HTTP commands can be used to switch the relays on and off. Assuming the unit’s IP address is 192.168.60.4, commands are of the format:

http:// 192.168.60.4/FFnn01 – switch ON relay number nn 

http:// 192.168.60.4/FFnn00 – switch OFF relay number nn 

… where nn is the relay number between 01 and 08. Unfortunately there is no http command to switch all relays on, or all relays off.

In my case the HTTP commands are issued from a Node Red workflow running on a Raspberry Pi.  An associated web-dashboard is used to see the antenna status and manually switch antennas. 

Figure 1 below shows the Node Red dashboard running on the Raspberry Pi  – each label acts as a ‘button’ and can be selected by the user’s mouse (or digit, on a touch-sensitive screen). Whenever one antenna is selected, all other antennas are deselected, thus only a maximum of one antenna can be selected at a time.

Node Red Dashboard for Antenna Selection

Figure 1 - Node Red Dashboard for Antenna Selection

Behind the web dashboard is a fairly simple Node Red workflow (see Figure 2) – it’s actually simpler than it first looks.

Node Red flow to select Antenna

Figure 2 - Node Red flow to select Antenna

Referring to Figure 2 above - Every 1 second the relay board is asked for the status of all eight relays. The relay board makes a response in XML format and for each relay, the workflow  checks if the web-button for that relay has been pressed. If not, nothing happens; if yes then the corresponding relay (to the button being pressed) is switched ON and all other relays are switched OFF. Once the relay is engaged it sends 12v down a control wire to the Rat Pak – the antenna corresponding to the button is switched on.


Using Radio CAT Data to Automatically Select the Required Antenna Relay

The next step was to automate antenna selection by having the Node Red workflow determine my Elecraft K3’s operating frequency and then engage the correct relay for the corresponding antenna.

The K3 sends out its frequency information only when asked, so my approach is to ‘listen in’ to the CAT communication between the K3 and the logging program. I used an RS232 Y-Splitter cable in the rear of the K3, one leg going to my logging PC and the other through an FTDI serial to USB cable, with the USB end plugged into the Raspberry Pi. A Node Red workflow listens to the data coming through the USB port and filters out everything except data strings beginning with ‘FA’ or ‘IF’ - both of these carry VFOa information.  After that,  the workflow does some string manipulation to determine the band in use to select the appropriate relay (antenna). The frequency data is being received by the workflow at least once every 500mS so rather than issue the relay select HTTP command every 500mS, the workflow only sends the command when the frequency band has changed. By default, if the radio is QSY’d to 40m or 80m the workflow selects the appropriate vertical antenna (Relay 1 for 80m; relay 3 for 40m), however once I am on either of those bands I can manually select the dipole (Relay 2) without fear of the Node Red workflow changing the selection. Only when I change band will Node Red change antenna again.

At this stage I have automatic antenna selection using Node Red but I can manually override to use an alternative antenna on any band.

Multiple Antennas on the Same Band  - Antenna Selection on the RF2K-S Amplifier

On first observation, having two antennas on the same band from a single antenna output on a solid-state amplifier might be an issue – the Antenna Tuning Unit will be tuned for one antenna but not the other.  Howeverthe RF2K-S has a neat feature whereby the ANT-1 output can have up to 16 antennas per band, each having the ability to be individually tuned and the ATU values saved in memory.

The user has to tell the amplifier which of the 16 available antennas is currently in use;  the amplifier uses pins 1-4 of the 15-way ‘Multifunction Connector’ on the rear panel to do this.

If these four pins have zero volts applied to them (0000), this will correspond to Antenna #1 of the 16 available. Of course, 0000 is the default value if nothing is plugged into the Multifunction connector. All four pins with a voltage on them represents Antenna #16. Value 1111 is Binary Coded Decimal (BCD) for 15 and since 0000 represents Antenna #1, four binary digits can represent 16 antennas.

In my case I currently have a maximum of two antenna per band so I will need to apply voltages to Pins 1 to 4 on the Multifunctional Connector to represent 0000 and 0001. i.e.

On 80m:

The Vertical, Antenna #1 is represented by 0000. (Default)

The Dipole, Antenna #2 is represented by 0001  (Pin 1 ‘active’, Pins 2,3,4 ‘inactive’)

On 40m :

The Vertical, Antenna #1 is represented by 0000. (Default – Pins 1,2,3,4 ‘inactive’)

The Dipole, Antenna #2 is represented by 0001  (Pin 1 ‘active’, Pins 2,3,4 ‘inactive’)

Where a positive voltage represents a ‘1’ in the BCD value and 0 volts represents a ‘0’, each digit of the BCD value needs to be applied to one of pins 1-4 of the connector. 

To tell the amplifier that I am using my alternative antenna (the dipole), I simply have to apply a voltage to pin 1 of the connector, and take it off if I am using the vertical. It’s the same on either 40m or 80m.

So only one wire (+ earth) from the antenna selection relay for the 80/40 dipoles to Pin 1 of the  Multifunction connector on the ampifier i required to achieve this.

RF2K-S Antenna Switch Configuration

Figure 3 - RF2K-S Antenna Switch Configuration

Antenna 1 on 40m Selected

Figure 4 - Antenna 1 on 40m Selected

Antenna 2 on 40m Selected

Figure 5 - Antenna 2 on 40m Selected