Skip to main content

New Technology for 2020 ~ A FREE TKT ( Tribal Knowledge Tip)

 How to Handle More Than One Band!



[Arduino Code Snippet ADDED to this post]

So you have just homebrewed a new QRP transceiver and it doesn't matter if it is SSB or CW and as a bonus have included two bands. Now the problem how to switch all the needed circuits so that with a simple DPDT Toggle switch -- the magic happens!

But let us back up in the sewer so we get the full aroma. Switching bands entails several actions including switching the LO range (I am presuming a digital LO) as well as the Band Pass and Low Pass Filters. One half of our DPDT can be dedicated to the Arduino Input for band change while the other half of the switch can "Power On" sets of relays to select the one of two bands.



Above is a two band LPF with the yellow core being the 20 Meter Section and the red core the 40 Meter Section. The two black relays are SPDT. and the Yellow relay is a DPDT.

By my wiring convention I made it so the NC contacts on the DPST are connected to the 40M Section and the NO to the 20M Section. The Center Leaf on the Left DPST is connected to the IRF510. Thus the LPF is always connected to the IRF510. In simple terms the LPF is not in the Receive Loop. This avoids hot switching the LPF to the IRF510.

The DPST relay on the right side of the LPF's has its center Leaf connected to the NO Contacts of the DPDT (yellow) Relay. (Again NC = 40M and NO = 20M) 

For the DPDT (TR Relay) I simply bridged (connected together)  both sets of contacts as we are running 5 watts through that relay. The Center Leaf of the Yellow relay goes to the bulkhead mounted antenna connector. The NC contacts of the yellow relay are connected to the Receive side of the transceiver. That follows that the NO side of the (TR Yellow Relay) is connected to the output side of the  LPF Relay.

Wiring is as follows the two DPST relays are powered  from the Toggle switch! So "power on" switches bands. That switch at the same time switches the Arduino to the new band.  The Yellow (TR) Relay has juice applied at all times BUT only grounded through the PTT switch (or MOX) control on transmit. Thus normal action has it so on receive the signal from the antenna is passed onto the receive section But on transmit the antenna is connected to the selected LPF.

Purposefully I did not draw a schematic as that is left to the reader. If you can't draw a schematic from what I have described, don't build the filter and consider stamp collecting!

Critical Path items! The base for this assembly is single sided copper vector board where the top surface is a ground plane and all connections to ground are simply soldered to the top of the board. All network connections are made on the under insulated side. Prior to passing connections that are not grounded through the board, I take a small drill bit and ream out the area around the penetration hole so there are no shorts to ground. Connections made to ground are not reamed. Look at the Right Side DPST in the lower right hand corner and you will see the reamed hole.

Secondly I use the W3NQN filter design as that specifically addresses the 2nd harmonic issue. The QST article which can be found on the internet gives the constants for all of the ham bands. I found it best to simulate the circuit in LT Spice and if you are a Nano VNA aficionado you can test the network after it is built to check your work. 

Next is some code snippets to show how the Arduino Code is arranged to respond to a LOW condition on either Pins A0 or Pin 5. This is not a standalone sketch but shows some of the elements needed to be added to existing sketches that start by identification that two pins will be used to detect a band change and then when a condition is identified for each LOW that becomes the start up frequency sent to the Si5351. I did not write this code but a ham in VK land was kind enough to furnish this to me. 

A ham friend here in the US is already looking at using the Nextion touch screen so that you touch a button on the screen and it is automatic band change. An additional output pin on the Arduino would trigger a transistor switch to cause the relays on the BPF and LPF to toggle between the bands. 

READ THIS IS NOT A COMPLETE SKETCH! THIS IS JUST ADDED ELEMENTS TO BAND CHANGE. ADDING MORE BANDS AND START UP FREQUENCIES IS NOT DIFFICULT. Added bands require changing a few parameters.

/* Sample code added to your sketch to give two band operation. Pins A0 an 5 are the input pins driven LOW to change bands
   The two numbers 16198500 and 23201500 are the start up frequencies for 40 and 20M with a 9 MHz IF
 */

int SWBANDS = 0;

int BSW = 0;

const int MAXBANDS = 2; // the number of bands we are using
const int SWBAND[MAXBANDS]={A0,5};  // 40m on A0,20m on 5
const int_fast32_t rxfreqs[MAXBANDS]={16198500L,23201500L}; // the default starting frequency for each band
int lastband=0;         // used to keep track of the last band used



void setup() {
 int lp;
 int pin;


 for (lp=0;lp<MAXBANDS;lp++) // set up each bandswitch position
        {
             pin=SWBAND[lp];        
             pinMode(pin,INPUT_PULLUP);      
             digitalWrite(pin,HIGH);
         }
        

}

void loop() {
  
      CheckBand();
}


//************************************************************************************  Band Switch Check
        

