Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
If you are having a problem, please refer to the product documentation or check the Help Center for known solutions.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.

Physical PTT for Remote SmartSDR

Dave - N6XVZ
Dave - N6XVZ Member ✭✭
I want to have a physical PTT switch and run my radio via SmartSDR remotely from the physical radio (actually just downstairs from radio location in a telecom rack in a closet).

Yes I know how to MOX and VOX and the wonderful space bar trick.  I still want physical PTT.

Given the following:
* Flex Radio 6xxx
* SmartSDR 2.4.9
* Windows PC with USB and Audio in but NO Serial port
* Open to using other software to assist (like FRStack)
* Open to building interfacee
* Fine with configuring CAT

How would I do this:
Have a physical microphone (Could be be USB or traditional - don't have this yet) and a PTT button

Driving PTT via CAT is my presumption and use something like FRStack to translate to MOX for SmartSDR

I've seen other threads here like putting an Arduino Nano ($30) into a Footswitch and running a Serial to USB Cable ($10-20) but that seems overcomplicated and expensive and was a solve 4 years ago.

Could it now be just as simple as wiring a switch (shorting pins 8 & 9) to a DB9 and then into a Serial To USB Cable and enabling CAT with PTT and running FRStack?

Or is there something a bit more elegant that I'm missing?

Have ya done it?  Help me out with your learnings please!

Answers

  • Mike-VA3MW
    Mike-VA3MW Administrator, FlexRadio Employee, Community Manager, Super Elmer, Moderator admin
    edited September 2019
  • WX7Y
    WX7Y Member ✭✭✭✭
    edited June 2020
  • Dave - N6XVZ
    Dave - N6XVZ Member ✭✭
    edited December 2018
  • John - K3MA
    John - K3MA Member ✭✭
    edited December 2018
  • WX7Y
    WX7Y Member ✭✭✭✭
    edited December 2018
  • Lee, N2LC
    Lee, N2LC Member ✭✭
    edited September 2019
  • Mike-VA3MW
    Mike-VA3MW Administrator, FlexRadio Employee, Community Manager, Super Elmer, Moderator admin

    I just tested this under 3.1.12 and it works.

    Connect to Radio locally or SmartLink on your Windows computer.

    Open SmartCat - make sure it is connected to the same radio

    This shows the radio I am connected to and the 'Station' aka, client. In this case, it is my Maestro named VA3MW



    Plug in a USB / RS232 cable - Make sure Windows sees it ok. Not the Com #. In my case, it was Com 14

    Create a new PTT port with SmartSDR CAT.  

    The serial port is "Existing" and I picked Com 14 since it is the physical port you installed previously.


    It will be attached to Slice A - If you had a Slice B you were going to ask, you would have to duplicate it on another switch, or just use FRstack -- FRStack requires a pullup resistor it seems (I can't seem to find the schematic to do this).

    For RTS Active Low, I have the FootSwitch connected across pins 7 and 8 on DB9 Female connector plugged into the USB / RS232 cable. (It was the same cable I used for testing SmartSDR for MAC remote PTT).

    I have confirmed that it does work on Local and SmartLink connections.

    Mike va3mw

  • Mick  W8BE
    Mick W8BE Member ✭✭

    The solution above is great if you have a DB com port. I use an Aurdino Nano Every in a foot switch to send CAT commands for Mox on\off. This allows me to the usb com ports on a laptop. I can post the Arduino sketch if any one is interested..

  • Mike-VA3MW
    Mike-VA3MW Administrator, FlexRadio Employee, Community Manager, Super Elmer, Moderator admin

    @Mick W8BE

    The design I mentioned is for someone who just wants to add a USB/232 cable to their windows PC.

    But, the Nano design is pretty cool too to send TX0 and TX1 commands.

    Please post the sketch, it would be fun to see.


    Mike

  • Mick  W8BE
    Mick W8BE Member ✭✭
    edited October 2020

    @Mike-VA3MW

    See sketch below. I have found out that my using hardware flow control works best for me. I have been running this on our club 6400 and on the guys can't even tell I am remote. I can't imagine not operating with out it now.


    #define PTT 2 // PTT pinD2 var 

    volatile int PTT_State = HIGH; // volatile, value changes in  

    ISR 

    const int bounce_delay = 20; 

    volatile int bounce_time = 20; // volatile, value changes in  

    ISR 

    int PTT_Old_State = HIGH;  

    void setup() { 

    pinMode(PTT, INPUT_PULLUP); 

    attachInterrupt(digitalPinToInterrupt(PTT), switchISR,  CHANGE); // attach interrupt handler 

    Serial.begin(9600); // set baud rate for usb port 

    delay(100); 

    void loop(){ // put your main code here, to run repeatedly:  

     if(PTT_State != PTT_Old_State) { 

     if(PTT_State == LOW) { 

     pttOn(); 

     } if(PTT_State == HIGH) { 

     pttOff(); 

     } 

     PTT_Old_State = PTT_State;  

     } 

    }  

    // Interrupt Service Routine (ISR) 

    void switchISR () { 

    if((bounce_time + bounce_delay) >= 50) { 

    return; 

    PTT_State = digitalRead(PTT); 

    } // end of switchPressed 


    //ptt On CAT Command 

    void pttOn(){ 

    Serial.print("ZZTX1;"); 

    delay(10); 

    PTT_State = digitalRead(PTT); 


    // ptt Off CAT Command 

    void pttOff(){ 

    Serial.print("ZZTX0;"); 

    delay(10); 

    PTT_State = digitalRead(PTT); 

  • Mick  W8BE
    Mick W8BE Member ✭✭

    The previous sketch did not post well. I am reposting for better clarity.

    #define PTT 2 // PTT pinD2 var

    volatile int PTT_State = HIGH; // volatile, value changes in ISR

    const int bounce_delay = 20;

    volatile int bounce_time = 20; // volatile, value changes in ISR

    int PTT_Old_State = HIGH;  


    void setup() {

    pinMode(PTT, INPUT_PULLUP);

    attachInterrupt(digitalPinToInterrupt(PTT), switchISR, CHANGE); // attach interrupt handler

    Serial.begin(9600); // set baud rate for usb port

    delay(100);

    }


    void loop(){  // put your main code here, to run repeatedly:

      

     if(PTT_State != PTT_Old_State) {

      if(PTT_State == LOW) {

       pttOn();

      } if(PTT_State == HIGH) {

       pttOff();

      }

       PTT_Old_State = PTT_State;

       }

    }  


    // Interrupt Service Routine (ISR)

    void switchISR () {

    if((bounce_time + bounce_delay) >= 50) {

    return;

    }

    PTT_State = digitalRead(PTT);

    } // end of switchPressed


    //ptt On CAT Command

    void pttOn(){

    Serial.print("ZZTX1;");

    delay(10);

    PTT_State = digitalRead(PTT);

    }

    // ptt Off CAT Command

    void pttOff(){

    Serial.print("ZZTX0;");

    delay(10);

    PTT_State = digitalRead(PTT);

    }  



    If you want to send a dax off command just insert the following code in your sketch:

    void daxOff(){

      Serial.print("ZZDX0;"); 

    }


    Then add daxOff() to the main loop:

    void loop(){  // put your main code here, to run repeatedly:  

     if(PTT_State != PTT_Old_State) {

      if(PTT_State == LOW) {

    daxOff();

    delay(10);

       pttOn();

      } if(PTT_State == HIGH) {

       pttOff();

      }

       PTT_Old_State = PTT_State;

      

     }

    }  

  • I think a Link to the Ardunio Sketch might be helpful
    Versus typing it all in, I am obviously a newbie to Arduino

    I am also wondering where is the best resource for all things Arduino for Ham Radio?

    Di Dit
    Steve
    KG5VK
  • Mick  W8BE
    Mick W8BE Member ✭✭

    Copy the sketch and paste into your IDE.

  • Mike-VA3MW
    Mike-VA3MW Administrator, FlexRadio Employee, Community Manager, Super Elmer, Moderator admin

    @Mick W8BE

    I wonder if you posting it in GitHub might be a better choice since this forum does mess up formatting.

    Mike

  • BA4KW
    BA4KW Member ✭✭
    Pin 7&8 short a 104 capacity
  • Disu
    Disu Member
    Hello Mike

    Thank you very much for your good tips regarding a foot switch which is connected to the PC via RS232. I have rebuilt this and have also made the PTT settings under CAT the same as you. Result: When pressing the button, the software goes to send, but my modulation is not sent. When I go on the air with the MOX button, it also sends modulation. Which setting do you think I forgot to make? Surely just a button press somewhere in the SmartSDR, right?
    Best 73 de HB9EHO
    Matthias

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.