Antenna Analyzer

Test and Measurement Equipment Concepts

Cloud ∇ is my homebrew approach to automated test equipment that uses a computer cloud interface for control and display. Automated test instruments are better than people to perform tedious measurements and prepare the results in a user friendly format for display. The concept is an integrated package of instruments capable of automatically measuring, analyzing data as inputs, processes it according to instructions stored in its memory before providing the results to a web browser using the same communication standards used on the Internet. Communicating like the internet means you can use any computer with your favorite browser (MAC, PC, Laptop or Tablet) to control Cloud ∇ equipment.
Cloud ∇     Vector Antenna Analyzer      Model 60
VAA 60 Front Panel
VAA 60 Front Panel
This is a different approach to a classic problem, how to make a control panel and display for a do-it-yourself electronics project. In this case I wanted a Vector Antenna Analyzer for antenna testing with high quality data graphics and data file exports. This many seem too extreme, but just about every radio made today is controlled by a computer (microprocessor) and the user pushes buttons for control and a liquid crystal display provides the status. Even the big frequency knob everyone has is digital encoder wheel just like a computer mouse! Some radios take this another step with an internet ready interface, after all the radio doesn’t know if you are in the same room or another country. Remote operation via the internet is now the norm for many business applications, however for most people it is totally new technology, the “Cloud”. Over the past few years has the Cloud become the standard term for the general public. The problem is that most people do not know what the Cloud is unless you are an information technology professional. You probably have no idea what the Cloud means or how to use it, but you actually use it every day.
What Is the Cloud?
 Cloud technology is when the computer performing your requested task is some other place. The computer you are sitting at is only a control panel and display. Think about every time you have used your computer to find a product and order it online, you are already using Cloud technology. Yes it is that simple. You are controlling a process at another location and getting the results sent back to you using your computer. The software you need is free, it is a web browser. All you need to know is how to point and click.
My approach was to build a Vector Antenna Analyzer for antenna testing with high quality data graphics; sweeps, frequency plots, Smith charts, alerts and data file exports using a web browser on any platform; MAC, PC, Tablet and even a cell phone. The key element is the analyzer controls and display are a simple website sever to communicate with any browser. I selected HTML 5 to support graphics displays which is compatible with; Internet Explorer 9, Chrome 3, Firefox 3, Safari 3, Opera 10 and Android 3. What this means is anyone who purchased their computer after 2009 is fine. The XP OS users need to load Chrome or Firefox.

What is Cloud ∇ Vector Antenna Analyzer?
A Vector Network Analyzer 60, (VNA 60) is an instrument used for antenna testing applications. Based on a variation of measuring RF impedance by means of the three volt method using a Wheatstone bridge that can determine both amplitude and phase of reflected signals.
Therefore the name Cloud ∇ is a combination of the “Cloud “ for communication with any browser and the symbol ∇ (Nabla) used in mathematics to refer to a connection in differential geometry. The “60” represents the maximum operating frequency of 60 MHz.

Operator Displays using Web Browser

The following step through of the browser screens the VAA 60 user will see in normal operation.  A printout of a full sweep report for the same antenna is available in PDF here.

The first display, shown below – Reports the results of several self-tests and presents the Analyzer Operation Mode Selection. Automatic Frequency Sweep or Single Frequency operation maybe selected by button.

f you select Automatic Frequency Sweep operation the next display is Start of Sweep Input, shown below - Starting frequency maybe selected by Band or typing in any frequency in KHz between 1,700 to 59,000 KHz.

Stop of Sweep Input is diplayed, shown below - Stopping frequency maybe selected by Band or typing in any frequency in KHz between 1,800 to 59,999 KHz.

Then Step Size of Sweep Input is displayed, shown below – The frequency change between each measurement maybe selected by button or typing in any KHz value between 1 to 999 KHz.

After all the sweep parameters are entered the Start and Stop Frequencies, Step Size and estimated duration of the sweep is displayed for operator review prior to starting the sweep, shown below. The next action selection, Continue Processing Sweep or Change Sweep Setup maybe selected by button.

