Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
Need the latest SmartSDR, Power Genius, Tuner Genius and Antenna Genius Software?
SmartSDR v3.8.19 and the SmartSDR v3.8.19 Release Notes | SmartSDR v2.12.1 and the SmartSDR v2.12.1 Release Notes
SmartSDR v1.12.1 and the SmartSDR v1.12.1 Release Notes
Power Genius XL Utility v3.8.8 and the Power Genius XL Release Notes v3.8.8
Tuner Genius XL Utility v1.2.11 and the Tuner Genius XL Release Notes v1.2.11
Antenna Genius Utility v4.1.8
SmartSDR v3.8.19 and the SmartSDR v3.8.19 Release Notes | SmartSDR v2.12.1 and the SmartSDR v2.12.1 Release Notes
SmartSDR v1.12.1 and the SmartSDR v1.12.1 Release Notes
Power Genius XL Utility v3.8.8 and the Power Genius XL Release Notes v3.8.8
Tuner Genius XL Utility v1.2.11 and the Tuner Genius XL Release Notes v1.2.11
Antenna Genius Utility v4.1.8
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.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.
USB PTT foot-switch
Marc Lalonde
Member ✭✭
that something i have in my brain for some time to build a USB PTT foot-switch
i operate remote and already have USB studio mike and not like to rely on third party application
only for handle my "CTS" serial port foot-switch
so i take Arduino nano and fit it inside on treadlite II switch
that beta code
//on next version will add a time-out timer by polling ZZTX; status and force RX if TX stay on for //longer that 180 second (JT-65 and meteor-scatter friendly)
#include <Bounce2.h>
#define PTT 2
int PTT_State = 0;
Bounce debouncer = Bounce();
void setup() {
// put your setup code here, to run once:
Serial.begin(57600);
pinMode(PTT, INPUT_PULLUP);
debouncer.attach(PTT);
debouncer.interval(5); // interval in ms
}
void loop() {
// put your main code here, to run repeatedly:
debouncer.update();
if (debouncer.read() != PTT_State){
if (digitalRead(PTT) == LOW) {
Serial.println("ZZTX1;");
PTT_State = 0;
delay(100); }
else {
Serial.println("ZZTX0;");
PTT_State = 1;
delay(100);
Serial.println("ZZTX0;"); } // just in case radio missing it
}
}
Next on my todo list was Native USB radioSport RS60CF headset
by put mini external USB sound card inside the headset shell
so keep analog audio line as short as possible ;-)
73! Marc VE2OLM
i operate remote and already have USB studio mike and not like to rely on third party application
only for handle my "CTS" serial port foot-switch
so i take Arduino nano and fit it inside on treadlite II switch
that beta code
//on next version will add a time-out timer by polling ZZTX; status and force RX if TX stay on for //longer that 180 second (JT-65 and meteor-scatter friendly)
#include <Bounce2.h>
#define PTT 2
int PTT_State = 0;
Bounce debouncer = Bounce();
void setup() {
// put your setup code here, to run once:
Serial.begin(57600);
pinMode(PTT, INPUT_PULLUP);
debouncer.attach(PTT);
debouncer.interval(5); // interval in ms
}
void loop() {
// put your main code here, to run repeatedly:
debouncer.update();
if (debouncer.read() != PTT_State){
if (digitalRead(PTT) == LOW) {
Serial.println("ZZTX1;");
PTT_State = 0;
delay(100); }
else {
Serial.println("ZZTX0;");
PTT_State = 1;
delay(100);
Serial.println("ZZTX0;"); } // just in case radio missing it
}
}
Next on my todo list was Native USB radioSport RS60CF headset
by put mini external USB sound card inside the headset shell
so keep analog audio line as short as possible ;-)
73! Marc VE2OLM
5
Comments
-
Very cool! Thanks for sharing!0
-
I did something similar a while back but I used a serial port instead of USB. You might find this: https://community.flexradio.com/flexradio/topics/push-to-vox-version-1-0-0-is-now-available interesting. With it you can can toggle either VOX or MOX.0
-
Nice work Marc! I too have been integrating the Arduino with my 6500. I use the Arduino to debounce my old Vibroplex keyers and massage the dit/dash timing, and use the new USB support to decode frequency and control bandswitching, antenna switching, SteppIR configuration, and utilize i2C bus devices to perform just about anything I desire (e.g. analog voltages for old Icom antenna tuners). Great fun ...
W7NGA dan
Seaside, Oregon0 -
Nice work Marc, this is a good idea.. let me know if you ever come down to Amos so we can meet somewere0
-
Serial.println("ZZTX1;");
I can find no reference that states the TX command is supported.
Does this actually work on a Flex Signature radio?
W7NGA dan
Seaside, Oregon0 -
HI that native cat command for SmartSDR ,at least it work on my 6700 whit last software
page 32 of SmartSDR-CAT-User-Guide.pdf
but may use kenwood ts-2000 if what to
73 Marc l. VE2OLM0 -
hmmm ... I can't find a SmartSDR CAT User-Guide
I am using the new USB cable interface and this command doesn't appear to be supported.
I think that is the issue ... it supports a very limited subset of CAT commands.
0 -
Outstanding. I am going to try it.0
-
i take it here www.flexradio.com/downloads/smartsdr-cat-user-guide-pdf/
since it a FTDI chip i assume it may work directly on radio USB port
but for now i only try on my Desktop PC
for kenwood CAT emulation it TX; or RX;
that may tested on CAT log.. windows whit the test Button0 -
Thanks Marc.
0 -
HI bit of reading and "CAT" USB cable plug on radio not handle ZZTX; command or TX; RX;
but i also not a issue since it have PTT on accessory connector (DB15)
and on mic connector on front of radio
on my case i what to use laptop / Desktop and my radio was remote in cabinet in the basement
so have USB PTT take sense ;-) same whit USB headset0 -
ok got my RadioSport headset from Flex today
so i turn it into a USB headset for use on my remote radio
Think it the first USB RS-60
so i take a small external USB sound card on ebay and remove all connector
then solder head phone wire to it ,and use 4 pin of mini XLR for USB
noting to complex about 45 min of work , i lost the use of build PTT but who use it really ?
first test look really good , this week-end Winter-Field day will be the real test ;-)1 -
Just built one of the foot switches this week with a cheap Chinese nano-clone. Works great! Thanks for sharing the code.1
-
Building one of these now with a nano-clone off Amazon. I notice there is a 3v3 pullup resistor to D2 in the first photo, but the value is hidden. Is it even required, since the internal pullup resistor is already enabled?0
-
HI value is not critical 1K is good , internal pull-up is very weak so it like ti rely on external one
0 -
Marc,
Did you ever finalize the code. I see your beta code posted. Wondering if there is a GA version.
tu
0 -
HI normally code work and have never change
but cannot test i since i no longer have flex ,sine none of the radio seem to work
on my un-heated remote site during cold Canadian whiner0 -
Thanks Marc...0
-
I just stuck my toe in the Arduino world for the 1st time... Downloaded the web editor and ran Marc's code. It threw out an error on bounce2.h . A quick google search and I learned about library manager. I downloaded bounce2.h and ran the code again. Success...Now I need is the nano and some solder time. I decided to get real Arduino boards instead of knock offs. It's not the boards I am worried about. It's more the drivers that I suspect. Regardless I hope to put my PTT switch together soon.
thanks to Marc for the code...
0 -
You can also do it without the Arduino. It is discussed here:
https://community.flexradio.com/flexradio/topics/remote-footswitch-how-to-lan-vpn-solution
Mike0 -
Update - It's working. I used the Nano Every. It was a tight fit but I have it in the foot switch.. I wish there was CAT command to disable DAX. I did not see it in the log. Then I would not have the issue where PTT is on but no audio. Regardless having a USB PTT is cool...Thanks Marc.
I would have went with the rs-232 port but I plan on using this with a lap top...
0 -
I wish there was CAT command to disable DAX.
ZZDX0;1 -
Ask and you shall receive. I did not see it in the manual . Thanks Tim.. Going to mod the code and give her a whirl...
0 -
Tim,
Impressive... I just coded it up and works as advertised. Here is the revised code.
#include <Bounce2.h>
#define PTT 2
int PTT_State = 0;
Bounce debouncer = Bounce();
void setup() {
// put your setup code here, to run once:
Serial.begin(57600);
pinMode(PTT, INPUT_PULLUP);
debouncer.attach(PTT);
debouncer.interval(5); // interval in ms
}
void loop() {
// put your main code here, to run repeatedly:
debouncer.update();
if (debouncer.read() != PTT_State){
if (digitalRead(PTT) == LOW) {
Serial.println("ZZDX0;");
Serial.println("ZZTX1;");
PTT_State = 0;
delay(100); }
else {
Serial.println("ZZTX0;");
PTT_State = 1;
delay(100);
Serial.println("ZZTX0;"); } // just in case radio missing it
}
}
I am wondering if it makes sense to do the DAX disable in the setup. There is a slight lag due to the extra command. Not really a big deal. Just wondering.
0 -
So I made a test and using this line of code it seems to work faster/smoother.
Replace
Serial.println("ZZTX1");
with
Serial.println("ZZDX0;ZZTX1");
Tim you da Man...
0 -
You're very welcome. I am glad I was able to help out.0
-
Update / question ….
I have been testing the foot switches I have made. I have noticed that some times SmartCAT is not able to interpret the CAT commands. I will see ??? in the log. I have played around with the driver properties and disabled the FIFO buffers. It seemed to help but not always. The usb port is configured as 57600 bps, 8 data bits, no parity and 1 stop bits.
When this issue occurs I am always able to see the CAT command using the Arduino serial port monitor and Putty so I am pretty sure it's not a garbled command.
I am just looking to understand if I can make the interface more stable.
thx
0 -
I think I found the issue. When you configure your CAT port in SmartCAT there is no where to set the baud rate or control params. This did not seem right to me so I went looking for a config file and found it in:
C:UsersMyNameAppDataRoamingFlexRadiosystems
I found the settings for the USB port
<PortSettings>
<Protocol>CAT</Protocol>
<PortCommType>Serial</PortCommType>
<SerialPortType>Existing</SerialPortType>
<TCPPortNumber>0</TCPPortNumber>
<UDPPortNumber>0</UDPPortNumber>
<LifetimeSeconds>0</LifetimeSeconds>
<Name>USB PTT Foot Switch</Name>
<SliceIndex>A</SliceIndex>
<ExistingSerialPortName>COM10</ExistingSerialPortName>
<SerialPortBaudRate>57600</SerialPortBaudRate>
<SerialPortDataBits>8</SerialPortDataBits>
<SerialPortParity>None</SerialPortParity>
<SerialPortStopBitsStr>1</SerialPortStopBitsStr>
<SerialPortStopBits>One</SerialPortStopBits>
<SerialPortFlowControlStr>None</SerialPortFlowControlStr>
<SerialPortFlowControl>None</SerialPortFlowControl>
<SerialUseRTS>true</SerialUseRTS>
<SerialUseDTR>true</SerialUseDTR>
<SerialPinActiveLow>true</SerialPinActiveLow>
<AutoSwitchTXSlice>true</AutoSwitchTXSlice>
<AutoRemoveSplitSlice>true</AutoRemoveSplitSlice>
</PortSettings>
I changed the baud rate to 57600 and now it seems stable. I will do some more random tests to ensure that the change actually fixed it.
I assume that the SmartCAT must have some dynamic way of setting the baud rate because it did work most of the time. Only on occasion did I get the erroneous CAT command in the log:
2020-01-07 16:59:34.985 COM10 [rcvd]: ?
2020-01-07 16:59:34.987 COM10 [rcvd]: f? f?f?~
2020-01-07 16:59:35.988 COM10 [rcvd]: ?f
2020-01-07 16:59:35.989 COM10 [rcvd]: ? '?f?~?
2020-01-07 16:59:35.989 COM10 [rcvd]: f? f?f?
I will say I am having fun with this...
Regards
0 -
So I tried it again and the errors came back. I have 2 options in my head now:
Throttle the usb port down to 9600 or add a delay after the daxoff cat command.
I tried both and they seem to work. I set the day to 15ms before sending the pttOn cat command.
Btw I am testing this on 2 different 6400's so I don't think the issue is related to radio hardware.
I will report back in a couple of days with more testing results.
Regards
0 -
Mike
If this isn't working, you can actually do the same thing by creating a SmartSDR CAT/PTT port that uses on RTS. You pair that with a local Com port on your PC and then use a foot switch to toggle RTS high and low. It is documented in the communtiy.
Don't get me wrong, I love the ingenuity of using the Nano to send a CAT command.
The baud rate should not matter as long as it matches, but I have found that keeping the baud rate in the 4800-9600 area is a bit more reliable and less impacted by any noise since you need less bandwidth.
The errors in the log do look like framing errors. Might it be RF related?
Mike
0
Leave a Comment
Categories
- All Categories
- 280 Community Topics
- 2.1K New Ideas
- 524 The Flea Market
- 7.5K Software
- 6K SmartSDR for Windows
- 144 SmartSDR for Maestro and M models
- 350 SmartSDR for Mac
- 248 SmartSDR for iOS
- 228 SmartSDR CAT
- 168 DAX
- 351 SmartSDR API
- 8.7K Radios and Accessories
- 7K FLEX-6000 Signature Series
- 839 Maestro
- 43 FlexControl
- 842 FLEX Series (Legacy) Radios
- 787 Genius Products
- 414 Power Genius XL Amplifier
- 274 Tuner Genius XL
- 99 Antenna Genius
- 238 Shack Infrastructure
- 162 Networking
- 399 Remote Operation (SmartLink)
- 124 Contesting
- 618 Peripherals & Station Integration
- 122 Amateur Radio Interests
- 857 Third-Party Software