Can I use an ATmega32U4 Pro Micro to trigger PTT in Thetis?

Post Reply
K1LSB
Posts: 752
Joined: Wed Feb 05, 2020 5:25 pm

Can I use an ATmega32U4 Pro Micro to trigger PTT in Thetis?

Post by K1LSB »

I know that sounds like a stupid question, but I'm stupid.

Any help would be appreciated.

Thanks,
Mark
User avatar
w-u-2-o
Posts: 6130
Joined: Fri Mar 10, 2017 1:47 pm

Re: Can I use an ATmega32U4 Pro Micro to trigger PTT in Thetis?

Post by w-u-2-o »

Of course you can. There are multiple methods available. PTT can be controlled over the Ethernet network, a serial port data connection, a serial port hardware signal (not to be confused with sending data), and via connection to the ANAN PTT input.

If you provide a bit more information about exactly what you are trying to achieve then it would be easier to narrow down those choices.
K1LSB
Posts: 752
Joined: Wed Feb 05, 2020 5:25 pm

Re: Can I use an ATmega32U4 Pro Micro to trigger PTT in Thetis?

Post by K1LSB »

Thanks Scott, I was hoping you'd reply, as you're probably the one best able to grasp what I'm trying to do.

Backstory:

I currently have a pushbutton PTT that's working fine. But due to the way I've recently reconfigured my audio I need the PTT to perform multiple functions now.

You may remember me asking you a few weeks ago about your thoughts regarding a migration toward VB-Matrix and away from Voicemeeter. Well, I decided to take that plunge and I'm super-glad I did, as the virtual patch-cord arrangement is mentally much easier to manage in the Matrix view.

One of the problems I've always had to deal with in Thetis is the fact that when I press PTT my mic (a super-sensitive large diaphragm condenser) is picking up the remnants of latent audio that's still coming out of the speakers, and other hams have told me that they can hear that as a distinct "Pfft" at the start of every transmission. I've been able to eliminate that by increasing the General > Options > Options 1 > RF Delay value to 90, but IMO that's a really crude workaround that also necessarily introduces an extra 90ms of delay into my mic audio stream.

But after migrating to Matrix I realized that the perfect solution would be to simply Mute the Speaker output channels in Matrix at the MOTU ASIO slot as soon as I press the PTT. That way it wouldn't matter whether there was any latent audio still being sent to the speakers, the speakers won't reproduce it because the audio has already been cut off at the M4 interface. So once I get that configured I can shave the RF Delay in Thetis waaay back to 20ms or so (as I still need to protect my amplifier relay from hot-keying).

So I need my PTT button to accomplish 2 things: I need it to key Thetis (of course), and I also need it to send Matrix a VBAN command to instantly Mute the speakers (the VBAN command has already been written and tested).

I asked ChatGPT how that could be accomplished and it advised me to use an inexpensive Pro Micro with an Atmega32U4 chip. Based on that advice, here's what I bought (it's arriving this afternoon):


My dream (pipe dream?) is to simply connect my PTT switch to the correct pins on the Pro Micro and let the Pro Micro magically handle the rest via its USB connection to the computer, lol.