Five graphs displayed in Automatic Frequency Sweep mode, are shown below – VSWR range 1 to 9.99 is plotted over frequency. R, X and Z range 0 to 499 Ohms are plotted over frequency. Phase range -90 to +90 degrees is plotted over frequency. Real-time values for each plot are displayed at the left with frequency gradient.

A 20M VSWR graph is displayed below for a Gamma match feed as an example. The values at the left are the last frequency measured at 14,350 KHz as the sweep has been completed.

A 20M Smith Chart is displayed below for a Single Frequency for the same example. Smith Charts are plotted for both Automatic Frequency Sweep and Single Frequency operations.

A 20M Single Frequency Antenna Tuning Display is shown below for 14,200,000 Hz. With a complex load as an example. The values at the bottom are the real-time measurement at the frequency. The bars change color in 256 steps from green to yellow to red independently with respect to ideal match. Smith Charts are generated for both Automatic Frequency Sweep and Single Frequency Antenna Tuning modes.

Using a Web Browser has practical exceptions
Remember my approach was to build a Vector Antenna Analyzer for antenna testing using a web browser on any platform. There are always a few exceptions like the On-Off switch and power indicator, see the front panel picture below. Two more exceptions were added during development; 1) Stop Sweep button that allows the operator to exit a sweep without losing any data. Sometimes after a sweep is started you notice you forgot to connect the antenna, you hit the button and can repeat or modified the sweep without data loss. 2) The VSWR Beeper switch is a 3000 Hz tone that starts at 2:1 VSWR, increasing in loudness to full volume at 1:1. A tuning feature for people like sound and some do not like beeps, therefore the switch.
VAA 60 non-Web Browser Interfaces

Comma Separated Value Sweep Data
Comma Separated Value (CSV) is the standard simple file format that is widely supported by consumer, business, and scientific applications. Many programs support some variation of CSV at least as an alternative import/export format. To use this data simply highlight the data below, COPY and PASTE into the application you wish to use. CSV data format is KHz = Frequency in KHz of data point sampled, Voltage Standing Wave Ratio = VSWR ratio referenced to One, R = Resistance in Ohms, X = Reactance in Ohms, Z = Impedance in Ohms, the sign of Reactance and Phase Angle are indicated as positive or negative = ( “+” or “-“  ), Phase = Phase Angle in electrical degrees, (90° = 1/4 of a wavelength) from a point of minimum resistance. Positive (Inductive) degrees leads (towards the transmitter) and negative (capacitive) degrees lags (towards the antenna), % RFLD = Percentage of Reflected Power , % RAD = Percentage of Radiated Power (Power available after match loss) and RL dB = Return Loss in dB. CSV data is generated for each Automatic Frequency Sweep operation.

The internal Hardware Layout and Parts list is shown below. Almost all off the shelf items glued together with software. The exception is the diode bridge and comparator filters inside the copper shield enclosure attached to the N connector at the bottom left.
Parts List
Main Processor Arduino Mega 2560
Ethernet W5100 Arduino Shield
DDS and amplifier Am QRP DDS 60 based on the AD9851
Stop Switch Red Push Button SPST
VSWR Tone 3KHz Pezio Buzzer 3-12 VDC
VSWR Tone On/Off mini SPDT
N RF Panel Connector
Power Connector to Mega Plug 2.1 / 5.5
Power Connector to front panel Jack 2.1 / 5.5
100-240 VAC Wall Power Supply output 12 VDC
7808 Serires Regulator on 2 X 3 heat sink
Power Switch Green Push Button
Power Indicator 10mm Grn LED
Large filter capacitor electrolytic 1000 uF @ 35V
PCB for detect / comparator filters
1N270 Diodes for detector
Carbon Resistors 1/4w film
Headers and Perf Bd for jumpers
Hook Up Wire #24 AWG
Screws, Washers, Nuts, Standoffs
10 Ft LAN Cable Ethernet
Case ABS 5.6 × 8.8 × 1.6 inches

Interconnection - There are just three header to header jumpers plus power as shown below. The pin numbers and function are listed in the same order on each end for clarity.

