Baofeng interface, now with PTT control

My first experiments connecting my handheld radio to my computer relied on VOX control for transmit, which has a bunch of shortcomings. This week I got around to adding some real transmit control and putting it in a little box.

Update 2023-02-21: John ZS1EQ emailed to say that he experienced RF feedback keeping the NPN transistor on. He suggests: “I connected 10nf cap (ceramic is fine) over the transistor C/E, i.e. PTT to GND and mine behaved perfectly after that.”

uvb5-interface-with-ptt

uvb5-interface-box

I noted last time that PTT is triggered by connecting the two grounds together. This is why I needed a transformer in one of the connections—my soundcard has the mic and speaker grounds connected.

At first I tried using a solid state relay to connect the two grounds. This worked fine but it’s also kind of overkill. I measured and found a high-impedance 3.2V DC voltage between the two grounds. With this information I was able to use a smaller and cheaper transistor switch and save the fancy relay for something else.

I also needed some sort of digital IO line from the computer itself to drive the PTT. It appears that unless you’re using a computer with GPIO like the Raspberry Pi, the normal way to do this is a control line on a serial port. The laptop I’m using unfortunately doesn’t have a serial port so I bought a cheap USB/serial adapter on eBay. It says it’s an FTDI chip… it wouldn’t surprise me if it was a knock-off but it seems to do the job.

The USB/serial adapter has a quirk of its own, which is that the Request To Send (RTS) line is 5V when deasserted, and 0V when asserted. In other words by default the radio will transmit all the time except for when I’m sending audio. Useful. I was able to deal with this in Dire Wolf’s configuration—specifying -RTS instead of RTS will invert the logic.

The trouble is that before I started up my soundmodem the serial port at rest was putting 5V on that line, which meant my radio was transmitting. In the end I solved this twice. I put a hardware switch in the PTT enable line, which means I can cut off the PTT if I’m worried my computer or the FTDI interface is going to do something dumb. I also put in a second transistor to invert the logic in hardware. Now the radio doesn’t transmit until it’s specifically asked.

The one remaining problem is RF feedback—if I have it on high power mode, sometimes enough power gets into the cables that it keeps transmitting forever, sometimes even if I turn off the switch. This implies that the wires closest to the radio are the ones that need better shielding. I’ve solved this for now by sticking to low power mode.

Update 2 Nov 2015: I’ve had some feedback (loool) that I should really have a dedicated hardware watchdog that will limit PTT time to, e.g., 3 seconds for APRS. I didn’t bother as I never plan to operate it unattended but it’s a really good idea. Please do include a watchdog circuit if you’re ever going to let it operate by itself.