APRS Tracker using Teensy 3.1

rvnash

Member
Hi All,

I thought I would share this project with the Teensy community in case anyone may be working on the same sort of thing. If it is helpful, feel free to use this software.

I built a Teensy 3.1 based position tracker. It is currently just a project on a breadboard. It uses the Adafruit Ultimate GPS (code here). It generates APRS packets and outputs the FSK tones on the DAC pin (A14) (code here).

The modulation of the tones into 144.390 MHz FM is done by the Radiometrix HX1 module.

I know it works because my packets were picked up by 3 different digipeaters (see tracking here), but the range seems poor. I'm not sure why that is, I think it purely a radio thing (bad antenna, low power).

Eventually, this is going to find its way onto either a high altitude balloon, or an autonomous vehicle. Time will tell.

Picture below...

Rich
KC3ARY

TeensyTracker.jpg
 
Neat project! I got one of those Adafruit GPS modules as well, but have so far just tested it in a few static locations.

By the way, for anyone wanting a small/cheap GPS device, there is an Indiegogo crowdfunding project going on now called "NavSpark" offering a GPS for $19, or GPS+GLONASS for $22. Presuming they deliver, it would be the cheapest GPS I know of. Apart from price, their unique feature is the ability to run your own code on their 32bit 100 MHz CPU using an Arduino-type IDE.

I'm not affiliated with SkyTraq, the company doing this project, but I was interested enough in the project to assemble a FAQ from the scattered info on the comments part of their page. http://pastebin.com/raw.php?i=1f5iXwiT
 
Thanks JBeale. I hope you find the project useful or interesting.

I looked into the NavSpark from your FAQ. It sounds more like a microcomputer development board (like Teensy) with a GPS peripheral built in, rather than a GPS that you can program. I am looking to conserve space, as I'm planning on this ending up in the cockpit of my model plane. It sounds like a worthy product some day, but from reading the specs, I think the Teensy 3.1 will suit my project better, and not just because it is real. I need to control multiple servos, and only 1 PWM output is a problem. And I love the DAC for audio out.
 
I am adding AFSK1200 support to my ongoing radioModem project. A friend of mine, KF7WWM, has a Teensy 3.1, and both of us have Teensy 3.0 devices. My code is currently targeting the Maple Mini running a 72MHz STM32, but I have also gotten it to work well on the Arduino Uno. I mention this because I have working demodulation for RTTY and BPSK31, and I believe that is a world first considering the absolute lack of videos and working code when a search is done online. I'll post my code to github once I clean up a few things and you can make use of the AFSK1200 receive functionality if you would like to send remote commands to your APRS tracker. :)

73... KF7IJB

 
Very cool. Have you had some success yet with AFSK demodulation? There are some products on the market that do mod/demod of AFSK1200. This one I bought and it works pretty well. It is based on a similar AVR as the Uno.
I'm not sure what the STM32 can do, but there are DMA modes that work with the A/D converters in the Teensy which can take some of the sampling burden off of you and let you concentrate on decoding. I look forward to your code.
 
The STM32 has DMA modes on the A/D converters; it is a very capable chip.

As far as AFSK demodulation, yes, it works well. As I stated, I have RTTY working. RTTY is AFSK, but has different mark/space frequencies from AFSK1200 (APRS), but the theory is identical.

I won't lie, I suck at DSP. The only reason for writing this code is due to the fact that no one apparently knew how or wanted to do it bad enough to actually do so. I am certain that once I release the code, people will improve upon it greatly... the only hope is that they don't take the code and privately make improvements without funneling it back to the author.
 
BTW, here is a video showing my other project with the APRS receive demonstrated.
 
Last edited:
Rich,

Your signal problems may be due to being so close to the ground. Have you put this inside a vehicle with a decent mag-mounted antenna and driven around town with it?

I have not yet looked at your code, but in order to maintain proper channel discipline, you really need receive capabilities, at a very minimum, carrier detect or squelch-open detection. If you are trying to transmit while another station is using the channel, you aren't going to get out.
 