Wheatstone Bridge and Detectors
The analyzer is based on a variation of measuring RF impedance by means of the three voltage method using a Wheatstone bridge that can determine amplitude and indirectly phase of reflected signals. The bridge has two matched value 47 Ohm resistor at the left and two 100 Ohm 1% resistors to get close to a 50 Ohm reference. There are just three detector diode / capacitors as shown below to find the RF voltage peak value at three points. The CW signal used to sweep the antenna must be clean, minus 30 – 35 dBc for all unwanted energy as the detector measures Vp from everything. After many tries at building a clean and wideband DDS (AD9850, AD9851) and amplifier the best I could do was -29 dBc. The problem being 1 to 60 MHz and clean! Cutoff filters normally used for transmitters were not the answer as they are not useful for a wideband application. I started looking for how others had solved this problem and found the AM QRP DDS60. The DDS60 gives 10 dBm output with a clean -40 dBc from 1 to 60 MHz, well done! Several times my shield connection to my antenna was intermittent with both SO-239 and N connectors. I used lock and star washers, ½ copper braid jumpers, but still had problems until I drilled and soldered to the chassis flange of the N connector.

Detector Comparator Filters
I learn to keep everything compact for bridge and filter, my best results required everything on a PCB about the size of a penny. The Mega A/D input impedance is approximately 400K Ohms based on my tests. I needed a pull down resistor to prevent the input from float around three volts. Using a 1 Meg resistor pull down gave a settling time of 10 mSec for 10 MHz frequency changes and 2 mSec for 100 KHz frequency changes. This delay was addressed by a software fix adding ten readings on this first frequency before starting each sweep. The filter PCB is shown below.

The first thing to decide is microprocessor development family before addressing the software; Arduino, Raspberry Pi, PIC or others. Review the interfaces you will need and the tolls available, “development environment”. I went with the Arduino because it is well documented and a standard Ethernet interface was available. If I was starting today the Raspberry Pi could be a better solution, but I don’t have all the details to make a decision. Be careful each compiler treats some characters differently you will discover through experience strange problems caused only in your application. Examples are; quotation marks (single, double, left & right handed), brackets <([{}])> have special meanings, and spaces to name a few. Another issue are browsers, sorry to report not all browsers are equal in displaying your carefully formatted page. I tested using IE, Firefox and Chrome to weed out special cases that I later found are known exceptions. Firefox Hangs sometimes in combination with some antivirus programs, the virus scan that Firefox starts after files are downloaded may cause Firefox to hang. You need to disable virus scan in Firefox preferences. Chrome requests favicon on every connection which looks like a second unexplained client connect. Internet Explorer does not support all HTML tags (format information) and some styles. A specific Arduino issue is the W5100 Ethernet card has a buffer overflow issue that has a work around and I have read there is a fix with newer compilers. When developing software keep in mind modes & states and do some serious planning before you code. I know flow charts (see mine below) are not used today but they are a great tool to think out functions before you code.

How do you find the resistance, reactance and impedances?
Warning do not read this section if you are an engineering purist!
The simplified equations used in this antenna analyzer are approximations commonly used in Amateur Radio projects and work fine 99% of the time, the other 1% is called error margin. One percent error would be great, but the biggest error comes from the diode detector. I will discuss the diode error later, for now let us look at how to find the resistance, reactance and impedances.

Z = Unknown Antenna Impedance - Finding the value for Z is determined by a voltage divider circuit. Just like 15 VDC dividing between a 5K and 10K resistor shown in the figure below the V out is an unknown resistor, but the voltage to different parts of a circuit can be measured. Knowing the voltage ratio between the two resistors, you also known the Z ratio. Just multiple the Z ratio times the known resistance to find Z.
Unknown Antenna Impedance = Known Resistance X ( V antenna / V resistor )
Z = 50 X Va / Vr

