KO6TH AZ/EL Rotor Controller

© Greg Dolkas, KO6TH, 2002

It was 1999. After a number of years operating satellite with a set of small, manually positioned antennas on a temperamental antenna rotor, I decided that the time had come for an update and some automation. A new 8-element 2 meter Yagi antenna (the longest that I could fit on my short roof “tower”), and a 2x8 element circular for 70cm, replaced the home-built 5-element beams. This helped the signal levels, but made other problems worse, primarily the Azimuth/Elevation rotor contraption that I had created. It consisted of a Radio Shack TV rotor for azimuth, and a homebrewed elevation rotor built from a geared DC motor, threaded rod, and some hinges, all bolted to a 2x4. With the weight of the two beams and the kludgy elevation rotor, the TV rotor was severely overloaded. This caused it to bind and get out of sync with the controller, so I often wasn’t aimed where I thought it was (not even close!). The elevation rotor’s position reporting (a pot with a weight on the arm) needed work; in theory it could be adapted for computer control, but the AZ rotor could not. The thought of adding a heavy dish, not to mention the requirement for precise aiming, in order to work AO-40, was beyond reason. A whole new rotor and controller were needed, and I determined that I would try to build my own.

What follows here is a discussion, not a complete how-to, of the design of my AZ/EL controller. I do not intend for others to copy this design exactly (although I’d be thrilled if you did), but rather to use the ideas and modules discussed here in your own design. Basic analog and digital circuit knowledge is assumed, as well as a basic understanding of the use of the BASIC Stamp series of controllers.

Computer control involves a computer tracking program and its interface to the rotor controller. The best tracking program I have found, for ease of use, functionality, and minimal computer requirements, is FODTrack. I was already using it to control the radios for Doppler shift, so using it for rotor control was the obvious choice. The program comes with a complete parallel-port AZ/EL controller design, but the controller requires the rotors to report their position with a 0-5 volt analog signal. I found a pair of rotors at a local Ham Swap, one a well used light duty ham-type azimuth rotor of unknown pedigree, the other a new Alliance TV-type (minus controller), which I figured could be used for Elevation. The idea was to mount the Alliance rotor sideways on the top of the AZ rotor. It would be able to provide a full 180 degrees of elevation travel and support for “Flipped” operation, an improvement on the previous homebrew EL rotor’s 90 degrees. But I had an issue for the controller; both rotors use contact closure for positioning. My choices were to design some sort of gizmo to convert the contact closure to an analog signal for the FODTrack controller, brew-up some sort of new analog sensors to the new rotors, or design a new controller. I opted for a new controller. The rotor’s 6 degree and 10 degree resolution seemed ample for what I needed, and the other options did not meet all of my requirements without considerably more work. (As I find now, the resolution of the rotor’s contact closure is barely adequate for finding AO-40’s S-band downlink. Depending on your antennas and rotor resolution, this approach may not be adequate for you.)

For background, the rotors that use an analog signal for position reporting have a pot tied to the antenna mount so that the pot wiper moves with the antenna. 5 volts is applied to the top of the pot, and a voltage proportional to the antenna position is returned from the wiper. In the FODTrack design, this pot voltage is compared with the desired position (created from a D-to-A converter) and the appropriate movement of the antenna is initiated if they are different. The other type of rotor uses contact closure for position. As the rotor moves, a small microswitch closes momentarily every few degrees of rotor travel. There is no direct indication of where the rotor is, only a relative indication that it has moved a certain amount. The controllers for these rotors use the contact closure to activate a solenoid which increments a toothed position wheel to show position. When the wheel is in the right place, the motor is turned off. It’s a simple, mechanical method to accomplish the positioning task. The azimuth rotor I found had one of these controllers with it. For computer control, this mechanical gadget had to be converted into a computer program.

Before getting too far into the design of the rotor controller, I listed my objectives:

Both manual and automatic control of AZ/EL antenna rotors

Manual operation without needing my PC to be running

Easy to read display of position

Easy to use

Able to use rotors with contact-closure position reporting

Low cost (under $100)

Modular design and construction

The last objective was important – this would be a design-as-you-go project. I chose the Basic Stamp-II as the foundation for the project’s controller. Other PIC controllers are far less expensive, but the ease of programming and higher level of built-in functionality made this the easy choice. The Stamp has 16 I/O pins, in addition to a bi-directional serial port for programming and debugging. Each pin can be used for a variety of purposes, including digital input and output, as well as some analog functions. I listed the required interfaces and pin requirements:

1 pin – Serial input port for FODTrack commands

4 pins – motor control (up/down/left/right)

2 pins – contact closure inputs from rotors (1 pin each)

2 pins – some sort of “mode” control (automatic, manual, park, set)

In hindsight, I could have done this with one pin in an analog mode

1 pin – initialization/calibration command

2 pins – AZ & EL manual positioning knobs, using analog input sensing

2 pins – AZ & EL analog output to position display meters

1 pin – some sort of activity indicator

