AA908Plot 
Excel Plot Macro Program for the AA-908

Al Gerbens, K7SBK

            


DOWNLOADS:

Data Plotter Excel Spreadsheet/Macro:  AA908 Data Plotter rev P  and  Sample Files
(NOTE: Euro users can now select their mode with ctrl-E command)

PDF Manual


2-30 MHz scan of K7SBK multiband dipole using AA-908 and his Excel Plot macro
Note all the useful data shown in the plot: major resonance at 14 MHz, interesting minor resonances at the SWR dips at 5 and 24 MHz, interesting behavior of resistance and reactance at various frequencies, and especially on either side of the resonances.

The Excel Data Plotter program plots a Smith chart when using the Plot function. 
The Smith Chart plot is always generated and is available in the rightmost tab at the bottom of the screen.
The plot shown here is of a 28-foot length of RG-58 coax illustrates the return loss of the coax.  
The trace spirals inward because the cable loss increases with frequency.

OVERVIEW

AA908Plot is a very useful Excel macro program written by Al Gerbens, K7SBK that allows you to collect and plot AA908 antenna analyzer scan data on a PC display.  With just a simple keystroke and a click on the uploaded data file, AA908Plot automatically generates a colorful scaled representation of antenna measurements for SWR, resistance and reactance – just like the sample above showing the performance of a multi-band dipole.  A Smith Chart is also generated to show additional dimensions of the scan.  Options can be set to show data points of interest on the SWR curve, as well as indications of the ham band segments along the frequency axis.  Further, you can hover the mouse cursor over a data point along the curve and a small window will show the frequency and SWR for that point.

AA908Plot can also remotely control your instrument over a serial cable to start and automatically collect/display the results.  Options are available to compare two plots on the same display, and determine network impedance matching data points for your antenna transmission line!

AA908Plot is an Excel workbook containing a macro that imports the data files generated during the AA908 scan function.  It then plots a graph of the data and leaves you inside Excel to do what you want with the graph and data.

Along the way, a vastly useful worksheet is created listing the scan settings, all the data points, and the polar representation of the impedance with reactance sign!

Multiple data sets can be handled on separate Excel sheets and then the whole thing can be saved as a workbook containing the graphs and datasets. 

AA908Plot is a great technical analysis companion to your AA908 antenna analyzer!

 

INSTALLATION

The preferred location to install AA908Plot is in a folder called “AADataFiles” on your hard drive.  This will be the default location for the data files you scan on the instrument or import to your PC. 

Create a folder at the root of your C: drive with this name and unzip the AA908Plot.zip file to that folder. 

Microsoft Excel must be loaded on your computer for AA908Plot to work.

 

OPERATION

The screen below is displayed upon launching the AA908Plot.xls program. 

(You may need to click “Accept” button if your computer displays a window asking permission to run an Excel macro.)

 

CTRL-M  Plot Data File

You can start the main function of AA908Plot by either pressing ctrl-M or by clicking on the ctrl-M button on the menu display.

·        A window will be displayed showing the contents of the AA908DataFiles and from there you can select one of the data files to plot.  The data files are text and sometimes have a .dat or .txt extension on the filename, but it is not necessary.  The distribution zip file has several sample data files you can select and try out before getting your own files into that folder.  (If the files you are intending to plot are not located in this folder, you can navigate to the correct location for them.)

·        Once you select the desired data file, the program will import the data to a worksheet of the same name (see the tabs at the bottom of the Excel program window) and in just a moment display new worksheet containing the plot.  (It may take up to a minute to import and display a large data file.)

·        You can print the chart using the standard Excel menus, or save it as a unique filename like the name of your antenna or date of the scan.

·        You can also display additional data plots … just click on the worksheet tab for Sheet3, click on ctrl-M again and select the next file to plot.

SWR Data Points may be enabled by placing a number ‘n’ into the upper box, indicating a n:1 SWR threshold for displaying white circles on the SWR plot.  Below this SWR level each SWR data point will be marked with a small white circle on the red SWR line in the plot.  This indicates where the SWR curve falls below a reference level and shows the position of each data point in this area.  Hovering the mouse cursor over each white circle produces a display of the frequency and SWR for that data point. The default setting is 1:1 which is the same as turning this feature off.

