Back Home -> Back to Project Index -> Back to APRS Index

Soundcard TNC interface hardware


My father, GM0SUY has been looking at using APRS and the potential for use with RAYNET locally. One of the great features of the APRS system (IMHO) is digipeating, the ability to repeat messages received. This turns a group of nodes into a mesh network and transparently delivers messages to all nodes even if a single node can only communicate with one other node. This operation can be expanded yet further by repeating on different frequencies and being gated through to the internet.

For initial testing we were keen to setup a station capable of comms on two frequencies along with internet access. The system was to operate from a laptop so as to be mobile capable. Soundcard radio interfaces were decided upon after seeing the prices of hardware TNC's (Terminal Node Controllers / Radio Modem). The AGWPE software under windows is capable of using left and right audio channels independently to create two radio interfaces but the laptop brought up some issues with this. Firstly whilst the line out jack was stereo, the mic in jack only provided a mono channel. It's quite common for laptop's not to have a stereo line in. Also with this being a relatively modern laptop no old style serial or parallel ports were available for PTT switching.

[Diagram of APRS Net to follow]

Audio Interface

We looked to external sound devices to provide us with stereo input but such devices tended to be rather expensive and fairly large. We settled on using two small USB headset style sound devices using the C-Media CM108 USB Audio controller. These are very popular on ebay and a search for usb audio usually brings up several hundred results, the majority of these being small stick type devices for around £5-10 including postage.

USB to Serial Interface for PTT

In order to have a PTT connection to transmit a USB-serial adapter was purchased. You must be careful however to purchase an adapter that implements hardware handshaking as the RTS and DTR pins are used for the PTT switch. We found a seller on ebay (e-cafe) selling FTDI chipset adapters that implement the RTS and DTR signals, the price was also good at under £10 inc. postage. Alternativly you could buy a similar device direct from FTDI (£15).

USB Hub Fitting

As this was now three USB devices to connect we looked towards a 4 port USB hub and a box to put everything into. The hub chosen was the cheapest avaliable from ebuyer costing about £8. The box was a die-cast unit from Maplin (N92BQ), originally sized to fit hub with devices plugged in. It was decided that the spare USB port should be available on the outside of the box for connecting a GPS or mouse, also meaning that a port is available to replace the laptop port used by plugging in the USB hub.

Reliable USB Connections

In putting the bits together I decided to de-box most of the parts and solder the USB connections together rather than use plugs, this meant less space taken up and solid reliable connections. The lower half of most of the cases were used to mount the devices in to insulate them from the metal box. The USB plug from the hub was replaced with a B type socket and some multi-pole connectors were used for the audio and PTT connections. The original power LED from the hub was extended to shine through the A type socket so that it was visible from the outside of the box.

Pin Function
1 PTT Ground
2 Audio In
3 Audio In Gnd
4 Audio Out
5 Audio Out Gnd
6 Spare / +5V?

Radio Connectors for Box

The radio connectors were chosen to be 7 pin locking connectors Maplin (FK27 & FK28), this gives pins for audio in/out PTT and a spare for a possible power connection. Unfortunately the line sockets have been discontinued recently but there are 6 or 8 pin versions which would be just as suitable. These connectors were wired in one case to a 6 pin mini-din plug for the data port on an ICOM set.

Pin Function
1 Carrier Detect
2 Receive Data
3 Transmit Data
4 Data Terminal Ready
5 Ground
6 Data Set Ready
7 Request To Send
8 Clear To Send
9 Ring Indicator

PTT Circuit

The PTT connection to the radio is usually a pin that is pulled to ground to activate the switch. The RTS and DTR pins on a serial port output + or - 8 to 12 volts depending on state and hardware. As we want the TX to be activated on a +ve output a small circuit was constructed using an optoisolator to control the PTT pin. If you're only going to use one radio connection then I suggest using the RTS pin as software that doesn't give you a choice tends to use that pin.

Ptt interface for one set, for a second interface use Pin4 DTR to switch a second optoisolator.

De-emphasis Issues

Radios with data ports don't usually have too much trouble driving a TNC but for sets without the speaker or audio out connection is usually filtered to take out higher frequencies, this can cause quite a difference in the relative strengths of the two frequencies used for packet transmission. To correct for this I suggest using a two stage filter similar to the one on the right that will attenuate the lower frequencies to level out the overall output, some attenuation on the higher frequencies is fine anyway as we still have levels plenty high enough for the mic. inputs even at low input volume settings.

Pink = Single stage filter

Purple = Two stage filter


Parts List

Part Approx Cost Available From Notes
Metal Box £6.50 Maplin Code N92BQ
2x 7pin chassis plugs £4 Maplin Code FK27
2x 7 pin line sockets £4 Maplin Code FK28
USB Hub £8 ebuyer Code 106231
USB B type Socket £1.50 Maplin Code L52AZ
USB A-B Cable £0.50 ebuyer Code 88129
2x USB Audio Device £20 Ebay Search for USB Audio,  should find two for under £20
USB-Serial Adapter £10 Ebay Search for FTDI in particular, £5 more to buy board direct from manf.
Misc bits of wire/solder etc £priceless Bench  
Total £54.50   So for around £50 you will have a box with single USB cable to PC capable of operating two radio sets, roughly the functional equivalent of two TNC's costing 5-10 times as much!

Thoughts for the future:

The LED on the USB hub was directed through the USB socket on the outside to confirm connection. There are also LED's on the audio devices, they light up when the device has been detected by the computer and flash when the device is in use, it would be handy to extend these to the outside for debug and identifying which channel is 1 and which is 2, similarly it may be useful to have a PTT active LED on the outside of the box.

The USB hub is not currently powered because the Audio and Serial devices only take 100mA each, this leaves 100mA available on the external USB port, this is fine for most mice, GPS receivers, etc. This all works fine provided the hub is plugged in to a fully powered USB socket on the host system. One improvement therefore could be to either have an external socket for power in (12 in to internal 2-3A 5V regulator?) or use the spare/power pin on the radio connectors to pass in some power. The positive side of a separate power connection is that the box could be used as a power distribution point, then again you could go the other way and miniaturise it into a box about half the size...

The Audio in on these devices is a mic input, they usually have an AGC setting, this is best turned off. The input volume level required is very low, only 3 or 4 % It may be preferable to have a 3:1 or 4:1 attenuator before the mic in  to make things a little easier to tune.

As there is a USB-Serial adapter in the box with only the handshaking pins being used it may be an idea to run the TX and RX lines out to a serial port connector on the end of the box, thereby giving a serial port that could be used for configuring TinyTrak's or other equipment on a laptop without serial port. I've not checked if AGWPE blocks the serial port when it's using it for PTT yet; if it dosn't, great, if not you'd need to close the packet engine to use the port but for initial setups it's a handy fallback plan.

With this particular setup the only drivers you should need to install are the USB-Serial adapter ones, Windows XP handles USB audio devices without any help, An up to date Linux distro in contrast should require nothing other than plugging the box in :-) One tempting option that springs to mind however is dropping the external USB port and using it for an internal USB flash drive, 1Gb ones can be had for under £10 these days, even a much smaller one may be handy in the box, it could hold the drivers for the serial device along with the installers for AGWPE, UI-View 32 or any other commonly used software for the APRS station. In this way a single USB cable from the box would allow setup of an APRS system on a computer from scratch...

All photos on this page are clickable to see originals, some other photos are in the gallery.

Author: Graham Auld
Dated: 8th January 2007