void CheckBand()
{
    unsigned char lp;       // temporary variable we will use to step through each of the bandswitch pins
    int bandpin;            // and temporary variable to store the reading from the current bandpin

 
    for (lp=0;lp<MAXBANDS;lp++) {
        bandpin=digitalRead(SWBAND[lp]);      // read the bandpin
        if (bandpin==LOW) {                   // if it is low we do a small delay before checking it again - this is a dodgy way of doing a debounce
            delay(5);                         // might need to change this to 50
            Serial.print("Pin low detected: ");Serial.println(lp);
        }           
        bandpin=digitalRead(SWBAND[lp]);      // after the delay, we get the pin state again, so we can see if the state has changed

        if (bandpin==LOW) {          // okay, if we are still low, then it is probably safe to assume that the switch is fully engaged, and the contacts have settled.
            if (lastband!=lp) {       // check to see if we were already on this band
              Serial.print(lp);Serial.print(" low and not lastband (");Serial.print(lastband);Serial.print(")");
              lastband=lp;            // we were not, so we need to set lastband to this band, so the next time around we won't actually change the frequency
              rx=rxfreqs[lp];         // and finally we can change the frequency
              Serial.print(" new band: ");Serial.print(lp);Serial.print(" new freq: ");Serial.println(rx);
              break;                  // the break here drops us out of the loop - after all, we have changed frequencies so we don't need to waste time checking the other switch positions
            }
        }
    }
    delay(100);             // I've added this line as you had a delay at the end of the change band code previously - not sure if its required or not? 90% sure it can be removed
}

 This project has five bands using the code.




73's
Pete N6QW

Wow what revelations about the emperor (with miniscule e) from Bob Woodward. It is said: Trump Lied, People Died as I heard quoted this morning! We should all get White Hats with the letters TLPD. Hey all you MAGA guys still think he is your man?

Popular posts from this blog

2019 ~ What is the simplest homebrew SSB Transceiver that can be built?

4/27/2019 The Future of our Hobby is Here! Forget those simple rigs with homebrew crystal filters, cranky IRF510's and the analog VFO's. SDR is the wave that is building strength just like a Tsunami. With the Soft Rock V6.3 SMD Version + RRPi2 With the Omnia SDR and RPi2 Pete N6QW How Simple & How Cheap can you  build a Homebrew SSB Transceiver? 4/26/2019 --- I just converted my websites from an obsolete Windows Based Server with GoDaddy to their cPanel (Linux). This was a cost issue as a one year renewal of the Windows Server would buy three years on the cPanel. GoDaddy is discouraging the use of what they call the Obsolete Windows System. So I had to migrate and reload the whole pastapete.com, jessystems.com and the n6qw.com sites to the Linux based servers. Some files and links got lost in the translation --so you might not be able to see everything! Essentially I have  to open every link to verify that it works --that may take some time

New Technology for 2020 ~ The Hermes Lite 2.0 SDR Transceiver

  The Hermes Lite 2.0 SDR Transceiver. November 7th, 2020 ~ It's Settled! It is done! The stain of the Trump era is soon to be removed! Thanks to all who voted. The Voice of the People has been heard.  Congratulations to President Elect Biden and Vice President Elect Harris. Pete N6QW November 3rd, 2020 -- IT WAS THE MOUSE   We all know this is Dump Trump  Day. Go out and vote! It was the mouse! Back in 1999 I stupidly was one of the very first to purchase a Ten Tec Pegasus. Never buy the first batch of a new model.  Touted as the world's first computer controlled radio , actually I think the Kachina 505 was really the first. But the Pegasus was fraught with problems including a trip back to the Smokey Mountains. I was using an older Windows 95 machine to control the Pegasus and that may be a co-conspirator. Well after many calls to TT -- finally someone who has some smarts told me: Fix your station ground, Make all leads short and Buy stock in a ferrite bead company. I did all

The Next Project Updated 10/10/2022! The rubber has hit the pavement!

The Next Project... A 2022 Transceiver. 10/10/2022 My Apologies. It is with regret that I will be terminating any further work on this project. My caregiver duties have over time become a greater time sink and it is almost impossible to build something working only 10-15 minutes at a time spread out over a day. I apologize for not getting it from design ideas to complete hardware. Most likely I have built the last transceiver I will ever build. Thanks for riding along. My website https://www.n6qw.com/  has the pdf of the postings and I will leave this blog page as is. 73's Pete N6QW 10/05/2022 Still Alive! Regrettably my caregiver duties have overtaken any free time so not much progress. But I am hopeful yet this week I will cut at least one board. A PSA from N6QW.  Think of it like Mary Jo has a "crink" in her back and unable to get in the backseat of the 57 VW Beetle. A bit of a setback but not forever.  Seems like the hired caregiver had a small emergency and not able