Finding Unknown Voltage Standing Wave Ratio = VSWR is measured using the diode bridge circuit. No energy is reflected when the bridge is balanced (0 volts across the center) only when the antenna exactly matches the 50 Ohm impedance from the two 100 Ohm in parallel. When an antenna and 50 Ohm reference do not have matching impedances, the reflected power increases and is measured as V reflected.
VSWR = Unknown Antenna Voltage Standing Wave Ratio
The result VSWR is a ratio of the differences of forward and reverse voltages equal to:
VSWR = ( V forward + V reverse ) / ( V forward - V reverse )
Antenna Resistance = R
The VSWR resulting from a PURELY RESISTIVE impedance mismatch is equal to:  VSWR = Z1 / Z2.
Example for a 100 Ohm resistive antenna match to a 50 Ohm resistive transmitter;
VSWR = Z1 / Z2 = 100 / 50 = 2 or 2:1 ratio
Example for a 25 Ohm resistive antenna match to a 50 Ohm resistive transmitter;
VSWR = Z2 / Z1 = 50/ 25 = 2 or 2:1 ratio
Looking at the Phasor diagram below if the antenna is purely resistive, you would see a horizontal line ( Z = R ). However with complex impedances of R + X the Z is equal to SQRT(R^2 + X^2) where R is the real part of the impedance and X is the reactive part.
The VAA 60 VSWR is referenced to 50 Ohms, so some of the variables can be replace with fixed values.
Doing some algebra these equations can be rewritten knowing Z and VSWR to find R equals;
R = (2500+Z^2) X VSWR/(50 X (VSWR^2 + 1))

Antenna Reactance = X
Knowing the values for Z and R it is possible to solve for by doing some algebra to the equation Z = SQRT [R^2 + X^2]. This is just some trigonometry you once had in school, for any right triangle the sum of the sides square equal the hypotenuse squared. In this case it can be rewritten knowing Z and R to find X equals:
X = SQRT (Z^2 – R^2)
This method does not determine if the reactance is inductive (+X) or capacitive (-X) and the bridge does not provide any parameter to find sign. The solution is to have the analyzer's software determine if the reactance it measures is actually capacitive or inductive by tracking changes in reactance and comparing them to change in frequency. This is the same method operators’ use on manual analyzers to find the sign of X. You find the sign by simply adjusting the VFO. If increasing frequency causes reactance to decrease, the load is capacitive (-X) because the reactance of a capacitor decreases with an increase in frequency.

Vectors or Phasors = Antenna Magnitude and Phase
Antenna Magnitude and Phase are based on the Phasor diagrams below and solving for the unknown values. The Phase is the arctangent of the ratio of X and R as illustrated by the far right vector diagram. This sound and looks difficult, but the magnitude is already known as the Z. The phase is determined by the ratio of R and X that is now known. This is just some trigonometry you once had in school, for any right triangle the ratio of the sides will determine the angle.

Diodes, the primary source of the VAA 60 errors
Have you ever wondered why you need 10 Watts to tune an antenna? Most circuits used to detect reflected power from an antenna use a bridge or directional coupler connected to diodes. The diodes produce a voltage for forward and reverse power that are compared to determine the VSWR.  The problem is every diode has a voltage drop (V fwd) when conducting that is not though of very often unless you are using the diodes in an antenna analyzer. At 10 W CW into a 50 Ohm load there is 23 V compared to 0.3 V diode drop error. Looking at the VSWR 2.00 : 1 for 10W, but dropping the forward and reverse voltages by the 0.3 V diode the answer becomes VSWR 1.95  : 1. This error is so small and most dial meters are so small no one notices.

The VAA 60 VSWR uses a CW output near 10 mW.  At 10 mW CW into a 50 Ohm load there is 0.71 V compared to 0.10 V diode drop error. The diode V fwd drop is less because the current is reduced, see the 1N270 V fwd curve above. Looking at the VSWR 2.00 : 1 for 10 mW, but dropping the forward and reverse voltages by the 0.10 V diode the answer is VSWR 1.15  : 1. This error is so big it must be compensated for any useful measurements. Starting with selecting the diodes with the lowest voltage drops and finishing by adding a correction equal to the V fwd drop the end result is an acceptable error margin when working in the 10 to 50 uA range. At the end of the day the typical total VSWR error is; an exponential curve staring at 1% @ 1:1; under 5% @ 4:1; and under 9% @ 10:1, see the VSWR Measurement Accuracy chart below for more detail.
If this discussion about VSWR error is too esoteric look at the typical VSWR meter shown below. Notice how the width of the needle is the difference between 9:1 and 10:1. Miniscule changes in high level of reflected power make a big change in the VSWR number. Although the errors I discussed are small, when displayed a digital number on a screen instead of a dial it seems more important than any tangible usefulness. In the real world of amateur radio antennas 9:1 or 10:1 is the same mismatch and it was never an issue until digital displays became common.

