Saturday, April 15, 2017

The SA becomes the SNA jr.V.3 for now UPDATE 4-17

I have been working on the Spectrum Analyzer, and had hoped to get it done in time for the FDIM  'homebrew' contest. Between wrong parts shipped , or not arriving in time, along with software problems it did not look like I could get it finished in time. So on to plan B.  I have gotten great response for the SNA Jr version 2, and even quite a few from people who have built their own version.  The most common requests for changes, are a larger screen, and higher frequency coverage.  I have the nice 2.8" screen and basic display routines from the SA, and I still have a couple Adafruit si5351 modules left from several other projects. The si5351 would give me frequency coverage to over the 2 meter band, but it has a square wave output.  From early experience in a simple K6BEZ style antenna analyzer I built a couple years ago, I had found problems with harmonics from the square waves. 

Looking around the web, I saw some information on an antenna analyzer by IW2NDH.  It used two clocks on the si5351, one at the test frequency, and the second offset by the frequency of a simple crystal filter.  This second clock is fed to a mixer, and the output goes through a crystal filter before being measured by an AD8307 LOG detector. This should remove the harmonic problems I had found with the earlier circuit.  It also had a built in directional coupler, instead of using an external RLB like I used with the SNA Jr II.  I made a few changes and came up with this block diagram.

Looking at the block diagram, I realized by just using the second clock, the mixer and crystal filter, it could also be used as a basic measurement receiver.  This might be adequate for measuring the harmonic output of a home brew transmitter.  

Basic functions to include
SNA  1 to 150 Mhz.
Antenna analyzer (SWR only)  1 to 150 Mhz.
Measurement Receiver  1 to 150 Mhz. there will probably be some unusable area around the IF frequency I select.

Since I still have some problems with some of the libraries for the stm32 board, I will go back to the old reliable Nano.  This will mean adding some level translation between the Nano and the display, and having a slower update on the screen.  But, I will live with that.  I added a couple of relays to change functions and to add a switched input attenuator.  I went with a 3 crystal filter, and added pads for several attenuators that I might need to properly terminate the filter and mixer stages.  I laid out and after a couple of tries I etched a single board that should do the job.  

The software is coming along nicely, I could use most of the display routines I had for the stm32 board, and also pulled in some of the code from the SNA Jr II.  Still going with the joystick instead of a rotary encoder for the input device,  It is much faster and easier to use than the encoder.


Here is a picture of the partially populated board being tested with just the display and si5351 connected.  Things looks fine so far, so I will probably have something for FDIM

UPDATE  4-17-17 

I had a little trouble getting the si5351 library to work after I copied some of my earlier code into this sketch.  The version I had been using is almost 2 years old, and the newer version has some major changes.  After making them most things looked OK except the frequency was off.  My frequency selecting code uses a resolution of 1 Hz., and after re-reading the documentation for the latest version of thesi5351.h file I saw that it has a resolution of  0.01 Hz. Just a quick multiply by 100 from the computed value to the value used to set the 5351 frequency took care of that. 

I needed to make a directional coupler, and used the instructions for making a VNA directional coupler at   www.oh6hgn.net/Miten_kaamia_VNA_muuntaja.pdf
Except for the number of turns through the core, this is basically the same as I used in my SWR/Power meter.  After building it, and installing on the PCB, I made some measurements to check how it worked.  
The small AD8307 power meter probe I built last year worked great for the job.   The difference function I added to the software made it very easy to check the coupling loss. I measured a  unloaded output level of around 12 dBm. in the center of the frequency range. Depending on frequency I measured around 15 - 18 dB. coupling loss from the through signal with no load,and around  40 - 44 with a 50 ohm load.  These values look usable, and probably are affected by the harmonics in the square wave, and possibly an impedance miss match on the input to the coupler.  I built in pads on the board for a small attenuator before the directional coupler.  I will solder in resistors for about 6 dB. and see if that makes a difference.
I checked the AD8307 log amp output with a voltmeter, and the values look very similar to what I found with other power meter circuits I have built.  Next to copy some of the code from the SN A Jr 2 software to get that working and do a simple sweep of the output of  the si5351.  Then to build the mixer/filter circuitry and test them





4 comments:

  1. Very interesting project Duwayne. Are you planning a switched bank of LFPs after the oscillator to eliminate harmonics?
    / Gerry

    ReplyDelete
  2. No, not planning on using LPFs. When doing a sweep the signal sent to the DUT and LO frequencies are both changed to maintain the IF frequency of the crystal filter. This way, only the fundamental frequency is measured.

    ReplyDelete
  3. I don't now if you have seen this project, DuWayne?
    https://bitbucket.org/kuchura/eu1ky_aa_v3/wiki/Home

    It has some similarity to your design, in that it has an IF stage, but it seems to downconvert to AF baseband for direct sampling rather than using a detector IC. This couldn't be done by an Arduino, but perhaps a Teensy? Although these STM discovery boards are very cheap.
    / Gerry

    ReplyDelete
  4. That is similar to the VIA by the Austin QRP Club. There is a kit available for this at http://www.qsl.net/k5bcq/Kits/Kits.html The kit does not include the STM 32 discovery board. I purchased one of the kits at FDIM and it is in my box of unbuilt kits. Another interesting VNA is the VNArduino info at https://hamprojects.wordpress.com/2016/02/21/hf-arduino-vna-english-version/ Follow some of the links you can find the original Russian version but you need to use Google translate to read the articles

    ReplyDelete