Tuesday, November 20, 2018

Scalar Network Analyzer

I've been working on and off for quite a while now on a network analyzer using a DDS9850 frequency synthesizer controlled by an Arduino Uno.  The details for this project can be found at this website (https://groups.io/g/PHSNA) but very briefly, a sign wave is generated by the analyzer (frequency selected by the operator) which is then sent to a device under test (DUT).  This could be a filter, antenna, crystal, etc.  The output from the DUT is then hooked to a power meter which develops a voltage proportional to its input.  This voltage in turn, is fed back to the analyzer where it is converted to digital counts.  A transfer function representative of the DUT can then be created from the collected data points covering several frequencies.  I had previously built a power meter a couple of years earlier (RF Power Meter) so I was all set.

I purchased a blank analyzer PC board, ordered the parts from various vendors and then assembled it.  Interfacing software had already been developed to run on a Windows platform so using this I fired up the hardware for initial testing.  Almost immediately it was apparent that operation was erratic from one test run to the next so something was up.  I quickly tracked this down to an intermittent solder joint on one of the toroids in the output filter stage.  Once this was corrected, everything appeared to work fine.  I was able to select a specific frequency, transmit that info to the Arduino over a USB serial interface (which subsequently communicated with the DDS module to generate a sine wave) and observe the output signal on my scope.

As a final test, I hooked up my power meter directly to the analyzer and ran a sweep function covering 1-30MHz in increments of 50kHz.  At each frequency, the power meter converted the incoming signal into a precise voltage proportional to its amplitude.  This voltage was then fed back into the analyzer for processing.  A graph was then created representing the voltage level (ie. power level) at each frequency point:


The actual "raw" output of the network analyzer is in blue and varies from a peak of ~4.0dBm down to ~3.1dBm across a 30MHz span.  This drop off in signal level is just the inherent output response of the analyzer.  To correct this, a mathematical "fudge factor" is added using a 5th order polynomial curve fitting algorithm to provide for frequency compensation and to normalize the curve to 0dBm. This eliminates the drop off and flattens out the response.  The red line represents this adjusted or compensated output.  Now, whenever a DUT is being tested a more accurate assessment of its frequency response can be made.

Update (July 2023)
I recently began making some low pass filters for a QRP transmitter I was building.  A total of three were needed (one per amateur band): 20m, 40m, and 80m. These are 7 element filters and were purchased as kits from QRP-Labs (www.qrp-labs.com) for about $5.00 each. 

20m, 40m and 80m LP Filters


After they were finished, I wanted to test each one on my SNA jig for its frequency response.  A sweep test was run for each, data was collected in a CSV file and then a graph showing attenuation as a function of frequency was created in Excel.  

Below are the results of my testing. Very nice responses overall. 



Friday, November 16, 2018

AD8307 Power Meter Update

In an earlier post (RF Power Meter), I discussed my power meter project which is based upon the amazing AD8307 logarithmic amplifier chip. This device takes a logarithmically scaled RF input and produces a linear DC output with a resolution of ~25mV/dB.

Well, I'm finally able to put this project to bed. After scratch building an initial board, I decided to go with a much cleaner solution by purchasing a pre-fabricated board from E&M Solutions. The finished board is shown below:
Completed board with RF shield covering log chip and input stage
The circuit board provides two ways to show the power level of a signal: an analog panel meter for an approximate reading plus a DC output jack for use with a DVM when I need more accuracy. In order to improve the overall resolution of the output, the board uses an op amp with a trimmer pot to produce a gain of ~2.1 to boost the AD8307 output to 5V when the maximum expected input signal is applied. The panel meter circuit has an additional trimmer pot to adjust the meter sensitivity. After adjusting both of these trimmers, whenever an input of 10dBm (10mW) is detected I should read 5.000V with my DVM and the panel meter should be at full scale.

Next, it was time to tackle the meter calibration. This required applying a known signal level, recording the output voltage, attenuating the signal by a specific amount, then recording the new output voltage. The response of the AD8307 could then be characterized and represented by a linear equation with an exact slope and y-intercept.

Previously I had built a neat little CMOS reference oscillator that puts out a square wave with a precise power level of -10dBm @ 10MHz. I used this tool to assist in the final calibration of the board. Applying this signal to the input of my meter produced 3.95V at the DVM output. Next, I removed the square wave reference and replaced it with a 10MHz sine wave oscillator I had also built earlier (Sine Wave Oscillator). I adjusted the amplitude of this signal source until it matched the power level output by my square wave reference. Now, with a sine wave of -10dBm as my signal source, I attenuated the signal by 20dB. The DVM output now read 2.87V. (Note - attenuating the signal from the square wave reference oscillator would have given inaccurate results due to design constraints with the AD8307). After a bit of math, I calculated the slope and y-intercept values. The final "response curve" for my power meter can now be represented by a simple, linear equation:

power (in dBm) = 18.5 x (voltage reading from DVM) - 83.15