Monday, November 25, 2024

11/25/2024. 1st DX with the 40M Hybrid Rig

 Worked VA6MB today, Mike in Cold Lake, Alberta. My report was 3X3. Not too bad for 6 watts at 6AM on 7.2MHz.



Them that know can make it go!

73's
Pete N6QW

Friday, November 22, 2024

Nov 23, 2024. BFO Code for the TR-3 with a 9MHz Filter

 


   /* This is the  use of the Xiao RP2040 and the Si5351 for a BFO for the TR3
         *
         *
         *
         *
         *
         *
         */








        #include "xiaoRP2040pinNums.h" // Or use the device pin numbers with "u" suffix.
        #include <Wire.h>
       
        #include "si5351.h"
        
        #define i2cSDA D4
        #define i2cSCL D5

      
      
        
       
        
        
      
        
        
        // Values in whole integer Hz
        
        uint32_t bfo = 8998500;    // Declared as a 32-bit unsigned integer
        

       

        
        Si5351 si5351;
       
        
        ////========================================
        ////******** FUNCTION: setup ***************
        ////========================================
        void setup() {

          Serial.begin(57600);

          
          
          Wire.begin();
              
          // Initialize the Si5351
          si5351.init(SI5351_CRYSTAL_LOAD_8PF, 0, 0);             
          
          // Set Si5351 Clocks
          
          si5351.set_freq(bfo* 100, SI5351_CLK2);   // in integer hundredths of Hz (whole Hz times 100)

          si5351.set_correction(1000,SI5351_PLL_INPUT_XO);
          
          
          si5351.drive_strength(SI5351_CLK2,SI5351_DRIVE_8MA);


          
          pinMode(2u, INPUT_PULLUP);   // usb/Lsb select          
          


        }



        

        
        




         
       // End of setup()
        
        //========================================
        //********* FUNCTION: (main)loop *********
        //========================================
        void loop() {   // Empty

            
        
       
          checkSideband();

          
       
         }

                 
                
                  


                 
                 
               
                


                 



                  
      
      

  //********************* Check Sideband********************

          
                  void checkSideband(){
      
                if(digitalRead(2u)){  //********If SW is true do the following.    
           
           
                 bfo = 8998500L;

                if (bfo = 8998500L);
                si5351.set_freq( bfo*100, SI5351_CLK2);
           
           
          
                
          
                }
                  else{                //**********if not, do this.
          
          
          
         
                 bfo =  9001500L;
                 si5351.set_freq( bfo*100, SI5351_CLK2);
             
             
             
                 }

    
         }   
        
      

11/22/2024. Sheer Brilliance!

Read up on the design of the Drake TR-3 SSB/CW transceiver. This radio had a rinky dink pair of 4 pole crystal filters which are affectionately called the "soup can". This was an Achillies heel of this radio and often one or both of the filters went south.




The topology of this radio used a fixed BFO frequency of 9 MHz, and the two filters center frequencies are such where one is above the BFO and one below he BFO. To switch sidebands, you switched the filters. 

These filters today are unobtanium and when one dies your TR-3 is dead! The TR-4 uses the same approach but employs two separate filters not soldered inside a soup can. The TR-4 filters are physically too big for a retrofit inside the TR-3.

But an ingenious solution from K9SUL who had one dead filter (the other was OK) was to hardwire that filter into the circuit, bypassing the front panel filter switch. The next step was a technology solution. He eliminates the 9 MHz crystal BFO and installs a Si535i driven with a Teensy Microcontroller. The front panel switch then selects a 9 MHz BFO frequency for the one good filter and a second BFO Frequency that shifts the BFO signal to the opposite sideband.

I foresee a twizzle on this approach where a single 9 MHz 6 or 8 pole filter is installed in place of the soup can and the Si5351 would then select the proper USB LSB carrier oscillator frequencies. You could even resort to a 4 pole 9 MHz INRAD filter which costs $33 and has a Zin/out of 200 Ohms. You will need a 10 to 1 match for this filter as I believe the soup cans ones were 2K. A 6 Turn to 19 Turn transformer on a FT-37-43 core gives that transform. 6^2 = 36 and 19^2 = 361. Thus 361/36 = 10:1.

