A Modern HyGain Antenna Rotator
Control Box

Let's improve an existing HyGain rotator analog control box
by adding a modern color touch-screen controller


By: Bertrand Zauhar, VE2ZAZ / VA2IW

Last updated: 08/09/2023

Like most HyGain antenna rotator models, the TailTwister is a rugged and dependable unit. Mine dates 1980 and, thanks to regular maintenance every 10 years, is still going strong. However, the control box has an outdated interface, with analog heading indication and manual orientation and brake release levers. We are far form a "set heading and forget" approach here! Looking around, it is possible to purchase readily made electronic controllers, but their prices (ranging from a few to several hundred dollars) are unreasonable to me. I would rather have fun designing and building a controller that meets all my requirements, and at a fraction of the asked price for a commercial unit.

This project details the design and construction of an add-on unit to existing
CD-45, CD45-II, Ham-III, Ham-IV and TailTwister rotator control boxes, It brings several desirable features, such as a color touch-screen, a rotary encoder and remote control via a computer. This makes it a real automated unit! No more manual controls...unless you still want to!

FEATURES

Here are the project's main features
:
  • Is a modern implementation:
    • Offers a convenient 3.2 inch tactile color LCD screen interface,
    • Displays the heading to the nearest degree, 
    • Has a rotary encoder for quick target heading entry,
    • Offers fully-automated brake support, 
    • Has frozen rotator timeout protection, 
    • Supports a USB (serial) interface responding to Rotor-EZ and DCU-1 commands. Can thus be controlled by a computer software.
  • Existing control box is kept:
    • Existing box retains full manual functionality, including LED operation, after modifications, 
    • New controller can be unplugged from existing controller without impact to manual operation. 
  • No power supply is needed; the new controller takes its DC supply from the existing controller.
  • Uses off-the shelf color display, rotary encoder and relay board.
  • Can be put together for less than $100, and for much less with a well-stuffed junk box and a bit of imagination and labor, especially when it comes to the enclosure.
  • Is connected to the existing control box using a 9-wire cable. The cable carries the DC supply, control of the three relays and rotator position-driven voltages.

Looks attractive? Keep on reading!

DESCRIPTION

The best way to understand what this project offers is by first consulting the Circuit Schematic of the board below (click on schematic to enlarge):




The Off-the-Shelf
320x240 pixels
Color TFT Touch Display


The Raspberry Pi Pico

