Thursday, July 17, 2014

Building an Open Source Arduino APRS Tracker with LCD & GPS ( SVTrackR )

It all started when I was searching the web for open source Atmel AVR or Arduino based APRS engine. There are several projects listed below with a short summary of them :-

Most of them are using atmega328P or similar MCU but most of them are also not updated except for the last one that my APRS Tracker was based on.


MicroAPRS


BeRTOS examples with APRS
http://www.bertos.org/use/examples-projects/arduino-aprs
The BeRTOS codes for an APRS implementation just using ATMEGA328 and a few common parts. From this, the few below project were the fork using the BeRTOS engine to encode and decode the AX.25 / APRS packet without the need for a very hard to find MX604/MX614 modem IC.

AX.25 Packet Modem
http://slepp.ca/projects/ax25-modem/
During the late part of 2012, I decided to start building a packet radio modem for 1200 baud AFSK (AX.25 style) from scratch. After spending a number of weeks on the project getting the basics all sorted out, it started to turn into something quite usable. I added on some small SPI SRAM chips that had 256kbit of memory each. However, these had to run at 3.3V and I was using a 5V Arduino. After setting it all up and create level shifters for the SPI bus, I noticed they also had 512kbit 23LC512 SPI SRAM chips that supported a native 5V interface. This made the actual layout and component count far simpler. It also doubled the available packet memory.

Arduino KISS TNC
https://sites.google.com/site/ki4mcw/Home/arduino-tnc
A while back I purchased Scott Miller N1VG's OpenTracker 1+. I bought the device as a kit, had no trouble putting it together, and have used it a few times as part of my ammo-can tracker box. The OT1+ uses a Freescale MC08 microcontroller to perform software-based modulation and demodulation of AX.25 audio. I have also read about Gary Dion N4TXI's WhereAVR, and Byon Garrabrant N6BG's TinyTrak 4, both of which use AVR microprocessors without additional modem chips to perform mod and demod functions in software. With these as examples, I knew that the AVR Mega series CPUs were capable of functioning as a TNC with minimal support circuitry.


extdigi, an APRS Digipeater for Arduino
http://extradio.sourceforge.net/extdigi.html
The project is an AVR ATMega328P based AX-25 1200 AFSK Digital Repeater, suitable for APRS "digipeating". The microcontroller code and the basic Hardware design is based from the BeRTOS APRS example. The most popular AVR ATmega328P board is called Arduino, wich you can either buy one at their website or build your own (the one on the picture is built by me).


The WhereAVR
http://www.garydion.com/projects/whereavr/
The WhereAVR is a small, lightweight, low-power, and low-cost APRS tracker with a full compliment of analog and digital I/O, as well as the ability to decode ax.25 packets. This allows for the reception of remote commands without the need for a "real" TNC. It is designed to hook directly to the speaker and microphone jacks of a handheld radio. One caveat, however, is that it currently doesn't have a spiffy configuration utility. I'm not into windows programming yet, so that feature will have to wait. :)

AFSK 1200 modem 
http://unsigned.io/?p=77
MicroModem is an educational and open-source implementation of a 1200-baud AFSK modem on the popular ATmega328p microprocessor. This makes it compatible with all Arduino boards and spinoffs using the 328p (for example the Uno, and the Microduino). Apart from a 328pBased board, you will also need to assemble 17 common electronic components to build the modem. When done, it can be used for things like ham radio APRS, TCP/IP over SLIP, experimentation with mesh-networks, long-range wireless communication with sensors (Or friends! Or strangers!).

After going through the MicroModem schematics, it seems like an easy modem to built, and those components were easy to find at the local electronic store. The schematics below was taken from https://github.com/markqvist/MicroAPRS/tree/master/Documentation Quickstart.pdf

MicroModem Schematics

With the components on top of the protoboard shield, I made two of them modem so that I can test them back to back without using two radios or transmitting test packets on the air.


After getting the modem to work, I had an idea to make an Open Source radio shield similar to Argent Data Radio Shield http://wiki.argentdata.com/index.php?title=Radio_Shield as this radio shield IC was not even listed in the schematics nor are open source. I usually stay away from non-open source stuff.

I had wrote to the author of MicroModem and he agreed to write the MicroAPRS with commands to control the AX.25 modem. This is great news to my journel to develop an APRS Tracker.

From here, I started writing the tracker codes in Arduino IDE as the SoftSerial, LCD and GPS libraries are already available for the Arduino platform. Below are some of the pictures from the projects.

From the pictures, you will need TWO Arduino UNO or TWO atmega328 chip for this to work. One as a APRS AX/25 "modem" and another as a Tracker talking to the GPS module and sending location to the modem.

SVTrackR with 20x4 LCD



Full setup with radio & GPS module

I'm using a 20x4 LCD module and a sensitive Skylab SKM53 GPS module ( Datasheet ). Below are some pictures of the first field tests outside my condominium.

Project box


Driving field test with decoded packets

I have also added a FTDI Serial USB module for logging and debugging purpose as I cannot view the screen while driving. The FTDI Android app was used for logging any errors for later reviews as a text file.
Using FTDI Serial USB and Android app for debugging

