Saturday, June 18, 2016

Back to the Spectrum Analyzer project

Now that FDIM is over and finished with the SWR - Power Meter for the QRP club, it is time to get back to some of my other projects.  Top of the list is the Spectrum Analyzer.  Looking at the modules I had finished, and some of the things learned when I built the SNA Jr II, I decided to make some major changes in the overall design.  The first change will be to the interface board.  The new board will be similar to the SNA Jr. II,  I am going to include the AD8307 circuitry on this board, and have provisions for a si5351 or si570 on the same board.  For the first try, I will be using the si5351 board from QRP-labs.  This has a very close pin-out to the Ad9850 modules used in the SNA Jr.  I plan on using machined pin header stock to create a socket for the QRP-labs board.  If I later want to try a si570, I will build a small breakout board with the same pin-out.  Then it is just a matter of plugging each board in to see if there is any noticeable difference in the results I get.  The si5351 would have an advantage, in that I could program one of the other clock outputs to use as a tracking generator.
The other main change was in what I was going to use as a user interface device to control the operation.  On the SNA Jr and other projects I used a rotary encoder with a built in push-button.  This worked quite well, but the software got to be fairly complicated as more functionality was added to the software.  I thought about push-buttons, but they would take up a lot of panel space.  And from using several other devices with push-buttons I really didn't think that was what I wanted.  I had a couple of the small joy stick controller boards that I picked up for something else, and thought I would give them a try.  I wired one up on a breadboard, and tried several different methods until I came up with one I liked.  A ReadJoystick function reads the Horizontal and Vertical axis position, and if it is more than 20% from center updates a global variable for that axis to either + or - 1 depending on direction.  This joystick also has a push-button, so I detect  either a short or long push, and update another  variable with that value. To make processing these variables a little easier, I only allow one to be changed at a time. If any of these occurs a global flag is  set.  This global flag allows the flag to be reset in the program to speed up processing by bypassing further testing in that pass through the loop. 

I did a  quick board layout  and etched a board to test the functionality.   Since all the pins used by the display except reset are through the end connector on the Mega board, I have all the other pins available.  This makes the board a lot easier, because I can just use a tall stacking connector and not have to do anything on the interface board for the display except bring out a couple of pins for the reset line. I also included several places on the board for push buttons that I might use for more advanced features later on.  And also brought out a couple  sets of I/O pins for control of the RF boards.

I took some of the code from the SNA Jr. and modified it for use with the new board, display and Joystick.
It was quite a bit simpler, and worked very well.  I think the Joystick will work nicely in the Spectrum Analyzer.  I really like the larger, higher resolution displayWith it having a parallel interface instead of SPI the response is nearly as fast as the small display in the SNA Jr.  It has already got me thinking about a SNA Jr version III.

 With the power detector and clock generator on the same board, I can modify more of the code from the SNA Jr. and have a stand alone version of the Sweeperino for testing some of the RF filters in the Spectrum Analyzer.  Then after I finish the RF circuitry, I can just connect it to the interface board and change the software to make it a Spectrum Analyzer.

No comments:

Post a Comment