The Z measurements also have errors due to the V fwd drop, but with both diodes conducting the correction is in the linear region of the diode curve working above the 50 uA range. and very predictable. The Z error only becomes an issue approaching 10:1 impedances (5 Ohms and 500 Ohms) when the correction moves to the bottom of the curve. The typical Z error is; an exponential curve staring at 1% @ 1:1 (50 Ohms); under 3% @ 5:1 (10 to 250 Ohms); and under 5% @ 10:1 (5 to 400 Ohms), see the Impedance Measurement Accuracy chart below for more detail.

One more source of error related to diode voltages
This was a problem of stray inductance and capacitance resolved by physical construction and best explained in pictures. The following is a history of the bridge detectors refinements in pictures. The first bench prototype, shown below, was point to point wiring spread out over four inches between connectors. The input was a signal generator and DVM for voltage readings for proof of concept.
The second bridge detector was on a 1/10 Inch perforated board with an area of 1 X 3 Inches, shown below. The resistor bridge was kept near the S0-239 connector for the antenna. The CW signal source was an AD9850 DDS via the header connector at the top and voltages measured by the Arduino A/D header on the left. Working hardware to a limited VSWR range, but allowed software to be developed.
Then my first printed circuit board bridge detector with an area of 1 X 2 Inches, shown below. Again the resistor bridge was kept near the N connector for the antenna. The bride, detector and filters all on one compact location reduced measurement errors and noise on the three voltages. After months of missteps I found the bolt at the bottom was not a good electrical connection. Even with lock washers and a star washer at the PCD copper it was an LR network. The eye lug at the top was a work around but never a good answer, so my measurements had the antenna and some unintended inductance and resistance.
In the end I learned by bitter experience to keep everything compact for bridge and filter, my best results required everything on a PCB, shown below, slightly bigger than a penny. This was the best answer I found for the most accurate voltage measurements and noise suppression. Connecting the PCB with solder copper standoffs directly to the N connector. Only clearance was left between the PCD and N connector to solder the center lead. The N connectors I selected have a potted center conductor that does not move during mating like the standard SO-239 panel jack. The resistors, diode detectors and filters are all in an area 1 X 1 inch with the resistors closest to the N connector center lead. These changes tripled my worst case (10:1) voltages and had no impact on my 1:1 voltages. This was the last part I was missing in deciphering and eventually compensating for my measurement errors.

Homebrew is an amateur radio slang term for home-built, noncommercial radio equipment. Design and construction of equipment from first principles is valued by amateur radio hobbyists for educational value, and to allow experimentation and development of techniques or levels of performance not readily available as commercial products. To build or to buy, that is the fundamental question for DIY projects. You will not be savings money and the time required build and test will detract from other activities. DIY a false economy so why build? Most things in life are store bought and you get what you get, custom tailored is no longer common place. It is all about rewards of meeting a self-determined goal, not money. Build is just one more facet of the hobby. DIY building offers some advantages, self-build gives you greater control over the functions or features. You can be as specific as you want about and set the whole thing up however you fancy. One unintended consequence with DIY projects, if they succeed is they are very educational.
In the comparison of features is never a simple yes or no and performance is more complicated quality because manufacturers specifications are not uniform. Looking at catalog and magazine advertisements is a waste of time as they never are a direct comparison. In the end I surveyed users’ reviews to develop a list of things I wanted and what to avoid. My custom list is the Cloud ∇ approach with the high quality data graphics; sweeps, frequency plots, Smith charts, alerts and data file exports using a web browser on any platform. My self-imposed design specification was 5% or +/- 1 Ohm whichever is greater.
An antenna analyzer used in amateur radio needs relative accuracy for antenna alignments, but not necessarily precise. Resonance is still at the point of lowest or zero j and your transmitter will work better with a lower VSWR. When it comes to matching circuit design a measurement needs to be both accurate and precise. In addition to accuracy and precision, measurements also have a measurement resolution, which is another design or feature choice. I elected to report VSWR to 1/100 ths and Z, R and X as integers. My reasoning is it is helpful to see small changes in VSWR during tuning and the Z, R and X factional values tend to jump around constantly and are just an annoyance.
With what seems like hundreds of antenna analyzers on the market there must be a standard way of specifying performance in the opening credits, right? Most industries have a de facto standard, right? It seems in the consumer world both common sense assumptions are wrong!. Except for the top end (above $5,000) commercial analyzers, most consumer analyzers I looked into are just selling with no rules. If you like it buy, if you don’t like it that’s fine. The only standard I can find is the measure of the market place based on the consistent testing of ARRL Labs and published in QST and some ARRL books. Using past reviews I did my best to make apples to apples measurements shown in the table below just to see how I compared. I was actually surprised on how well the VAA 60 looked or how many commercial analyzers do well in the market without accuracy. Either way this is the real world answer.
Comparison of VAA 60 to Commercial Antenna Analyzers
(Right Click to Enlarge)

