SP9UOB

Ham radio projects

dsTNC - a TNC built around a DSP processor

One day I decided to do something new: learn digital signal processing. Since I had been playing with APRS for a while, I decided to build an AFSK1200 modem using exactly this technique - mainly because dedicated analogue modem chips are expensive and hard to get. The processor used in the project costs about 25 PLN (net) and is available off the shelf, e.g. from TME or Farnell.

Algorithm

I decided to try implementing the algorithm proposed in 1995 by Thomas Sailer HB9JNX on a dsPIC30F4013. The result of my deliberations is the algorithm drawn below:

Block diagram of the AFSK1200 demodulator algorithm

The algorithm is very effective: it correctly decodes 900 frames (!!! can anyone decode more? ;-)) (results here) from track 2 of WA8LMF's APRS test CD (wav file WARNING! 130 MB, WA8LMF test CD) (with my modem, of course :-)). A TCM3105-based modem, which I thought could receive anything, gets only 747 frames :-)

Hardware

Next came the schematic:

dsTNC schematic

and finally the finished modem (the one in the photo has no MAX232, because I connect to it with a USB - TTL cable):

Assembled dsTNC modem

The audio signal goes through a tuned MAXim low-pass filter to the ADC input of the processor. The filter itself is optional; without it you can fit a 680R resistor between pins 2 and 5 of its socket and a jumper between pins 5 and 6. It is important that the audio input level is not too low.

The AFSK output signal is generated with PWM and, after passing through a filter, goes to the transmitter input.

The processor runs at 10 MIPS (it can go up to 30 MIPS) and the modem part takes about 6% of the CPU time. Once the AFSK1200 project is finished, I will try to run FSK4800 (D-STAR) and FSK9600 on the same hardware. Keep your fingers crossed.

Software and programming

At the moment I publish the KISS_TNC firmware, which works as a KISS controller at 57600 bit/s on the serial port, ready for UIView, Xastir or the Linux AX25 stack. There is also the dsDIGI software, which works as a WIDE1-1 DIGI - details here.

The processor can be programmed with Microchip ICD2, ICD3 or PICkit programmers. Please note the pinout of the ISP connector - it is my own standard (I made myself such a cable once and have stuck with it ever since).

Connector pinout in the photo below:

dsTNC connector description
Connector description. Click to enlarge.

NOTE! The serial port pins refer to the modem side. Connect the modem TxD to the computer RxD, and the modem RxD to the computer TxD.

The circuit needs no alignment or tuning (apart from programming the processor). The only thing to do is to set the level of the audio signal fed to the transmitter input.

In practice

The video below shows the working unit compared with the Linux soundmodem:

The SR9NKO DIGI/iGate runs on this very TNC - have a look at its receive coverage.

Downloads

If you are interested in a PCB or a programmed processor - please get in touch as well.