This not only rescues a boat anchor from the land fill, but a 6 or 8 pole filter would be an upgrade.

Yet another use of the Si5351. K9SUL has a you tube video on his solution. 

73's
Pete N6QW

Wednesday, November 20, 2024

Nov 20, 2024. Those who know will understand!

 // UTFT_Demo_320x240_Serial
// Copyright (C)2015 Rinky-Dink Electronics, Henning Karlsen. All right reserved
// web: http://www.RinkyDinkElectronics.com/
//
// This program is a demo of how to use most of the functions
// of the library with a supported display modules.
//
// This demo was made for serial modules with a screen
// resolution of 320x240 pixels.
//
// This program requires the UTFT library.
//
// ********************************************************************
// * IMPORTANT: Read the comments in the setup() function when        *
// * using the Watterott MI0283QT9 or the DisplayModule DM-TFT28-105. *
// ********************************************************************
//Pete Here> 5/14/2018 Got this to work with all functions for use with a 20 Meter Transceiver
// Now need to install buttons.



#include <UTFT.h>
#include <URTouch.h>

// Declare which fonts we will be using
extern uint8_t BigFont[];
extern uint8_t SmallFont[];
extern uint8_t SevenSegNumFont[];


//if your LCD driver IC is ILI9341,please uncomment the line
UTFT myGLCD(CTE32_R2, 38, 39, 40, 41);
//if your LCD driver IC is SSD1289,please uncomment the line
//UTFT myGLCD(CTE32, 38, 39, 40, 41);

URTouch  myTouch( 6, 5, 4, 3, 2);


 
    
 
    
    #include <SPI.h>
   
    #include "Rotary.h"
    #include <toneAC.h>
    #define TONE_PIN 6
    #define NOTE_B5  988
    
    
    #if defined(__SAM3X8E__)
    #undef __FlashStringHelper::F(string_literal)
    #define F(string_literal) string_literal
    #endif
    
    
    #define ENCODER_B   A10                     // Encoder pin A
    #define ENCODER_A   A11                  // Encoder pin B
    #define ENCODER_BTN  A3
    
    
   
    
    #include "si5351.h"
    #include "Wire.h"
    
     Si5351 si5351;
      long int frq;
    int_fast32_t rx = 16198500L; // Starting frequency of VFO
    int_fast32_t rx2=1; // variable to hold the updated frequency
    int_fast32_t increment = 100; // starting VFO update increment in HZ.
    int_fast32_t bfo =8998500L; // LSB
    String hertz = " 100";
    
    int buttonstate = 0;
    int buttonstate2 = 0;
    
    const int tonepin = 9; //Output for tune up purposes 988 Hz tone
    const int SW = A1; //selects upper or lower sideband
    const int SW1 = A2; // provides the TUNE fucntion
    const int LED = 8; //Controls the transmitter in TUNE simple 5 VDC reed relay
    byte ones,tens,hundreds,thousands,tenthousands,hundredthousands,millions ;  //Placeholders
   // int backlight =0;
    int i = 0;
    
   const int SM =A0;// Analog Pin A0 for the S Meter function
   int adcval = 0; // Analog Pin A0 for the S Meter function
   int val = 0;
    
    
    int buttonState = 0;
    int lastButtonState = 0;
    
    Rotary r = Rotary(A10,A11); // sets the pins the rotary encoder uses.  
    


void setup()

