Saturday, October 31, 2015

SPECAN 2nd IF filter UPDATED 11/4/15

Got back to work on the spectrum analyzer, with the 2nd IF filter board.     Revised 11/4/15

 This is two filters that are relay switched.  The narrow filter about 1Khz uses 9 crystals and has two in line amplifiers between each set of 3.  The wide filter should have about a 400Khz bandwidth and is comprised of 5 LC networks.



I did a board layout using mostly SMD components. During the layout of the narrow (1KHz.) filter, I found it would be easier to use leaded 2n3904s instead of the smd components.  Just too lazy to redo everything I had already finished to use the smd part.

 



I had ordered a batch of 30 12MHz. crystals, and using my SNA  to match them, I got 9 that were within about 100 Hz. of each other. 
After building this half of the board I decided to test and see what kind of a frequency response I had.




 Using the SNA jr. to check the bandwidth,I found the signal at just a few KHz. below 12MHz.  Narrowing the sweep range I found a nice peak and a bandwidth  of about the 1KHz. required.  From everything I have read, for a Spectrum Analyzer filter you want more of a peaked response than that for a SSB filter.  So this response looks like it will work.  After I finish the board I will check the responses with the Chinese SNA  that has  options for measuring bandwidth.  But, the SNA jr. is so easy to use on the bench it is what I usually go to when building.



Next to do the wide bandwidth filter.  I have not decided If I want to wind some toroids, or use some molded RF chokes.  If I use the chokes I had had added places for paralleling a couple of smd capacitors to tune to the correct frequency.  With the toroids I can try  to adjust spacing of the turns to help tune the filter elements.


I wound some toroids and tried to tune the segments by adjusting the coil spacing on the toroids.  This turned out to be a large pain, and I could not get them adjusted to the bandpass I wanted.
I had some 1.8uH molded RF chokes and some small 60pF trimmer capacitors that would fit on the board.  I  had placed pads for additional capacitors if needed, but found that I could tune the segments without adding any additional capacitors.

After finishing this filter I added the relay switching circuitry.  The relays I had were through hole, but I bent the leads and trimmed the length so I could solder directly to the elongated pads I had on the circuit board.

After completing I checked the bandpass filters.  The narrow crystal filter was about 1.1 kHz at 6dB. and the wide band filter was 456 kHz. at 6dB.

Just need to solder some .020" circuit board material as a shield around the assembly and on to the mixer stage.



Monday, October 26, 2015

Power meter and reference finished.

I finished up the AD8307 power meter and -10dBm reference. 

For the reference I soldered some .020 in double sided circuit board material around the outside edges to protect the components.  Since this will not be used very often I decided to not put in a switch, I just glued the assembly to a 9V battery holder.
I have a new circuit board layout with room for mounting holes that I will build for use as an internal reference in the Spectrum Analyzer I am working on.

After a little cutting and a lot of sanding and touch up work I painted and printed some decals for the Altoids tin I used to house the Power meter.

According to the readings on my oscilloscope the reference should be within 1 dBm of the desired -10 dBm.  After setting the calibration values in the Arduino sketch for the power meter, the readings are consistently within .5dBm.  Checking linearity with several in-line attenuators all readings were within 1dBm.

Without access to other calibrated standards, this is about as accurate as I can come up with, and should be accurate enough for checking most things an amateur would build. 
Now to get back to the spectrum analyzer build.








Sunday, October 18, 2015

20 Mhz. power Reference & Calibrating the Ad8307 power meter

I had the AD8307 power meter working, and compared it against the Chinese SNA in watt meter mode.  The SNA has a built in step attenuator, using that I found the linearity to be very good.  Only thing I was not sure of was the accuracy of the calibration on the SNA.
Looking around the web I found several articles on using a CMOS crystal oscillator can and adjusting for a certain DC output level.  I really wanted something that I could just build and not have to worry about adjusting.  I  would also like to use one as an internal reference for the spectrum analyzer I am building.

 I found a circuit from W1GHZ that looked like it would do nicely. 

http://www.w1ghz.org/small_proj/small_proj.htm 

His circuit uses a crystal oscillator and then takes its output and feeds a pair of back to back diodes.  This should give a very accurate and stable output signal.  This is fed through a low pass filter to remove harmonics of the square wave to a attenuator to set the final output level at -10 dBm.
 


Looking around I found a 20 Mhz. oscillator that I had form another project.  I used ELSIE to design a 5 pole low pass filter using component values I had on hand.  A small circuit board was built using mostly surface mount components except for the two molded RF chokes in the low pass filter.  I made room on the board so I could parallel resistors and capacitors to make the values needed.  Checking the output level on my scope I fund the output to be around 208 mv. p-p  Close enough the the 200 mv. value for -10 dBm.

The method I used to compute dBm. from the ADC reading on the Arduino does not have a calibration routine.  The correct value has to be determined by trial and error, and entered into the sketch.

