SGC-230 Diagnostic ROM ====================== Introduction ------------ The SGC-230 automatic antenna tuner/coupler consists of a microprocessor controlled pi network with sensors to detect transmission line conditions allowing the CPU to select the optimal network configuration to match virtually any antenna to an input frequency. The computer controllable variable capacitors and inductors necessary for such a network are implemented in the SGC-230 by using relays to switch parallel fixed capacitors and series fixed inductors. SGC provides a pretty good basic troubleshooting document to help you diagnose your ailing 230, however one of the major problems it leads you to is "defective relays" - there are 26 relays in the SGC-230 operating at high RF power levels, giving a fairly high probability of mechanical failure (bad contacts etc.). Diagnosing the SGC-230 relays with the standard tuning ROM is almost impossible (they usually operate continuously when problems occur). The diagnostic ROM replaces the standard ROM in the SGC-230 and communicates with a user via a bit-bash serial port implemented on the two SGC-230 configuration jumper I/O pins - by connecting a level convertor and serial terminal (or PC running a terminal emulator), you can: - Manually set any relay configuration and change it at will. - Step up or down individually through all possible transmitter- capacitor, inductor and antenna-capacitor values in the internal pi network. - Hunt up or down through the capacitor/inductor values at various speeds. Also included is a "continuous" mode which hunts up and down repeatedly through the network values. - Read the status inputs being presented to the CPU. - Toggle the TUNE LED With this program, you can activate each relay in turn. For the capactor relays, you can easily check the contacts with a DC ohmmeter. For the inductor relays, you will have to either measure the inductance with an LCR meter, or do as I did, and test the tuner with live RF, manually tuning it via the terminal interface exactly as you would a basic manual pi-network tuner. Disclaimers ----------- I have no association with SGC, this project is my own design and is not supported by or endorsed by SGC. If you are not completely comfortable doing the procedures outlined here, find someone who is. - If you don't know what you are doing you can easily damage your tuner. Doing what I am about to describe to your tuner will most certainly void it's warrenty (which begs the question - if it's under warranty, why are you trying to fix it yourself in the first place). Operating RF in close proximity to your body is dangerous, especially through a tuner open on your bench with wires hanging out of it. Use only LOW POWER when working under these conditions. I accept no responsibility for you or your tuner, and you use this program and information entirely at your own risk. If you do not fully understand the information presented here and/or are not prepared to accept full responsibility any use you make of it, then do not proceed. This code has been tested on only one tuner. Since there have been a few variations on the design over the years, you may need to change the code if you have an older/newer tuner. Here are the details of my SGC-230: - Manufactured October 1994 - Has 7 red LEDS (newer ones have 5 green LEDs) - Has an 146805 CPU (newer ones have 68HC711) - Has a 5480 serial-parallel relay latch (newer ones have 5481) - Has the lock function (older ones apparently do not) The code will definately NOT work on a newer SGC-230 with a 68HC11 processor - Perhaps someone with a newer tuner will take this design and develop it for the newer hardware - I have included the source code (S230DIAG.ASM) for your reference. If you do this, please contact me (see below) so that I can include the updates in this distribution. Installation ------------ To install the diagnostic ROM, carefully remove IC7 the standard 2764 ROM - easily identified by it's copyright label. You will need to program the diagnostic ROM code into a blank 2764 and install it in the IC7 location. You will need the capability to program EPROMs to do this! I have provided the code in three different formats, use whichever one is suitable for your EPROM programmer: S230DIAG.MOT - Motorola 'S19' download format S230DIAG.INT - Intel ':' download format S230DIAG.BIN - Raw binary 8K image file. You will also need to connect an RS-232 level convertor to the SGC-230 configuration jumper pins (remove the jumper blocks). I used a MAX232 5v powered level convertor. I recommend building the convertor into a standard DB-25 "headshell", so that you can use it on other projects as well. Please refer to the image file MAX232.JPG for a schematic diagram of the level convertor. When the diagnostic ROM is active, the "TUNE FROM MEMORY" configuration jumper becomes an output, and produces 9600bps serial data output (to the PC) - the "TUNING ELEMENTS OUT" jumper becomes the serial data input (from the PC). Please refer to the image file CONNECT.JPG for a a photo of my connections to the SGC-230 - also shown is my level convertor headshell, and a separate image of it with the cover off. The Ground, serial data out and serial data in signals required by the lever convertor can be obtain directly by "wire wrapping" to the SGC-230 configuration jumper pins - +5V is not available on a pin, so I soldered a lead to one end of R9 (closest to the 2764). When you are finished with the diagnostic ROM, simply remove the connections to the level convertor, and replace the original 2764 ROM and jumpers. Operation --------- Configure your TTY (or PC/terminal emulator) for 9600 bps, no parity, 8 data bits and one stop bit. When the SGC-230 is powered up with this ROM installed, a welcome prompt will appear on the TTY, followed by a status/prompt message in the following form: T>000000 I:00000000 A:00000 L:0 000000 'T' is a label identifying the transmitter-capacitor relay bank. It is followed by 6 0/1 indicators showing the current setting of relays K1-K6 (in this case all-OFF) '>' is an indicator telling you that the Transmitter-capacitor bank is currently selected for modification. When the Inductor or Antenna-capacitor bank is selected, the indicator will move to the corresponding label. 'I' is a label identifying the inductor relay bank. It is followed by 8 0/1 indicators showing the current setting of relays K7-K16 (in this case all-OFF) - Note that K13/14 and K15/16 are operated as pairs and have only one control bit visible here (refer to schematic) 'A' is the label identifying the antenna-capacitor relay bank. It is followed by 5 0/1 indicators showing the current setting of relays K17-K26 (in this case all-OFF) - Note that all of these relays are operated in pairs and have only one status bit/pair (refer to schematic). 'L' is a label identifying the TUNE-LED output, and is followed by 0/1 indicating the current setting. The last five 0/1 indicators are the PORT-A status indicators presented to the 146805 CPU. They are (in this order): - Inverted/conditioned FWD (also to IRQ) - non-inverted FWD - 4:1 SWR - LO "Z" - 2:1 SWR - PHASE At any time you can press SPACE to re-read/display these values. You can also use RETURN to, which adds a blank line to the display (useful when you want to break up a listing). The following additional commands are available: T - select Transmitter-capacitor relay bank for modification I - select Inductor relay bank for modification A - select Antenna-capacitor relay bank for modification 0-7 - toggle corresponding relay in currently selected bank U - step Up to next higher capacitor/inductor value in selected bank D - step Down to next lower capacitor/inductor value in selected bank F - hunt Forward to higher cap/ind values in selected bank, stop at end * B - hunt Backward to lower cap/ind values in selected bank, stop at end * H - Hunt continuously in currently selected cap/ind bank, up to highest * then down to lowest, repeat forever. S - cycle to next F/B/H speed, 5 speed values are available. L - toggle tune-Led on/off R - Reset: all relays off * You can stop a hunt command by pressing any key and return immediately to the main prompt. Note that due to the bit-bash nature of the serial port, this will usually corrupt the last character sent. Use the Hunt commands to perform manual tuning - select each bank, hunt Forward/Backward for the lowest SWR reading and hit any key to stop - then use U/D to fine-tune the position. Failure to tune, or sudden jumps in SWR are indicators of a bad relay. Use the 0-7 toggles to checkout the operation of each individual relay. In closing ---------- I created this program in desparation when faced with a "very dead" SGC-230 that had suffered internal water damage/corrosion and physical damage to the relays (on the plus side, I picked it up at scrap value). I needed to be able to excercise each relay individually, and to manually tune the network - it worked wonderfully, and my SGC-230 is now alive and well. It is my hope that others will find it equally useful. Dave Dunfield www.dunfield.com You can contact me through the "Technical support" link on my website.