The problem I'm hoping you can help me with is how to make Thetis recognize that I've pushed the PTT (I'm sure Chat will help with the task of getting Matrix to mute the speakers).

Mark


Edit: Apparently the link doesn't appear in my post, here's the description from the Amazon listing:

Pro Micro with Atmega32U4 chip Development Board, AYWHP 3 PCS Pro Micro 5V/16MHz Nano microcontroller Development Board with Built-in USB updater Type-C Interface Compatible with Arduino IDE
K1LSB
Posts: 752
Joined: Wed Feb 05, 2020 5:25 pm

Re: Can I use an ATmega32U4 Pro Micro to trigger PTT in Thetis?

Post by K1LSB »

w-u-2-o wrote: Sun Jan 18, 2026 5:49 pm .
.
PTT can be controlled over the Ethernet network, a serial port data connection, a serial port hardware signal (not to be confused with sending data), and via connection to the ANAN PTT input.
.
Of those options, which is the lowest latency? Directly into the PTT jack on the rear panel?

Mark
User avatar
w-u-2-o
Posts: 6130
Joined: Fri Mar 10, 2017 1:47 pm

Re: Can I use an ATmega32U4 Pro Micro to trigger PTT in Thetis?

Post by w-u-2-o »

K1LSB wrote: Sun Jan 18, 2026 7:12 pm
I currently have a pushbutton PTT that's working fine. But due to the way I've recently reconfigured my audio I need the PTT to perform multiple functions now.
Gotcha! No sweat!
You may remember me asking you a few weeks ago about your thoughts regarding a migration toward VB-Matrix and away from Voicemeeter. Well, I decided to take that plunge and I'm super-glad I did, as the virtual patch-cord arrangement is mentally much easier to manage in the Matrix view.
Very cool! Matrix is undoubtedly a lot easier if audio mixing is not a requirement.
One of the problems I've always had to deal with in Thetis is the fact that when I press PTT my mic (a super-sensitive large diaphragm condenser) is picking up the remnants of latent audio that's still coming out of the speakers, and other hams have told me that they can hear that as a distinct "Pfft" at the start of every transmission. I've been able to eliminate that by increasing the General > Options > Options 1 > RF Delay value to 90, but IMO that's a really crude workaround that also necessarily introduces an extra 90ms of delay into my mic audio stream.
Yes, this has always been a problem with Thetis, and PowerSDR before it. There is so much latency in the receive and transmit DSP pipelines. I agree, that is a crude work-around, and pretty much doubles your RX-to-TX latency, which can be a problem when trying to break into a rag chew or pile-up.
But after migrating to Matrix I realized that the perfect solution would be to simply Mute the Speaker output channels in Matrix at the MOTU ASIO slot as soon as I press the PTT. That way it wouldn't matter whether there was any latent audio still being sent to the speakers, the speakers won't reproduce it because the audio has already been cut off at the M4 interface. So once I get that configured I can shave the RF Delay in Thetis waaay back to 20ms or so (as I still need to protect my amplifier relay from hot-keying).

So I need my PTT button to accomplish 2 things: I need it to key Thetis (of course), and I also need it to send Matrix a VBAN command to instantly Mute the speakers (the VBAN command has already been written and tested).
A good plan. And you've got VBAN automation working. So perhaps not so stupid :D
I asked ChatGPT how that could be accomplished and it advised me to use an inexpensive Pro Micro with an Atmega32U4 chip. Based on that advice, here's what I bought (it's arriving this afternoon):
Ugh! In this case the AI is a moron :( That's a terrible way to do it. I hope you can return the development board.

Instead, I'd suggest proceeding as follows.

Step 1: program a VBAN macro button that causes PTT CAT commands for Thetis. I've not written any VBAN scripts myself. However, the CAT command you need is ZZTXn; where if n=1 then the radio will switch to TX, if n=0 the radio will switch to RX, and if n is blank the command will report back either 0 or 1 depending on the state of the radio, RX or TX. When issuing CAT commands the semicolon is required. You can play games with the button such that it can generate a 1 on button down and a 0 on button up, or have it toggle between 1 and 0, etc.

Step 2: get that CAT command from VBAN to Thetis. Here you have two choices. The first, and what I recommend, is to enable the TCP/IP CAT Server function in Thetis (Setup > Serial/Network/Midi CAT > Network). Do NOT confuse this with the TCI Server. You want the TCP/IP CAT Server enabled with the Server Running checkbox. Point VBAN at the bind IP:port shown in Thetis setup, it should be something like 127.0.0.1:13031 (or whatever). The second method would be to use virtual serial ports, but that's a lot of extra software and work.

Step 3: buy and provision either a MIDI footswitch, or USB footswitch, or similar gadget, to actuate the VBAN macro from a physical control. MIDI might be conceptually easier in the VBAN environment, but a USB switch is considerably less expensive.
Post Reply

Return to “Everything Else: Antennas, Relays, Switches, Power, Grounding, Cooling, etc.”