Saturday, August 15, 2015

Arduinos embedded within Homebrew Test Equipment ~ N6QW

More uses for the Arduino -- Test Equipment

There is always something on the bench! While I await some critical antenna parts still to come and a few parts I need for the two SSB transceivers, I thought I would turn my attention back to some investigations with the Arduino Nano coupled with TFT Color Displays.
 
I am amazed at how many sophisticated homebrew measuring devices  (many fitting in Altoids tins) are showing up in YouTube videos and on websites. Among these are Scalar Network Analyzers, Digital SWR Bridges, Audio Test Equipment and on and on.
 
In some of my own efforts I figured out how to add a moving bar S Meter to the bottom of a color display so that up until S9 the bar was one color and beyond S9 another color. Thinking that was pretty cool my attention turned to how would you add real time plots to a color display such as you might have in checking out a homebrew crystal filter (I know this is what a SNA does). But I wanted to see what makes things tick.
 
So my first thought was how to display a Sine Wave. We have two variables X and Y, where we can represent that y = sin(x). Fortunately the Arduino has built in math functions and so it is a simple matter to set a range of values for X and then have the Arduino calculate the Y values. Along the way we can add some axis' (ordinate and abscissa) and plot centerline.
 
As usual I thought all you needed to do was to set up the Arduino for the color display and write a couple of math equations and you are there. WRONG!!!!!! It took me nearly two days to figure out how to display a simple sine wave. You can see that below.
 
The problems I ran into was that I specified 320 points (width of the display)  for x starting at point x =14 so that it would fit within the axis. Well that netted multiple traces. By trial and error I found that if you only used  "x" at every 5 points that you got the plot below. Anything more or less gave a screwed up plot --Inexplicable is a really good word. Since the top of the display is considered y = 0 you must offset every value by + 120 (1/2 of 240 which is the number of vertical blocks) to place the plot in the middle of the screen. So then I thought this plot consists of rectangle data points, what does it take to "connect the dots" with lines. That never did work BUT I was able to create a plot similar to what you might see in a "two tone audio test" which is shown in the second photo. Below that is the sketch wherein I used Arduino 1.0.5 -- I do have 1.6.3 on a different machine.
 
So email me any thoughts or suggestions. If you know what you are doing, it is probably a pretty simple thing to homebrew your own test equipment --unfortunately I don't know what I am doing!!!!
 
Pete N6QW
 
 
 
 
This is the code I am using (it is OK to laugh).
 
 
/* From N6QW using the 240 X 320 TFT Color display
This is to test displating graphical information such as you would have with test instruments
*/
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <TFT_ILI9340.h>
#if defined(__SAM3X8E__)
#undef __FlashStringHelper::F(string_literal)
#define F(string_literal) string_literal
#endif
#define __CS 10
#define __DC 9
#define __RST 8
// Color definitions
#define BLACK   0x0000
#define BLUE    0x001F
#define RED     0xF800
#define GREEN   0x07E0
#define CYAN    0x07FF
#define MAGENTA 0xF81F
#define YELLOW  0xFFE0 
#define WHITE   0xFFFF
TFT_ILI9340 tft = TFT_ILI9340(__CS, __DC, __RST);
#include "Wire.h"
int val = 0;
int val1 = 0;
int x = 0;
int y = 0;
int old_val = 0;
int old_val1 = 0;
void setup() {
 
 
  tft.begin();
  #if defined(__MK20DX128__) || defined(__MK20DX256__)
  tft.setBitrate(24000000);
  #endif
        tft.fillScreen(0x07F0); // testing switching background colors
        tft.fillScreen(WHITE); // 0x07F0 = lt green, 0xF810 = rose, 0xF840 = rust, 0xF820 = orange
        tft.setRotation(1); // landsacape versus portrait
       
       
        tft.drawLine(14,0,14,230, BLACK); //X axiz
        tft.drawLine (14,230, 300, 230, BLACK); // Y axis
        tft.drawRect( 14, 118, 300, 2, GREEN); //centerline of plot & the 2 is the width of the rectangle --makes it look like a FAT line
   
 
}
void loop()
    
{   
 
 for(int x = 5; x <320; x++){ //sets the range of values to plot along the X axis
 
 
 double sine = sin(x);
   x = x + 5 ;
   y =50*sin(x);
   old_val = x ; // for connecting lines to the dots at this point doesn't work
   old_val1 = y  ; //for connecting lines to the dots at this point doesn't work
  
   //tft.drawRect(x,y +120,  5, 5, MAGENTA); // the y+120 puts the y values in the center of the screen null this out for two tone test pattern
 
   delay(10);
 tft.drawLine( x, y + 120,old_val , 120 -old_val1, BLACK); // two tone test null this out for sine wave
 
 
   }
  }
 
 


