Directional Antenna Alignment Control System

From Mindworks
Jump to navigation Jump to search
Sponsors U.S. Navy Acoustic Research Detachment, Dr. Herbert Hess
Team Name Sea Scanners
Duration Fall 2020 - Spring 2021
Faculty Advisors
  • Dr. Herbert Hess, Dr. Feng Li
  • U.S. Navy Acoustic Research Detachment
Team Members
  • Steven Haener
  • Cade Knott
  • Ethan Morris

The goal of the project is to create a control system that can be used to automatically align a directional antenna mounted on a barge to an on-shore omnidirectional antenna. This system will use GPS coordinates of the bow and stern of the barge to determine the directional antenna's position as well as the coordinate of the on-shore antenna to determine the angle of alignment that the system will need to output.

Problem Definition[edit]


The U.S Navy Acoustic Research Detachment has been conducting research on a barge in North Idaho and have been transmitting their recorded data from the barge to an on-shore omnidirectional antenna.

The Barge's Area of Operation (Within the Buoys) Relative to the On-Shore Antenna

Their transmitting antenna is not automatically aligned to the receiving antenna on the shore. Thus, those on the barge must go up to the antenna and manually redirect it every time the barge moves to a new location. This wastes time and energy of personnel as well as delays research. Utilizing a control system that automatically aligns the transmitting antenna to the onshore antenna could significantly reduce waiting time. We will be creating a control system that will align the antenna within 30 seconds the moment the system is powered. Additionally, the system will have an on/off switch so that those on the barge will not have to go up to the antenna to power the system, further increasing the convenience of aligning the antenna. The precision of the antenna will also improve as the antenna adjustment will be a mechanical output of a calculated digital input position, which is more precise than the human eye.


The objective of this project is to create a working finalized product that can be mounted and implemented atop the barge. The system will also be configured to be a "plug-n-play" device and made so that maintenance and upkeep is fairly easy to conduct.


1. Functional Requirements[edit]

What the product should do
Read in the GPS data of the two points of the barge (stern and bow)
Calculate position of barge antenna relative to stationary, on-shore antenna
Use calculated data to adjust motor that will align the antenna on the horizontal plane
Maintain a fixed orientation towards the on-shore antenna

2. Mechanical Requirements[edit]

Strength Requirements
Must survive extreme weather conditions such as high winds, snowstorms and rainstorms
Must maintain orientation through weather conditions
Spatial Requirements
Product Requirements
Overall Length 200 mm
Overall Width 200 mm
Overall Height 300 mm (not including antenna)
Weight/Mass Requirements
Product Requirements
Maximum Weight 15 lbs
Mounting/Interface Requirements
Will mount to hand railings on the barge using clamps
Reliability Requirements
Product Requirements
Operation without maintenance 3000 hours
Reliability rating of components 90%

3. Electrical Parameters[edit]

Barge Supply Voltage 120 V AC
Stepper Motor Operating Voltage <12 V AC
Arduino Uno (Microcontroller) Operating Voltage 7-12 V AC

4. Environmental Requirements[edit]

Operating Temperature
Product Requirements
Minimum -25°C
Maximum 46°C

5. Cost Requirements[edit]

Prototype Cost
Maximum cost to build prototype and finalized product $1000

6. Schedule Requirements[edit]

Major Milestones Date
Complete code 1/13/21
Power supply testing 2/1/21
Build enclosure 2/12/21
Enclosure moisture test 2/15/21
Assemble testable prototype 3/12/21
Antenna accuracy testing 3/13/21
Temperature/weight testing 3/20/21
Finalized prototype 4/1/21


Functional Process[edit]

Example of Angle Rotation and GPS coordinates

Once the device has been powered on, the first step of our system's process will be receiving a RS232 serial communication from a GPS receiver. This receiver will send the coordinates of the bow and stern of the barge. Once the message is received, a microcontroller calculates the position of the directional antenna and then, using the fixed coordinate of the on-shore antenna, determines the angle that the directional antenna would need to rotate (relative to the bow of the barge) to properly align itself to the on-shore antenna. One thing to note is that the microcontroller will adjust the angle of rotation based on what angle the antenna is currently at (again, relative to the bow).

