Thursday, December 31, 2015

The N6QW Simple-Ceiver

I spent most of the holidays visiting relatives. and had quite a bit of time to work on something I had been thinking about doing for a while.  I have been following the development of the Simple-Ceiver that Pete N6QW has been posting on his blog.   N6QW.blogspot.com .  
Pete spends a lot of time going through the design of a DC receiver that is later converted to a single conversion heterodyne  receiver for 40 meters. He goes through the design using LTSpice to simulate each stage before he builds them.  This powerful tool allowed him to optimize the circuit design before melting any solder.
I have a bunch of 12 mHz. crystals left over from the IF amplifier for the Specan, so I could use the same frequency scheme that Pete used.  I plan on using a  version of the SI5351 VFO  I had  built for the "Canned Frog" transceiver.  Different from Pete's circuit I will use another clock output from the SI5351 for the BFO.

 Link to schematic at  https://www.dropbox.com/s/dersy23jgj6h37c/Simple-ceiver-schematic.pdf?dl=0
 


After drawing the schematic and getting it checked by Pete,  I did a single sided board layout using mostly surface mount components.  I did not have surface mount versions of the ICs for the AF amplifier so I did the layout with extended solder pads for the leaded components. Although I plan on using the SI5351 for the BFO, I decided to add the BFO oscillator to the board.   
Etched the board now to start building and testing the receiver, first the audio amplifier stages.


Friday, December 4, 2015

A PONG Game for Christmas

It is getting close to Christmas, and I need to come up with another present for my son.  He always says that when he was a little kid he had wanted a game system, instead he got a real computer.  He had been a programmer for a while so I guess it wasn't a complete waste.  I think it is time to finally get him a computer game.  Looking around I found a couple versions of the original computer 'PONG"  game for the Arduino. 
I chose  the project from http://michaelteeuw.nl/ 
that looked like it would be easy to port over to the hardware I have on hand.  And of course it would fit in an Altoids tin.
I had an OLED  like the display in my "Canned Frog", but it was two color instead of monochrome.  I had a small TFT display left over from the DL Watt meter project, so decided to use that.

Looking a the schematic, it was very easy to take the board layout from that project and modify it for use for the PONG project.  I was able to remove the Dummy Load and detector components from the board, and move the Arduino Pro Mini and display up towards one end of the board to give room for the two pots I needed for the game controls.  Only other thing was to bring out a pin to connect a small speaker.

After etching the board and installing the components, I started on porting the software to work with the TFT display.  The main advantage of the software I chose, was that it had used the Adafruit graphics library.  I had a compatible library for the TFT display I was using, so it was only took an hour or so to make the necessary changes to use this display.

Main changes was in the resolution of the display, and handling the different colors available to this display.  The OLED display has a clear() function that was used during the draw routine that was not available in the TFT library.  I tried to  replace this with a fillScreen(color) function. Unfortunately this was much too slow and there was a lot of jiter.  Instead of filling the whole screen, I used the fillRectangle(color) function to only clear areas that needed to be redrawn.  This was much faster, and greatly reduced the amount of jitter.  Just a couple of other changes of game play and the porting was finished.
The part of the project that took the longest was cutting and aligning the holes in the Altoids tin.

Friday, November 6, 2015

S9 signal generator Updated 12/1/15

While waiting for some parts for the Spectrum Analyzer, I was looking around for a quick project.

There was a post on the QRP-tech yahoo group about the NorCal S9 Signal generator
http://norcalqrp.org/files/NorCal_S9_Assy_V1.pdf

 








This is very close to the circuit for the Elecraft  XG2 Receiver Test Oscillator

http://www.elecraft.com/manual/E740084%20XG2%20Manual%20Rev%20F.pdf


This looked like something that might be useful for testing the Spectrum Analyzer after I get it finished.  I decided to build a similar unit, using parts from both design.  Looking at the NorCal circuit, I saw that they used  20 and 14 db pads instead of the single 34 db pad used in the Elecraft model.  I went with the NorCal circuit and added switching around both pads to have options of 50, 10, 5, and 1 uv. outputs. 


I want to put the signal generator in an Altoids tin, so I used the same template as my AD8307 power meter as the basis for the board layout.  I have found that I get more consistent etching of the ground pour if I do it as a hatch instead of solid.  I plan on using  2 row .1" header strips with jumpers instead of switches, so I placed extended solder pads on the board.  This way I can just bend the bottom part of the header pins out to the side and solder directly to the top of the board.

Now to etch the board after I get back from a hamfest tomorrow.

 11/8/15


Well it was a little damp and chilly at the Hamfest, so I didn't stick around as long as I usually would.  This gave me plenty of time to etch the circuit board.  For SMD boards I have been using the blue press-n-peel transfer paper to eliminate etch through, and I get a cleaner pad for the SMD components.  I also let the boards sit in some "Liquid Tin" solution for about a minute to give a nice tin coating to the traces.  This seems to solder a little better than the bare copper.


I built the oscillator portion of the board to test how much output I was getting.  From the Elecraft document it looks like the oscillator should put out about -50 dBm before the attenuators.  Hooked mine to my home-brew AD8307 power meter and got a reading of -48dBm.  Checked the voltage to the oscillator and had about 1.6 volts, I might try adding another diode in series to drop the voltage  and see what that does to the output. 
Now on to the attenuators,  I am missing a one of the values for the 20 db pad but will try with the  closest value I have for now.  Will replace with correct value when the assortment of low value SMD resistors I have comes in. 

Since it is raining out I decided to finish the board and add the attenuator  components.  With the attenuator pads out I measured -68.2 dBm on my power meter.  I added another diode in series with the existing diode, this dropped the voltage to the oscillator to 1.07 volts.  Measuring the output with the additional diode I measured a value of -72.8 dBm.  This is more than close enough to the desired -73dBm output level of the Norcal S9 generator.



Only have two crystals in the circuit for now (3.561 and 7.030) will add others as needed.  Listening to the output on a receiver. The 50uv gives about a S7 reading, readings for other levels are below S1 but I can hear definite changes in the signal as I change attenuator settings.
Unfortunately I do not have any calibrated test equipment to verify the values I found.  But I believe the accuracy should be enough for testing the home-brew equipment I am working on. 



Link to dropbox for Eagle files and toner transfer image.

https://www.dropbox.com/sh/p4qqfqab0z5g80k/AACJtjIMUgUTV1FqEuiN-Byta?dl=0


I finished drilling some holes in an Altoids tin and and mounted the circuit board.  I also printed a simple instruction card showing the jumper settings for the different signal frequencies and attenuator settings.  I sized this to fit inside the top cover of the Altoids tin.






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