Ham Band Indicators may be specified in the lower box.  This step results in a reference SWR level being plotted as a thick black line indicating where the Ham frequencies are located.   Note that this line is continuous at frequencies where data points exist with Ham bands.  That’s not exactly the same as absolute ham band edge indicators but the differences are generally very small in this system.  This feature provides dual information – ham frequency location on this plot and the SWR reference level of my choice. The default SWR level is 2:1.  Both SWR level features can be used at the same time.

Getting Data Files from the AA908 – Most AA908 owners are familiar with the procedure for setting up their instruments to generate the data and importing it to the PC.  This is specified in the AA908 manual as well as in a AA908 Application Note.  For a refresher on the technique, see the Appendix in this document.

Formatted Data File –  After the data file is plotted, the worksheet containing the data is named with the filename you originally specified.  The imported data points are displayed with column headings, and the polar representation of Z is displayed in the worksheet.  The scan settings are displayed at the top of the worksheet, forming a great numerical/text record of the antenna being analyzed.  (See the example shown below.)

 

 

CTRL-T  Remote-Control Scan & Data Import

The ctrl-T command uses the TeraTerm terminal program to remotely command the AA908 to perform a scan. The data collected from the scan is placed into a data file in the A908DataFiles folder on the PC, and control is returned to the AA908Plot main menu. From there, you can select the ctrl-M Plot command to display the plot of your newly-collected data file.

The AA908 must be connected to the PC with the serial cable. The AA908 must also be turned on and have the setting of “Send during scan” set in the Data item of the Setup menu on the instrument.

You must also have the TeraTerm dumb terminal program installed on your PC. All AA908 owners have this program and have it installed for software upgrade purposes as well as in using other Data features of the instrument.  (When you installed TeraTerm, the application was very probably placed in a folder with path name  “C:\Program Files\TTERMPRO”. This is where AA908Plot looks for the application and if not there will ask you where its located.  If TeraTerm is not at this location it is probably a good idea to install it there, or change the macro to look in a different location.)

 

CTRL-C  Generate Comparative Plot

The ctrl-C command generates a comparative plot of two separate data files. Operation is simple, just enter the location of the two data files when prompted, and both plots get displayed on a single graph. 

These graphs are basically XY scatter plots and so it is possible to arrange them such that all six parameters are plotted against frequency (X axis). The program uses the minimum frequency of the two data sets as the minimum and the maximum frequency of the two data sets as the maximum in determining the frequency range of the graph. So if you plot two 40 meter data sets they’ll look pretty good in comparison. If you plot a 160 meter data set and a 10 meter data set, you will not going to be too happy with the result, although it is not too likely that you would want to do that anyway).

Because there is so much going on with 6 parameters being plotted on the same graph,  the hamband indicator and SWR data point marker options were eliminated. 

The SWR and SWR2 curves are wide lines for emphasis and the Res, Res2, Rx and Rx2 lines are very thin to help the observer maintain sanity. 

As you’re looking at any of the graphs, remember that all of Excel’s functions are available to you to tinker with. For example if you would like to remove a plotted line, use your mouse to select that line, right click on the mouse and edit that series to eliminate the line, change its color, change its width, add data point markers, etc.  When you’ve got it looking right, just save the workbook with your own unique filename.

Above is a comparative plot using a test antenna circuit consisting of RLC mounted on a BNC connector.  The circuit is held firmly between thumb and forefinger when generating the second dataset.  You can clearly see the downward shift in resonant frequency and the reduction in circuit Q. Evaluating the effect of antenna modifications using before and after AA908 data scans and overlaying them using the ctrl-C macro should be very interesting.

 

CTRL-L  Determine Network Impedance Matching Data Points

The ctrl-L command determines network impedance matching data points for your antenna transmission line.  This function designs an impedance-matching L network for each data point in the data file you select.  The input to the L network is 50 ohms resistive and the other end of the network is the complex impedance of  individual data points.