Thanks Vespira,

Yes, I've tried those things. No worries, I have the correct equipment to monitor my own transmissions. What I don't have is time. So my projects take a long time as I steal an hour or two here and there to diagnose things.

- Rich
 
Help Appreciated ... building a tracker for my quad copter.

Hi Rich,

Thanks for sharing your project. Would you consider sharing your wiring diagram? I am a new ham (W3RIP) (Gen class since 2010) and also new to electronics and programing so I can use all the help I can get. I am trying to build a very small portable and light weight GPS tracker that I can use among other ways on my quad copter. I frequently fly in remote areas with no cell phone service and when I saw your idea about using APERS I thought this might also work for me since I already have two APERS radios I could use to track my copter should the need arise. On that note I have already lost one and I do not want to loose another. Thanks for sharing your code! It would be very helpful if you could also share with me a simple drawing of your wiring to go along with your code. Thanks in advance for any help you can offer.

Sincerely,

Rip Noel
(W3RIP)
865-679-6635m.


Hi All,

I thought I would share this project with the Teensy community in case anyone may be working on the same sort of thing. If it is helpful, feel free to use this software.

I built a Teensy 3.1 based position tracker. It is currently just a project on a breadboard. It uses the Adafruit Ultimate GPS (code here). It generates APRS packets and outputs the FSK tones on the DAC pin (A14) (code here).

The modulation of the tones into 144.390 MHz FM is done by the Radiometrix HX1 module.

I know it works because my packets were picked up by 3 different digipeaters (see tracking here), but the range seems poor. I'm not sure why that is, I think it purely a radio thing (bad antenna, low power).

Eventually, this is going to find its way onto either a high altitude balloon, or an autonomous vehicle. Time will tell.

Picture below...

Rich
KC3ARY

View attachment 1355
 
This is a very cool project! I really appreciate you sharing the code. I have been going over the code because I am doing a similar project. Will this code work if I use an Arduino instead of a Teenssy? I have tried it and have got lots of errors.

I look forward to your response.
 
Hi,

I glad I found this posting... This is 9W2SVT currently writing an Arduino APRS Tracker...

