SmartSDR v3.10.15 and the SmartSDR v3.10.15 Release Notes
The latest 4O3A Genius Product Software and Firmware
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.
PTT CAT control using USB Arduino Nano Every
I had developed a CAT control interface utilizing a USB Arduino Nano Every and I had issues with stability. Last week I operated in the VA QSO party and used the PTT SmartCAT interface with my foot switch. It is a Linemaster industrial foot switch and the bounce effect when using the switch was very noticeable. This got me thinking about my CAT control interface. I went back and used Wireshark to examine my FlexControl. I noticed the commands were sent very quickly to the radio. I had the Arduino Nano Every set to 9600 baud. I decided to change the baud and after experimenting I was able to get the device to act in a stable manor. I have updated the repository. I find using the CAT control is very quiet and so far I have had no stability issues Here is the link to the repository.
https://github.com/w8be/usb-ptt-arduino-nano-every/tree/main
Comments
-
Very cool Mick. One trick that I use is to attach an interrupt to the input pin. In the ISR, I immediately disable that interrupt, service the interrupt, and set a timer (20 ms or whatever I need to get past the bouncing). When the timer expires, I enable the interrupt again. This makes sure that I get the earliest possible "make" contact and that additional bounces don't chatter relays and that kind of thing.
For this scheme, I usually attach the interrupt using CHANGE so that I can use the same technique on the break. I often wind up with a different break timeout than make timeout. It mostly depends on the switch and how fast I want to be able to cycle it. PTT will usually have longer time constants than a dot paddle, for example.
0 -
Thanks Len,
I am including a bounce function from the libraries. I currently have the bounce timer set to 200ms.
Regards
0 -
Here are a couple pics.
0 -
Very clean installation!
0 -
Ken,
Can you share your ISR code. It may very well be worth switch too.
Thanks
0 -
Hi Mick, The full source for my TeensyMaestro is out on GitHub. With everything going on, it will be a challenge to filter out what you need.
Here is a real quick sample:
/* Sample Interrupt-driven input Len Koppl, KDØRC 03/26/24 Teensy 4.1(with built - in Ethernet) */ // Includes // Constants const byte BUTTON_PIN = 0; const int DEBOUNCE = 20; // debounce time in ms // Global Variables IntervalTimer debounceTimer; void setup() { attachInterrupt(digitalPinToInterrupt(BUTTON_PIN), buttonISR, FALLING); } void loop() { // looping code here } // Subroutines // Interrupt Service Routines void buttonISR() { detachInterrupt(BUTTON_PIN); // stop button interrupt to prevent multiple hits (bounce) // quick stuff here like setting a variable. Do not do massive processing in the interrupt service routine. debounceTimer.begin(debounceISR, DEBOUNCE); } void debounceISR() { debounceTimer.end(); attachInterrupt(digitalPinToInterrupt(BUTTON_PIN), buttonISR, FALLING); // allow button pushes again after debounce period }Hopefully, this helps.
0 -
Well, I'm an idiot... That sample code is for a Teensy 4.1, not a Nano Every. If I get a chance, I will see if there is a timer library for the Nano Every. If not, then it might not be worth the effort to do what I am suggesting.
0 -
Thanks...no rush
0 -
Update: I have been using my Arduino Nano Every PTT foot switch since March and I am pleased to say it has worked every time I plugged in the usb port and turned the radio on. I have had no issues with rfi and I find the cat command makes no noise compared to the mechanical ptt using a db9 rs232 connector.
0 -
I have updated the repository for the USB PTT using the Arduino Nano Every to send CAT PTT commands. It is simple to set up and implement.
Regards
0
Leave a Comment
Categories
- All Categories
- 354 Community Topics
- 2.1K New Ideas
- 619 The Flea Market
- 8K Software
- 3 SmartSDR+
- 6.3K SmartSDR for Windows
- 176 SmartSDR for Maestro and M models
- 414 SmartSDR for Mac
- 267 SmartSDR for iOS
- 252 SmartSDR CAT
- 188 DAX
- 377 SmartSDR API
- 9.2K Radios and Accessories
- 25 Aurora
- 220 FLEX-8000 Signature Series
- 7.1K FLEX-6000 Signature Series
- 926 Maestro
- 53 FlexControl
- 862 FLEX Series (Legacy) Radios
- 898 Genius Products
- 457 Power Genius XL Amplifier
- 325 Tuner Genius XL
- 116 Antenna Genius
- 287 Shack Infrastructure
- 202 Networking
- 445 Remote Operation (SmartLink)
- 141 Contesting
- 761 Peripherals & Station Integration
- 139 Amateur Radio Interests
- 979 Third-Party Software


