Thursday, April 27, 2017


I was working on the SNA  Jr. version 3 circuit board, and did something really stupid.  I had been checking linearity using several in line attenuators.  Just set the different values I was not using at the time down on the desk.  Then I sat the still powered up board down on top of them, there it was the "MAGIC SMOKE'.
I guess it is time to build a case for the boards, before I do something stupid again.  
I had  a design for the side panels I had used for other projects.  It has slots for a top and bottom made from circuit board material that just slide in.  It also has a board slot for holding the circuit board at the correct height in relation to the top. It was just a matter of changing some dimensions and printing them.  I also designed and printed simple end pieces with a lip to help protect the SMA connectors for RF in and out signals.

I wanted a bezel around the display, and something to cover the hole where the Joystick comes through the top panel. 
 After a little playing around with the design software, I came up with one that would do both.  I then decided to also add mounting posts for the Joystick to the bottom of the bezel. 

 This is the reason I bought a 3D printer in the first place.  No more looking for and trying different stand-offs or other bits of hardware to make some thing kind of fit.  Just design exactly what you need and then print it. It might take a couple of tries but, I can usually come up something that works and looks nice. The first try almost worked, except that I could no longer get at a connector mounted on the main board.  So I moved the Joystick mounting posts a little and change the orientation, and the second part worked just like I wanted it to.  

The display mounted to the bezel correctly,  and I have a lip on the bezel to cover the hole in the top panel for the display. The Joystick comes through the top of the bezel at the height I wanted, when screwed down to the printed mounting posts. 

This was so much easier and cleaner looking than my original attempt using standard length stand off hardware.  The chamfer I built in around the Joystick opening also does a nice job of covering up the mechanicals of the Joystick.

I stuck the display assembly on the SNA  Jr. circuit board, and loaded in a sample sketch to check the display and the Joystick operation. Everything works well and looks great. 

UPDATE 4/30/2017
I cut the opening for the display and Joystick in the piece of PCB material,I am using for the top panel. I mounted the bezel with the display and joystick to it. Checked how every thing fits, epically how well the main board and top panel fit in the slots in the side panels.  I think it will look nice when finished.  I need to do some sanding and painting on the top and bottom panel parts, but for now I can work on the software without worrying about sitting the board down on  anything again.

Now to get back to working on the software and finish putting all the parts in the cabinet.  I want to see how it looks with just the printed parts, or if I want to do a little sanding filling and touch up painting on them.  Will keep keep you updated on the progress.

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
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