Monday, August 10, 2015

New Radios on the Bench at N6QW ~ A 20M SSB Transceiver

More Surface Mount as Applied to a New 20M SSB XCVR

 
Peter Parker VK3YE is probably one of the most prolific ham radio homebrewer's and you only need to look at his YouTube channel and you will be well convinced. One of his creations is called the Knobless Wonder. Basically Peter has built a simple SSB transceiver using crystals in the 40M ham band and by doing so has eliminated the need for a local oscillator. The 7 MHz BFO serves as the main frequency determining element and thus becomes essentially a single channel SSB transceiver. Brilliant idea, Peter! This keeps the circuitry simple and power consumption low. So why not?
 
 
I had thought about duplicating that project and I think Peter's crystals were in the 7.150 MHz range. That would be ideal. Alas I was unable to find those crystals from US distributors but did purchase some cylindrical crystals at 7.2 MHz from Digi-Key. Somehow I don't think those are going to work too well and 7.2 Mhz here on the left coast (California) is a major net frequency. My milli-watts would quickly be swallowed up by the big guns. But I did really like his architecture.
 
 
That led me to a slight twizzle where I would use a 9.0 MHz filter and I have in the junk box crystals at 5.185 MHz and 5.238 MHz and there may even be others in the 5.15 to 5.35 MHz range lurking in the dark corners. So those two crystals would give me a SSB signal on 14.185 and 14.238 MHz. Now we are cooking. (Just checked and I have a 5.068 MHz for the CW portion of the band).
 
So why not use most of Peter's architecture only put the radio on 20M. BTW a Google Search will turn up schematics for the Knobless Wonder. This led me to a board layout that was 6 Inches long by 2 Inches wide. See below. What is not on the board is the 5.0 MHz LO (2 crystals) and the final RF amplifier, TR switching and the LPF. A similar board is now in the works just for those items.
 
The build will be mostly Surface Mount and the 6x2 size was done with a thought of making it like a Walkie Talkie. If this works out with the two channels there is a possibility of adding some VXO capabilities and perhaps even an Arduino driving an AD9850.
 
Stay Tuned --the real fun begins at N6QW!
Real Estate Allocation of the Main Board
Part Layout for the 2N3904/2N3906 Bilateral Amplifier Stage ~ Size 805 Parts. Copper Width = 0.12 Inch

Board with the SBL-1 and Band Pass Filter

 


Saturday, August 8, 2015

New Radios on the Bench at N6QW

New Radios in the Queue!

 While I await some of the beam parts to arrive I have taken up building (or should I say rebuilding) some new radios. The two new builds are SSB transceivers with one being on 40 Meters and the second on 20 Meters.
 
Beginnings of a new 40M SSB Transceiver.
 

The 30M CW Transceiver is Sacrificed!

In 2013 I was convinced to write an Article for QRP Quarterly that would center around a 30M CW transceiver complete with narrow filter and even an RIT. I built that project wrote the article and even had two QSO's with the radio. After having taken some nice photos for the article the radio was put into the back of the closet. That seemed a good place for the project seeing as I had no emails of inquiry and despite having some nice features no one was interested in building it. Previously I had another CW article only this one was for a 40M CW transceiver. Again not much interest.
 
The most interest has come from my SSB radio projects and the recent LBS series of articles is testament that most new to homebrewing want to yak and not key. We have received over 100 emails about the LBS and we know for a fact that many are under now construction. Need I say more. The hobby has room for all sorts of interests and in fact I find the SSB radios to be more of challenge to design and build than the CW ones. But to each is own.
 
 
One of my bents is to reuse circuit module blocks -- if something works then why reinvent the wheel. In the course of building the LBS, the ZIA and LBS-II it suddenly came to me that many of the blocks I would have to build where sitting in the 30M CW transceiver and since that had been all but abandoned -- a ready source of modules. The LBS has the pre-driver, driver and final stage. The ZIA ended up with the bidirectional amplifier module and the LBS-II has some of the knobs, pots and relays. Thus the sacrifice of the 30M CW transceiver was taken in earnest.
 
 
One module still intact was the mainboard which had the 30M BPF, RxTx Mixer stage (TUF-1) two bilateral amplifiers which used BF991 Dual Gate MOSFETs, the 5.0 MHz CW Filter, the Product Detector was an NE602 and the audio amp was a 2N3904 with an LM386 --and it even had a FET silencer on transmit. This main board with some modification looked like a perfect start of another 40 Meter SSB transceiver.
 
