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




How to add your Amateur Radio "callsign" to facebook profile

To all Amateur Radio Operators, facebook is allowing hams to add their callsign to their profile.

Here is how it is done :-

1. Open facebook.com on the browser
2. Click on "Settings"
3. Under "General Account Settings", on the "Name", Click "Edit"
4. Enter your callsign in the space marked as "Alternate name"
5. Check the box, include this on my timeline
6. Save the setting by entering your facebook password in the box marked "Password"
7. Click on "Save Changes"

Hope this helps..