VAA 60 as built Performance Specification*
Frequency range: 1.7 to 60 MHz
VSWR measurable range: 1:1 to 10:1
SWR accuracy: better than 10% (see error curves above for detail)
Z Impedance range: 5 to 500 Ohms
Impedance accuracy: better than 5% (see error curves above for detail)
X measurements including magnitude and sign
Phase measurements including sign
Frequency Plots displayed for VSWR, R, X, Z Phase
Smith Charts Plots displayed
PC Data Output of Plots or as CSV data (MS Excel Compatible)
External Power Supply 100-240 VAC 50/60Hz
Size (HWD): 5.6 × 8.8 × 1.6 inches, weight 1.5 lb.
Computer Interface: Ethernet RJ-45
System Requirements:
Web Browser: Internet Explorer 7, Firefox 3.x, Chrome 4.x, Safari 3, or later browsers
OS: Windows 10, 8, 7, Vista, XP or Mac OS X 10.6 or later operating system
* More truthful than most!     

Homebrewing Conclusion
I will make this an official conclusion, building your own antenna analyzer is NOT RECOMMENDED. I built mine because I want a challenge. I got my challenge plus the frustration of not having the test equipment to properly understand my results. I was forced to work by trial and error with many squandered hours used for false investigations. They say if it doesn’t kill you it makes you stronger. I say thing make sense after you figure out the problem. If you must build use a many off the shelf components as possible and develop the minimum needed to get some functions working. Gradually add move functions after you have something working. Looking at my block diagram you can see in the end I only developed the bride detector and filters on the comparator inputs. If you must try, a good starting point is the antenna analyzer in the ARRL “Ham Radio for Arduino and PICAXE”, SWR Scanner and modify it to your needs after its working.

