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

January 26, 2024. A simple CW Transceiver/Transmitter

Cruise through the lower part of the ham bands bands and what do you hear? Well, FT-8 and CW. Often you will not hear any SSB stations yet go to the lower part of the bands, and it is a cacophony (I love that word) of bad sounding signals and some high-speed keying. Fast is not so much of the issue as is bad, run together and jerky keying. But none the less our hobby started there.    So, you could crank down your ICOM 7300 and watch the waterfall on CW or you could homebrew a radio. Actually, to do CW right you need more thought up front than you do with a SSB transceiver. Often, I will state that a CW Transceiver is much more difficult to build than a simple SSB rig. I published two articles in QRP Quarterly on CW transceivers and all I got was a yawn so maybe history will repeat itself.  Yawn!   30M CW Transceiver with RIT!   Of interest is that the LO is a Varactor tuned LC oscillator using a NE602. Look closely at the RIT circuit which is only activated on ...

March 31, 2024. Happy Easter to those who celebrate this day.

What a great day to Binge on Chocolate and experience the pain of that filling that has been leaking.  I would be in that category with the leaking filling(s) had I not just spent an amount equivalent to one of the fancy new uptown appliance box transceivers on two filling repairs. Well at least I can binge on the Chocolate bunnies without fear of pain. Regrettably everything appears to have jumped in price including the price of parts. Well not so much the parts as the shipping costs.  That notably is seen in the eBay treasures. I spotted a nice heathkit DX-20 for about $50 and the shipping was $65. Likely it is a twofer with part being a way to in effect charge a higher price by inflating the shipping and in part by increased shipping costs. Shipping with insurance across the US was about $150 for this jewel and that was three years ago. 6AM on the Left Coast ~ 20M Easter Sunday! My only hope is the cost of Chocolate Bunnies remains steady although a pound of See's Candies f...

August 30, 2024. A PNP 20M SSB Transceiver

Shown below is the Block Diagram for the 20M PNP SSB Transceiver steered in the  Transmit Mode . The components shown in the dotted block are relay steered so that the block module is single pass and amplifies in a single direction. The Block diagram show steered in Transmit.  Essentially the steering process works so that the IF Module input follows the Balanced Modulator on Transmit and then the input side follows the Receive Mixer on Receive. All done with some relays and a bit of RG174U coax. For those who count things in detail, this block diagram is not unlike what was used for the PSSST Transceiver which can be found on my website . Yes, a warmed over P3ST only using PNP devices. TYGNYBNT. 73's Pete N6QW