There are 8 possible L configurations.  Most matching problems can be solved with 2 of the 8 and the two most desirable are the so called ‘low pass’ configuration.  These are the two primary solutions given by LNET  a third alternative (TYPE B) is also calculated and presented whenever it’ll work.  A single L network configuration cannot solve all matching problems.

Determining the sign of the reactance turned out to be a source of error.  Some of the limitations result from not being able to sample the reactance outside of the data set range,  an occasional ‘weird’ data point (s)  and the method itself.  This program attempts to smooth the data and remove ‘outliers’ but could never get all of them.

There are a lot of reactance vs. frequency inflection points in many observed data sets.

 

A screen capture of the LNET worksheet is shown above.  The three network configurations are diagrammed at the top of the page with the 50-ohm input (coax) indicated leftmost.  The TYPE column indicates the configuration, and the C and L columns contain the capacitance (in pF) and inductance (in uH)  required to build a network matching 50 ohm coax to the complex impedance in your data set Res +/- Rx.  (If R is less than zero, no design is reported.)

Depending on your dataset you’ll find an occasional point or small region of points that don’t make a lot of sense and in most cases looking at the data set it will be obvious why, generally they’ll be connected to a bump in the data that produces a reactance sign transition that possibly is not real or may not be significant to your application. 

If you want, for example,  to operate your 20m dipole on 17m you should be able to derive a workable impedance matching network using the designs from this program. Just scan your dipole (including 18 MHz ) with feedline, generate the data file, execute LNET and select a matching configuration in the 17 meter region of the spreadsheet. 

There are several  good L network impedance matching tools on the Internet and in HamCalc (by VE3ERP), but I thought it would be interesting to see the designs vary by frequency in a spreadsheet format – something none of them can provide.  Looking at the design C and design L variation with frequency can be helpful in selecting components you may already have, etc. It turned out that the spreadsheet format  provides a good overall view of the context for the design of each data point and can allow for construction of a workable L matching network for your application.   

 

CTRL-E  Select European Data Format

The ctrl-E command instructs Excel to use the “,” (comma) as the “decimal point” in the data file instead of the “.” (period) as is customary for computers in the US and UK.  Otherwise, in computers with non-US language pack settings, the data file is not interpreted correctly. 

 

APPENDIX:  Manually Importing AA908 Scan Data to the PC

The Micro908 Antenna Analyst may be configured to send raw scan data during a Scan operation over its RS-232 serial port to an external computer.  Link908 and AA908Plot are programs typically used on the external computer to plot the data on the computer screen, thus displaying convenient SWR, Resistance and Reactance graphs for the antenna system under analysis.

The raw scan data may also be collected and manually organized for additional views or for preparation into other software analysis programs.

PROCEDURE

1  Configure the AA908 to send data during a Scan – This selection can be made in the Config item called Data Options.  Select the “Send During Scan” option, then Exit.

2)   Specify the Scan Settings – Select the desired Band on the AA908 instrument.  (Remember, if the Custom Band is selected, you will also need to set the Start, End and Step values in the Setup menu.)

2)   Select “Log to File” in TeraTerm – Open TeraTerm and in the File menu, select the Log function, which prompts you for a filename to use for the data being collected/displayed in the TeraTerm window.  If you specify the data file to be located in the AA908DataFiles folder on your C: drive, you will be all set to import the data to the AA908Plot program.

3)   Perform a Scan – Using the scan button on the AA908, initiate a scan. You will see line after line of data being displayed to the TeraTerm window on the PC, representing all of the measurement points being sent by the AA908.  The scan operation will take longer because of data being sent to the PC, but it will eventually complete and the minimum SWR point will be displayed on the AA908 LCD, as normally done.

 

WHATTA TOOL!

Thanks a ton for your effort Al.  This is a great accessory program for the Antenna Analyst and a great way to archive graphic results of one's antenna work.

Back to the Micro908 Kit page


 


Page last updated:  April 28, 2007