Building an Arduino-Based Antenna Rotator Controller

Build a ham radio antenna rotator controller using Arduino. Covers motor control, position sensing, calibration, computer interface, and integration with logging software.

· 6 min read · By HamPost Editorial Team

Part of our guide: Ham Radio Tower Installation: Permits, Foundations, and Raising Your First Tower

Commercial rotator controllers cost $200-600. An Arduino Mega, a motor driver board, a position sensor, and a weekend of tinkering gets you the same functionality for $50 — with features the commercial units don't have. Computer control. Web interface. Custom acceleration profiles. Automatic tracking of DX stations from your logging software.

Street prices in this article were checked in July 2026 and move around; verify with a dealer such as HRO, DX Engineering, or GigaParts before you buy.

I built my first Arduino rotator controller in 2020 to replace a dead Yaesu G-800DXA controller. The rotator motor itself was fine — just the controller box died. Rather than spend $350 on a replacement, I spent $45 on parts and got a better controller.

System Architecture

[Logging Software] → USB Serial → [Arduino] → [Motor Driver] → [Rotator Motor]
                                      ↑
                            [Position Sensor]

The Arduino:

  • Reads current antenna position from the rotator's built-in potentiometer
  • Accepts target position commands via serial (from computer) or buttons (manual)
  • Controls motor direction (CW/CCW) via relay or H-bridge
  • Implements acceleration/deceleration profiles
  • Reports position to logging software using standard protocols

Hardware Required

Core Components

  • Arduino Mega 2560 (~$15): Extra I/O pins for expansion. Uno works for basic builds but Mega gives room to grow.
  • Motor driver: Two approaches:
    • Relay module (2-channel, $5): Simple on/off control. CW relay, CCW relay. Works for all AC rotator motors.
    • H-bridge (L298N or BTS7960) for DC motor rotators: Allows variable speed control via PWM.
  • Power supply: 12V for Arduino relay coils, plus whatever the rotator motor needs (typically 24VAC for Yaesu, varies by brand)
  • Position feedback: The rotator's built-in potentiometer (typically 500Ω). Connect to Arduino analog input through a voltage divider.
  • Display: 20x4 LCD ($8) or OLED 128x64 ($6) — shows current heading and target
  • Buttons: CW, CCW, Preset 1-4 (optional physical controls)
  • Enclosure: Whatever works — project box, 3D printed, old equipment case

Wiring Overview

Position sensing: Most rotators have a 3-wire connection for the position potentiometer: +5V, GND, and wiper (variable voltage proportional to azimuth). Connect the wiper to an Arduino analog pin (A0). The Arduino reads 0-1023 corresponding to 0-360° (after calibration).

Motor control (relay approach):

  • Arduino pin D2 → Relay 1 (CW motor line)
  • Arduino pin D3 → Relay 2 (CCW motor line)
  • Never energize both simultaneously (software interlock AND hardware interlock)
  • Relay contacts switch the motor voltage (typically 24VAC through the rotator cable)

Motor control (H-bridge for DC motors):

  • Arduino PWM pin → H-bridge speed input
  • Arduino direction pin → H-bridge direction input
  • Enable pin → H-bridge enable
  • This allows variable speed — critical for smooth stops

Software

The Firmware