I was looking for an alternative & more powerful MCU with more hw serial as I am writing an APRS Tracker using two Arduino Mini Pro, one as an APRS Modem (AVR C codes) by Mark ( http://unsigned.io/microaprs/ ) and another pure Arduino utilising all the Arduino libs connected via serial.

I have planned to add 2.2" SPI TFT to the Arduino Mini Pro 3.3V 8Mhz but it was just too slow either for the TFT screen updates and I'm getting lots of checksum errors on the GPS..

I will get a teensy 3.1 for this purpose and if possible, do away with one mini pro acting as an APRS Modem ( if the codes is stable .. )

Currently, my setup will not have any LCD or TFT screen, just pure and cheap tracker as I got those five units of Mini Pro 5V/16Mhz for only US$12

2014-08-07 14.51.48.jpg 2014-08-03 08.50.47.jpg

Pls read all about it in my blog here : http://9w2svt.blogspot.com/2014/07/building-open-source-arduino-aprs.html
My github repo here : https://github.com/stanleyseow/ArduinoTracker-MicroAPRS
 
Last edited:
Hi,

Yes, the code is fairly stable and here: https://github.com/rvnash/aprs_teensy31

If you have any trouble let me know.

The Teensy 3.1 seems plenty powerful enough to keep up with both sending APRS and reading GPS's over the serial port, along with many other functions. at 96Mhz, with a 32-bit bus, there is a big difference between the Arduinos you are using. Also note, there is a true DAC built in, no need for PWM or resistor ladders!

Good luck.
 
Ordered my Teensy 3.1 locally yesterday and received it today...

Managed to also fixed a major bug on my APRS Tracker ( called SVTrackR ) ... now my SmartBeacon + extras codes are running well...

I'll have a cheap no-frills / no-display version and a "pro version" with TFT display / probably BT and if I can write it.. moving maps...

Stanley
 
Hi,

one question out of curiosity, with the new audio library would it be possible to further improve your (great) work?

Does it help to use the audio board?

Michael
 
Hi Michael,

I'm not sure how it would help to use the audio library. I haven't looked closely at it, but very precise control over how the frequencies shift at high speed is required for the AFSK signal to work. What advantage would you see in using the library?
 
Hi,

perhaps this is a naive thought; is it possible to reuse repeating parts of the audio signal (flags, control field, ...) saved as wav to reduce load on the processor?

Michael
 
Teensy

@paul my first post. I love my teensy 3.1s. BIG step over unos and megas! I appreciate you contributions to the arduino world, including the audio library.

@rvnash many thanks for making this software available. It inspired me to try a radio oriented project for the first time.

@all I have Nash's software working, but am trying to use a cheap baofeng radio and the broadcast is not being picked up by any local digipeaters. I can see the DAC output and the waveform looks reasonable. When dropped down to around 20mv with resistors and the DC blocked with a 4.7uF cap the signal looks noisy but it could just be the cheap bitscope I'm using. The ptt MOSFET switch works and I can see the transmission on 144.90 with a sdr display on my PC. I also hear modem tones through the sdr. I inserted my ham call sign in the appropriate slot in the software. The text string to the serial port shows correct location and my call sign. I don't know of any "registration" needed to be accepted by the digipeaters. Any suggestions on what to check?
 
Hi Bmeyer,

I first did this with a cheap Baofeng too, and had some success. However I struggled with the pre-emphasis issue. You can read about it here:
http://owenduffy.net/blog/?p=2035
or here:
http://www.febo.com/packet/layer-one/transmit.html

What I did is get a second radio (with no reemphasis) as a receiver and look at the audio output, and adjust the scale on the two frequencies until I got the signal to look good there. I believe my code as a provision (#define) for setting a scale difference between the two frequencies.

If that doesn't work, make sure there is a delay between PTT and the transmission of the first packet. It takes a while for the Baofeng to come up to power.

Good luck, let us know how it goes.

- Rich
 
@Rich: I tried increasing the delay between PTT and transmition, and even manually held the transmit button a second or two before the transmission started, with no result. I'll take a look at the preemphasis issue. That is probably the cause. Many thanks for your quick response!
 
A quick followup: Success!

I am now transmitting a valid APRS signal and being picked up by a local digipeater. I had a bad pigtail cable between my Baofeng radio and the standard cable on a mag mount portable dual-band radio. Also, it needed a mod to the software to get it to work. I changed the scale factor in your progmemSin.h file from 1.0 to 0.75 which took care of the preemphasis issue mentioned earlier in this thread. The resulting wave has a pretty severe discontinuity when switching between sin tables near the peaks, but happily it doesn't seem to bother the receiving digipeater.

I also changed the PTT wait time from 100 to 200 in the aprs_setup call, which seems to work well with my particular radio. For those following along, this project consists of teensy 3.1 controller ~$20, a ~$10 recycled display from an old Nokia phone from adafruit, a ~$40 GPS from adafruit, a Baofeng 82? radio ~$40 from amazon (which I already had; a uv5 variant would be ~10 bucks cheaper and probably work the same), a hacked speaker/mic ~$6 to use the dual mic/speaker radio plug end for connecting to the breadboard, and a few components (resistors, caps, mosfet switch). I also inserted some code to drive the nokia display along with the adafruit nokia library.

@rich Many thanks again for making your code available and giving me some guidance. Another question: Did you make any progress in receiving and decoding APRS signals from others?
 
BOM / Schematic?

Can you share the hardware BOM and a schematic of the interconnects?
I'd like to reproduce this using an HT to transmit.
Thanks
Den W2DEN
 
This is really fantastic work. Makes me want to get back into APRS after a 10(?) year hiatus.
 
Back
Top