Homebrewing your own Code
Again, I will make this an official conclusion, building your own antenna analyzer is NOT RECOMMENDED! If you know nothing about building RF hardware, microprocessor or HTML, this is not where you start. Start with another analyzer or well defined kit get it working, then modify it. The same one step at a time applies to software. The following examples of Arduino web server code will run without modifications or inputs are demonstrations on the Arduino Mega 2560 and a W5100 Ethernet Shield, expect Example #4. You will need to connect to your computer and web browser using an IP address ( ). There many ways to accomplish this IP connection, click here for some basic methods. Later when you are more experienced you access your micro sever over the internet using port forwarding. These examples were selected so you do your own customization later on as the code is commented. 
Example Arduino Code #1  “micro Web Server Message Board”
This is a very simple web server that generates a message board to anyone connecting. It does not require inputs or have controls. It was an electronic bulletin board for a club Field Day activities. It could be modified to report remote repeater battery and room temperature by adding text followed by reading and printing analog values.
Example Arduino Code #2  “Simple Web Server controlling Lights by Nitin William VU3GAO”
This is a very simple web server that controls four pins to anyone connecting. Inputs are made by mouse clicks on buttons with text name functions. When a button is clicked once pin output is updated (on or off). The display does not change, although a page refresh occurs with each click.
Example Arduino Code #3  “micro Web Server Control and Display Demonstration”
This is a single page web server that primarily demonstrates many possible controls formats and styles to anyone connecting. The displays are input feedback; range limits, pattern or filed checks with operator help balloons. Radio Buttons (click on the choice from a list), fill in the blank fields, and ICON buttons are used. (HTML RADIO BUTTONS for preset values) All inputs are used to control pins or enter values of numbers or text fields. A selection with and without display status updating are demonstrated.
Example Arduino Code #4  “SWR Sweeper by Alan Biocca W6AKB”
This is a sweeping VSWR meter with LCD graphic display for the ARRL book “Ham Radio for Arduino and PICAXE” The book is about project-building for radio amateurs using many platforms including the Arduino.
Example Arduino Code #5 is  “micro Web Server VSWR Plotter”
This is a simple web server that generates a VSWR plot vs. Frequency to anyone connecting. This server will run without inputs as a demonstration. The code includes the calculations to Plot VSWR values from inputs of; VSWR, sweep start frequency, sweep stop frequency, sweep step size.
Example Arduino Code #6  “micro Web Server Smith Chart + Plotter”
This is a simple web server that generates a Smith Chart to anyone connecting. This server will run without inputs as a demonstration plotting an arc. The code includes the calculations to Plot Smith Chart positions from inputs of; Resistance, Reactance and lead or lag (sign +/-).
Example Arduino Code #7  “micro Web Server Bar Chart”
This is a simple web server that generates bar graphs for antenna analyzer values to anyone connecting displaying; Voltage Standing Wave Ratio, resistance, reactance and complex impedance (magnitude and phase).  This server will run without inputs as a demonstration displaying dynamic bar movement and color changes with respective numerical values. The code includes the calculations to display color changing bar graphs and text values from inputs of; Voltage Standing Wave Ratio, Resistance, Reactance, and Complex impedance (Magnitude, Phase, and lead or lag)

Sensor Design Continues to Develop

AD8307 replaced diodes on Wheatstone Bridge

Over a period of a year many attempts with the same Wheatstone bridge modified by using AD8307’s instead of diodes, as shown above, were tested. The  Wheatstone bridge approach ultimately failed to measure more accurately at high impedances due to the bridge load imbalance from the AD8307 placed on the bridge. At first glance a software based correction should have been a clean solution to back out the AD8307 load, however the results were still inconsistent. The issue was likely coupling in the PCB, variations in components, or generic measurement errors that could not be isolated. Later attempts to mitigate the extra load by changing the bridge resistor network values caused greater errors likely due to component variations. 

Final Sensor Design

Now all the redesigns have now passed and the parts are now in the scrap bin, I ultimately reaching the range and accuracy results desired. The solution was to replace diode based Wheatstone Bridge with a Stockton directional coupler for VSWR, plus a series resistor divider form impedance as shown below. I was on the correct path with the AD8307 but the sensor design was wrong for a low impedance measurement device.

AD8307 based Stockton directional coupler with series impedance comparator

The difference between the 1.05 : 1 and 10 : 1 (5 or 500 Ohms vs. 50 Ohms Resistive) is over 30 dB is no longer a problem for the AD8307 logarithmic amplifier that has the potential of 92 dB range. The 10 bits Arduino analog to digital converter accuracy is now the limiting factor in the design. I found that averaging multiple A/D samples addresses the sampling least significant bit errors and then get to at least 20:1 with accuracy approaching  1/10 dB accuracy and 40 dB range. I cannot increase my range as the DDS noise floor becomes dominate in the measurements. This is a limitation of a wideband design but it exceeds my needs for antenna testing. In simple terms it works and it is not important to distinguish between 23:1 and 25:1 VSWR for my testing.

 Hardware Layout, inset showing AD8307 based Stockton directional coupler

I have tested with 5 to 500 Ohms test load and random complex loads from 1 to 62 MHz. Even though it is handmade prototype with discrete components it is accurate. 

Note: the resistors are ¼ Watt @ 1% and the toroid is type 61. My RF and digital grounds are isolated and all AD8307 inputs are via 0.01 uF capacitors.