SmartSDR v3.7.4 and the SmartSDR v3.7.4 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
Leave a Comment
Categories
- All Categories
- 251 Community Topics
- 2.1K New Ideas
- 490 The Flea Market
- 7.4K Software
- 5.9K SmartSDR for Windows
- 135 SmartSDR for Maestro and M models
- 332 SmartSDR for Mac
- 241 SmartSDR for iOS
- 224 SmartSDR CAT
- 161 DAX
- 344 SmartSDR API
- 8.6K Radios and Accessories
- 6.9K FLEX-6000 Signature Series
- 780 Maestro
- 42 FlexControl
- 836 FLEX Series (Legacy) Radios
- 733 Genius Products
- 393 Power Genius XL Amplifier
- 254 Tuner Genius XL
- 86 Antenna Genius
- 224 Shack Infrastructure
- 151 Networking
- 375 Remote Operation (SmartLink)
- 119 Contesting
- 586 Peripherals & Station Integration
- 116 Amateur Radio Interests
- 810 Third-Party Software