The 30 Meter BPF consisted of two 42IF123 Back to Back IF transformers that are nominally set to 10.7 MHz --a slight tweak to the cores put those on 30M. If you add a 68 PF Cap to each tuned winding and change he coupling cap between the IF cans to 4.7 PF --this will tune to 40M (Just like in the LBS). A quick installation of the three caps now moved the filter to 40M. The four pole 5.0 MHz filter was fairly narrow and useless for SSB. I pulled out those parts. Several years ago I experimented with building a 6 pole 5.0 MHz SSB Filter using the AADE design software. When I built it, there was a question in my mind that it worked. Throwing caution to the winds I temporarily "haywired" it in the circuit. Surprise, Surprise -- it works very well and so made a permanent part of the board. The NE602 will have to be replaced and I plan on using a homebrew DBM with a surface mount BFO/CIO.

The original 30 Meter CW transceiver used a varactor tuned heterodyne VFO and that enabled easily adding the RIT. None of that old school crap in this new radio. Having a few AD9850 DDS modules in the bin, I suited up an Arduino Pro-Mini as the controller and now had a chance to use a 8X2 cool blue display. What a great addition to even older radios. Now we have a nice stable LO signal for SSB.

I should add that the Dual Gate MOSFET bilateral amps are based on the work of Ron Taylor (G4GXO) and while have the gain fixed by applying 8 VDC to Gate 2, you could just as easily add AGC and/or ALC to these devices -- so lots of possibilities. I have actually done this is several other radios using this same bilateral circuit.
 
I have taken some videos of the receiver in action and when finalize the edit will upload those to youtube
 
73's
Pete N6QW
 
 




 
 
 


Wednesday, August 5, 2015

Building a new atenna at N6QW ~ Part VIII

Approach Resolved ~ A Good News Story!

 
I am happy to report that I have a new path for installing my new Tri-Band Beam antenna. Here is the plan.
 
  1. The new antenna will use the Spider beam 10M Heavy Duty mast as the support structure.
  2. The mast will be bottom rotated using a Yaesu G450 rotator.
  3. The rotor base section will employ a US Tower RP-3 base plate section that is normally installed in the top section of the tower but instead will be installed on a concrete base. My approach involves elevating the RP-3 base plate assembly approximately 3 inches above the concrete base to enable access to the rotor wiring. The elevating mechanism will be 3 inch steel angle stock which will be anchored to the 1 foot cube reinforced concrete base using 8 X 1/2 inch anchor bolts.
  4. Spider Beam was able to set me straight on how to route the coax so it does not get entangled in the guy rings.
  5. This has added immeasurably to the cost but will provide a solid installation. I only regret that I did not think of all of problems before purchasing some of the hardware that was initially bought. Someone will get a good deal on a Rohn H950 Mast and other associated hardware.
  6. I will post progress photos during the construction.

Monday, August 3, 2015

Building a new antenna at N6QW ~ Part VII

A New Direction

 
Sadly experience can be costly. In my quest to get something up in the air and quickly, I acted in haste when I purchased the Rohn H950. It is probably ideal for holding up a 2 Meter Dipole made from #36 wire but for my application is simply unsuitable if not outright dangerous. I have only myself to blame and take full responsibility.
 
The new direction is to use a bottom mounted rotor assembly ( the Yaesu G450 can do bottom mount) and to rotate the whole mast. I have been in contact with SpiderBeam and it appears their 10M HD product will work for this application. I am still asking a lot of questions before I flash the plastic and thus more cautious about this approach versus my foray with the H950.
 
Yet I have not received a crisp answer from Spiderbeam about running the coax so it does not interfere with the two sets of guy wires and that remains an open item.
 
Thus if any one reading this blog has a Spiderbeam mast I would appreciate hearing from you about your experience and how you installed it.
 
My plan is for a concrete base to which is affixed an elevated rotor base plate that is secured to the concrete base with anchor bolts. It will also have a sleeved house bracket  to provide a bit more rigidity to the whole assembly which consists of a section of PVC pipe that is slightly larger in diameter and is affixed to the eaves of the house.
 
 
So if any reader has info on a SpiderBeam Mast installation please email me with details.
 
 
73's
Pete N6QW

Sunday, August 2, 2015

A temproary diversion from the Antenna installation --- Homebrew Crystal Filters

A Diversion from the Antenna Installation

 
My life seems to be consumed with installing the new two element beam; but it appears that the goal of having an new antenna may take a bit longer than thought (or desired). There has to be a workable solution that does not involve spending $3000 on a small tower. I have received some new inputs that will require a bit more noodling so the antenna project is now in the "needing more evaluation" stage.
 
