3
10 The AMSAT Journal January/February 2006 www.amsat.org Simple Az-El Antenna Control Control your Antennas with a Digital Pot by Anthony Monteiro, AA2TX, [email protected] hard to find and new-old-stock units can often be found on popular on-line auction sites at very low prices. Unfortunately, the ORBIT-360s were not designed for computer control and they have no provisions for it. But, they use a feedback potentiometer at the rotor to provide positioning information and this makes it easy to build a simple and low-cost computer interface for them. The key to this low-cost interface is a device called a digital potentiometer. Digital Potentiometer A digital potentiometer (pot) is a resistor with an adjustable tap just like the familiar volume control. But, unlike a volume control, the tap on a digital pot is adjusted via a digital interface rather than a knob. The device used in this rotor interface is a Microchip MCP41010, a 10K ohm pot with a built- in Serial Peripheral Interface (SPI.) SPI was invented by Texas Instruments as a simple and low-cost way for a micro-controller to communicate with its peripheral devices. Fortunately, the SPI signal levels are compatible with the signal levels on a PC parallel port. With a little bit of software to implement the communications protocol, the SPI digital pot can be controlled from a PC with no extra hardware. The SPI protocol on the MCP41010 chip uses three signals, Not Chip Select (NCS,) Serial Clock (SCK,) and Serial Input (SI.) The SPI data blocks are 16-bits long and include an 8-bit command byte and an 8-bit wiper value byte. The blocks are clocked synchronously into the chip from the SI lead on positive transitions of the SCK signal. The diagram in Figure 2 illustrates how the SPI protocol works. To start the data transfer, the NCS signal is set low. The SI lead is set to the most significant data bit value and the SCK signal is pulsed high to clock in the bit. Then the next most significant data bit value is put on the SI lead and the SCK signal is again pulsed high to clock in this bit. After all 16 bits are clocked in, the NCS lead goes high to transfer the data value to the pot wiper. For further details, please refer to the specification sheet from Microchip 5 The MCP41010 will ignore any data blocks that have the wrong number of bits and this provides a high level of noise immunity. The chip also has Schmitt-trigger inputs on the SPI leads to further increase its noise immunity. How it Works The ORBIT-360 control box implements a closed-loop, automatic control system. A block diagram of is shown in Figure 3. The control pot on the top of the control box is used to set the desired antenna direction. The feedback pot in the rotor unit is gear-driven by the same motor that turns the antenna. The wiper on each pot forms a voltage divider from the +4.5VDC source. Each of the wipers is fed to an input of the difference amplifier circuit. The difference amplifier compares the voltages from the two pots and generates an error signal, which is fed to the motor driver circuit. When the error signal exceeds a minimum threshold, the motor driver activates the motor, turning it either clockwise or counter clockwise depending upon the polarity of the error signal. As Introduction Automatic antenna tracking makes working the amateur satellites much easier, especially on fast moving LEO 1 satellites. But automatic tracking requires a computer rotor-control interface and this has generally been expensive to buy or fairly complex for a homebrew project. This article describes an alternative approach that uses only a single chip and is very easy to construct. The chip costs $1.59 2 and the total cost of the parts is about $5. This interface was implemented on an azimuth/elevation satellite tracking system made from ORBIT-360 TV antenna rotators but the same approach could be used to provide a computer interface on any antenna rotator system that uses a potentiometer for positioning feedback 3 including the Yaesu G-5400/5500/5600 units. The ORBIT-360 was one of the most popular TV antenna rotators ever made. They were sold by Walmart, Home Depot and almost every major electronics retailer in the USA. In addition to their low cost, a great feature of these units is that the antenna mast passes through the body of the rotor making it easy to use one mounted horizontally for elevation control. A pair of ORBIT-360 rotors can easily handle moderate sized beams and a 1-meter dish. My antenna system with a 2.4 GHz dish and a 70 cm panel antenna 4 is shown in Figure 1. While no longer manufactured, used and re-built ORBIT-360 units are not Figure 1 Satellite tracking antenna system NCS SI Bit-16 Bit-15 Bit-14 SCK Bit-1 Figure 2 SPI Protocol Operation

Simple Az-El Antenna Control Control your Antennas … · Simple Az-El Antenna Control Control your Antennas with a Digital Pot ... Circuit Description ... The circuit schematic diagram

  • Upload
    vohanh

  • View
    250

  • Download
    3

Embed Size (px)

Citation preview

