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
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
- 290 Community Topics
- 2.1K New Ideas
- 536 The Flea Market
- 7.5K Software
- 6K SmartSDR for Windows
- 146 SmartSDR for Maestro and M models
- 361 SmartSDR for Mac
- 250 SmartSDR for iOS
- 231 SmartSDR CAT
- 173 DAX
- 354 SmartSDR API
- 8.8K Radios and Accessories
- 7K FLEX-6000 Signature Series
- 33 FLEX-8000 Signature Series
- 851 Maestro
- 44 FlexControl
- 847 FLEX Series (Legacy) Radios
- 799 Genius Products
- 417 Power Genius XL Amplifier
- 279 Tuner Genius XL
- 103 Antenna Genius
- 244 Shack Infrastructure
- 166 Networking
- 404 Remote Operation (SmartLink)
- 130 Contesting
- 633 Peripherals & Station Integration
- 125 Amateur Radio Interests
- 874 Third-Party Software