APRS with the Raspberry Pi and the TNC-X board

Aus DL8RDS Wiki
Wechseln zu: Navigation, Suche

1 Motivation

After my first series of experiments with APRS and Arduino, but also with APRS and OpenWRT I am now trying out something else:

Using a Raspberry Pi as a APRS gateway. In this case I intend to do it bidirectional.

2 The TNC-X board

3 Notes on the Raspberry Pi board and other boards in the setup

The RPi 1B version which I used has a couple of problems. Notably the USB socket is very high, which gives you a few problems connecting other boards. Stackable shields will easily have shortings wo the ethernet socket. So this is a mechanical issue you will have to solve.

I did it by simply soldering out the USB socket. In case you still need USB connectivity, you will need to attach some angled stacked pins.

As in most of my RPi projects I am using the pin header for power supply. I generally do not use the usb socket, because that seems a little unreliable to me.

For the power supply I am frequently using DC/DC converters from Ebay, you get them cheap from China.

Here in this case I was using two converters, one from any high voltage up to 30V down to 7,5 for the IC2E clone and another one for the step from 7,5 down to 5,0V for the Raspi.

I also attached a serial port socket using a MAX3232 converter, firstly to ensure access to a raw Raspian image, but secondly also for diagnostic actions on the serial line.

The little pcb in the middle between the Raspberry setup and the radio is a PTT arrangement: The TNC puts a DC voltage on the PTT pin, which must arrive on the TX audio pin of the radio, though, with a considerably high impedance. So a 4k7 resistor will help. The TX audio signal must be given to the same pin, however de-coupled by a capacitor, I am using a 0.1 Microfarad.

Here is some info found on the web about this setup:

 The IC2E can be used successfully on packet. This is how to achieve it.

TNC                             RIG

PTT-----------4.7K-------- TIP OF SMALL JACK

TX AUDIO------0.1MF------- TIP OF SMALL JACK

GROUND-------------------- BODY OF BOTH JACKS

RX AUDIO------------------ TIP OF LARGE JACK

This arrangement works with most TNC2 type clones, but it has not been tried
on the PK88.

Another possibility would be to use a 1 to 1 audio isolating transformer.
This is a suggestion on how to connect it up:

RX AUDIO---------TIP OF LARGE JACK
GROUND-----------BODY OF LARGE JACK
GROUND-----------TRANSFORMER PRIMARY
TX AUDIO---------TRANSFORMER PRIMARY
PTT--------------TRANSFORMER SECONDARY
                 TRANSFORMER SECONDARY---------TIP OF SMALL JACK

When the PTT line goes low, it makes the Tx connection for the IC2E.

Julian G6LOH @ GB7BIL

4 The Radio used

5 Configuration

First of all: This site was very helpful: http://www.auetal-online.net/page3,0,0.xhtml

Here's the manual: http://ham.zmailer.org/oh2mqk/aprx/aprx-manual.pdf

  • Note that it is really important to set jumpers Nr. 3 and Nr. 4. Otherwise you won'r receive anything and you will not be able to transmit either.
  • I was downloading the following APRX version:
wget http://ham.zmailer.org/oh2mqk/aprx/aprx_2.08.593-1_armhf.deb

Here's the APRX config:

mycall  DB0HSR-1
myloc lat 4859.93N lon 01205.59E
<aprsis>
passcode 12345
server    rotate.aprs2.net
</aprsis>
<logging>
pidfile /var/run/aprx.pid
rflog /var/log/aprx/aprx-rf.log
aprxlog /var/log/aprx/aprx.log
</logging>
<interface>
  serial-device /dev/ttyAMA0  19200 8n1    KISS
  callsign     $mycall  # callsign defaults to $mycall
  tx-ok        false    # transmitter enable defaults to false
  #telem-to-is  true # set to 'false' to disable
</interface>
<beacon>
beaconmode both
beacon symbol "I&" $myloc comment "Tx-iGate Raspberry/TNC-X/APRX"
</beacon>

6 Future Plans

So this project really worked well, and APRX allows transmitting, so that is really a great benefit. I will try to extend this project by the following terms:

  • build two more of them, provide them to DB0MHB and to DB0KN and create greater coverage
  • add some telemetry with a temperature and humidity readout. I will need to think about the connection, because I removed the USB socket for space reasons, as you can see on the pictures below.

7 Images

7.1 Unit 1

Rpi tncx aprx1.jpg

Rpi tncx aprx2.jpg

Rpi tncx aprx3.jpg

Rpi tncx aprx4.jpg

Rpi tncx aprx5.jpg

Rpi tncx aprx6.jpg

The pictures below show the following modifications:

  • The USB port, formerly just de-soldered was led out through angled pins.
  • Introduction of some PTT logic that works with the IC2E type of radios (see above)

Rpi tncx aprx7.jpg

Rpi tncx aprx8.jpg

  • Finally got the cabling right... It now transmits. That is what I wanted it to do.

Rpi tncx aprx9.jpg

7.2 Unit 2

In Comparison to unit 1 I decided to route many of the DC and NF cables on the bottom side of the mounting plate. The entire setup looks more ordered and the shielding may be a bit better. But this is just a guess as I have not yet noticed any problems.

Placing the DC converter on top also brought me some problems: It is not possible to remove the MMC card without dismounting the plate from the box. Though, it gave me some more space in the top section.

And I found another way to mount the Serial converter: I just soldered the converter on a board via the four header pins.

And I also left the barrel DC converter on the injector. This allows to feed 24V DC with a plug type power supply.

Rpi tncx aprx1 2.jpg

Rpi tncx aprx2 2.jpg

Rpi tncx aprx3 2.jpg

Rpi tncx aprx4 2.jpg

8 Links