{myGLCD.clrScr();

  Serial.begin(9600);

         myGLCD.clrScr();
         myGLCD.InitLCD();
         myGLCD.fillScr(255,80, 00);
    
         PCICR |= (1 << PCIE2);
         PCMSK2 |= (1 << PCINT18) | (1 << PCINT19);
         sei();
         
         
 
         
         pinMode(SW, INPUT);   // Selects either USB or LSB`````
         digitalWrite(SW,HIGH);
         pinMode(SW1, INPUT); //Tune
         digitalWrite(SW1,HIGH);
         pinMode(LED, OUTPUT);
         digitalWrite(LED,LOW);
       //  pinMode(backlight, OUTPUT);
         pinMode(A3,INPUT); // Connect to a button that goes to GND on push
         pinMode(A1,INPUT); // IF sense **********************************************
        pinMode(A10, INPUT); digitalWrite(A10, HIGH);
        pinMode(A11, INPUT); digitalWrite(A11, HIGH);
        pinMode(A0,INPUT); digitalWrite(A0,LOW);
       
         digitalWrite(A3,HIGH);
         digitalWrite(A2,HIGH);
         digitalWrite(A1,HIGH); // init done
         // set backlight level
       
       
      
      //while (!Serial);
      //tft.begin();
      #if defined(__MK20DX128__) || defined(__MK20DX256__)
     // display.setBitrate(24000000);
      #endif
    
      
        //  initialize the Si5351
    
          si5351.init(SI5351_CRYSTAL_LOAD_8PF);
          si5351.set_correction(100);
          
          si5351.set_pll(SI5351_PLL_FIXED, SI5351_PLLA);
          
        // si5351.set_freq(rx , SI5351_PLL_FIXED, SI5351_CLK0);
    
         
          si5351.set_freq(bfo, 0, SI5351_CLK2);
          
          si5351.drive_strength(SI5351_CLK0,SI5351_DRIVE_8MA);
          si5351.drive_strength(SI5351_CLK2,SI5351_DRIVE_8MA);
          
         
    
    }
    
    
    void setincrement(){
        if (increment == 10){increment = 100;  hertz = " 100";}
        else if (increment == 100){increment = 1000; hertz="  1K";}
        else if (increment == 1000){increment = 10000; hertz="  10K"; }
       else if (increment == 10000){increment = 100000; hertz=" 100K";}
       else if (increment == 100000){increment = 1000000; hertz="  1M ";}  
        else{increment = 10; hertz = "  10";};  

           
         
         delay(100); // Adjust this delay to speed up/slow down the button menu scroll speed.
    }
    
    
    ISR(PCINT2_vect) {
      unsigned char result = r.process();
      if (result) {    
        if (result == DIR_CW){rx=rx+(1*increment);} // account that rx = 1 times the frequency so the increment must be 4* or /.25
        else {rx = rx-(1*increment);};       
          if (rx >=18900000L){rx=rx2;}; // UPPER VFO LIMIT = 1X the opearting frequency + offset
          if (rx <=1200000L){rx=rx2;}; // LOWER VFO LIMIT = 1 X the opearting frequency + Offset
          
          }
    
    
     
            
      
    
    }
    
 
  // Watterott
// ---------
// The following two lines are needed for the MI0283QT9 display
// module to enable the backlight. If you are using any other
// display module these lines should be commented out.
// -------------------------------------------------------------
//  pinMode(9, OUTPUT);
//  digitalWrite(9, HIGH);
// -------------------------------------------------------------

// DisplayModule
// -------------
// The following 4 lines are needed for the DM-TFT28-105 display
// module to set the SS/CS pins for the other devices connected
// to the Arduino SPI pins. If you are using any other display
// module these lines should be commented out.
// -------------------------------------------------------------
//  pinMode(10,OUTPUT); digitalWrite(10,HIGH);  // TFT SS/CE
//  pinMode(8, OUTPUT); digitalWrite(8, HIGH);  // SD card SS/CE
//  pinMode(6, OUTPUT); digitalWrite(6, HIGH);  // Flash chip SS/CE
//  pinMode(4, OUTPUT); digitalWrite(4, HIGH);  // Touch controller SS/CE
// -------------------------------------------------------------


// Just get some random numbers

 
// Setup the LCD
      
 