So we don't lose your interest in this blog I want to share some tribal knowledge about building homebrew crystal filters. There is much information about the actual selection and characterization of homebrew filters and I will not cover that aspect. My bent is once you have the filter crystals and the selected capacitors how do you translate that into hardware.
 
In a recent project of mine called the LBS - II, I decided to use a 5.185 MHz homebrew crystal filter principally because I misplaced my normal stash of 4.9152 MHz crystals which happens to be my most favorite IF frequency behind 9.0 MHz. Because the LBS - II was (by design) to utilize Surface Mount parts to make the radio more compact I needed a way to install the crystals in a small footprint. Some noodle time came up with a layout that works and in fact is ideal if one elects to use the 9.0 MHz SSB Filter Kit Model #351 sold by INRAD. Here are the specifics:
 
  • The footprint involves five pad areas of 0.2 inches wide by 0.4 inches long. Thus the overall size is 1 inch long by 0.4 inches wide.
  • All of the filter capacitors are soldered along one edge of the assembly (this makes adjustments very easy to accomplish).
  • The design provides a good ground plane area under the crystals which is very important to achieve the stop band attenuation
  • The board can be made by etching, milling or ugly style with a hacksaw and xacto knife
  • The board area being small is ideal for retrofitting into existing designs
  • An all important final step is to connect all of the crystal cans to ground which is another factor in the stop band attenuation.

Drum Roll Please

Layout for the 9.0 MHz INRAD Crystal Filter


The 5.185 MHz  filter installed on the LBS-II. The Ground Wires have not been added at this point.

 
Stay Tuned de N6QW
 

Saturday, August 1, 2015

Building a new antenna at N6QW ~ Part VI

Additional evaluation of the H950 Mast


In the dark ages (over 50 years ago) while I was in high school taking the mandatory second year of Latin studies, I can well remember telling Miss Bushnell (the spinster Latin teacher) about how useless Latin was as a language and once the class was over would never use it in my lifetime. Miss Bushnell must be really smirking these days (hopefully from heaven)  as I attempt to use Roman (Latin) Numerals to order my blog posts. This says much for the old adage "Never Say Never!" I better end this thread soon as I am not sure what comes after X (Arabic 10).
 
Along the way I did learn about the "24 Hour Rule". Sometimes it is best to wait at least 24 Hours before making any important  decisions. Hopefully such a passing of time removes some of the emotionalism from the decision and adds a strong measure of logic to the mix.
 
The Never Say Never and 24 Hour Rule factors have caused me to rethink some of the concerns I have about the H950 push up mast and to come up with an alternate plan for the support mast and installation process.
 
  • My original plan was to remove the small concrete base that is now supporting the fiberglass mast. If that is removed and the H950 mast installation is a failure then I now have a problem of having No Antenna while I further resolve an alternate mast solution. Much effort went into finding dead center of the current base and the house bracket alignment. I might not be so lucky with the H950 and thus an additional concern.
  • I do my best thinking while I sleep and last night, while I slept, it came to me. Why not use the current base as a part of the H950 Mast install. In it current condition the concrete base having just a stub can serve as a temporary the base for the H950 (sans the clevis assembly). Now the H950 can be slipped over the stub and then affixed to the existing bracket assembly. At this point the mast only weighs about 34 pounds and this can be done without any extra hands or equipment. 
  •  
  • This achieves two purposes: 1) I can hand raise the H950 mast and get a better feel for its mechanical rigidity and 2) when raised to 27 feet allows the determination of the guying lengths and to evaluate the impact of the guys. The real bonus is that it preserves the original base assembly so that if necessary the current fiberglass antenna mast can be put back in place fairly easily.
  • Since I must wait a month for the beam to arrive, if this temporary H950 install works then I have the option of using the 20 Meter EDZ antenna with the Rohn mast and that will also be a part of the additional guying.
  • My brain while it was working on the problem, also came up with a way to pour the new base around the existing base so the clevis assembly can be refitted to the mast and the new concrete poured around the existing base with the mast installed. This will allow straight and true alignment of the mast.
  • In sum these new thoughts about the H950 enable me to make a measured evaluation of the H950 mast. Assuming this works the mast would be "pushed up" in place using some hired help to assist with that task.
  • I  also looked at the spider beam mast and concluded that I would be spending an additional $450 to essentially have the same concerns regarding rigidity and the erection process
We now have a plan for further evaluating the H950 that enables me to have hard data on its suitability while providing an option to go back to the fiberglass mast.
 
Stay tuned de N6QW.
 
(You are not going to believe this but our beloved "de" comes from the Latin meaning from --Miss Bushnell how did you know?)

The Risk of Power.

 What happens when the faithful lose faith? We don't know the result but now it is time to pop more popcorn as the interesting part of t...