M0AGX / LB9MG

Amateur radio and embedded systems

Antenna switch & rotator controller

This is a two-in-one device. It can be set up to:

  • switch 7 antenna relays from a PC over USB or using transceiver band output
  • control an antenna rotator using buttons and LCD or from USB

Assembled powered front PCB

Hardware features

  • LCD 2x8
  • 5 buttons
  • USB
  • 8-15V DC power input (can also run alone from USB)
  • 7 open-collector outputs suitable to drive 12V relays directly
  • pulse input (for rotator encoder)
  • RJ-45 transceiver connector with signals compatible with Icom and Yaesu radios

Bare PCBs

Antenna switch features

  • manual switching of 7 antennas using front panel buttons
  • PC control using OTRSP protocol via USB (eg. Logger32, N1MM and other popular applications)
  • automatic antenna selection using band output from Icom or Yaesu radio
  • switching is locked when PTT is active
  • current antenna is shown on the LCD and indicated with a LED
  • each antenna can have its own name displayed
  • each antenna can have any bands assigned

Assembled front PCB

Rotator controller features

  • can learn any pulse count per rotation
  • protection against rotating too far
  • protection against missing pulse feedback
  • manual control left/right
  • rotation to desired azimuth using front panel buttons
  • PC control using GS-232B protocol

PCB back view

PCB top view


User manual

Buttons have obvious names - up, down, left, right, center one is called enter.

Power-on button commands

1
2
3
4
5
6
  ------------------ ------------------------------------------------------
  UP button          start bootloader to load new software
  RIGHT button       select between antenna switch and rotator controller
  DOWN button        start rotator learning procedure
  LEFT+ENTER+RIGHT   reset to defaults
  ------------------ ------------------------------------------------------

Antenna switch mode

1
2
3
4
5
  ------------------ ---------------------------------------------------------------------------------
  LEFT / RIGHT       switch antenna
  ENTER              switch to automatic mode (band data from transceiver)
  ENTER long press   configure antenna bands and name (hold once more to configure transceiver type)
  ------------------ ---------------------------------------------------------------------------------

The display presents currently selected antenna and its name. Upper right corner shows 'M' for manual antenna selection, 'A' for automated control from transceiver band output, 'TX' for active PTT (switching is locked).

1
2
3
4
+--------+
|ANT 1  M|
|DIPOLE  |
+--------+

Antennas can be switched using left and right buttons.

Antenna configuration

To configure a particular antenna it has to be selected first and then enter button must be held for a couple of seconds.

Arrows are displayed whenever a particular button is active. This screen shows configuration of antenna 1 and 160m band is not enabled for this antenna. Up/down buttons cycle through all bands.

1
2
3
4
+--------+
|SET 1  ↑|
|160[ ]↵↓|
+--------+

One of the options is called 'NAME' - it leads to the name input screen:

1
2
3
4
+--------+
| ←→↑↓ ↵ |
|DIPOLE_ |
+--------+

Each letter can be changed using up/down buttons. Cursor is moved using left/right buttons. Enter saves the name. It is a convenient as writing an SMS on a '90s phone, but it has to be done only once :)

Logger32

After installing drivers the device should show up in device manager as a regular serial port:
Device manager screenshot

Logger32 requires band assignment to be set first. Click "Tools"->"Setup bands and modes".
Logger32 menu

Each band and mode has a separate "Aerial" field that is just a number from 1 to 7.
Logger32 bands and modes

Right click on "Antenna" in the status bar and then on "Show antenna selector".
Logger32 show antenna selector

Select the right COM port and click "Open OTRSP device".
Logger32 antenna selector window

When connection is established the line below should turn green and the antenna should be automatically selected.
Logger32 antenna selector window connected


Rotator controller mode

Rotator software is based on a previous, proven design. The controller has to be first taught the pulse count and azimuths of the rotator.

Learning mode

Hold button DOWN and turn power on. The following screen will be shown for a couple of seconds:

1
2
3
4
+--------+
|ROTATOR |
| SETUP  |
+--------+

Rotate the antenna to the furthest counter-clockwise azimuth (there is no protection at this stage!) using LEFT / RIGHT buttons. The following screens are shown:

1
2
3
4
+--------+   +--------+
|ROT MAX |   |THEN    |
|LEFT  ←→|   |PRESS  |
+--------+   +--------+

When the antenna is at the furthest counter-clockwise azimuth - press enter. Repeat the same step for furthest clockwise azimuth:

1
2
3
4
+--------+   +--------+
|ROT MAX |   |THEN    |
|RIGHT ←→|   |PRESS  |
+--------+   +--------+

After the pulses have been counted, azimuth values in degrees have to be put in using up/down and left/right keys, then confirmed with enter.

1
2
3
4
+--------+   +--------+  +--------+
|SET MAX |   |LEFT AND|  |RIGHT   |
|000°000°|   |000°000°|  |000°000°|
+--------+   +--------+  +--------+

Rotator is ready to use :) LEFT / RIGHT buttons directly turn the antenna (with all kinds of protection). UP / DOWN buttons change azimuth setpoint the antenna will be automatically rotated to. From PC's side the device speaks GS-232B protocol.

1
2
3
4
+--------+
|POS 000°|
|SET 000°|
+--------+

Schematic

Schematic


Software and design files

LB9MG_antenna_switch_1.0.zip I release this project into public domain.