1 pin – manual up/down/left/right control (put 4 switches on 1 bit by using analog techniques)

Total: 16 pins.

Overall, the Stamp software consists of a giant loop, which watches for commands from the operator (e.g. switch changes or new position information from FODTrack on the PC), executes the commands, and then returns to look for more work to do. Inside the loop are a number of modular building blocks, which are described separately. These were designed so that I could design, build, and debug each one, before moving on to the next. I describe each block with a segment of the operating software, and the circuitry it interfaces to.

Manual position setting. The original idea was to use a pair of pots to mimic the positioning knobs of the traditional control box. One pot would be for Azimuth, another for Elevation. In operation, you would point the control to the direction you want the antenna to go, and the controller would move the antenna to that position. This would use the Stamp’s ability to read a resistance value with the RCTIME command. This circuit is repeated for the azimuth and elevation controls.

HIGH AZPOT; discharge the capacitor

PAUSE 1

RCTIME AZPOT,1,TEMP; measure the charge time

AZDISPL = TEMP*AZSCALE/256 ; normalize reading

The controller program uses several internal representations of position. One is “Index”, which is the number of contact closures the rotor has counted through from its Zero position. The AZ rotor has a 6 degree rotation between closures (total of 60 per 360 degrees of travel), while the EL rotor has a 10 degree resolution (18 for its 180 degrees of travel). A second representation is for the output to the meters. Here, the 360 degrees of a circle are compressed to 256, so that the PWM command can be used to drive the meters. In calculations, the ratio of 256/360 is reduced to 32/45 to fit the Stamp’s 16-bit math. A simple analog buffer circuit is used to hold the PWM output, and to drive the meter. The 10K pot is used to set the full-scale meter indication. This circuit is repeated for the azimuth and elevation displays.

TEMP = AZDISPL*32*AZCOUNT/45; convert index to meter representation

PWM AZMETER,TEMP,50; send analog value to meter for display

Putting these two routines in a loop allows you to turn the pot, and have the meter follow. That’s how I tested it. For the controller, when in Manual Mode, the values of the AZ and EL pots are polled for any change. When there is one, the new position is tracked until it doesn’t change for a moment, then the antennas are moved to match. To position the antenna to due South, for example, you would move the AZ knob until the meter was pointing at mid-scale, and then in a few seconds the antenna would begin moving to that position. This “timeout based” control works well for the controller’s command functions, except when you wanted to nudge the antennas a little. For that I created, as an afterthought, a momentary contact switch interface, which will be described later.

Rotor Motor control: The antenna rotors are run from about 24 volts AC, which is supplied from the transformer salvaged from the AZ rotor’s original control box. The AC power is routed through a pair of relays each for AZ and EL, each relay driving its motor in one of the chosen directions. With the relays I used, a transistor drive is needed to boost the output of the Stamp to the 12 volts needed for the relay coils. I also am a fan of indicator lights, and so included an LED with each relay to show what is going on during operation. This circuit is repeated four times.

To move one of the rotors, the appropriate relay is engaged. Then the contact closure input is polled until the right number of counts is seen. Then the relay is released.

HIGH RIGHT; start motor

AZRIGHT:

GOSUB AZINDEXWAIT; wait for contact closure

AZPOSN = AZPOSN+1; update the current position

TEMP = AZPOSN*AZCOUNT*32/45; update the meter

PWM AZMETER,TEMP,50

IF DEST > AZPOSN THEN AZRIGHT; test if done yet. If not, wait for next contact closure

LOW RIGHT; turn off motor

PAUSE MOTORSTOP; wait for things to settle down before continuing

The subroutine to wait for and debounce the rotor’s contact closure pulses is as follows. For contact bounce I use a simple delay (pause), which is timed so that the contact has completely closed, finished bouncing, opened, and the rotor is in the middle of the gap to the next pulse. I chose to isolate the rotor’s contacts from the circuitry, to protect the sensitive inputs to the Stamp chip. The rotor transformer had a low voltage tap on its secondary winding that was used to drive a small dial lamp. This became the power source for a set of reed relays that are energized by the rotor’s contact closure. The relay’s contacts are then were coupled to the Stamp, so there is no connection between the rotor and the Stamp. Again, I like to see what my controller is doing; LEDs on the relays flash with the index pulses from the rotor contact closures to show that the antennas are indeed moving properly. This circuit is repeated for the AZ and EL rotors.

AZINDEXWAIT:

IF AZINDEX = 0 THEN AZINDEXWAIT; if already at index, wait first

WAIT1:

IF AZINDEX = 1 THEN WAIT1; wait for index to start; 0 = closed,1 = open

PAUSE AZINDEXT; delay for switch bounce and for end of pulse

RETURN; done

