IMPROVEMENTS FOR THE KANSAS CITY TRACKER/TUNER BY JOE BARGER N6KK 2009 Harkness St. Manhattan Beach, CA 90266 internet: barger@aerospace.aero.org satellite: AO-16, LU-19, FO-20 bbs: N6KK @ WB6YMH compuserve: 71560,2514 INTRODUCTION The Microsats have created an entirely new and fascinating aspect of amateur radio. Digital communications, satellite tracking, communications protocols and BBS operations are just a few of the diverse disciplines that are instrumental to the operation of the Microsats. Assembling the hardware and software elements for a successful Microsat station is an educational, challenging and absorbing experience. The technology is so new that there are many aspects of Microsat operation where experimentation and advancement in the state of the art is possible and needed. Operating the low earth orbit Microsats can be a hectic experience. Two hands are not enough to handle the "routine" jobs of pointing azimuth and elevation antennas, tuning the uplink and downlink radios to correct for doppler shift, switching antenna polarization to correct for polarity shifts, etc. Add the "mothering" of computer programs necessary to upload or download files and the number of simultaneous tasks becomes tedious and error prone. Automation of some of these routine functions makes life on the Microsats much easier and more productive. Automation of the tracking and tuning functions also makes unattended data collection over a period of several days possible and is a necessary step toward automatic gateway operations. The Kansas City Tracker (KCT) and Tuner by L. L. Grace is a commercially available product that automates antenna tracking and downlink/uplink tuning. It consists of a plug-in hardware board and complementary software that interfaces with the antenna rotors and the uplink/downlink radios. It works in concert with satellite tracking programs such as Quiktrak and GRAFTRAK. The Tracker function works beautifully. It keeps the antennas pointed within a few degrees and eliminates a major source of work during the passes. Relatively large errors in the keplerian elements (keps) and time can result in pointing errors of a few degrees, but the 3 db antenna beam widths used by amateurs are typically 30 degrees or more, so pointing errors of a few degrees are not critical. The Tuner, however, is not so forgiving. To tune the downlink (and uplink, although the uplink isn't nearly as critical), the Tuner requires very accurate time of day and keps. An error of just 1 second in the time of day can result in a maximum downlink tuning error of around 100 Hz for high elevation passes of the Microsats. Accurate time of day can be obtained via WWV, but getting keps that are accurate enough seems very difficult. Even using the "freshest" keps I can find, tuning errors occasionally exceed 500 Hz during the middle of the pass (when the doppler shift rate is highest). My TAPR PSK modem loses lock when the tuning error approaches 200-300 Hz. And even the best set of keps seems to be good for a week or so before the tuning errors build up and the modem loses lock sometime during the pass. SOLUTIONS TO THE TUNING PROBLEM There are (at least) two solutions to this problem. The accuracy of the keps can be increased by periodically correcting them to reflect the current orbital parameters, perhaps by massaging several element sets to produce a "smoothed" element set that may be good for long periods of time. Since I'm not a math wiz, and I didn't have much information on how such corrections should be made, I decided to take another approach that does not require extremely accurate keps. The original Tuner uses an "open loop" method of determining the downlink frequency. It simply predicts the downlink frequency based on the time and keps for the satellite of interest. With accurate keps and time, this calculation is good enough to keep the modem locked. But if the time or keps are just a little off (particularly in the middle of the pass when the change in doppler shift is highest), the calculated frequency is in error. The Tuner does reliably calculate the downlink frequency at AOS even with moderately inaccurate time and keps, since the change in doppler shift is minimal at AOS. In a "closed loop" system, the actual tuning error is included in the downlink frequency calculation, which results in a self-correcting system to keep the modem locked to the downlink frequency. The TAPR PSK modem (and others) provide an error signal in the form of "mic-step" tuning pulses that can automatically step the downlink receiver up or down to track the doppler shift once the modem is locked. The key to the problem was to find a way to incorporate the modem step tuning pulses in the downlink frequency calculations to correct the computed downlink receiver tuning commands. Unfortunately there isn't a convenient method of incorporating these error signals directly into the Tuner downlink frequency calculations. I talked to the KCT developer, Brooks Van Pelt, about my project. He was very supportive but, since he was very busy with the DSP-12 project, he didn't have the time to make and test the necessary changes to the software. He was willing, however, to provide me with the source code (which is in assembly) and a hardware schematic so I could make the changes myself. Making changes to your own software and hardware is scary enough, but making mods to a product as complex as the Tracker/Tuner is crazy. I decided to give it a try. The first order of business was to find a way to make the state of the "step-up, step-down" pulses from the modem available to the software that does the downlink frequency calculation. An inspection of the schematic showed that there are two tristate buffers connected to the KCT internal bus that are used to determine the configuration of the KCT hardware. The hardware configuration is read by the software once during initialization and merely modifies the driver "RIO" state. Since there is a driver command line switch (RIO) that can be used to set the RIO state, there is no need to dedicate these buffers to determine hardware configuration. Therefore, once the code that reads the hardware configuration is removed, these two tristate inputs can be used to sample the state of the modem step signals. The easiest way to run the step signals to the tristate buffer inputs is to isolate the buffer inputs by cutting the copper traces that go to the inputs and attaching small wires from the isolated pins to appropriate spare pins on the DB25 connector. Unfortunately the inputs of interest are tied to copper traces that run under the tristate buffer chip (which is soldered directly to the card), and are therefore inaccessible. Only two other (rather drastic) options came to mind. First, the two pins of interest can be cut as close to the board as possible and then bent up so wires can then be attached directly to the pins and run to the DB25 connector. Locate the two large socketed 2651 chips near the upper center of the board (U10 and U11). Directly below the lower socketed chip is a 74LS126 (the only 74LS126 on the card, U7). The two pins we are interested in are pins 9 and 12. Cut them as near to the board as possible and carefully bend them up from the board so they point straight out from the chip. Because the LS126 is very close to another chip, very fine pointed cutters are required. Make sure the tools you have will do the job, or you may mangle the chip and possibly the card. Once the pins are cut and bent, use a fine tip, low wattage soldering iron and connect a small wire from pin 9 to pin 2 on the DB25 connector. Connect another small wire between pin 12 and pin 4 on the DB25. Space is tight around the 74LS126, so be sure you don't short anything together. Connect the modem "up" step signal to pin 2 on the mating DB25 connector and the modem "down" step signal to pin 14 on the mating DB25 connector. Make sure the step signal levels provided by the modem are TTL compatible (see "USING THE MODIFIED TUNER" below). An alternative approach involves removing the chip entirely and replacing it with a socket. I prefer this approach since the original functionality of the board can be completely restored by simply putting a new 74LS126 in the socket (and it's easier to make more modifications for future projects). Locate the 74LS126 as described above and carefully snip each of the pins with fine pointed cutters. Use a low wattage soldering iron with a fine point to remove the remaining part of the pins that extend through the board. Remove the remaining solder with the same iron and some solder wick. I tried using the solder wick to suck up the solder and remove the chip without cutting the pins, but I had no luck getting enough solder out to completely free the chip. Proceed very carefully, being sure not to use too much heat to remove the solder or damage the copper traces on the card can result. After the chip has been removed and the holes through the board freed of solder, solder in a PC mount socket. Then take a new 74LS126 and carefully bend pins 9 and 12 away from the body of the chip until they make a 90 degree angle with the other pins. Insert the chip in the socket (make sure pin 1 is properly oriented) and check the clearance between pins 9 and 12 and the adjacent chip. It may be necessary to cut the lower half of the pins off to avoid shorting against anything. Then follow the instructions in the preceding paragraph on wiring pins 9 and 12 to the DB25 and wiring the modem step signals to the mating DB25. Once the hardware was modified, the software needed to be changed to read the state of the modem step signals and adjust the downlink frequency calculation accordingly. Fortunately, Brooks took the time to comment the source code in enough detail that I found the spots in the code that needed to be modified without too much problem. The modifications described above are not radio specific, so they should work with any radio supported by the KCT. The only radio I have checked thoroughly, however, is the Yaesu 736R. As it turned out, the Tuner didn't send 736R frequency update commands fast enough during periods of maximum doppler shift. The maximum change in the doppler shift for the Microsats downlink is approximately 100 Hz/sec. The period between frequency updates (either uplink or downlink) using the 736R is around 2.4 seconds. The step size can then approach 240 Hz, which can result in momentary loss of lock. The cause of the slow update rate turned out to be due to the way the frequency updates for the 736R are done in the Tuner. To initialize the Yaesu Computer Aided Transceiver (or CAT, which allows computer control of the 736R), four separate CAT commands are required. The Tuner simply sends the entire initialization sequence of four commands for each and every frequency update. After initialization, however, only one command is required to update the frequency. The update rate was increased by changing the software to send only the frequency command after initialization is completed. The Tuner is designed to recalculate the uplink and downlink frequencies every second, so improving the radio update rate beyond one second is not necessary. This change results in around 100 Hz steps maximum and much better performance. POLARITY TRACKING Another manual task that can be automated is polarity switching of the downlink (and uplink) antenna. Cross polarization between the satellite antenna and the ground station antenna due to satellite rotation and Faraday rotation can result in deep fades during a pass. The KCT can (via the Yaesu CAT) access the 736R S meter to obtain relative signal strengths. The KCT can also control an external antenna switch, which can be used to switch antenna polarity. I developed a simple algorithm based on the relative downlink signal strength to select the appropriate downlink polarity. The downlink is sampled every 3 seconds. If the signal strength is above about S-2, no change is made. If the signal strength is below S-2, the polarity is switched and the resultant signal strength compared to the original. If it is higher, the polarity stays at the new position. If the signal strength is less, the polarity is switched back to the original polarity. How the uplink polarity switching should be handled is another matter, however, and I don't know how to do it at the moment. One potential problem is that the Tuner may attempt to switch the uplink polarity while the transmitter is transmitting, resulting in hot switching the polarity relay. More importantly, changes in uplink signal strength at the satellite are difficult, if not impossible, for individual users to accurately evaluate. The polarity tracking function requires an S meter reading to be returned from the 736R over the serial CAT bus. The KCT hardware is configured for interrupt driven CAT input, but (since reading data over the serial CAT bus isn't required in the stock Tuner) there is no software to support interrupt driven input. Writing the required interrupt drivers is not a trivial task and, if not implemented properly, prone to erratic operation. I decided to avoid interrupt driven input if possible. As it turns out, the 736 returns 5 bytes of data for each "read S meter" command; 4 copies of the S meter reading and the "read S meter" command. The only data that is needed is one copy of the S meter reading, so capturing just the first byte returned after the read S meter command is issued is adequate. The 736 spits out the 5 bytes of data very fast, so a method of reliably capturing the first byte returned must be used. The 2651 USART used for the CAT serial communication link between the KCT and 736 has an output signal that indicates when a byte has been received and is ready to be read (RXRDY) as well as an input signal that disables further data input (DCD). Simply connecting these two signals will disable the USART receiver after the first byte is received. This minor hardware change and some software to enable the USART receiver and poll for data ready is a simple and effective method of reading the S meter without developing complicated interrupt driver software. The hardware changes do not affect stock Tuner operation. Fortunately the USARTs are mounted in sockets. Assuming your 736R is on Port A, pull U11 (a 2651 chip) from its socket. Carefully bend pin 16 90 degrees so that it points straight out. Bend pin 15 just enough so that it will slip just outside the socket when the chip is reinserted. Put the chip back in the socket and verify that pin 16 doesn't touch or interfere with the adjacent parts. Also make sure pin 15 is not seated in the socket but rather outside of the socket. Solder a small wire directly to pin 16 on U11. Connect the other end of the wire to pin 8 of U13 (a 7406 chip). Now remove U10 and bend pin 15 just enough so that it will just slip outside the socket and reinsert U10. If you are using Port B instead of Port A, simply reverse U10 and U11 in the procedure above. The signal that the KCT provides to switch antenna polarity is a single TTL output. Fortunately, there is a spare relay driver on the KCT card that can be used to drive a 12 volt relay. The inputs on the spare relay driver are grounded, so they must be isolated by cutting the copper trace that goes to them. Cut the wide copper trace on either side of pins 6 and 7 on U24 (a 75452 chip). Verify that pins 6 and 7 are indeed isolated from ground but still connected to each other. Connect a small wire from U13 (a 7406 chip) pin 14 to U24 pin 8. This reconnects the path to U24 pin 8 that was severed when pins 6 and 7 were isolated. Connect a small wire from U17 ( a 74LS273 chip) pin 12 (the antenna control output signal) to pin 6 on U24. Unfortunately, if the tuning improvement modifications described earlier are implemented, there are no more spare output pins on the DB25 connector. As far as I can tell, none of the radio interfaces require the -12 volt that is supplied to pin 14 on the DB25 connector, so I isolated pin 14 from the -12 volts by cutting the trace that goes to pin 14. Then connect a small wire from pin 5 on U24 to pin 14 on the DB25 connector. The relay itself is connected by wiring one side of the 12 volt coil to pin 14 on the mating DB25 connector and the other side of the 12 volt coil to pin 21 of the mating DB25 connector. (This is exactly the same as how the "rotor interface option" external relays are interfaced.) Be very careful not to short either of the wires running to the relay to anything, since both sides are at 12 volts until the relay driver is activated (which grounds one side). I simply connected the normally open contacts of a Radio Shack #275-218B 12 volt relay in parallel with the switch I use to manually control polarity. In this case, the manual switch must be open for the automatic polarity switch to work. TUNER "POP UP" DISPLAY IMPROVEMENTS The Tuner Pop-Up display contains some interesting and necessary information and some less useful data. The top half of the display contains the shifted beacon, uplink, and downlink frequencies, uplink and downlink enable/disable control, and uplink and downlink frequency selection. The bottom half of the pop-up is devoted to the radio port settings, which are not configurable from the pop-up. In fact, the only way the ports can be configured is via command line switches during bootup and, therefore, these settings rarely change. After operating the satellites for a while, I found myself wishing I had several bits of information on this display, such as the time to LOS when a pass is active, the time to the next tabled pass, and a list of the tabled passes. It would also be nice to have some of the features of the "OSC" pop-up, such as the ability to delete a single pass or the whole table and view the current az and el rotor positions. My version of the KCT Tuner Pop-Up deletes the port setting information and replaces it with this data and more. Figure 2 is an example of the new Tuner Pop-Up during a typical pass with two more passes in the table. The new features perform the following functions. "F-Trak" shows the status of the frequency track function (or modem assisted mode) as described above. Pressing "F" toggles the F-Trak function on and off. "P-Trak" shows the status of the polarity track function. "P" toggles the P-Trak function on and off. P-Trak will be blanked from the display and polarity processing disabled if a Yaesu 736R is not the radio type assigned to the selected port since only Yaesu 736R radios support this function. If a pass is not active, P-Trak is also blanked from the display because a port (and therefore radio type) is not selected until a pass starts. "S-Mtr" is a relative indication of received signal strength. It ranges between 1 and 128 or so and is updated every 4 seconds during a pass. This display is also blanked until a pass starts and continues to be blanked if the radio selected is not a Yaesu 736R. The "AZ" and "EL" values indicate actual rotor positions during a pass. The values are blanked between passes. "LOS" indicates the time until loss of signal during the current satellite pass and is blank between passes. "Doppler" displays the beacon doppler shift during a pass (it is simply the difference between the real beacon frequency and the shifted beacon frequency). It is also blanked between passes. The rest of the Tuner Pop-Up shows the AOS date and time, duration of the pass and time until AOS for the next two satellites in the pass table. If the time to AOS is greater than 60 hours or the AOS time has passed, the display will show "--:--:--". As in the OSC pop-up, pressing "S" will delete an active pass or the next pass in the table and pressing "X" will delete the entire pass table. The Tuner "Help" screen has been updated to include these changes. All the Tuner Pop-Up improvements except the F-Trak and P-Trak related functions can be used without making any hardware modifications to the KCT card. Simply install the software and turn the F-Trak and P-Trak functions off after bootup. MISCELLANEOUS There are a few other minor changes. The "alert" morse code messages at 3, 2 and 1 minute before a pass starts now only sound once instead of 9 times. The original version (2.43) of KCT software also has a bug that can corrupt the uplink frequencies that are stored for each satellite. It has been fixed in this modified version. In order to distribute the processing load evenly and produce periodically spaced updates to the radio, I have reduced the frequency that the software processes the antenna azimuth and elevation functions. The only noticeable effect is an overshoot of a few degrees during antenna slews that is corrected in a few seconds. USING THE MODIFIED TUNER There are several hints and kinks that will make using this modified KCT easier. I have tested the mods on a Yaesu 736R, PK232 with TAPR PSK modem and a s-l-o-w PC XT clone, but these comments should apply to other station setups as well. My communications software (PB and PG) run on a separate computer, so I have not been able to check for problems between the modified tuner software (running as a TSR) and the communications programs. I have taken pains to make sure the extra overhead taken by the mods is minimal and distributed evenly, but some functions (such as updating the next pass information) take some time and may interfere with fast data transfer rates on slow machines. KEEP THE TIME AND KEPS AS ACCURATE AS POSSIBLE! The errors created by inaccurate keps and time are nonlinear and build-up very rapidly. These mods help reduce the sensitivity to inaccurate keps and time, but they can only compensate so much! Make sure the DRV command line switch RIO is set properly for the version of KCT hardware card that you are using. It should be 1 for the LLG02-B board and 0 for all others. Also make sure that the dipswitches on the KCT card are set according to the KCT instructions. Set the KCT port tuning step size to 10 Hz (via the Tuner command line switches). Anything much higher causes the "F-Trak" mode to try to correct the shifted frequency in steps that are too large and the receiver may over-correct when the doppler shift rate is high. Also set the time step size to around 6 seconds or less (0.1 in Quiktrak) when loading the pass table. This results in large pass tables that take a long time to load, but the increase in tuning accuracy makes it worth it. When a new set of keps are loaded, it is important to adjust the "fine tuning" for each satellite of interest. At AOS with F-Trak off, simply step the ADJUST value in the Tuner pop-up window so that the modem is in the middle of its lock range. This is the ADJUST value that will be stored in the appropriate parameter table and will be used again at next AOS. Turn F-Trak on and the ADJUST value will be changed in real time to keep the modem locked as the pass progresses. I use the TAPR PSK modem. The KCT will not respond properly with the mic-click signals configured for the Yaesu 736R because in the "low" state the optoisolator in the modem will not pull the signal down to a low enough voltage. A simple fix is to remove the optoisolator chip (U12) in the modem and jumper pins 1 and 8 together and jumper pins 4 and 5 together by inserting small pieces of wire into the socket. This connects the TTL compatible outputs of the 555 timer directly to the modem mic-click outputs. Be sure to use a small wire and use care when jumpering so the socket isn't damage should you ever want to put the optoisolator chip back in the socket. I'm sure that the proper combination of jumpers and pull-up resistors on JP5/JP6 wouldn't require removing the optoisolator, but pulling the chip and jumpering between socket pins makes returning to the original configuration easier (simply remove the jumpers and reinsert the optoisolator chip). If you are using a Yaesu 736R, make sure the VFO switch is set to the downlink VFO (either A or B). Otherwise you'll be wondering why the radio doesn't accept frequency update commands. CONCLUSION Once these changes were made, operating the Microsats became much more enjoyable. I can now store several passes (for different satellites, if desired) and the KCT will initialize the uplink and downlink at AOS. During the pass, the KCT tunes the uplink and points the antennas while the modem error signals help insure accurate downlink tracking. The Tuner tracks right through deep fades (which can cause the modem to loose lock). I have stored all the passes for WO-18 for four days and captured all the downlink data. I can now work several passes of AO-16 and LU-19 and concentrate on getting data to and from the birds without worrying about antenna pointing or uplink/downlink frequency tracking or downlink polarity switching. FUTURE IMPROVEMENTS It would be nice to perform "real time" tuning as well as tracking without having to load tables in advance of a pass. In this mode, tuning as well as tracking info could be passed from (for example) Quiktrak to KCT to tune the radios and point the antennas. I believe Brooks has built the "hooks" into the code for this function, but I haven't pursued it yet. I'm sure there are other enhancements that can be added. I'd be glad to hear what other KCT users would like to have added/changed to make their operations more efficient. ACKNOWLEDGMENTS Many thanks to Brooks Van Pelt of L.L. Grace for doing the original development of the KCT/T, providing the source to his code, a schematic of the hardware, and graciously allowing me to make these modifications available to current users of KCT with the Tuner option. Please send a formatted IBM 3 1/2 or 5 1/4 floppy with a return mailer with your name, address, and enough return postage for the mailer to my home address. I should also have the necessary files on Compuserve Hamnet in the satellite section under KCT500.ZIP. My mods are based on version 2.43, which has the 9600 baud fix. Please be sure to read the README file for the latest information. I would also like to thank Paul, KB5MU, for his helpful comments and encouragement. Figure 1. Parts Placement on LLG02 Board Component-Side View -------------------------------------------------------------- | | | ----------------- ------- ------- | | ------ | U10 | | U19 | | VR1 | | | | U1 | | | ------- | | | | | | | | ------- ------- | | ------ ----------------- | UN1 | | | ----------------- ------- | | ------ | U11 | ------- | | | U2 | | | | U28 | | | ------ | | --------------- ------- | | ----------------- | U21 | | | ------ ------- -------- | | ------ | | U3 | | U7 | | U12 | | | | | | ------ ------- -------- --------------- |DB25| | | | | ------ ------- ----- ----------- ----- | | | | U4 | | U8 | |U15| | U16 | |U22| | | | ------ ------- ----- ----------- ----- | | | | | | ------ --------- --------- ----------- ----- ---------| | | | U5 | | SW1 | | SW2 | | U17 | |U24| | U13 || | | ------ --------- --------- ----------- ----- ---------| | | | | | ------ --------- --------- ----------- ------------ ------ | | U6 | | U9 | | U14 | | U18 | | U29 | | | ------ --------- --------- ----------- ------------ | | | | | ---------------------- -------- | | | | | | | | | | | | | | | | | | | | | | | | ---------------------------------- Card-Edge Connector with gold-plated "fingers" Figure 2. Modified Tuner Active Window during a pass. |-------------------- Active Window -------------------------| | Kansas City Tuner with N6KK Mods ver 5.00 | Uplink: ON | |10/21/1991 02:01:16z [+00] ANT=0 |Downlink: ON | | Port F-Trak: ON P-Trak: ON |---------------| | LO-19 /VFO Adjust Shifted | | Beacon : 437.000.000 437.002.038 | | UplinkA: AA USB 145.900.000 -0.900 145.901.000 | |DownlinkA: AB LSB 437.125.000 -1.600 437.125.440 | | S-Mtr: 32 AZ:135 EL: 34 LOS: 00:06:02 Doppler: 2.038 | |------------------ Next Two Tabled Passes ------------------| | Next Sat AOS Duration Time to AOS | | AO-16 10/21 04:16:45z 00:06:06 02:15:29 | | WO-18 10/21 04:46:45z 00:11:10 02:45:29 | |------- Use ESC to exit this window. Use F1 for help. -----| L. L. Grace Communications Products, Inc. 41 Acadia Drive, Voorhees, NJ 08043, USA Telephone: (609) 751-1018 Fax: (609) 751-9705 Compuserve: 72677,1107