Tuesday, September 3, 2019

Dipping the Toe into the World of CW

A New Found Opportunity--Arduino + CW!

The Left Coast Loafer CW Transceiver






Hey John Bolton now that you have some free time, have you considered getting a ham ticket?

A New Definition for MAGA

More And Greater Avarice. 

Maybe the wrong guy just got fired yesterday!


*****************************************
9/7/2019 ~ CW Output Across 50 Ohms




*****************************************
9/6/2019
More Tidbits for your amusement and amazement!

So here are a couple of "tricks" I would like to share with you.


  1. First is how to have sidetone. Well with my super duper DPDT TR switch I added a 470 Ohm 1 watt resistor and a 1N4007 diode. The 470 Ohm connects on one end to the voltage contact that supplies the Transmit voltage. The other end is connected to the Anode end of the diode. The Cathode end is then connected to the contact that receives juice on Receive. Thus on receive no voltage is fed back to the transmit side; but when in transmit voltage is fed to the receiver. The 470 Ohm dropping resistor is a 2 watt unit which essentially operates the receiver  at about half voltage and the audio is not very loud. With the scheme I am actually listening to the transmitted signal -- thus sidetone.
  2. Next is the method of turning CLK2 ON/OFF for transmit. I am not actually keying the clock; but during the transmit sequence CLK2 is continuously on and the transmit RF chain is keyed through a 2N2905 PNP "keying" transistor. You do hear a bit of backwave in the headphones but that is not transmitted. So back again to my DPDT TR switch and voltage is taken off the transmit contact and fed to the Base of a 2N3904 through a 1K 1/4 watt resistor. The 2N3904 Collector is connected to Pin 4 on the Arduino Nano which has been set HIGH in software. The Emitter is grounded. So when voltage is applied to the base via the 1K resistor the transistor switches and essentially Pin 4 is made LOW which turns ON CLK2. Throwing the DPDT back to receive stops the CLK2 (OFF) and all is normal.
  3. A further refinement as found in SSDRA (not seen in EMRFD) is an electronic TR switch using a NE555 and a few diodes. This would automate the sending so all you do is hit the key and the rest is automatic.

What started out as a bunch of scrap/surplus circuit modules is now a full functioning CW transceiver. You just got to love all of this technology.



73's
Pete N6QW

*****************************************
9/5/2019

Something new learned today!!!!!!!!


This is the very 1st time I am using all three clocks on the Si5351. and it has been an excellent learning experience for me that I want to share with you.

So CLK(0) is supplying the LO signal at around 5 MHz and CLK(1) is supplying the BFO signals ( 12.096 MHz +/-) for CWU and CWL. Should mention I used an AD9850 stock oscillator to find the proper BFO frequencies and then modified the code with those frequencies. So the grand plan was how to use CLK(2) in such a way that it spit out the proper frequency for the transmitter including a plus/minus 600 Hz offset. 

Setting the third clock to give that frequency output so that it automatically tracked the received frequency was not too difficult. The nut to crack was to only have that third frequency output only while transmitting. 

My code senses a LOW condition on Pin 4 and when that happens and depending on whether you have CWL or CWU engaged the transmitted frequency is +/- 600 Hz from the received frequency, the third clock is turned on and the display shows that frequency. The problem I initially had was that once turned on -- it stayed on! There were some references to how to do it and they were not clear nor was the data sheet helpful. That is when I spotted something in the si5351.h file --the ah ha moment.

With a simple line of code and a change in one coefficient it is possible to turn ON and turn OFF a clock --in software/

Turn ON:     si5351.clock_enable(SI5351_CLK2, 1);
Turn OFF:   si5351.clock_enable(SI5351_CLK2, 0);

(OK you missed it -- the "1" turns it on and the "0" turns it off.)

So my code senses if Pin 4 is LOW and if so then turn ON the CLK2. If it is not LOW then turn it OFF. This is the standard If Else regime. You also have to blank out the frequency in the else part of the code. Here is the code

 void CheckCW() {
         
                 digitalRead(4);
                 if(digitalRead(4) == LOW){
                 si5351.clock_enable(SI5351_CLK2, 1);
                
                 si5351.set_freq( bfo+O-rx2, 0, SI5351_CLK2);
                 ucg.setFont(ucg_font_ncenR14_tr);
                 ucg.setColor(255, 255, 0);
                 ucg.setPrintPos(15,80); 
                 ucg.print(bfo+O-rx2);
           
            
                 
             
         }
            else{
              
                si5351.clock_enable(SI5351_CLK2, 0);
        
               
                 ucg.setColor(0, 0, 0);
                 ucg.setPrintPos(15,80); 
                 ucg.println(bfo+O-rx2);
            }
                
       

 }


