Computer interface cable for Baofeng – First try

In this post, I will share some info about the tx/rx computer interface cable I made for my Baofeng radios that is compatible with the Direwolf software TNC and probably others.  Here’s a peak at the mess I have made (that actually works):

Baofeng connected through homebrewed interface to computer to enable APRS packet transmission and reception tuned to my testing frequency of 147.120MHz with the standard 144.390MHz APRS frequency.
This is crude but works and was built entirely with parts I had laying around tuned to my testing frequency of 147.120MHz.

But first, a little background…

Now that I’m receiving beacons in Direwolf and I’ve setup a Raspberry Pi to send and receive APRS, it is time to begin the holy grail of 2 way testing with two APRS nodes — one RPi and a laptop.  Then I will be able to experiment with more advanced messaging capabilities of APRS as well as a BBS system.  BPQ is looking like the top contender right now (Thank you Joe DeAngelo AG6QO for the suggestions and excellent packet BBS implementation log!)

The radios

My first radios where a pair of 2m VHF radios from a thrift shop.  I like those HTX-202 radios.  However, I believed that the VOX feature on newer radios would make it easy for me to send packet data as well as receive it so I bought a couple Baofeng radios.  I bought the super cheap UV-5R VHF/UHF (about $25) and the BTECH UV-5X3 VHF/1.2m/UHF (about $65).

So how did that work out for me?  I found early on that the VOX feature, does not seem to function well.  I can’t find much about others having the issue.  Am I the only one who is either confused or has two radios with a poorly functioning VOX?  I’ve tried setting VOX as low as 1 and as high as 9 (just for giggles).  I’ve tried both the UV-5R and the UV-5X3; both have the issue!  When I yell, close to the mic, the VOX detects audio and enters transmit mode.  Less than a yell and it stays in receive.  Worst of all, I haven’t found an output level from my packet software TNC (Direwolf) that will trigger transmit.  No dice!

So, that felt raw.  I bought those radios mainly for VOX but they wouldn’t work that way.  Consolation: I have two more radios (reasons stated above), I have two more frequencies 1.2m and 0.7m.  Overall, I’m happy with them.  I may have just expected a little too much for my money.

VOX isn’t reliable for transmitting packets

Moving forward, I know that the VOX solution was not the best solution to transmitting packets with a radio.  Just think about it: The radio VOX circuit must hear the audio of the packet to determine it needs to turn on, before it is transmitting.  That means that the start of the packet, no matter how fast the detection and switching, must miss somewhere between microseconds and milliseconds.  That would require more workarounds depending on the detection and switching time.

The best solution is to have the software TNC (or hardware if that’s what you’re using) actually activate the PTT circuit.  That will place the radio in transmit mode prior to transmitting the packet.  Perfect.

The homebrew interface

Eventually, (a month later…) I accepted this reality and committed myself to building an interface for my laptop.  This is different than the way I setup the Raspberry Pi since my laptop does not have easily accessible GPIO pins.  It turns out, it is only a little bit more challenging the the RPi interface — score!   I’ll share my RPi setup later.  However, for now, suffice it to say that the RPi setup is very well documented especially inside the Direwolf documentation.  Here is a bad pic, just for the curious:

Raspberry Pi in old plastic parts box with breadboarded PTT circuit for Baofeng radio
This is my Direwolf-Raspberry Pi setup acting as my home APRS station.

The biggest difference between the RPi and the laptop PC interface is the need to control the on/off state of a wire to turn on the PTT circuit when it is time for Direwof to transmit.  One common way to do this is by plugging in a USB<->Serial (RS-232) adapter and using one of the pins that are part of hardware handshaking in the RS-232 protocol like RTS (Request To Send).  If you have an old enough computer, it might just have one installed already.  This is a DB9 or DB25 connector that looks like this

USB to Serial DB9 RS-232 glued to a PTT circuit
USB to Serial DB9 RS-232 glued to a PTT circuit

I was able to cobble this interface together to connect my Baofeng radio to my PC soundcard’s mic and headphone jacks for transmitting and receiving APRS packets using a transistor, a capacitor, some wires, an old PC board, and an USB<->RS-232 serial adapter.  I was back on the trail of something good — transmitting digital packets!

As I refine it, I’ll provide more detail.  For now, I just wanted to share some of the things I learned along the way.