Page 1: Simple Az-El Antenna Control Control your Antennas … · Simple Az-El Antenna Control Control your Antennas with a Digital Pot ... Circuit Description ... The circuit schematic diagram

10 The AMSAT Journal January/February 2006 www.amsat.org

Simple Az-El Antenna ControlControl your Antennas with a Digital Pot

by Anthony Monteiro, AA2TX, [email protected]

hard to find and new-old-stock units can often be found on popular on-line auction sites at very low prices.Unfortunately, the ORBIT-360s were not designed for computer control and they have no provisions for it. But, they use a feedback potentiometer at the rotor to provide positioning information and this makes it easy to build a simple and low-cost computer interface for them. The key to this low-cost interface is a device called a digital potentiometer.Digital PotentiometerA digital potentiometer (pot) is a resistor with an adjustable tap just like the familiar volume

control. But, unlike a volume control, the tap on a digital pot is adjusted via a digital interface rather than a knob.The device used in this rotor interface i s a M i c r o c h i p MCP41010, a 10K ohm pot with a built-in Serial Peripheral Interface (SPI.) SPI was invented by Texas Instruments as a simple and low-cost way for a micro-controller to

communicate with its peripheral devices. Fortunately, the SPI signal levels are compatible with the signal levels on a PC parallel port. With a little bit of software to implement the communications protocol, the SPI digital pot can be controlled from a PC with no extra hardware.The SPI protocol on the MCP41010 chip uses three signals, Not Chip Select (NCS,) Serial Clock (SCK,) and Serial Input (SI.)

The SPI data blocks are 16-bits long and include an 8-bit command byte and an 8-bit wiper value byte. The blocks are clocked synchronously into the chip from the SI lead on positive transitions of the SCK signal.The diagram in Figure 2 illustrates how the SPI protocol works. To start the data transfer, the NCS signal is set low. The SI lead is set to the most significant data bit value and the SCK signal is pulsed high to clock in the bit. Then the next most significant data bit value is put on the SI lead and the SCK signal is again pulsed high to clock in this bit. After all 16 bits are clocked in, the NCS lead goes high to transfer the data value to the pot wiper. For further details, please refer to the specification sheet from Microchip5

The MCP41010 will ignore any data blocks that have the wrong number of bits and this provides a high level of noise immunity. The chip also has Schmitt-trigger inputs on the SPI leads to further increase its noise immunity.How it WorksThe ORBIT-360 control box implements a closed-loop, automatic control system. A block diagram of is shown in Figure 3. The control pot on the top of the control box is used to set the desired antenna direction. The feedback pot in the rotor unit is gear-driven by the same motor that turns the antenna. The wiper on each pot forms a voltage divider from the +4.5VDC source. Each of the wipers is fed to an input of the difference amplifier circuit.The difference amplifier compares the voltages from the two pots and generates an error signal, which is fed to the motor driver circuit. When the error signal exceeds a minimum threshold, the motor driver activates the motor, turning it either clockwise or counter clockwise depending upon the polarity of the error signal. As

IntroductionAutomatic antenna tracking makes working the amateur satellites much easier, especially on fast moving LEO1 satellites. But automatic tracking requires a computer rotor-control interface and this has generally been expensive to buy or fairly complex for a homebrew project. This article describes an alternative approach that uses only a single chip and is very easy to construct. The chip costs $1.592 and the total cost of the parts is about $5.This interface was implemented on an azimuth/elevation satellite tracking system made from ORBIT-360 TV antenna rotators

but the same approach could be used to provide a computer interface on any antenna rotator system that uses a potentiometer for positioning feedback3 including the Yaesu G-5400/5500/5600 units.The ORBIT-360 was one of the most popular TV antenna rotators ever made. They were sold by Walmart, Home Depot and almost every major electronics retailer in the USA. In addition to their low cost, a great feature of these units is that the antenna mast passes through the body of the rotor making it easy to use one mounted horizontally for elevation control.A pair of ORBIT-360 rotors can easily handle moderate sized beams and a 1-meter dish. My antenna system with a 2.4 GHz dish and a 70 cm panel antenna4 is shown in Figure 1. While no longer manufactured, used and re-built ORBIT-360 units are not

Figure 1Satellite tracking antenna system

NCS

SI Bit-16 Bit-15 Bit-14

SCK

Bit-1

Figure 2SPI Protocol Operation

Page 2: Simple Az-El Antenna Control Control your Antennas … · Simple Az-El Antenna Control Control your Antennas with a Digital Pot ... Circuit Description ... The circuit schematic diagram