Next, the microcontroller translates the angle into stepper motor steps and then send the result out to the motor where it will turn accordingly. The mounting rod of the directional antenna will be connected to the shaft of the stepper, therefore turning as the motor turns. To ensure the stepper motor moved to the correct position, an encoder will be attached and will send a signal containing the position back to the microcontroller where necessary angle adjustments will be made. Once the control system has deemed the motor to be in the correct position, the whole process will then repeat.

System Design[edit]

The design for our device can be split up into three different subsystems: Housing, Power, and Control.


The current design of the housing and mount of antenna and control system

There are three aspects of the housing that are important to the final design.

The first is water resistance. The antenna will be mounted to the top of a barge on a lake, so exposure to the elements will be a threat to the electronics of our design. The housing must be able to keep water out from waves, storms, and high humidity. Rubber lining around the access ports of our housing to ensure a sealed environment is a possibility. A barrier around the antenna has also been postulated to keep wind and rain from affecting the position of our antenna.

The second is thermal management of the electronics. The stepper motor and power relay will be creating varying levels of Joule heat (heat shed from electronics) based on the level of control at a given point. In order to make sure the electronics don't overheat, analysis and measurements will be taken to ensure the heat can dissipate before damage occurs.

The third is a firm mounting to the hand railing of the barge. This is vital due to the nature of our control system. Calibration of our rotary encoder will be made to know what position it has to move to in order to point to the onshore antenna. If the mount that the rotary encoder sits on were to move, then this calibration would be off and it would point in the wrong direction, even though our control system would be working perfectly fine. A buckle-like strap will be used to provide a snug fit against the hand railing of the barge. This can be seen in the picture to the right.

The material that the housing will be made out of is fiberglass. This is due to its easy manipulation, fabrication, and price. Parts will be 3D printed and fiberglass will be overlaid. The 3D part will be removed and the fiberglass will be left.



The power supply system is made up of three components: a 9VDC Power Rectifier/Supply, a 9V PCB Relay, and a control ON/OFF switch.

Power Components

For the power supply itself, I selected a Meanwell Industrial 9VDC Power Supply. I chose this model because of its impressive operating temperature range and rugged design.

The relay I chose was a miniature PCB version, so that we could put the relay inside our enclosure without worrying about not having enough space for it. I found a model rated for 9VDC input voltage, with an operating voltage of 6.3 volts which matches the output voltage coming from the power supply.

Last I selected a reliable momentary actuation ON/OFF switch, with a clear blue LED indicator to show the system is powered on. Below you can see further specifications on each part.

Data Tables
Power Supply Relay Switch
Spec Value Spec Value Spec Value
Output voltage 9VDC Rated DC Voltage 9VDC Bushing size 22mm
Input voltage 85-264VAC Operating DC voltage 6.3VDC Actuation Momentary
Rated current 2A Release DC voltage 0.45VDC Current rating 16A
Rated power 18W Coil resistance 180Ω Contact Resistance 50mΩ max
Ripple voltage 80mVp-p Rated coil power 450 mW Operating temperature -25°C - +85°C
Working temperature -30°C - +70°C Environmental protection RTII - Flux proof - solderable Mechanical life 1 million cycles
Working humidity 20% - 90% Ambient temperature -30°C - +85°C Ingress protection IP67


Power Supply Circuit

The circuit diagram above shows the wiring schematic of the power system, including how the three components will be connected together as well as to the rest of the system. This screenshot also shows a live simulation, showing that the relay and switch will not impact the output voltage, which reads 9 volts on the output pin of the relay.

The remaining task for the power system is to build it, which depends on the distance from the power panel on the barge to where the antenna will be mounted. I plan on using the picture of the barge that our client has provided us to estimate the maximum length our power supply cord will need to be. From there I will cut the power supply, and extend it using high grade wire, along with adding connectors to the end of wires that can be connected to the switch and relay terminals. This should provide the easiest installation experience when the product is delivered to the client.