void loop()
{          showFreq();
           checkMode(); //********Moved void checkBand out of the loop
           checkSideband();
           lastButtonState = buttonState;

           myGLCD.setBackColor(255,80,0);
          myGLCD.setColor(VGA_BLACK);
          myGLCD.setFont(BigFont);
          myGLCD.print(hertz, 190,51);
    
         
       adcval = analogRead(SM);  //S meter routine

        
        Serial.println(adcval);
        myGLCD.setColor(VGA_BLACK);
        myGLCD.fillRect(90,190,290,215);
       
        val= 30*log((adcval-200)/20);

        
       
        myGLCD.setColor(VGA_LIME);
        myGLCD.fillRect(95,198,95 + val,205);
       
        
        
        delay(20);
        
        
        
        Serial.println(val);
 
 
 

 
   
 
      myGLCD.setBackColor(255,80,0);
      myGLCD.setColor(VGA_WHITE);

      myGLCD.setFont(BigFont);
      myGLCD.print("Hybrid Wireless", CENTER, 10);
      myGLCD.setBackColor(255,80,0);
      myGLCD.setColor(VGA_WHITE);
      myGLCD.setFont(BigFont);
      myGLCD.print("N6QW Wizard of 91320", CENTER, 220);
      myGLCD.setBackColor(255,80,0);
      myGLCD.setColor(VGA_BLACK);
      myGLCD.setFont(BigFont);
      myGLCD.print("SMtr",15,190);
 
        myGLCD.setColor(VGA_BLACK);
        myGLCD.setFont(BigFont);
        myGLCD.print("S9", 185,173);
        myGLCD.setColor(VGA_BLACK);
        myGLCD.fillRect(95, 180, 97, 185);
        myGLCD.setColor(VGA_BLACK);
        myGLCD.fillRect(105, 180, 107, 185);
        myGLCD.setColor(VGA_BLACK);
        myGLCD.fillRect(118, 180, 120, 185);
        myGLCD.setColor(VGA_BLACK);
        myGLCD.fillRect(134, 180, 136, 185);
        myGLCD.setColor(VGA_BLACK);
        myGLCD.fillRect(150, 180, 152, 185);
        myGLCD.setColor(VGA_BLACK);
        myGLCD.fillRect(170, 180, 172, 185);
         
         
     showFreq();   

 

 


         
   
    {      
          
          
            myGLCD.setFont(BigFont);
            myGLCD.setBackColor(255,80,0);
            myGLCD.setColor(VGA_BLACK);
           myGLCD.print("Hz",280, 51);
          
            
           
           
          
         
         
   
      
        if (rx != rx2){  
          
            myGLCD.setFont(SevenSegNumFont);  // When you change frequency you don't have to screen clear! It paints it black
            myGLCD.setBackColor(255,80,0);
          //  myGLCD.setColor(VGA_BLACK);
          //  myGLCD.printNumI((rx-bfo),30,91);
           
              
            showFreq();

            
            si5351.set_freq(rx  , SI5351_PLL_FIXED, SI5351_CLK0);
            Serial.print(rx);
            si5351.set_freq(bfo  , SI5351_PLL_FIXED, SI5351_CLK2);
            rx2 = rx;
            
          
          
            
          
            
          }
          
        buttonstate = digitalRead(A3);
        if(buttonstate == LOW) {
            setincrement();
         
            
            myGLCD.setBackColor(255,80,0);
            myGLCD.setFont(BigFont);
            myGLCD.setColor(VGA_BLACK);
            myGLCD.print(hertz, 190,51);
            delay(10);
             
     
           
          
            showFreq();
        };
        
        delay(25);
        
      
    }  
}
     
         
       void checkMode(){
        buttonState = digitalRead(SW1); // creates a 10 second tuning pulse trani 50% duty cycle and makes TUNE appear on the screen
       if(buttonState != lastButtonState){
        if(buttonState == LOW){
        digitalWrite(LED,HIGH);
          
         myGLCD.setFont(BigFont);
        myGLCD.setColor(VGA_WHITE);
         
         myGLCD.print("TUNE", 130, 42);
        
         delay(12);
         for(int i = 0; i < 100; i++) {
         tone(9, NOTE_B5);
         myGLCD.setColor(VGA_LIME);   //Flashes the Icon during transmits
         myGLCD.fillCircle(282,39,8);
         delay(75);
         noTone(9);
         myGLCD.setColor(VGA_BLACK);
         myGLCD.fillCircle(282,39,8);
         delay(25);
         
         }
             
        }
       else{
         digitalWrite(LED,LOW);
         myGLCD.setFont(BigFont);    // This prints a Black TUNE over the RED TUNE and makes it disappear from the scereen
         myGLCD.setBackColor(255,80,0);
         myGLCD.setColor(255,80,0);
         myGLCD.print("TUNE", 130, 42);
         myGLCD.setColor(VGA_BLACK);
         myGLCD.fillCircle(282, 39, 8);
         
         noTone(9);
    
       }
          
      
         delay(40);
    
       }
         }
    
      void checkSideband(){
      
        if(digitalRead(SW)){  //********If SW is true do the following.    
           
           
           bfo = 8998500L;
           si5351.set_freq( bfo, 0, SI5351_CLK2);{
           
            if (bfo = 8998500L);
          myGLCD.setFont(BigFont);

          myGLCD.setColor(255,80,0);
          
         myGLCD.print("USB",12,61);}
           myGLCD.setColor(VGA_BLACK);
          myGLCD.print("LSB", 12, 42);
      }
      
      else{                //**********if not, do this.
          
          
          
         
          bfo = 9001500L;
          si5351.set_freq( bfo, 0, SI5351_CLK2);
             
             myGLCD.setFont(BigFont);
             myGLCD.setColor(255,80,0);
             
            myGLCD.print("LSB",12,42);
             myGLCD.setColor(VGA_BLACK);
             
            myGLCD.print("USB", 12, 61);
             
      }
      }   

    void showFreq(){
          millions = (((rx/1)-bfo)/1000000);
          hundredthousands = ((((rx/1)-bfo )/100000)%10);
          tenthousands = ((((rx/1)-bfo )/10000)%10);
          thousands = ((((rx/1)-bfo )/1000)%10);
          hundreds = ((((rx/1)-bfo )/100)%10);
          tens = ((((rx/1)-bfo )/10)%10);
          ones = ((((rx/1)-bfo )/1)%10);

         myGLCD.setFont(SevenSegNumFont);
         myGLCD.setBackColor(255,80,0);
         myGLCD.setColor(VGA_WHITE);
     
                
            myGLCD.printNumI(millions,30,91);           
            myGLCD.print("", 40,91);            
            myGLCD.printNumI(hundredthousands, 70,91);
            myGLCD.printNumI(tenthousands,100,91);
            myGLCD.printNumI(thousands,130,91);
            myGLCD.print("",140,91); //says print for the spacing
            myGLCD.printNumI(hundreds,170,91);
            myGLCD.printNumI(tens, 200,91);
            myGLCD.printNumI(ones, 230,91);
            
         
    }

           
           
     
     
     
   
      
    


          

Tuesday, November 19, 2024

November 19,2024. Seven Segment Color TFT Display Fonts

 

New Display for Hybrid Wireless

A display that plugs into and is integral with the Arduino Mega 2560. The Key Feature is the Seven Segment Display of the Frequency. A boon to Old Farts that have vision problems.

The Black Dot turns green on Tune/Transmit.

Monday, November 18, 2024

November 18, 2024. A pair of shoes for the Hybrid SSB Transceiver.


With a low Plate Voltage about 20 Watts PEP 


12GE5 Beam Pentode

275 VDC on the Plate

185 VDC on the Screen

A -20 to -30 VDC Bias

90 Ma Cathode Current

17.5 Watts Plate Dissipation


Replace the SS stages with a 12BY7 Driver and the 12GE5 Final. Broad Band No Tune Amp.

Tuesday, November 12, 2024

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...