Note: O is the offset variable and is set by a selection in the code. If you select CWU then O = +600 and if you select CWL then O = -600. 


Now the Code for CWU CWL Selection:

There still may need to be some tweaking to get CWU CWL in the right relationship which only requires changing the signs on the O = 600 or O = -600. But the display does change from having the transmitted signal above or below the received signal by 600 Hertz. If you don't like 600 Hertz the change the 600 to what ever you like such as 800 or maybe 500. The code below is based on my filter frequency which is above the signal frequency. If you use a different filter frequency below the incoming (homebrew, heathkit or early Yaesu)  then you will have to diddle with the U or L and the offset. The photos below are to merely show that the transmitted frequency is either above or below the received frequency --my scheme works! The code now makes CWL = -600 and CWU + 600. On the Air tests will help me affirm that is the correct sequence. If not just changes the two signs of the 600 and you would be there. Gets a bit confusing. 

 void CheckSB(){
     

     if(digitalRead(SW)){  //If SW is true do the following.
       bfo = 12098500L; 
       si5351.set_freq( bfo, 0, SI5351_CLK1);
       {
          O = +600; // + Offset Value
     
        ucg.setFont(ucg_font_ncenR12_tr); 
        ucg.setColor(0, 0, 0);
        ucg.setPrintPos(42,98);
        ucg.println("CWU");
      
        ucg.setFont(ucg_font_ncenR12_tr);
        ucg.setColor(255,10, 200);
        ucg.setPrintPos(3,98); 
        ucg.println("CWL");}
    
     }
      else{                //if not, do this.
         
         
         
        
          bfo = 12096500L;
          O =  -600; // - Offset value
       
          si5351.set_freq( bfo, 0, SI5351_CLK1);
          ucg.setFont(ucg_font_ncenR12_tr); 
          ucg.setColor(0, 0, 0);
          ucg.setPrintPos(3,98);
          ucg.println("CWL");
      
          ucg.setFont(ucg_font_ncenR12_tr);
          ucg.setColor(255, 10, 200);
          ucg.setPrintPos(42,98); 
          ucg.println("CWU");
          }
         
      }


    
      




I still have some wiring to accomplish. When I use my exotic DPDT switch for TR it will also close a relay to provide a LOW condition at Pin #4. When you go to Receive then the clock is turned OFF and the screen is blank where the transmit frequency was showing. 

I bypassed the crystal oscillator transistor and straight into the EMRFD board. I get over 500 MW and my SS amp now registers 50 watts out. Shades of my Johnson Adventurer (on steroids). A few more checks and we may actually have to make a contact.

After I get things cleaned up I will post the code on my website www.n6qw.com.

If I had thought how to do this before --it might even be possible to build CW into most of my homebrew SSB transceivers  using a method I used in my KWM-4. There the generated CW signal bypasses the mechanical filter and dumps the CW signal right into the transmit mixer chain. In the KWM-4 it is fixed so that it receives only on USB (the two schematics below show the KWM-4). 

Now much of the work would be done with the Arduino/Si5351  and a simple keyed buffer amp. Look at the dates on these schematics -- almost 7 years ago I had a scheme for SSB and CW in a homebrew double conversion multiband transceiver. OK I will say it -- ahead of its time!




Pete, N6QW
******************************************
9/4/2019


I have received some inquiries about the "innards" of the Left Coast Loafer CW Transceiver and will over time will supply some technical data about the rig. The rest is up to you.



Firstly this rig just sort of happened like spontaneous construction. I had some spare and/or obsolete circuit board modules in the junk box and the next thing you know -- we have a transceiver. 