For the stepper motor, we elected to use STEPPERONLINE's NEMA 17 Bipolar Stepper Motor. This motor has a step angle of 1.8° with a holding torque of 59Ncm ( This motor would, however need a motor driver and would not be able to be driven directly from the microcontroller. Thus, we opted to use the HiLetgo A4988 Stepstick Stepper Motor Driver.

Using this driver would enable us to determine how many steps the motor should move and in what direction (CW or CCW). This driver also allowed for microstepping down to a sixteenth of a step, thus allowing for 0.1125° per step. Since the barge would be, at most, approximately two miles away from the on-shore antenna, we needed to get the motor to have as good of resolution as we could, and at the time of our choosing the driver, 0.1125° was the best we could find.

When choosing a microcontroller, we decided upon the Arduino Uno Rev 3. We chose this device since it had a serial port to communicate with the GPS receiver, a supply voltage of 9 volts, which turned out to be the same as the supply voltage of the motor driver, there were plenty of digital pins for connecting to the motor driver and encoder, and we were familiar with the Arduino coding interface.

The part that caused the most issue and relief was the rotary encoder. Since this was a control system, we needed to create a feedback loop to ensure that the antenna was in the correct position. An encoder would be able to do just that by reading the amount of steps the motor moved from its last position and sending them to the microcontroller to be analyzed. The issue was finding an encoder that worked with our parts. Our first theory was to use a hollow shaft rotary encoder that could slide on top of the motor shaft. This problem with this is that there were no encoders we could find that were small enough to fit around the motor's 5mm shaft. The next idea was to replace our motor with one that had an encoder built in. We managed to find one that contained the exact motor we had already bought, but the encoder was incremental instead of absolute. This is an issue because incremental only reads the motor's distance, speed, and position while the absolute encoders measured angular positions. Also, absolute encoders could maintain the antenna's position after powering down while the incremental could not.

We eventually came across a product called uStepper S. This device served as a microcontroller but also had a motor driver and a rotary encoder built-in. It was programmed to be used with the Arduino interface and had already had an Arduino library ready to use. Also, the motor driver was able to microstep down to 1/256th step (or 0.007°) and the encoder had a resolution of 0.0055°. With these resolutions, our angle and step calculations would become greatly more precise than we had originally planned for. In addition, this microcontroller supported an input voltage of 9V, leaving our power system unchanged. While this product does seem promising, it is sourced out of Denmark, so we have to check with our client to make sure we can use that part.


The code is the core of the whole project. Here, the process for reading the GPS signals, calculating the directional antenna angle, reading the encoder, and controlling the stepper motor takes place. Below shows the process of the code.

After initializing the system, the first part of the process is to read in the two GPS signals. There is a receive flag that determines if a serial message has been sent to the Arduino. Once that is confirmed, the GPS message is then parsed and the GPS coordinates, directions, and the transmitter ID is extracted and returned to the main function. Then, the satellite ID is checked to see if it matches the ID of the bow or stern transmitter, and the coordinate data will be assigned to their corresponding variables (bow or stern). This process is repeated once more, with the receive flag being turned off in between.

Once this is completed, the Arduino then uses the GPS data from both messages and the set data coordinate of the on-shore antenna and runs them through a trigonometry algorithm that determines the angle the directional antenna needs to rotate. After this, the angle is then translated into stepper motor steps and the motor turns accordingly. Once the motor stops moving, the encoder is then read to determine the motor's position. The reading, which is read in as angular data, is then compared to the calculated angle, and if they do not match, a new angle is calculated to assess the displacement of where the motor is and where it should be. The Arduino will then move the motor again and continue this process of correction until the encoder reading matches the original calculated angle. After this, the receive flag is turned off and the process goes back to the beginning of the main function.