The AMSAT Journal January/February 2006 www.amsat.org 11

the motor turns, the wiper on the feedback pot moves in tandem so that eventually, the feedback pot wiper and the control pot wiper will have the same output voltage. At that point the error signal will go below the minimum threshold and the motor driver will shut off the motor. The antenna is then pointing in the direction that was set by the control pot.To make the ORBIT-360 computer controlled, all that is needed is to replace

the manually-operated control pot with a digital pot. The digital pot is wired in parallel with the control pot and a switch is used to select the wiper of either the control pot or the digital pot allowing either manual or computer control.Circuit DescriptionRather than build an external box, the computer interface was built right into the rotor control box, eliminating the need for any power supply, printed circuit board or enclosure. The computer interface on the rotor control box is directly connected to the PC parallel port with a cable. The circuit schematic diagram is shown in Figure 4 and the parts list for the interface is in Table 1.

Note that a full Az/El system requires two interfaces, one for each control box.The SPI signals on the digital pot are wired to a 6-p i n m i n i - D i n connector that is installed at the rear of the control box. This connector is

the same type used for the PS/2 mouse and keyboard on many PCs. The three 10K resistors pull down the SPI leads if the cable is disconnected from the computer. While not used on the prototype models, 100 ohm resistors may be added in series with the SPI signals for additional static protection if the units will be used where significant static electric discharge is a problem.To install the computer interface, the pc trace from the control pot wiper to the difference

amplifier must be cut and a switch is added to select either the control pot wiper or the digital pot wiper. This trace and cut is shown in Figure 5. The +4.5V and ground signals are also available right at the control pot leads making it easy to connect the interface. The modified unit can still operate stand-alone by switching to the manual control pot.The digital pot, resistors and the capacitor easily fit on the pc board of the ORBIT-360 controller. Holes were drilled in the controller board for the discrete components and an 8-pin DIP socket was installed for the digital pot. The switch was mounted on the top panel of the control box and the parts

were wired with 30-gauge wire-wrap wire. A photo of the completed controller board is shown in Figure 6. The 8-pin DIP on the right of the control pot is the difference amplifier, a uA741 op-amp. The 8-pin DIP on the left is the digital pot with its associated components.The interface cable wiring is shown in Figure 7. This cable can be easily made by cutting a standard, male-to-male, PS/2 keyboard-extender cable in half and soldering the wires to a DB-25 female connector. This eliminates the need to solder the 6-pin mini-Din male connectors, which can be a challenge given their small size.SoftwareAll of the software and source code is in the file irotor.zip that is available from the AMSAT web site6 The software was tested and operated properly under DOS-5, Windows3.1, Windows95 and WindowsXP. The software package includes the following components; Digipot.exe, RotorDRV.exe, Rotor.exe, Park.bat and Source.zip.Digipot.exe is a simple DOS program that will control a Microchip MCP41010 or MCP4050 digital pot. It is intended to allow experimenting with these devices which can be both fun and educational. You can use digital pots to control many types of electronic circuits well beyond the simple rotor interface described in this article. To use the program, wire the digital pot NCS, SCK, and SI leads (pins 1, 2 and 3) to your PC parallel port connector pins 2, 3 and 4 respectively and connect the circuit ground to pin 18 on the parallel port connector. Digipot.exe defaults to using port 1 but it can drive any standard parallel port by specifying the port number on the command line.

RotorDRV.exe is a TSR7 driver for the rotor interface that is compatible with the Kansas

M

+4.5VDC

+4.5VDC

Motor DriverDifference Amplifier Motor

Control Pot

Feedback Pot

Title

Author

File

Revision

Document

Date SheetsC:\Documents and Settings\Anthony Monteiro\My Documents\AAA-Rotor\OR360block.dsn

1.0 1 of 1

Figure 3ORBIT-360 control system

..

Cut Trace

Manual

Auto

PA0

PW0

PB0

Vdd

Vss

NCS

SCK

SI

U1 - MCP41010

J1 -6-pin female mini-Din

Control

1

2

3

45

6

7 8

4

2

6

5

C1

R1 R2 R3

.1uF

10K 10K 10K

+4.5VDC

To Difference Amp S1

Title

Author

File

Revision

Document

Date Sheets

Rotor Control Interface

Anthony Monteiro - AA2TX

C:\Documents and Settings\Anthony Monteiro\My Documents\AAA-Rotor\rotorcontrol.dsn

1.0 20-OCT-2005 1 of 2

