DIY Rotator Controller

I have just finished building a DIY controller as part of a home-brewed antenna rotator project. The controller allows simple clockwise and counterclockwise movement of the stepper motor using 4 buttons. The motor may be replaced with a larger one depending on the intended load. I have added an optional speaker for audible feedback.

To view the circuit diagram, head directly to Stepper Motor Controller using Arduino.

I have posted the sketch below:

//DIY Rotator Controller Sample Sketch
//November 30, 2019
//DIY Rotator Controller

#include <Stepper.h>  
//initialize Azimuth motor

const int stepperPin1 = 9;                           //Stepper pin
const int stepperPin2 = 10;                          //Stepper pin
const int stepperPin3 = 11;                          //Stepper pin
const int stepperPin4 = 12;                          //Stepper pin
Stepper AZstepper(6330, stepperPin1, stepperPin2, stepperPin3, stepperPin4);  
int motorSpeed = 3;                                  //Motor speed                                             
const int Button1 = 2;                               //Button pin
const int Button2 = 3;                               //Button pin
const int Button3 = 4;                               //Button pin
const int Button4 = 5;                               //Button pin
int speakerPin = 6;                                   //Tones feedback

void setup() {
  pinMode(stepperPin1, OUTPUT);                       //AZStepper pin
  pinMode(stepperPin2, OUTPUT);                       //AZStepper pin
  pinMode(stepperPin3, OUTPUT);                       //AZStepper pin
  pinMode(stepperPin4, OUTPUT);                       //AZStepper pin
  AZstepper.setSpeed(motorSpeed);                     //AZStepper speed
void loop() {
  if(digitalRead(Button3) == HIGH){ //Orange
   if(digitalRead(Button4) == HIGH){ //Yellow
     while(digitalRead(Button1) == HIGH){ //Red
    while(digitalRead(Button2) == HIGH){ //Green
void playHighTone()
  tone(speakerPin, 7040, 50);                           //High tone
void playLongHighBeep()
  tone(speakerPin, 2000, 2000);                        //Long high tone
void playLowTone()
  tone(speakerPin, 55, 50);                             //Low tone

To view all posts on amateur radio, click here.

Related link: Stepper Motor Controller

Night Sky in Focus
Astronomy and Amateur Radio
© Anthony Urbano (Manila, Philippines)

2 thoughts on “DIY Rotator Controller

    • It’s really not that hard. It is like sending a text file to a USB Drive. There are a lot of tutorials on the Internet. I recommend getting started with an “Arduino Uno”.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google 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 )

Connecting to %s