The algorithm to calculate the angle of movement for the directional antenna is based on a series of trigonometric equations and different cases of the barge's position. Using the coordinates of the bow and stern, a line can be created running through both points. Similarly, a line can be drawn from the position of the on-shore antenna to the directional one. For now, we are assuming the directional antenna falls on the barge's reference line and is halfway between the bow and stern points. The angle going from the bow side of the barge reference line to the antenna reference line is the angle we want to determine. From here, we find the angles of the two reference lines, relative to the positive latitude axis, using the slope of the lines. The angle for the directional antenna is then found using one of the 8 different cases (with 6 sub-cases) of the boat's position. The different cases are listed below. It should be noted that for the listing of these cases, θb is the absolute value of the reference angle of the barge line, θa is the absolute value of the reference angle of the antenna line, θt is the calculated angle the directional antenna should move, lat_stern is the latitude position of the stern, lat_bow is the latitude position of the bow, lon_stern is the longitude position of the stern, and lon_bow is the longitude position of the bow.

Cases of the Barge position
Case 1: lat_stern > lat_bow and lon_stern < lon_bow θt = θa + θb (will be negative since CW relative to bow)
Case 2: lat_stern > lat_bow and lon_stern > lon_bow if slope of barge line > slope of antenna line θt = θa - θb (will be negative since CW relative to bow)
if slope of barge line < slope of antenna line θt = θb - θa
if slope of barge line = slope of antenna line θt = 0°
Case 3: lat_stern > lat_bow and lon_stern = lon_bow θt = θa (will be negative since CW relative to bow)
Case 4: lat_stern < lat_bow and lon_stern < lon_bow if slope of barge line > slope of antenna line θt = 180° - (θa - θb)
if slope of barge line < slope of antenna line θt = 180° + (θb - θa)
if slope of barge line = slope of antenna line θt = 180°
Case 5: lat_stern < lat_bow and lon_stern > lon_bow θt = 180° - (θa + θb)
Case 6: lat_stern < lat_bow and lon_stern = lon_bow θt = 180° - θa
Case 7: lat_stern = lat_bow and lon_stern > lon_bow θt = 90° - θa
Case 8: lat_stern = lat_bow and lon_stern < lon_bow θt = 90° + θa (will be negative since CW relative to bow)

Once θt has been found, it will be adjusted to account for where the directional antenna currently is. The larger angle will be subtracted from the smaller one, and if the current position angle is larger, then the motor will turn clockwise rather than counter-clockwise. This result is then sent to a function where the angle will be translated into stepper motor steps and then sent out to the motor.

Team Members[edit]

Picture Info
Steven Haener Profile Pic.jpg

Steven Haener
Major: Mechanical Engineering
Hometown: Boise, ID
Responsibility: 3D Modeling, System Housing, Meeting Agendas, Thermo-management

Cade Knott.jpg

Cade Knott
Major: Electrical Engineering
Hometown: Moscow, ID
Responsibility: Budget/Ordering, System Power, Client Communications, Schedule

Ethan Morris Profile Pic.png

Ethan Morris
Major: Electrical Engineer
Hometown: Chelan, WA
Responsibility: WikiPage Management, Records/Documentation, Control System, Coding

Additional Documentation[edit]

Project Schedule

Meeting Minutes
File:Instructor Meeting (09 1 20) Minutes.pdf
File:Instructor Meeting (09 25 20) Minutes.pdf
File:Instructor Meeting (10 9 20) Minutes.pdf
File:Instructor Meeting (10 16 20) Minutes.pdf
File:Instructor Meeting (10 21 20) Minutes.pdf
File:Instructor Meeting (10 30 20) Minutes.pdf
File:Instructor Meeting (11 6 20) Minutes.pdf
File:Instructor Meeting (11 13 20) Minutes.pdf
File:Instructor Meeting (11 20 20) Minutes.pdf

File:Snapshot Day 1 Presentation.pdf
File:Snapshot Day 2 Poster.pdf
File:Design Review Presentation Slides.pdf

Client Meetings
File:First Client Meeting (10 1 20).pdf
File:Second Client Meeting (12 11 20).pdf