While I was trying to find the correct value I noticed something interesting.  When I had the AD8307 meter powered by a battery the reading was very constant. 




 But, when I powered it from the PC when I was uploading the sketch with a different cal value the reading jumped around quite a bit, and was much higher.  Indicating that a lot of noise was coupled from the PC to the power meter.  Having the battery connected at the same time greatly reduced the noise but did not eliminate it completely.  
This indicates that any test instrument powered from the PC might be the cause of noise found during testing.  Powering from battery if possible would probably be the better choice.

It only took me 3 tries at setting the calibration value to get the AD8307 meter to read within 0.1 dBm. of the -10 dBm reference signal.  Now I still need to cut up another Altoids tin to put the meter in.









 

Friday, October 16, 2015

An AD8307 power meter

When I started on the SPECAN spectrum analyzer, I purchased several AD8307 log detectors.
I found several slightly different designs for power meters, but most are basically the same with different output circuitry.  I decided to stay with the circuit used by Farhan in his Sweeperino and Specan.  Only change I made was to use 33uf molded RF chokes instead of resistors to feed the +5v and bring the  output from the detector to the outside of the shielded compartment.
After deciding on that I took a look at the Arduino software used to read the log detector and convert to dB.  There are several different methods used, some very simple and others that require rather complicated calibration schemes.  

The best way  to test these would be to build a simple power meter.  I had the layout for the power meter part of the SPECAM and the Arduino and display that I had done for the Dummy Load Wattmeter.   Removing the dummy load portion of that board I was able to import the AD8307 power meter circuitry with only a little change  in the original layout.  For the Arduino Nano and Pro-Mini projects I use low profile IC sockets.  Since I want to move to more surface mount designs.  I changed the board layout to have solder pads for the Arduino and display sockets instead of using through hole. 

I etched up a double sided board, with the bottom being solid except for an isoleted block under the AD8307 circuitry.  I had a little problem and the board was over etched, with a lot of pin holes in the ground plane area on both sides.  I flowed a layer of solder over the board to cover some of them.  After populating the board, I cut a .25" wide strip of .020" circuit board material to use as a shield around the log detector circuitry.


I was able to use much of the software from the DL Wattmeter.
I tried several of the chunks of code for the AD8307 interface, and finally went back to Farhan's basic code.  It is one of the simplest and gives results that will be more than adequate for most amateur use.  It does not have a calibration routine, so a cal value has to  be put into the source code.  After only a couple tries comparing the readings with that of the wattmeter function in the Chinese SNA I found a cal value that gave readings within 1 dB of the SNA.

I wrote the software to include the numerical value from the log detector and also have a analog bar display.   I find that a bar display is often easier to use when aligning equipment.  I also added a little code to give another bar showing the peak value measured.  By implementing a counter in the main loop I was able to have the peak reset to the current level after 10 seconds from the last highest peak reading.      Next to put it in another Altoids tin. 

Looking around for a way to check the calibration, I found a simple RF power reference circuit on the web site of W1GHZ.  I had room on the same board as the power meter, so added that layout.  Will update after I finish building and test it. 

Added link to dropbox folder containing the Arduino Sketch, Eagle cad file ,toner transfer image, and parts layout for boards.  

https://www.dropbox.com/sh/ooubfjxdvjao8by/AABe6N-vTZjaMSgUAG0jeGSca?dl=0



Thursday, October 1, 2015

SNA jr Re-build Updated 11/9/2015

There is a upcoming 'Makers Fair' in Atlanta, and several of the local Ham Radio clubs are going to have a display there.  They will demo some equipment and modes of operation. There will also be  several hand's on activities for the attendees. 
I decided to rebuild the SNA Jr. as part of the exhibit. I redesigned the circuit board, making it a little larger to make it easier to build.  Being larger it will no longer fit in the Altoids tin, but I found a metal Crayola Crayon box that was the right size.
 
I also found a nice small 12 V battery pack with charger on e-bay, they are available in several amp hour ratings.  It is just the right size to fit under the circuit board.  It has a built in On/Off switch and  a separate cable with the charging connector, which makes it very easy to build into projects that are battery powered.

Since this will be a show and tell event, I needed to make it "pretty".  Cutting the required holes in the lid of the tin, caused the metal to deform around the cuts. To make it smooth and sturdier, I glued a piece of .020" circuit board material on top of the lid, and filled in around the edges with some auto body filler. After a paint job, I applied some laser printed decals for labels. I also printed a fake bezel to put around the LCD display.

Along with the new circuit board, I also made a new RLB board that will connect directly to the SNA instead of having to use cables.


Here is a picture of the finished unit with the attached RLB.
It shows a normalized scan of my 80-40 meter  dual band dipole antenna.  Using a RL-SWR table lookup, the  SWR values are the same as when I scan the antenna with my FoxDelta Antenna Analyzer.


I have placed all files  necessary for building
including Eagle files and toner transfer image 
 in the following dropbox 
https://www.dropbox.com/sh/16bxycnl2xg7vqi/AADcMnY9LNpBBfRuFJkzlVD-a?dl=0