And below are the tracklogs on aprs.fi after fixing the coordinates formula and added  "Smart Beaconing" algorithm with distance detection and distance from base station into the LCD display.

tracklog on aprs.fi
The nice things about writing your own APRS SVTrackeR is that you can customise the comment field with dynamic info and I have added voltage of the Arduino ( SecretVoltmeter ), speed, HDOP and number of active GPS to it. On the LCD, I have added distance from last Tx, distance to base station, Tx counter and seconds since last Tx. I've also added a manual Tx wire/button to pin Analog0 with a limit of Tx every 10 seconds if the jumper wire are connected to 5V. This is really useful to test in places without much RF coverage.

There are still a few more bugs to be fixed before I will make a PCB ( printed circuit board ) instead of all the jumper wires flying around.

My source codes are posted to Github at https://github.com/stanleyseow/ArduinoTracker-MicroAPRS and I will update them often when bugs are found and features are added.

I welcome anyone to test out my codes and contribute to the codes by forking my repo. My programming style isn't the best and I have not optimize the codes for good memory usage.


Updates :
I've migrated to two Mini Pro ( Modem on 5V/16Mhz and SVTrackR on 3.3V/8Mhz  ) to shrink down the size of the box.

I've also added a 2.2" SPI TFT screen to the Tracker ( renamed to SVTrackR ) on Mini Pro 3.3V 8Mhz but unfortunately the atmega328 running at 8Mhz is under powered for such a test of reading GPS and updating the 320x240 screen.

SVTrackR with 2.2" TFT
More Updates :
I've added course, speed and altitude int APRS format that can be recognise by aprs.fi.

SVTrackR v0.4

Added course/speed/altitude into APRS format


Summary Links :-
My Repo https://github.com/stanleyseow/ArduinoTracker-MicroAPRS
Arduino Secret Voltmeter https://code.google.com/p/tinkerit/wiki/SecretVoltmeter
Android FTDI Terminal https://play.google.com/store/apps/details?id=com.ftdi.j2xx.hyperterm
Skylab SKM53 GPS http://www.nooelec.com/files/SKM53_Datasheet.pdf
APRS Modem with command line MicroAPRS




13 comments:

  1. Thank you Stanley, Nice detail on instruction, I am looking for the idea for a while for Decoded the AX.25 with Arduino but your project is much easy to understand. I will start to build and see how it will perform.

    THANK YOU again.

    HS1IFU / K6XOX

    Bangkok, Thailand

    ReplyDelete
    Replies
    1. Glad you find it useful.. you can also dropby at http://unsigned.io/forum/ where we discussed about Arduino TNC and MicroAPRS libs and 1 x arduino + OLED + GPS ...

      Delete
  2. Could you list the hardware used (BOM) and the interconnects. I am very interested in this project but am not really sure what you did.
    Thanks
    Den

    ReplyDelete
    Replies
    1. The schematics are located at my repo https://github.com/stanleyseow/ArduinoTracker-MicroAPRS under PCB Drawings ...

      Delete
  3. Thanks. Have a lot to digest. 73 Den

    ReplyDelete
  4. I have a few questions:
    Why the two different voltage min-pros?
    Can this still operate using an UNO?
    If yes, do you have a hook up schematic for the UNO?
    Anything else i should know when using a UNO?
    Thanks
    Den


    ReplyDelete
    Replies
    1. the mini pro with 3.3V was need to cater for the 2.2" TFT that is also 3.3V , if u r using regular 5V display, u do not need the 3.3V mini pro

      Delete
  5. My setup is 1 Uno/mini pro as a AX.25 modem and another as a Tracker/GPS/OLED/decompression/etc.. the newer libs here can be done using only 1 Uno/Mini Pro https://github.com/markqvist/LibAPRS ...

    ReplyDelete
  6. your blog describe a nice view of the things. It is very effective for the reader. Please post more blog related to this.
    Visit :- radio Arduino

    ReplyDelete
  7. Hello. I want to build one of this but I couldn't find a parts list. What parts should I buy exactly? I want to build this with 2x16 LCD. Is this possible? If it's possible and if you give me full parts list, I'd be so happy and grateful. 73! TA6AOZ

    ReplyDelete
    Replies
    1. Yes, u can use 16x2 LCD but the codes will need to change to cater for 2 lines only... full part list is inside the schematics ..

      Delete
  8. Hi,

    Thanks for the great site, it was very helpful for me when I was attempting to get a working APRS implementation done myself.

    I had an especially hard time getting the APRS wire format correct but ultimately was able to debug it using a modified MicroModem firmware where I could see the individual bits/bytes on the wire.

    I've compiled specifics on message construction onto a page as a reference for others who may be in a similar situation, especially the APRS CRC checksum (FCS).

    I'm leaving a link here in case anyone finds it useful.

    Thanks.

    https://sites.google.com/view/kd2kdd/aprs/aprs-message-building-source-code


    doug

    ReplyDelete
  9. Hello, i find this nice procect.. and will use the 2,2" TFT, but in your code nothing obaut this. Can you update this?
    many thanks..

    ReplyDelete