Skip to main content

A Practical Problem ~ How to make your hombrew rig do TUNE?

(A note from Pete -- I can see the number of hits on each post and was somewhat surprised that the secrets of homebrewing got nearly 500 hits and the troubleshooting one just over 150. So that is helpful and very telling --we like to build stuff; but don't like to fix it. That is the last time that troubleshooting will be discussed by me. I know how to do it --do you?)

How to make your Rig do TUNE?

So you asked has Pete been in the house too long because of all the rain in California and now has gone bonkers?  Everyone knows for SSB only rigs (like the stock Bitx40) you simply whistle into the microphone or yell the standard "HOLA"  into the microphone! Others will ask why do you even want to tune your radio? VU2ESE's Bitx40 instructions basically say plug in the microphone and talk it up.
 
Well having your SSB only rig be able to TUNE has some very practical and necessary applications. The CW ops are smiling now as they think --just hold the key down for about 10 seconds and you are in TUNE.
 
The "why" is now unveiled. Firstly if you have homebrewed your own rig, then you need to make adjustments so that the performance is optimized such as tuning the Band Pass Filter or setting drive levels to intermediate stages or even adjusting the bias on your IRF510. Of course you would never do this "on air" but into a dummy load. That is a lot of whistling or shouting HOLA. CW ops are still smiling!
 
Thus rig adjustment for best performance is probably the 1st use and the second after that  is the adjustment of the rig to the antenna. So OK, you have one of those fancy auto tuners and you let the tuner do the hard work. But if you are like me and have no such devices, then you need to be able to provide a tune signal to make the adjustments -- thusly reason #2. Perhaps a third is maintenance --suppose you suspect you are not getting full smoke to the antenna --then you would want to put your rig in TUNE and see what the output looks like.
 
So how does one generate a TUNE signal. Mind you the TUNE doesn't have to be at full power but just enough to put a couple of watts of RF into a dummy load or into your antenna system. So how is it done?
 
Method #1. In an SSB only radio if there is a way to unbalance the carrier in the balanced modulator then a simple unbalancing will output the carrier. This seems like an antithesis of its purpose. We work hard in our rigs to make the carrier "go away" --we get nervous when the carrier suppression is only 65 dB down and now we want to undo that. Well many of the old boat anchor radios had a carrier balance control right on the front panel so you could make that adjustment. Now with our packaged Double Balanced Mixer a bit harder to do. The SBL-1 however can be unbalanced --read EMRFD for a way as described by W6JFR (yes me in another life). But you cannot do this in a casual manner --so not for everyone.
 
Method #2 which offers some bonus features in that you effectively can add CW to your SSB only transceiver. In my KWM-4 I added CW by having a separate CW oscillator tuned to the center frequency of the filter and that signal was fed to a keyed buffer stage. This CW oscillator was only turned on when you hit the key and was held on for a short period of time. The output from the keyed buffer was fed to a relay where it was injected into the 1st  bilateral IF stage bypassing the filter. From there the signal went to the RxTx mixer stage. Sorry CW ops this is not QSK and is like semi-break in with delay. Clunky for the ardent CW op --yes but it would do CW with an offset since on receive  the Rx was set to USB. This same approach could be used for TUNE. Just hold down the key. The real hard part of this was the control and sequencing circuitry. But it did work. I have made one CW contact on the KWM-4 and it worked flawlessly. I had to do the CW contact for proof of concept.
 
Method #3. Since my primary interest is SSB --- how would you do this? Many early transceivers  used a tone for generating CW and that same tone keyed the VOX which put the rig into transmit. The Collins KWM-2 used this approach as did others. Staring me in the face was the Arduino and I said why can't I let the Arduino do all of the heavy lifting. I researched generating tones with the Arduino and it was possible to do just that. For the earlier IDE's there is a library called "toneAC" that must be in your library section of the Arduino folder. Now the rub --you will have to find a later version of this library to work with the IDE 1.6.0 and above.

So that is step one. Next you will have to include the following in your sketch: #include <toneAC.h>  Now I picked a tone that was close to 1000 Hz and the best I could do was 988 Hertz. That to needs to be in the sketch in this form  #define NOTE_B5 988 Finally you need to designate a tone pin --where will the output be on the Arduino and you will need this statement const int tonepin = 4; //tune up tone  We will also need to start the cycle and thus an input pin --in the set up you must write code for the pinMode and to define a status for the pin so that it is HIGH. We picked pin 12 and called that SW1 which is really a push button.

#include <toneAC.h>
#define NOTE_B5 988
const int tonepin = 4; //tune up tone
const int SW1 =12; // provides the TUNE function
const int LED = (some free pin number); //attach mini relay to parallel PTT contacts

In the setup()

     pinMode(SW1, INPUT); //Tune
     digitalWrite(SW1,HIGH);


So how does generating a tone work and how does this cause a TUNE signal? Essentially the sequence is to momentarily hit a panel mounted Push Button which we call SW1. There is a call function in the loop that constantly looks to see if the push button has been pushed which would be a signal that Pin 12 is LOW. From there the call function starts and the main loop is on hold. In the most current use I have pretty much used up all of the Arduino pins so had to come up with a bit of a work around.

When I first used this approach I was not constrained for pins and here is the sequence of what happened. The PB is engaged and the loop takes over and recognizes the button was pushed and immediately moves to the call function. Another free pin was designated as a Push To Talk pin and so upon initiation would go HIGH to which a 5 VDC mini relay was connected whose contacts were in parallel with then normal PTT contacts --the rig would now be placed into transmit. Next a message would appear on the screen, that the rig was in TUNE. Finally the tone was generated at 988 Hz, But there was a loop counter inside the loop that would turn the 988 Hz tone on and off for a specific number of cycles and thus a pulsed tone. That was the "if" part of the call function. The else part is where the word Tune is once again painted on the face of the display only it is the color of the background and thus "disappears". The pin driving the 5 VDC mini relay goes low and the PTT un-keys and the receiver comes to life. The pulsed tone is better than a constant tone as it is easier on the finals and is helpful during a antenna tune where the SWR is high. Below is an example of the rig in the TUNE mode. Pretty cool?



In one of my current projects I was short of pins so I just paralleled a panel mounted switch that is in parallel with the PTT. After engaging the (MOX) switch the rig is in transmit and I simply press the momentary PB and we are in tune. The "MOX" switch on the panel is nice if your are testing microphones so you don't have to hold down the PTT.

But wait you are NOT done. That beautiful 988 Hz tone is a SQUARE wave and perhaps a bit hard on some of the circuitry downstream. On the internet I found a square wave to sine wave RC network that uses three 1.5K resistors and three 10 NF caps. --almost like a phase shift network --well it does knock of the corners but is no pure sine wave.

Here is the call function code: //For Check Mode --ie TUNE If you have added the 5 VDC relay to one of the pins you need to add digitalWrite(LED, HIGH) in the "if" part and digitalWrite(LED,LOW) in the "else" part. I simply called the PTT pin LED and you will also have to declare the LED pin number and the initial setup() add  pinMode(LED, OUTPUT); and initial state digitalWrite(LED, LOW);


     void CheckMode(){
      buttonState = digitalRead(SW1); // creates a 10 second tuning pulse train50% duty cycle       makes TUNE appear on the screen
       if(buttonState != lastButtonState){
       if(buttonState == LOW){
      
   
     tft.setTextSize(2);
     tft.setTextColor(WHITE); // This puts a white TUNE on a black background
     tft.setCursor(126, 110); 
     tft.print("TUNE");
     delay(12);
     for(int i = 0; i < 100; i++) {
     tone(4, NOTE_B5);
     delay(50);
     noTone(4);
     delay(50);
      }
            
        }
    
    else{
        
         tft.setTextSize(2);    // This prints a black TUNE over the white TUNE and makes it disappear  from the screen
         tft.setTextColor(BLACK);
         tft.setCursor(126, 110);
         tft.print("TUNE");
        
       noTone(4);
   
       }
         
     
         delay(50);
   
    }
   
   
73's
Pete N6QW.

This is a useful tool but does require some noodling.

 

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