Note this is essentially a Trans / Receiver and the common element is the Digital VFO which generates the LO and BFO signals for the receiver as well as a secondary VFO that offsets the received frequency by + or - 600 hertz for the transmitter. It is not a true transceiver (sharing many common elements) like I usually build





  • The Audio amplifier board was originally in the LBS transceiver project. I never liked the discrete components amplifiers -- too many parts and I really have no need or desire to know what every components does in an audio amp circuit. But I did have the board. One premise of the LBS was to only use discrete components.
  • The main receiver board is comprised of a homebrew  DBM, a healthy (2N5109) post mixer amplifier and a three pole 12.096 MHz crystal filter thence followed by a BF991 product detector. That board also had a J310 Crystal Oscillator for the BFO. The board size was maybe 3 x 4 inches. It was initially built again as a part of the development effort for the LBS project. [The LBS project was a two part article in QRP Quarterly authored by myself and Ben KK6FUT (now AI6YR)  -- LBS = Let's Build Something.] Needless to say --it works pretty well.
  • The Rx RF amp stage is just a single "hot biased" 2N2219 and is untuned. In fact there are no Band Pass Filters in the Rx section -- probably one would help with out of band signals --but this is a "loafer" build.
  • The transmitter, initially crystal controlled on one frequency (7.030) in its original form was an oscillator stage in a 30M CW transceiver which also was published in QRP Quarterly. That transceiver has been cannibalized and the parts and boards have found their way into many of my current SSB transceivers. This board has a 2N3904 crystal oscillator essentially followed by the EMRFD stage (2N3904/2N3866) and develops about 1/2 watt. An afterburner delivers about 15 to 20 watts to the antenna. The transmitter will now be driven by one of the outputs from the Si5351 and is offset by +/- 600 Hertz from the received frequency.
  • My initial construction had a 5 MHz VFO operating the receiver and the single crystal for the Transmitter. Now with the Arduino/Si5351/Display we have the Rx LO and BFO and the Tx VFO all in one neat package.
  • For now we will use manual switch over from Rx to Tx but the Arduino will be reprogrammed so that you hit the key and it is automatic --you are on the air. 
  • Other possibilities drawing upon the collaborative efforts with AI6YR and use the articles we penned for QRP Quarterly for the CW Sender and incorporate a keyboard for sending CW. It may require the use of a Mega 2560 --but that is just more space on the breadboard.
  • The Box has been opened...



*****************************************

9/3/2019

This post is a result of too much Temperature (90F), too much Tequila and too much Time on my hands.



In the process of creating a new rig, I actually ended up with a spare Arduino Nano and Si5351. This was a fatal error for now I had a driving desire to couple these two with my new found color OLED Displays --an worse yet to integrate these three items into a simple CW transceiver.



An earlier foray in August with again the terrible three's (Temperature, Tequila and Time) I built an analog VFO controlled VFO receiver with a 3 pole 12.096 MHz crystal filter and then mated that with a QRP 7.030 MHz Crystal Controlled transmitter. So now how to make the lash up work with the Arduino & Si5351.



The Easy Part 1st!

That is the beauty of having lots of code snippets as it now becomes possible to port over code to new projects without having to start with a clean sheet of paper.

My initial configuration is to have the following:


  1.  The LO will run around 5 MHz and mated with a 12.096 MHz IF results in signals in the 40 Meter band. So the code was changed so that CLK(0) would spit out the LO signals and the display would read the 40 Meter Band
  2. The crystal BFO would be initially kept for the testing purposes so a BFO frequency as such (typically CLK(2)) would not be generated. However CLK(2) would only be activated on transmit would take the BFO (IF) frequency and subtract the LO but would add 600 Hz as the offset. I call that CWU so that the transmitted signals would always be 600 Hz higher than the received frequency. With additional code, a simple switch would give you CWL which then would cause the transmitted signal to be 600 Hz lower in frequency. Again initial testing will be at the +600 Hz offset.
  3. The first photo below shows the display in the receive condition with a default boot up of 7.030. The second photo shows the transmitter engaged (a Pin goes low on the Arduino) and the transmit frequency is generated via CLK(2) at 600 Hz higher in frequency. Unkey the pin and CLK(2) stops and only the recei9ved frequency is displayed. Initial tuning tests with the encoder indeed shows that the transmitted frequency tracks the received frequency by +600 Hz. Pretty cool.







So the next steps are as follows:



  1. Mate the Arduino/Si5351/Display with just the receiver section and run the various test such as birdies, noise, sensitivity etc.
  2. The output of the CLK(2) is not a sinewave and so some cleanup might be (very likely will be) needed. I also need to determine how to replace the crystal with the signal from CLK(2) and also address the signal level which might require a booster amp.
  3. The current configuration has a DPDT switch that changes the voltage to the Rx and TX as well as switch the antenna from Rx to Tx. This may need to be a bit more refined. so that you hit the key and all is automatic.
  4. Finally this may be an opportunity to try CLK(1) which would supply the BFO signal thereby eliminating the Crystal BFO.

Note this is a measured approach so that changes are made in such a way as to test, evaluate and refine any modifications being made.



I just hope it gets cool so I can get back to some serious other SSB SDR work. Stay Tuned!





73's

Pete N6Qw

Back to some Techie Stuff!

Upgrade that IRF510 Final Amp! [ O nce you have done this upgrade you should consider putting your homebrew SSB Transceiver on FT-8 and...