Lessons learned/Tips

  • If you plug the radio’s speaker output into the mic of your computer sound card and the mic input of the radio into your computer’s speaker y0u will activate PTT and the radio will go into transmit mode constantly.
    • The solution is to prevent DC current from flowing between the ground wire of the PC line out (headphones, etc.) and radio line in (mic).
    • Solve this by placing a capacitor in series with the ground between pc line out and radio mic.  You will probably see an initial PTT activation when you first plug it in due to the initial flow of current to charge the capacitor.  You should see the transmit turn off quickly (1-2 seconds).  If not you’ll have some troubleshooting to do 🙁
  • Test your transmissions on a VHF or UHF frequency that you have the privilege to transmit on and does not have activity on it.  Use the lowest power possible.
  • Use a NPN transistor with a 2-5k ohm resistor between the base and the RTS pin to trigger PTT.  I’ve seen 2N2222 recommended.  I didn’t have one handy and I grabbed one I did have.  It was this one
    • PTT Switching transistor (9287 N830) and capacitor (10uF electrolytic)
      This is a train wreck. But it does work.
  • The configuration for Direwolf that initiates PTT using the RTS pin of the USB serial port looks like this:

# If not using a VOX circuit, the transmitter Push to Talk (PTT)
# control is usually wired to a serial port with a suitable interface circuit.
# DON’T connect it directly!
# For the PTT command, specify the device and either RTS or DTR.
# RTS or DTR may be preceded by “-” to invert the signal.

PTT /dev/ttyUSB0 RTS

Finally, here is a crude schematic of my circuit when I wired it for my Raspberry Pi.  The one I’ve “crafted” for PC is identical except the RCA jacks are replaced with 1/8″ male stereo plugs and the “GPIO25” pin is replaced with RTS on a USB-Serial adapter.  YMMV

My circuit diagram/schematic depicting a very rough draft of a circuit to connect from a Baofeng mic/speaker connector to a PC Mic/Headphones port using RCA female jacks.
This is really crude. But, I’m sharing it just in case it helps someone figure something out for their setup.

APRS: Social Media for Hams

While exploring APRS, I’ve found inspiration to help guide my adoption.  This inspiration comes straight from the developer of APRS, Bob Bruninga WB4APR,  who said recently in a post to the TAPR APRS Mailing List that “APRS and its APRS-IS cloud are not being used to their full potential” and that “The original intent of APRS in its 1992 paper at DCC was to be a single information resource channel”  I’m inspired by this because I’m feeling like I want to push beyond the usage I see locally here in central Maine, near Bangor, ME.

The Original Vision for APRS

Bob continued to outline his original vision in more detail by saying:

[it is] to maintain real-time situational awareness of *everything* going on in HAM RADIO is an area.  Everything we could think of to identify our activities, station capabilities and actions was included in the format.

All we got instead, was a wasted decade of one-way GPS trackers with no one even looking at what was going on in their area.

Are you doing something useful right now in Ham radio?  Are you beaconing it?

Social Media for Hams

I am so happy Bob said this.  It supports my evolving notion that APRS should be the advertisement free, totally non-commercial Twitter and Facebook of Ham radio!  You know, with that athentic amateur radio twist 😉  I know I’ll talk more about this usage pattern in future posts.  Especially while I’m implementing some packet BBS (BPQ?) and advertising it with APRS.  I may even post a “listening frequency” and begin monitoring it…  THIS is starting to look a lot like the Ham radio I dreamed of as a teenager at the end of the 1980s.  Hang on tight!

By the way, Happy New Year!


First digital traffic received! APRS on 144.390

Yes, yes, and yes.  It has been a long time since I last posted.  I was aiming to post more frequently, too.  Right?  However, this summer my family and I moved from in-town Orono, Maine to “in-town” Charleston, ME.  Wow, we were busy.  Still are.  However, now I’ve had just enough time to setup a functional, outdoor antenna for 2m.  I’ve been looking for digital signals to decode recently.  I found plenty.  However, I haven’t figured out what the lower pitched sounds I’ve encountered on 145.305MHz are.  I’ll share a recording soon.

With my new antenna freshly setup and my trusty, thrift store HTX-202 in hand, I tuned to 144.390 to listen for APRS traffic.  WOW!  I hear a steady stream of bursts!  Yes!  What I’ve been waiting for — a recognizable sound representing a know digital signal encoding that I could try to decode.

I’ve been reading about Direwolf and APRS a little and thought I’d give it a shot.  Look at what I got!  My first, digital, Ham traffic decoded:

This was truly a thrilling moment. I have been hearing data in many places around 2m. However, my signal was always too weak and my setup wrong. Last weekend I put up a simple 1/4 wave antenna about 12 feet off the ground based on a mobile antenna cable to exposed conductor connector and VOILA!
This was truly a thrilling moment. I have been hearing data in many places around 2m. However, my signal was always too weak and my setup wrong. Last weekend I put up a simple 1/4 wave antenna about 12 feet off the ground based on a mobile antenna cable to exposed conductor connector and VOILA!