Arduino Directional Antenna Array Controller

Updated 2016-10-03

Introduction

This project which is a spin off from the main Arduino Rotator Controller project, allows you to control a directional antenna array via a computer using Yaesu or Easycom rotator control protocols.  It features:

  • Can control 2, 4, or 8 position / relay antenna arrays
  • LCD Display (optional)
  • Rotary Encoder Present Control (optional)
  • CW and CCW Rotation Buttons (optional)
  • Control using the Yaesu or Easycom rotator control protocol via the Arduino USB port

Antenna Arrays

The most common way this controller could be used is with a phased vertical antenna array.  I won’t go into detail here on the theory of phased arrays or how to build one, but suffice it to say there are many information sources on the Internet, and Google is your friend.  Here are some sites describing antenna array projects:

N4JTE 2 Element 40 Meter Vertical Array

K5QY Phased Array Presentation

Theory of Operation

This control unit receives commands (Yaesu or Easycom) from a computer connected to the Arduino USB port.  Using a terminal program or an amateur radio logging, contest, or rotation control program, the computer sends commands to the Arduino requesting rotation to an azimuth, in degrees. The Arduino software determines the appropriate relay settings for the requested heading and changes logic pin outputs accordingly. The pins control relays which change the phase relationship of the antennas which in turn changes the transmit and receive antenna radiation pattern.  The computer can also query the current azimuth from the controller.

An optional LCD display can be added which displays the heading.  Optional CW and CCW rotation buttons and/or an optional rotary encoder can be added for a human interface device to manually change the rotation.

In addition to single pins activated for azimuth ranges, the code also supports a 4 bit binary output. The configuration for the four binary pins is described below.

Configuration

The code is easily configurable for most any setup.  The settings are located in various include files:

antenna_array_controller_features.h

Features can be activated or deactivated simply by uncommenting or commenting out the appropriate lines at compile time.  Features and options are controlled in code by defines:

FEATURE_YAESU_EMULATION – Activates Yaesu GS-232A protocol emulation on the serial control port

OPTION_GS_232B_EMULATION – Activates Yaesu GS-232B protocol; use in combination with FEATURE_YAESU_EMULATION above

FEATURE_EASYCOM_EMULATION – Activates Easycom protocol on the serial control port

FEATURE_LCD_DISPLAY – Activates LCD display code

antenna_array_controller_pins.h

This file defines various hardware pins.  Pins set to 0 (zero) are disabled.

#define button_cw 0 // normally open button to ground for manual CW rotation (schematic pin: A1)
#define button_ccw 0 // normally open button to ground for manual CCW rotation (schematic pin: A2)
#define button_flip 0 // flip to long path (+/- 180 degrees)
#define serial_led 0 // LED blinks when command is received on serial port (set to 0 to disable)
#define blink_led 13 // “run” LED – links every second (set to 0 to disable)

// antenna binary output pins (set to 0 to disable)
#define binary_output_bit_0 6 // least significant bit
#define binary_output_bit_1 7
#define binary_output_bit_2 8
#define binary_output_bit_3 9 // most significant bit

//classic 4 bit LCD pins
#define lcd_4_bit_rs_pin 12
#define lcd_4_bit_enable_pin 11
#define lcd_4_bit_d4_pin 5
#define lcd_4_bit_d5_pin 4
#define lcd_4_bit_d6_pin 3
#define lcd_4_bit_d7_pin 2

// rotary encoder pins
#define rotary_encoder_pin1 A3 //0
#define rotary_encoder_pin2 A2 //0

antenna_array_controller.ino

The antenna array is defined in the main .ino file in this section:

/* antenna and pin definitions */

//const int ranges[] = {0, 180, 360};
//const int pins[] = {0,0};
//const byte number_of_positions = 2;

const int ranges[] = {0, 90, 180, 270, 360};
const int pins[] = {0,0,0,0};
const byte number_of_positions = 4;

//const int ranges[] = {0, 45, 90, 135, 180, 215, 270, 315, 360};
//const int pins[] = {0,0,0,0,0,0,0,0};
//const byte number_of_positions = 8;

Three example are included in the code: 2, 4, and 8 position antenna arrays.  The ranges[] array defines the azimuth limits of each position.  The pins[] array assigns the Arduino output pins; replace the zeros with your pin assignments.  Number_of_positions defines the number of azimuthal positions.

antenna_array_controller_settings.h

The active and inactive states of pins can be configured here:

#define PIN_ACTIVE_STATE HIGH
#define PIN_INACTIVE_STATE LOW

Support

Please consult this page for support information.

Where To Get The Code

Code is available on GitHub.

2 responses to “Arduino Directional Antenna Array Controller

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 )

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