Skip to main content

August 11, 2024. Using the Arduino Uno to make the CW Transmitter work.

Today I want to focus a bit on the Arduino code that will operate the transmitter. We will have to start by traveling back and looking at the code that operates the MC1496 Direct Conversion Receiver (DCR). 


Arduino Uno for the CW Transceiver.

The true story is that I did not start out to build a DCR. The real truth is that I was headed toward a SSB Transceiver that would utilize the MC1496 devices in many critical parts of the transceiver. (Product Detector, Balanced Modulator, Transmit Mixer, Receive Mixer)

I had a bag of old MC1496's in the 14 Pin DIP package and the goal was to test those for the SSB transceiver, custom selecting the best ones. It was jury rig time and for the code I just hacked some Arduino code I had that would work (with a lot of nulled lines).

So, we all know how things happen -- the DCR worked well beyond my expectations and so did the code. Soon an article evolved, and the rest is history. 

My 1st task is to clean up the code so that only those lines involved with the DCR are kept and from there modified to work with the transmitter.

One key element I include with all of my code is a little program I wrote that produces a pulsed 10 second, 988 Hz tone that could be used for tuning purposes. This will beat whistling into the microphone or shouting "Ola" over and over.

This timed action is already in the DCR code as it was not removed but simply nulled out. This function will be modified so that when a momentary Push Button (key) is engaged a 2 second timing cycle starts that causes an output pin to go HIGH for the timing duration. This same action cause CLK2 to be enabled for the timing duration where CLK2 = CLK0 - 600 (the offset). With the Key Up (Receive) the Pin Goes LOW and CLK2 is disabled. As long as you key (at about 13 -15 wpm) the timing cycle will not break. If you stop keying > 2 seconds back to receive. You may have to play with the value delay(2000) to suit your keying speed.

Below is the enabling code for the Transmitter LO. The example shows CLK1, it is changed in the code to CLK2

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

When a 1 appears after the CLK number then it is ON and when a 0 appears it is off.

The output pin when High triggers a small Reed Relay using a BS7000 driver, whose contacts are connected to 12VDC. The 12VDC feeds the Diode switch (TR) and provides a source to the Bias circuitry on the IRF510.

The Momentary switch has diode isolation to two other circuits, one of which is the PNP Keying transistor (2N2905) and the other is a semi muting switch on the audio amp. This gives us sidetone. SW3 is the Key on Pin 6 and Pins 9, 10, are timed outputs. CLK2 is enabled with the 600 Hz offset during the timing cycle.
 
  void checkCWMode(){
      
 
 
      buttonState = digitalRead(SW3); // creates a 2 second hold in
       if(buttonState != lastButtonState){
        if(buttonState == LOW){
          
         lcd.setCursor(10,1);  
         lcd.print(" XMIT ");
        
        delay(12);
        
        digitalWrite(9,HIGH);
        digitalWrite(10,HIGH);      
        si5351.clock_enable(SI5351_CLK2,1); //Turn CLK2 ON
        si5351.set_freq(rx1-600 , SI5351_PLL_FIXED, SI5351_CLK2); //The transmit frequency is offset by 600 HZ
         delay(2000); //2second delay
         
          
        }
       else{
          
        lcd.setCursor(10,1);
        lcd.print("    ");
        digitalWrite(9,LOW);
        digitalWrite(10,LOW);     
        si5351.clock_enable(SI5351_CLK2,0); //Turn CLK2 OFF
        lcd.setCursor(10,1);
        lcd.print(hertz);
    
        
    
       }
          delay(10);
    
    }

    }

The Block Diagram.






For those Blog readers not in California, Willie Brown was Mayor of San Francisco and Jerry Brown was twice Governor of the state of California. Jerry Brown's most notable other fame is that he is a member of an elite club along with George Lucas and JD Souther -- they all dated Linda Ronstadt! Past 70, it is really hard to keep the Brown's straight.

One blog reader suggested using the IRF510 Final in Class E based on its high efficiency --more watts to the antenna and less heat.

TYGNYBNT

73's
Pete N6QW

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

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

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