The wiring of the relay contacts is such that the one transformer can drive both rotors, one at a time. This was out of necessity, as I only had the one transformer and the one motor capacitor, both salvaged from the AZ rotor’s original control box. Fortunately, the Alliance rotor seems happy to be driven from the larger Ham rotor’s parts. A consequence of using one set of parts is the relatively complex relay wiring, but it does save space. Each of the four relays route the AC voltage to their rotor motor, with opposing relays wired in reverse. The rotor motors have a 3-terminal winding. The center point of the winding is the common, and the other two take the AC voltage. One is driven from the transformer; the other gets its power through an AC capacitor, which applies a 90-degree phase shift to the current. This causes a rotating field within the motor, and makes the motor turn. If these two outer terminals are reversed, the motor reverses direction.

With the basic control functions in place, I added a second method for manual positioning. I had found that making small tweaks to the antenna position, such as when trying to home in on a weak signal, was cumbersome with the knob-based system. You would have to move the knob a little, just enough to make the meter move, and then wait for the 1-2 second timeout before the rotors started moving. If that didn’t do it, you repeated the process. I saw pictures of other antenna rotor controllers in the pages of QST that had switches where the operator would simply hold the desired direction switch down until the antenna was at the desired position, and let go. There was one bit left on the Stamp, so I decided to try ganging all four direction switches onto the one bit by using an analog technique. Instead of 4 physical switches, I chose to use two SPDT-center-off switches. Four different resistors would be used, with each direction command being represented by a different resistor. The Stamp’s RCTIME function would be used again to read which switch had been activated.

HIGH SWITCHS; read switch setting

PAUSE 1

RCTIME SWITCHS,1,TEMP

IF TEMP = 0 THEN LOOP; zero indicates no switches are active

IF TEMP > 400 THEN SWLEFT; each switch

IF TEMP > 200 THEN SWRIGHT; gives a different

IF TEMP > 75 THEN SWUP; value when pushed

GOTO SWDOWN; actual value is between numbers tested

The switches are polled while motor moves, so that you can stop at any time (at the next index mark) by letting go of the switch. Note that the circuit and software do not account for more than one switch being depressed at the same time. I just remember not to do that…

Now that the basic functions of the rotor controller are implemented and working, the “hard part”, automatic computer-controlled positioning, is almost trivial.

Automatic positioning: This uses the Stamp’s serial I/O capability to receive position information from the FODTrack program. FODTrack has the ability to command several different types of controllers. Some are Serial and others are Parallel. With the limited number of I/O pins available the Stamp, the pin-efficiency of the serial port is a requirement. One of the serial-type controllers is built by Yaesu, and uses a simple command language. The serial data contains a “W” followed by the azimuth and elevation values in degrees, separated by a space, and followed by a carriage return.

W090 030would indicate a position due East at 30 degrees elevation

The Stamp code receives the serial data stream using the SERIN command:

SERIN SERIAL,BAUD,2000,NOSERIAL,(WAIT(“W”),DEC AZINPUT,DEC ELINPUT)

The decimal values for azimuth and elevation are converted to the internal form, and compared to the current positions of the rotors. If they are different, a call to the MOVE routines (created already for the manual modes above) is initiated.

Support functions. The only remaining building block is the calibration routine. There are two scaling factors that are used in the operation of the controller, namely the conversion factors for the two manual position pots. The controller also must be synchronized once with the physical position of the rotors, since there is no way to “read” where a rotor is in absolute terms. A calibration routine is entered on power-up if the Calibration Mode pin is at a logic 0 state, which is simply the result of grounding that pin on the Stamp with a switch. Before beginning the calibration procedure, both of the manual position pots are turned to their maximum position. Then the Calibration switch is pushed and the controller turned on. The values of both pots is read and stored in the internal memory of the Stamp, where it is retained even when the controller is powered off. The internal memory is also used to save the AZ and EL rotor positions at the end of each movement, so that the controller always knows where the rotors are. Both of the rotors are then rotated back towards the 0-degree stop. At each point in the process, the operator moves the main controller mode switch to the next step when that step has completed. The rotation to 0-degrees is observed when the index LED stops flashing. A more elegant design would use an automatic timeout, but this routine is rarely used, and it wasn’t worth the programming time to automate it.

Concluding thoughts: The controller seems to meet all of the objectives I set out in the beginning. The cost of the controller was well under the cost target. The most expensive component was the Stamp-II, at almost $50. The rest of the parts were in the few dollars range, and many came from my junk box. The rotors seem to be holding up well, in spite of their well-used state. The Alliance rotor, being on its side, is a worry. The bearings aren’t designed to work that way, but they seem to be holding up. I have been pleasantly surprised with its strength, given its size and the antenna mass that it is moving around. The only problems that I have had include a tendency for the controller to reset itself when the elevation rotor motor is turned off. This caused the controller to forget that the antenna had moved, making the controller and antenna out of sync. I figured this was due to the surge caused by the motor, and put bypass capacitors across the relay contacts. So far, this has fixed the problem. I also seem to have some dirt in the azimuth rotor’s position contacts, causing the controller to get confused as to where the rotor is. As this would require a complete disassembly of the entire roof-mounted array, I’m hoping that use or a change in weather may make the problem “go away” soon.