The Arduino firmware needs to:

  1. Read position (analog input, smoothed/averaged)
  2. Accept serial commands for target azimuth
  3. Compare current vs. target, determine rotation direction
  4. Drive motor with acceleration/deceleration
  5. Stop when within deadband (±2-3°) of target
  6. Report current position periodically via serial
  7. Implement safety limits (don't rotate past mechanical stops)

Key Code Concepts

// Position reading (averaged for stability)
int readPosition() {
  long sum = 0;
  for (int i = 0; i < 16; i++) {
    sum += analogRead(POSITION_PIN);
  }
  return sum / 16;
}

// Convert ADC to degrees (calibrated)
float adcToDegrees(int adc) {
  return map(adc, adcMin, adcMax, 0, 360);
}

// Determine shortest rotation direction
int shortestPath(float current, float target) {
  float diff = target - current;
  if (diff > 180) diff -= 360;
  if (diff < -180) diff += 360;
  return (diff > 0) ? CW : CCW;
}

// Soft stop (decelerate near target)
void updateMotor() {
  float error = abs(target - current);
  if (error < DEADBAND) {
    stopMotor();
  } else if (error < SLOW_ZONE) {
    // PWM reduced speed for DC motors
    // Or pulse the relay for AC motors
    runMotorSlow(direction);
  } else {
    runMotorFull(direction);
  }
}

Protocol: GS-232 Compatible

Most logging software (N1MM, DXLab, Ham Radio Deluxe) speaks GS-232 protocol for rotator control. Implementing this on the Arduino is straightforward:

Commands the Arduino should recognize:
- "C2\r" → Report current azimuth (respond: "+0xxx\r" where xxx is degrees)
- "Mxxx\r" → Rotate to azimuth xxx
- "A\r" → Stop rotation
- "L\r" → Rotate left (CCW)
- "R\r" → Rotate right (CW)

With GS-232 support, your Arduino controller appears as a standard rotator to any ham software. N1MM clicks "Rotate to" → sends serial command → Arduino rotates antenna → reports new position.

Pre-Built Firmware Options

K3NG Rotator Controller: The gold standard open-source firmware. Supports GS-232, Easycom, and multiple protocols. Handles multiple rotators, presets, LCD display, GPS heading, overlap, and much more. Highly recommended unless you want to learn by writing your own.

GitHub: github.com/k3ng/k3ng_rotator_controller

K3NG supports: Arduino Mega, display options, Ethernet (web control), rotator presets, sun/moon tracking, park position, and dozens of configurable parameters.

Calibration

Position Sensor Calibration

  1. Manually rotate antenna to known heading (use a compass or known landmark)
  2. Read raw ADC value at this position
  3. Rotate to another known heading (ideally 180° from first)
  4. Read raw ADC value
  5. Now you have two points to calculate the linear mapping from ADC to degrees

For more accuracy, take readings at 4-8 known headings and fit a curve (some potentiometers aren't perfectly linear).

Deadband Adjustment

The deadband is how close to target the controller considers "good enough." Too small (±1°) and the motor hunts back and forth indefinitely. Too large (±10°) and pointing is inaccurate.

Start at ±3° and adjust based on your rotator's mechanical backlash and braking characteristics.

Overlap Handling

Many rotators have mechanical travel beyond 360° (typically 0-450° or similar). This allows rotating through north without reversing. Your software needs to track the physical position (which may exceed 360°) and present the logical position (0-359°) to the user.

Physical Construction Tips

Keep motor power and logic separate. The Arduino and its 5V logic on one side. The relay board and motor power on the other. Separate ground planes if possible. Relay coils produce spikes that can crash the Arduino.

Snubber diodes across relay coils. Already included on most relay modules, but verify.

Flyback protection on motor. If driving a DC motor directly, add flyback diodes across the motor terminals.

Cable between shack and rotator: The existing rotator cable carries motor power + position sense. Don't change the cable — interface at the controller end. The Arduino reads the same potentiometer voltage that the original controller used.

Waterproofing: If mounting outdoors (at the tower base, for example), use a weatherproof enclosure with sealed cable entries.

Advanced Features

Network Control

Add an Ethernet shield or ESP32 instead of Arduino. Now the rotator controller has a web interface accessible from any device. No serial cable needed.

Multiple Rotators

K3NG firmware supports multiple rotators on one Arduino Mega. One for azimuth, one for elevation (EME/satellite). Or multiple az-only rotators for a multi-antenna station.

Automatic Tracking

With logging software integration:

  • Click a DX spot → N1MM calculates bearing → sends rotation command → antenna points automatically
  • Real-time contest cluster → antenna follows the latest spot direction
  • Satellite tracking → antenna follows orbit prediction

Preset Positions

Program buttons for common directions:

  • Button 1: Europe (40° from my QTH)
  • Button 2: Japan (330°)
  • Button 3: South America (175°)
  • Button 4: Park position (rotator's rest direction)

Brake Control

Some rotators (Tailtwister, HAM-IV) have a separate brake solenoid. Add a third relay:

  1. Release brake
  2. Wait 500ms
  3. Run motor
  4. Stop motor
  5. Wait 500ms
  6. Engage brake

Comparison to Commercial

Feature Arduino/K3NG Yaesu GS-232B Green Heron RT-21 Cost $45 $250 $600 Computer control Yes (serial/ethernet) Yes (serial) Yes (serial/network) Soft stop Yes (configurable) Basic Yes Multiple rotators Yes No Yes Web interface Yes (ESP32) No Yes Preset positions Unlimited 4-8 Multiple Open source Yes No No Support Community Yaesu Green Heron

Start Here

If you just want a working controller quickly:

  1. Get an Arduino Mega ($15)
  2. Get a 2-channel relay module ($5)
  3. Download K3NG firmware from GitHub
  4. Connect position pot to A0, relays to D2/D3
  5. Edit the config file with your calibration values
  6. Upload, test, done

Total build time: 2-4 hours including calibration. Total cost: $30-50 depending on display and enclosure choices.

If your existing controller works fine and you just want computer control: add an Arduino that reads the position and speaks GS-232 to your computer, while keeping the manual controller for the motor drive. This piggyback approach requires zero modification to your existing system.

Read next Portable Mast Options for Field Operations: Telescoping, Push-Up, and Pneumatic Compare portable antenna masts for ham radio field operations. Covers fiberglass telescoping, aluminum push-up, pneumatic, and DIY options with pros and cons.

Frequently asked questions

How much does it cost to build an Arduino rotator controller?
About $30-50 total depending on your display and enclosure choices, versus $200-600 for a commercial controller. The core parts are an Arduino Mega 2560 near $15, a 2-channel relay module near $5, and either a 20x4 LCD around $8 or a 128x64 OLED around $6. Build time is 2-4 hours including calibration.
Will an Arduino rotator controller work with N1MM?
Yes, if you implement the GS-232 protocol, which N1MM, DXLab, and Ham Radio Deluxe all speak. The Arduino needs to answer C2 with the current azimuth, act on Mxxx to rotate to a heading, stop on A, and turn left or right on L and R. Then clicking a DX spot in N1MM swings the antenna automatically.
Do I need to replace my rotator cable or motor?
No. The existing rotator cable already carries motor power plus the position sense line, and you interface only at the controller end in the shack. The Arduino reads the same potentiometer voltage, typically from a 500 ohm pot, that the original controller used, so the motor and cable stay untouched.
How do I calibrate the rotator position sensor?
Manually rotate the antenna to a known heading using a compass or landmark and record the raw ADC value, then rotate to another known heading, ideally 180 degrees away, and record that value. Those two points define the linear ADC to degree mapping. For better accuracy, take readings at 4-8 known headings and fit a curve since some pots are not perfectly linear.
Why does my Arduino reset when the rotator motor starts?
Relay coils produce voltage spikes that can crash the Arduino. Keep the 5V logic physically separated from the relay board and motor power, use separate ground planes if possible, verify snubber diodes are present across the relay coils, and add flyback diodes across the terminals if you drive a DC motor directly.
Should I write my own firmware or use K3NG?
Use K3NG unless you specifically want to learn by writing your own. It is the gold standard open source rotator firmware, supports GS-232 and Easycom, handles multiple rotators, presets, LCD displays, GPS heading, overlap, park position, and Ethernet web control, and it is available at github.com/k3ng/k3ng_rotator_controller.

Put it into practice

Reader field notes — share yours

Log in to share your field notes and photos.