Figure 4Computer interface schematic

Figure 5Bottom of unmodified controller board

Page 3: Simple Az-El Antenna Control Control your Antennas … · Simple Az-El Antenna Control Control your Antennas with a Digital Pot ... Circuit Description ... The circuit schematic diagram

12 The AMSAT Journal January/February 2006 www.amsat.org

City Tracker8 specification. When installed, it uses only 6K of memory and can control azimuth-only or Az/El rotor systems. It was designed for and has been tested with the InstantTrack satellite tracking software available from AMSAT9.Rotor.exe is a command line control program for the RotorDRV.exe TSR. It is mostly intended for testing the rotor interface and software installation but also includes a helpful “flip antennas” feature that causes the elevation rotor to operate beyond 90 degrees (i.e. with the antennas flipped over.) This is useful when a satellite pass would cause the azimuth rotor to hit up against the end stop. Rotor.exe will provide all of the commands and options for itself and for RotorDRV.exe by typing “Rotor” at the DOS prompt.

Park.bat is a DOS batch file that will park the rotors with the antennas pointing straight up. It can be easily modified using a text editor such as Notepad or WordPad to set the parking position to wherever is desired.

Source.zip is the source code for the Digipot .exe , RotorDRV.exe and Rotor.exe programs.T h e s o f t w a r e modules include a parallel port driver, an SPI digital pot driver and a rotor controller. Anyone who wants to write their own software for the rotor interface or for controlling d i g i t a l p o t s i s w e l c o m e d a n d encouraged to use the source code.Operation with InstantTrackTo use the rotor driver you have to load it into memory first. This can be

done by typing “rotordrv.exe” plus any options at the DOS prompt or it can be put into a batch file for convenience. Next, load any other TSR drivers that you usually use (such as OrbitDRV or InstantTune10) and then start InstantTrack. When you select a satellite and hit the “r” key to start tracking, the rotor control boxes will light up showing that the rotors are moving to track the satellite. Once they are pointing at the correct azimuth and elevation, the lights will go out. As the satellite pass progresses, the lights will flash when one of the rotors is moved to track the satellite. This system will track a satellite to within about 2 degrees which is more than sufficient for pointing a 1-meter dish at 2.4 GHz. The RotorDRV software will automatically suspend rotor movement if the satellite elevation goes below -5 degrees.SummaryDigital potentiometers are very useful and provide an incredibly easy way to control an analog circuit from a PC. The rotor interface

described in this article was built for about $5 using a handful of commonly available parts. Although simple and inexpensive, this rotor interface provides all the hardware needed for fully automatic antenna tracking and greatly simplifies operating on the ham satellites.

Endnotes1 LEO: Low Earth Orbit2 MCP41010 is listed at $1.59 each at Jameco Electronics; www.jameco.com3 TV antenna rotators with 3-wire connections do not use a pot and will not work with this circuit4 A Panel Reflector Antenna for 70cm, by Anthony Monteiro, AA2TX, QST Feb 2005. 5 Microchip spec sheets can be found at www.microchip.com6 irotor.zip software is available at www.amsat.org7 TSR: Terminate and Stay Resident program, a way to effect hardware drivers under DOS8 The Kansas City Tracker interface spec is available from AMSAT at www.amsat.org9 InstantTrack is available from AMSAT at www.amsat.org10InstantTune automatic radio tuning software is available for free from AMSAT at www.amsat.org

Figure 6Modified controller board

1

2

3

4

5

6

7

8

9

10

11

12

13

25

24

23

22

21

20

19

18

17

16

15

14

DB25

..

..

..

..

..

..

P1 - 6-pin male mini-Din

P2 - 6-pin male mini-Din

P3 - DB-25 Female

4

5

6

2

2

4

5

6

silver

silver

yellow

yellow

red

red

green

green

black

black

Azi

mut

hE

leva

tion

PC Parallel Port Cable Assembly

Title

Author

File

Revision

Document

Date Sheets

Rotor Control Interface

Anthony Monteiro - AA2TX

C:\Documents and Settings\Anthony Monteiro\My Documents\AAA-Rotor\rotorcontrol.dsn

1.0 OCT-20-2005 2 of 2

Figure 7Interface cable wiring

Component Description

C1 0.1uF, 50V ceramic disc capacitor

J1 6-pin, mini-Din jack

R1, R2, R3 10K ohm, ¼ watt resistor

S1 SPDT sub-miniature toggle switch

U1 MCP41010, Microchip digital pot

Table 1Parts list