The Quadruple Relay Board
The circuit is rather straightforward. Here are its main features.
  • The selected micro-controller (A1) is the Raspbarry Pi Pico, a powerful, cheap and readily available processing platform,
  • A 3.2 inch, TFT Color, 320x240 pixels, resistive touch display (via J1) informs of the current antenna orientation and rotator state. J1 carries two SPI data buses, backlight control and DC supply to the display. The selected display uses the ILI9341 and XPT2046 chipsets.
  • One of the four operational amplifiers (U1B) that make the LM324 is used to sense the current rotator position on the rotator potentiometer cursor located in the motor unit. Another operational amplifier (U1A) senses the maximum voltage expected on that potentiometer. The two voltages are sampled and averaged out by the Pico's onboard Analog-to-Digital-Converter. With these two voltages, the firmware can calculate the current position.
  • For closing the rotator contacts, a quadruple relay board with 5V relay coils is installed inside the existing controller box (see relay board in picture at right. It is inexpensive, and is driven directly by the Raspberry Pi Pico output pins (LVTTL level signals). Only three of the four relays are used in this project.
  • For power efficiency reasons, a DC-DC Buck converter board (LM2596-equipped) produces a regulated +5 VDC supply from the unregulated +27 VDC provided by the existing controller.
  • The +27 VDC supply is protected by a 0.5A pico-fuse.
  • All input and output lines going to the existing controller are decoupled to ground using 1000pF ceramic capacitors, the objective being to reduce the stray RF from flowing into the circuit.
  • Note that the entire circuit operates in a floating fashion with reference to the chassis ground. This is imposed by the internal construction of the rotator. More on this in the Assembly section below.

The rotary encoder, with integrated push-button

The DC-DC Buck Converter board
PCB

The Printed Circuit Board is a double-sided design, 100 x 100 mm in size, with plated-through holes, solder resist and silkscreen (marking) on both sides. All components are of through hole mounting type. The PCB features a prototyping area, allowing for hardware additions if new features are required.

The zip file contains the KiCAD design files. It also contains the Gerber and drill files for anyone who would like to order the PCB. Such PCB can be ordered for around $20 per lot of 5 PCBs. I normally order from JLCPCB, but other major manufacturers will produce the same quality. In your order, select 0.062" (1,6 mm) thickness FR-4 glass-epoxy material, the standard.




COMPONENTS

The following is a list of all required components and sub-modules to put together this project.


In general, component selection is not critical on this project. As a result, one can order all required components from known local suppliers (Digikey, Mouser, Element-14, etc.), or order from Asian online suppliers like AliExpress, Banggood, DealExtreme, eBay, etc. The latter approach will yield a much lower total cost.


On-Board Components
Reference Qnty Value Description
A1 1 Raspberry Pi Pico Arduino UNO Microcontroller Module, release 3
C1 1 100u, 35V Polarized electrolytic capacitor
C2, C3, C9, C10 4 1000p, 50V Ceramic capacitor
C4, C5, C7, C8 4 100n Ceramic capacitor
C6 1 47u, 16V Polarized electrolytic capacitor
C11 1 470u, 10V Polarized electrolytic capacitor
F1 1 Pico Fuse 0.5A Fuse
J1 1 PR20214 or equivalent Male header connector, single row, straight, 14 pins, 0.100" (2.54mm) pitch
J2 1 PR20205 or equivalent Male header connector, single row, straight, 5 pins, 0.100" (2.54mm) pitch
J3 1 PR20209 or equivalent Male header connector, single row, straight, 9 pins, 0.100" (2.54mm) pitch
R1, R2 2 200 Resistor, axial
R3, R4 2 1K Resistor, axial
U1 1 LM324 Low-Power, Quad-Operational Amplifiers, DIP-14

Additional Components and Hardware
Qnty Description
1
3.2 inch, TFT Color, 320x240 pixels, resistive touch display, uses the ILI9341 and XPT2046 chipsets. Available from AliExpress.com or similar site.
1
DC-DC Buck converter board, adjustable output voltage, equipped with LM2596 switching regulator (see picture above). Adjusted to +5V prior to mounting on the PCB.
1
Quadruple relay board, 5V relay coils, with opto-couplers, TTL-driven. Maximum load: AC 250V/10A, DC 30V/10A. See picture above.
1
Rotary encoder board, with built-in push button, 20 steps per revolution, model KY-040
1
DB-9 Female connector, panel mount. Used on existing rotator control box
1
DB-9 Male connector, panel mount. Used on new controller enclosure.
1
Signal cable, 9 wires, DB-9-Female to DB9-Male connectors, straight wiring.

Loose wires, 20 cm (8 inches) length. Used to interconnect DB-9 male connector to boards.
19
Dupont wires, female-female, 20 cm (8 inches) length, for interconnecting the display and the rotary encoder to the board.
2
Male, single row, 0.100" (2.54mm), 20 pins connector. Used on the Raspberry Pi Pico to mate to the board.
2
Female, single row, 0.100" (2.54mm), 20 pins connector. Complementary to connector above. Used on the board to receive the Raspberry Pi Pico.
4
Plastic PCB standoffs, associated nuts and screws.
1
Micro USB, Male-Female extension cable, 20 cm (8") in length, brings the Raspberry Pi Pico USB connection to the rear panel. Male end is of panel-mounted type.
1
Dip-14 IC socket, recommended for LM324 quad operational amplifier IC.
1 Enclosure - Bud Industries EX-4522, 176 x 155 x 80 mm, extruded aluminum box, or equivalent.
1
USB isolation dongle. Required if remote-controlling using a computer. See warning note in the Operation section below.

ASSEMBLY

The board is not particularly difficult to assemble by hand. The components are mounted and soldered onto the PCB in a through-hole fashion. A small tip soldering iron and some solder wire is appropriate for the job.

Note that the entire circuit operates in a floating fashion with reference to the chassis ground. This is imposed by the internal construction of the rotator, which connects together the pot wiper and the chassis ground. This was done by the HyGain designers to save one wire between the controller and the rotator unit. This limitation forces us to insulate the project from any chassis ground or antenna ground. Although there is no copper contacts around the mounting holes, the use of plastic standoffs to mount the PCB is recommended. This insulation must also be preserved with the USB cable mounting on the enclosure.


The DC-DC converter board should be adjusted to a +5 VDC output prior to mounting it to the PCB. Any input voltage from +7 to +28 VDC will be suitable for the task. Mounting of the DC-DC converter board can be done with 4 short wires. It is advisable to leave a 1/8-inch (3 mm) air gap between the converter board and the PCB.

The suggested enclosure

A metal enclosure should be used. This helps to contain EMI radiation from the micro-controller. A suggested enclosure is a Bud Industries EX-4522, 176 x 155 x 80 mm, extruded aluminum box. This is a rather expensive enclosure; it still shows the type of box one may want to use. The enclosure is much larger than the board, and this is suggested to allow easy routing of the internal cabling, and to provide enough front panel surface to accommodate the LCD display. The author recovered an enclosure from another project. This explains where there are holes plugged with aluminum tape on the rear panel.

The
front panel

The rear panel
 
INTEGRATION INTO THE EXISTING CONTROL BOX


The existing HyGain control box receives the relay board and a female, panel-mounted DB-9 connector. All modifications are performed on the underside of the unit. The unit shown in the images below dates 1980. Newer units may have a slightly different layout.

Study the following schematic and pictures carefully. The changes to be made are shown in red color. The changes shown apply to the TailTwister model. For other applicable HyGain models (CD-45, CD45-II, Ham-III and Ham-IV) there are no LED signals to intercept. Consequently, in those units, the add-on relays simply bridge the three micro-switch contacts.








Most control wires (the yellow wires in the pictures above) are soldered directly to the micro-switch lugs. In TailTwister models, the two wires going from the micro-switches to the existing PCB (blue and brown wires in the author's unit) are the LED control wires. They are disconnected from the micro-switches and re-routed to the relay board. These wires may have to be lengthened to reach the relay board.

Installation of the female, panel-mounted DB-9 connector onto the rear panel requires a D-shape hole and two small mounting holes to be drilled and filed. The rear panel is made of steel. This makes it a rather labor-intensive job. Signal assignment to the connector pins is arbitrary, but should be made the same at the new controller end.

The rotator potentiometer cursor signal is shared with the chassis ground. To hook up the
potentiometer cursor signal to the connector, simply connect the chassis ground to one of the pins. This is shown as a short green wire in the pictures above.

The +27 VDC supply is picked up directly from the large capacitor on the existing PCB (twisted blue and black wires in the pictures above). Simply solder two wires to the capacitor solder pads, and route them to the DB-9 connector. Make sure to respect the polarity (in the pictures above, the blue wire is the positive lead).

ARDUINO FIRMWARE

The Arduino firmware is written to be compiled in the Arduino IDE environment. The Arduino IDE software must thus be installed to a computer. The IDE is available for Windows, Linux and MacOS operating systems. Visit https://www.arduino.cc/en/software for more details on how to proceed.

Support for the Raspberry Pi Pico must also be added in Arduino IDE. Consult this Instructables link for more details on the prodedure.

The Arduino firmware (a.k.a. the sketch) uses the following non-standard libraries:
  • Adafruit_ILI9341
  • Adafruit_GFX
  • XPT2046_Touchscreen
These libraries must be installed in Arduino IDE via the Library Manager (Menu: Sketch -> Include Library -> Manage Libraries...) prior to compiling the sketch.

The Arduino sketch for this project can be downloaded from my GitHub page.

Note: Even though the controller display images shown here have French text, the final firmware has English text. Obviously, one can easily change the displayed messages in the firmware to suit his/her preferences.

OPERATION

Operation is simple and fast. When you turn on the power switch on the existing box, the new controller lights up and becomes operational within a couple of seconds.

There are four ways to re-orient the rotator to a new heading:
  • By entering a new heading on the tactile screen keypad, and then pressing the GO button,
  • By dialing in a new heading via the rotary encoder. Pushing in the encoder shaft launches the re-orientation. This is the most convenient way,
  • By pressing the +15 or -15 buttons on the display. This automatically increases or decreases the heading by the number of degrees indicated,
  • By issuing a re-orientation command from the Rotator Control Software,
There are three ways to stop a re-orientation while the rotator is turning:
  • By pressing the CLR buttons on the display,
  • By pushing in the encoder shaft,
  • By issuing a stop command from the Rotator Control Software.
There are three phases in a re-orientation process:
  1. Rotation: During rotation, the rotator brake is disengaged and the rotator motor is spinning. The screen shows the "IN ROTATION" status message. The heading indicator shows the re-orientation progress.
  2. Inertia: When the target heading is reached, the motor is de-energized, but the rotator brake is not engaged yet; that delay of several seconds is allocated for slow down and dampening of antenna movement. The screen shows the "IN INERTIA" status message.
  3. Idle: Once the inertia delay is over, the controller reverts to an idle state, and the rotator brake is engaged. The screen shows the "IDLE" status message in that phase. This is the default rotator state.
The controller firmware monitors the rotation progress. It will protect the rotator by promptly transitioning to the inertia phase if no meaningful rotation is detected. This would indicate a seized or frozen rotator. An alarm message is also displayed on-screen to warn the user. Following this, a new re-orientation attempt can be made, if desired.

When entering a new heading using the display keypad, pressing the CLR button will clear the entry. If entering a heading of more than 360, the unit will automatically erase the entry.

A computer Rotator Control Software is available to remotely operate the rotator. Re-orienting the rotator can be as simple as a mouse-click on the map. Binaries are available for both Windows and Ubuntu-Linux on my GitHub page. More information on the software operation is detailed on GitHub.




Warning: In order for the unit to be connected via USB to a computer, a USB isolation dongle must be inserted on the USB cable. This is a requirement due to the
floating heading indication circuit with reference to the chassis ground. A suitable USB isolator such as the unit shown below can be purchased for a few dollars on online stores.



Note that the calibration procedure of the existing control box (bringing the needle to the 360 degree mark) still applies with the new controller.

CLOSING COMMENTS

Although this was not a particularly difficult project to design, one aspect increased the challenge. T
he existing indication meter circuit operates in a floating fashion with reference to the chassis ground; a separate AC transformer is used just for the indication circuit. Since the pot wiper and the chassis ground are connected together, a lot of 60 Hz AC ripple noise (like 1 Vrms) makes its way onto the potentiometer signals. This is invisible to a slowly moving meter needle, but it sure is problematic for the Raspberry Pi Pico ADC, which samples at more than 500 Kilo-samples per second! To eliminate the effect of that ripple, a long averaging period is implemented in firmware. This averaging nulls out the ripple and derives the actual potentiometer cursor voltage.

I have been operating this controller f
or a few months. Although there may be improvements to be made, the main objectives are met. It is a joy to re-orient the antennas and not have to worry about holding the brake lever and stopping the rotation at the right moment. And remote operation using the computer software is real joy when contesting!

Some of the features do not quite suit you? Make changes to the firmware then! It is very easy in Arduino IDE. The code is fully commented, so you should have no problems understanding what I have done. And there is even a prototyping area on the board to add some additional hardware if needed. Enjoy!