Arduino APRS Tracker

An APRS tracker is easy to build these days.

I had decided to build one for portable use (plan is to be used on hiking, but also in my car) powered from Lithium Ion battery and with all components running on 3.3V. Transmit of APRS messages is done through a UV-5R.

The tracker is powered from my favorite Panasonic NCR18650 3400mAH through a MCP1700-3302E LDO regulator, and has plenty of juice for daily use.

GPS is a Adafruit Ultimate GPS Breakout – 66 channel w/10 Hz updates (https://www.adafruit.com/product/746) not that i need 10 Hz, 1 Hz update is more than enough but i had in stock from a different project, so why not ? (i love it).  You can also use a NEO-6M and change the appropriate define on the code

Arduino is a Pro Mini 3.3V 8 MHz (actually a clone of Deek-Robot Pro Mini)

Up and running on breadboard

Update

Bought a Kenwood cable to avoid the mess with the 2.5 and 3.5 mm audio connectors

BIG FAT WARNING : There is no load disconnect for the battery while charging. DO NOT CHARGE AND USE IT. The charging of the battery will never finish, resulting on explosion, fire etc. YOU HAVE BEEN WARNED

https://www.aliexpress.com/item/DIY-2-pin-4-Wire-Speaker-Mic-Cable-Spring-Line-for-Baofeng-UV5R-Kenwood-TK370-Linton/32734963747.html

TP4056 Lithium Cell Charger Module with Battery Protection to charge it through USB.

https://www.aliexpress.com/store/product/5x-TP4056-Lithium-Charger-Module-with-Battery-Protection-Micro-USB-5V-1A-TE420/1895489_32646760134.html

I have started working with the schematic of MicroModem (http://unsigned.io) but i have modified LibAPRS to make it work.

As long as GPS has a FIX it submits my location every two minutes and i have a button for a single shot APRS update. SmartBeaconing support is included and now is the default

The idea is to create a complete unit with a DRA818V with USB charging.
DRA818V is still on my desk… i have “trouble” designing a good low pass filter for VHF.

Schematic (breadboard version)

Remember power supply needs to be 3.3V

Arduino APRS tracker schematic (for the breadboard version)

Documentation has not been finalized yet and i use multiple libraries making it a bit difficult to handle everything

I have uploaded my working version to github
https://github.com/billygr/arduino-aprs-tracker

Remember to change the APRS_CALLSIGN to your call sign

You will need these libraries
libAPRS (modified) https://github.com/billygr/LibAPRS
TinyGPS http://arduiniana.org/libraries/tinygps/

PCB

Oh yes !!! We do have also PCB ready credits to aronaut. Thank you !!!

https://github.com/billygr/arduino-aprs-tracker/tree/master/archive/PCBv1%20KiCad%20(5.0.2)

Bill of Materials (breadboard version)

R1 1K
R2 2K2
R3 3K9
R4 8K2
R5 270
R6 10K trimmer
R7 1K
R8 10K
C1 100nF
C2 4.7uF/16V
1 x GPS Module
1 x push button
1 x Arduino Pro Mini 3V3 8MHz
Q1 2N2700/BS170

For using without an external power supply:

1 x Panasonic NCR18650 3400mAH (or your favorite 18650)
1 x 18650 socket
1 x MCP1700-3302E
1 x TP4056

Bill of Materials (PCB version)

Includes the 18650 socket+TP4056

https://github.com/billygr/arduino-aprs-tracker/tree/master/archive/PCBv1%20KiCad%20(5.0.2)

301 Comments on “Arduino APRS Tracker

  1. Confirmed this is a bug

    Transmitted (so no issue with transmission):
    2017-12-28 19:28:29 EET: SV1QFV-5>APZMDM,J41VAI*,WIDE1*,WIDE2-2,qAR,SV1BGM-1:=0256.40N/01014.84E>Arduino APRS Tracker

    But it is interpreted as
    2°56.40′ N 10°14.84′ E – locator JJ52CW95QO

    It needs to be fixed to DDMM.hhN/DDDMM.hhW

    • hi billy,

      Gizillion Thanks to u. now its working,

      Location: 2°56.39′ N 101°40.83′ E – locator OJ02UW15PN –
      1.3 km Northwest bearing 293° from Putrajaya, Putrajaya, Malaysia
      12.9 km Southwest bearing 217° from Kampong Baharu Balakong, Malaysia
      22.4 km South bearing 182° from Kuala Lumpur, Kuala Lumpur, Malaysia

      tomorrow i will have a road trip to test it..

    • Hi

      Output is AFSK and i trigger the PTT with a FET/transistor so no VOX.

      You can try it depending on the transmitter and adjust the output accordinly

  2. OK Billy,
    Many thanks for your answer.
    Please let me know if you have some Ardunio source code from some other project?
    I’m looking for a solution, just to monitor Over the Air strings.
    Many thanks
    Fred

    • The code will need to support telemetry messages for APRS, it is not so difficult.

      Any preference on the temperature/humidity sensor ?

      • juste only i like to test one sensor

        temperature and humidity sensor like DHT11 or DHT22 better
        temperature LM35 ,LM60 or DS18B20 better

        i wante only test one sensor for educational

        Thnks you

    • Hi,

      Never tested on Arduino Uno, however you can try to change the
      #define ADC_REFERENCE REF_3V3
      to
      #define ADC_REFERENCE REF_5V

      And hopefully it will work

  3. Hello, thank you for a nice project.

    Can you please elaborate a bit on wiring the Kenwood cable to the board? What are you using the forth cable for, the schematic indicates only 3 connections?

    My Baofeng is constantly transmitting once I plug in the cable, even when the power is off on the board.

    I’ve wired it as follows:

    https://i.imgur.com/c8lIsM8.jpg

    Where does the SPK+ go?

    Thanks in advance

    • Hi,

      Check you grounding, without power on the board connecting the cable shouldn’t trigger the PTT.

      I have checked my board and without any power or the Arduino plugged in the Baofeng is not transmitting.

      The forth cable is unused at this stage, the plan is to check if the frequency is open before transmiting, if you want you can connect the SPK+ through a 100nF cap to A0

      Check the Q1 is case it has allready failed

      • Hello Billy,

        Indeed, Q1 was fried, after I replaced it, the HT stopped transmitting as soon as it was plugged in.

        However, nothing is happening when the circuit is powered on.

        I am getting valid NMEA sentences when I connect the arduino to a CP2102, i.e. “if (gps.encode(c))” is true, however nothing happens from that point on..

        I’ll let you know if I manage to debug it.

        Regards

      • Hi,

        It will not trasmit (or exit the loop) if you don’t have a fix. Can you check the serial output of the Arduino ?

  4. Hello Billy,

    I did check the serial output of the Arduino, but I’m not sure what to make of it.

    1. When the GPS module (GY-NEO6MV2) is interfaced with a CP2102, in u-center, I get a 3D lock in a matter of seconds, the coordinates are accurate to within a few meters.

    2. When I interface the Arduino with the CP2101 I get what appear to be valid NMEA sentences (see the pastebin below), however the coordinates in $GNGGA are more than 50km off from my current position!

    3. Your software appears to be outputting 99999(..etc) as lan/lat and 0/0/2000 as the current date, so obviously the incoming data is not being parsed correctly.

    4. I’m not quite sure what to make of the serial output coming in this way – the NMEA sentences are sometimes on the same line, or otherwise interrupted randomly. This is the reason I lowered the baud rate to the Arduino to 9600 from 115200, but the result is the same (please see the screenshot).

    5. The APRS Update function will fire. Upon that event, the HT will start transmitting continuously, until it is powered off. Please see the screenshot below.

    I will try to debug further when I have the time. If someone has any ideas in the meanwhile, it will be very much appreciated if you share them.

    Pastebin of the serial output: https://pastebin.com/GX1KsshQ

    Screenshot of the serial output: https://i.imgur.com/YsTydjs.jpg

    Screenshot of HT transmitting: https://i.imgur.com/xQWDDBw.png

    Kind regards

  5. Hi,

    I can comment on the LAT/LON 999999999. This is parsed from the TinyGPS library, for some reason it cannot understand the output of the GPS

    Can you please enable the gps.sendCommand(PMTK_SET_NMEA_OUTPUT_RMCGGA);

    Let’s fix the parsing first, i do have somewhere a NEO GPS to test

    • Hello Billy,

      After some frustration with TinyGPS I used some simpler parsing for the NMEA sentences and I am now feeding the correct values to APRS_setLan and APRS_setLon

      However, I cannot get over the continuous transmission problem – i.e. once a packet is transmitted, the UV5R will not stop transmitting at all (obviously no data, though). Do you have any idea how to debug this?

      Here’s how it looks – https://i.imgur.com/Tzrh3Qw.png

  6. It was an EMI problem, temporary solution is a ferrite.

    I’m getting packets on aprs.fi already, thanks again for the nice project. If you don’t mind I might post the modified code and hardware later on.

    I think using NeoSWSerial instead of SoftwareSerial and not using TinyGPS at all makes a big difference for this weak chip.

    Regards

    • Hi Anon,
      can you pls. post the modified code and hardware.
      Maybe you have it already on Github?!
      I am really interested!
      Thanks,
      Andreas

  7. hi Billy, i’am Dario iw2fzr…..beginner for ARDUINO. i try make your project but, not run correctly in my arduino NANO. after put in sw in board i see correctly serial .Arduino
    APRS Tracker
    28/7/2018 8:46:8 LAT=46175150 LON=9864482 4610.50N/00951.86E
    i push the botton i hear first moment afsk correctly on the end bad qualyty and the serial MANUAL UPDATE
    28/7/2018 8:46:18 LAT=46175150 LON=9864482 4610.50N/00951.86E
    and stop run! you have a suggestion? nano isen’t correctly ?only micro? best regards ciao

    • Hi Darlo,

      Can you see the build-in LED of Arduino Nano on TX to go high ?

      There is a modification to be done on libarps to support the Nano

      SV1QFV

      • hi billy, you have the modification in libaprs ??? i build the project in arduino nano. thank you. adolfo from argentina

  8. Has this been tested on a Pro-Mini 16mhz? My C language is really rusty (I’m mostly self taught), but I’ve seen the program run through most of void loop() but the manual button doesnt work, send_aprs_update never goes true, and the timer.run() isnt performed. The only output I get on the serial monitor is
    Arduino APRS Tracker
    17/9/2018 6:7:45 LAT=47000000 LON=-122000000 4700.00N/12200.00W
    Any ideas?

    • Also tried it on a Duelimove, same results. All I have connected is the GPS on pins 11&12 and the button on 10. Nothing on the output.

    • It was something wrong with my digital pin 10 – I switched it to 13 and the problem changed. I may have a bad pro-mini, I’ll find another one to use.

  9. It appears that I need to read a bit better. I had not seen that you modified libaprs – that was the problem. I believe you can use the original libaprs if you change the button to pin 13 and watch PORTD 5 for transmit. All is better now – Thanks!

  10. Hi Billy, i am very interested in APRS Tracker but i am not so much into electronics. My question, is it possible to use this tracker also with a 5V/10000mAh PowerBank instead of the Akku? Or how do i have to adopt it? Thanks, Andreas

    • Andreas hi,

      The regulator accepts input up to 6V, so if you can connect your powerbank USB output directly to the input instead of using the battery it will work

      • Hi Bily, thanks a lot for your fast answere. Unfortunately another question comes up. I am interested in the APRS Tracker with the charging module to use it with USB-Powerbank. Your comment was very helpful. My question is if you have also a schematic file (pdf) were the Batterycharger electronic is includet. Thanks a lot, Andreas

      • Now i understood, unfortunately there is no option to charge the battery and also use the APRS tracker, i am missing a feature called load sharing

  11. Hi Billy, thanks in advance for you answer and for your great project. I’ve build it but it did not happen anything on my Baofeng UV-3R although TX LED on Arduino blinks for a little bit either on APRS UPDATE and on MANUAL UPDATE with button on PIN 10. Serial Monitor update every second with correct position data.

    Could you please make a short list of controls to do?
    Thanks. Paolo.

    • Hi Paolo,

      If your UV-3R is not going on TX blame the PTT (Q1). Check with a voltmeter on PTT PIN first if it goes high on TX as a starting point

      if it is going on TX and you don’t transmit, check the R6 and adjust it accordingly

  12. That’s really great project! Cheap and reliable.
    It’s can super great time add additional hardware, as compass with display, for locating same APRS devices in range…. For example tourism, etc… Display can show direction and range to other listened devices, same as them can spot you. Thanks!

  13. Hi Billy,
    i built everything. Looks good, but i have some problems with uploading the software. With Arduino IDE it works, but than the Tracker ist doing nothing. And with PlatformIO (ATOM or VS Code) it does not work at all! Always errors on debugging like board is not supported from PlatformIO and the LipAPRS will not be found. Are there any adjustments i have to do. Thanks a lot, Andreas

    • Where can I download arduino files who can I upload to my raspberry ?
      Maybe stupid question but Im beggining – it is my first project which I assembly

      • This specific project is Arduino based, no raspberry at all. It means that you cannot run the code on your Raspberry Pi

    • Thanks Bily, i have already an working Tracker! 🙂 Will try to make an PCB for it. Its really cool… 🙂

  14. Is there a way to see the completed APRS packet in the serial monitor? I have an afsk encoder with my radio that just needs a string. Can I read the buffer of the final project before it is sent? Thanks and 73

    • You could do that by modifying libAPRS.cpp function APRS_sendLoc , just before APRS_sendPkt to print the packet instead of sending it

  15. Any chance you have actual part numbers?

    I ordered 3 PCBs from OSH Park and I found most of the items on Mouser, but looking for the exact switches you used…

    • I love this project, and love that you shared the files. I can’t wait to build it but I am pretty bummed the BOM doesn’t list all the parts needed to build…

      Missing values for C3 & C4 & U2

      Also can’t find a part for SW2.

      • To avoid confusion use the KiCAD schematic, contains all the info

        I will update the page accordinly, C3 100nF/C4 1uF

  16. Hello! I am working on developing this to work with a weather balloon project I’m working on. I am trying to transmit some temperature data live with it. To do this, I am trying to alter the “comment” part of the code to contain a variable with it. I am doing this inside the locationUpdate() Part of the code. It keeps giving me an error saying, “initializer fails to determine size of ‘comment’.” My code is below.

    void locationUpdate(int insideTemp, int outsideTemp, int alt) {
    char comment []= (String)”Arduino APRS Weather Ballon! Inside Temp:”+insideTemp);

    APRS_setLat((char*)deg_to_nmea(lat, true));
    APRS_setLon((char*)deg_to_nmea(lon, false));

    // turn off SoftSerial to stop interrupting tx
    Serial1.end();

    // TX
    APRS_sendLoc(comment, strlen(comment));

    // read TX LED pin and wait till TX has finished (PB5) digital write 13 LED_BUILTIN
    while(bitRead(PORTB,5));

    // start SoftSerial again
    Serial1.begin(9600);
    }

    Any help would be great.

    Thank You,
    Noah (KM4VXF)

  17. Hi Billy,
    i have a hopefully little problem. I got new GPS Modules for the Tracker (ublox 6MV2) unfortunately its not working with them. I am not sure what i can do. I tried many boud rates. I changed on the GPS Module and also in the software. On the Arduino IDE Serial Monitor i see the NMEA sentences on the Arduino board. I see that there is the &GNGGA with all the information. Do you think there is something with the baud rate or the parsing the GPS data? GPS has an fix. I recogniced also the manual push button is not working? Do you have any idea where i do some mistake or whats happen? THX, Andreas

    • Andreas hi,

      Let’s isolate it: can you please run the examples from the tinygps ?

      If tinygps is not able to decode it, then the APRS tracker will not be able to do anything

      Billy

      • Hi Billy, thanks. I run examples from TINYGPS called simple_test. It shows me all the NMEA sentences like this.

        $GNGGA,174010.000,4758.5081,N,01437.9094,E,1,12,2.1,252.6,M,0.0,M,,*7B
        $GNGLL,4809.2281,N,01628.1194,E,174010.000,A,A*48
        $GPGSA,A,3,03,22,31,23,17,,,,,,,,3.0,2.1,2.1*37
        $BDGSA,A,3,20,,,,,,,,,,,,3.0,2.1,2.1*22
        $GPGSV,3,1,10,01,22,160,,03,62,089,31,06,38,307,18,09,45,235,*74
        $GPGSV,3,2,10,11,03,172,15,17,22,253,14,19,26,268,,22,42,103,27*7C
        $GPGSV,3,3,10,23,86,197,21,31,17,040,28*71
        $BDGSV,1,1,01,20,67,068,14*51
        $GNRMC,174010.000,A,4809.2281,N,01628.1194,E,0.23,332.63,060819,,,A*7F
        $GNVTG,332.63,T,,M,0.23,N,0.43,K,A*22
        $GNZDA,174010.000,06,08,2019,00,00*4F
        $GPTXT,01,01,01,ANTENNA OPEN*25
        CHARS=7865 SENTENCES=0 CSUM ERR=0

        Looks ok so far?! KR, Andreas

      • Hi Andreas,

        I assume that you used this example:
        https://github.com/mikalhart/TinyGPS/tree/master/examples

        And it doesn’t display the coordinates but just skips to line 56 output of CHARS…

        This decodes correctly
        $GNRMC,174010.000,A,4809.2281,N,01628.1194,E,0.23,332.63,060819,,,A*7F

        This one no
        $GNGGA,174010.000,4758.5081,N,01437.9094,E,1,12,2.1,252.6,M,0.0,M,,*7B

        https://rl.se/gprmc

        I assume that this version of TinyGPS doesn’t support the GNRMC code which explains the behavior…

        Can you please try this version ?
        https://github.com/florind/TinyGPS

        Apologies but it is out of my control

        Billy

      • Hi,

        I have updated the code to include the altitude in the APRS comment field in the latest update. I don’t know if aprs.fi supports it or not… but it is trasmitted (value /A=infeet)

  18. Hi Billy,
    i assume the problem was that the new GPS-Modules send GPS and GLONASS sentences I modified the TinyGPS from Mikal Hart by adding also the “GNRMC” and “GNGGA” type.
    You find the GitHub fork under https://github.com/aronaut/TinyGPS
    Now it works! Thanks for your support and giving the right hints!
    KR,
    Andreas

  19. Hi I need some help, I tryed to upload the sketch and I got an error message saying “no matching function for call to ‘SimpleTimer::setInterval(long int, void (&)())'” what can I do to fix this problem.
    Thanks

  20. Hello Bily I built your design but with arduino nano, it works very well and I can see my position on the maps .. but … when I press the send location button it sends the location without problems but then the program stops and I need to restart it so that Go back to work, can you give me some tip?

    • Hi,

      Check if you are using a push on switch, and could you please change the code to

      Serial.println(F(“BEFORE”));
      while(bitRead(PORTB,5));
      Serial.println(F(“AFTER”));

      73

      • Arduino APRS Tracker
        10/11/2019 23:14:45 LAT=-31746292 LON=-65001211 3144.77S/06500.07W
        10/11/2019 23:14:46 LAT=-31746293 LON=-65001212 3144.77S/06500.07W
        10/11/2019 23:14:47 LAT=-31746291 LON=-65001209 3144.77S/06500.07W
        10/11/2019 23:14:48 LAT=-31746290 LON=-65001206 3144.77S/06500.07W
        10/11/2019 23:14:49 LAT=-31746288 LON=-65001203 3144.77S/06500.07W
        MANUAL UPDATE
        BEFORE
        AFTER
        10/11/2019 23:14:51 LAT=-31746301 LON=-65001223 3144.77S/06500.07W
        …. DO THE SAME WITH THE OLD LIBRARY AND WITH THE NEW

        AFTER PRESSING THE MANUAL UPDATE THE PTT DOES NOT ACT AGAIN

        POSSIBLY IF YOU PUT A RESET THEN MANUAL UPDATE?

        THANK YOU VERY MUCH FOR YOUR TIME!

  21. I connect the system, the minute sends position and then does nothing more.
    if I open the serial monitor you get this: 11/13/2019 16:20:28 LAT = -31746136 LON = -65001162 3144.76S / 06500.06W
    11/13/2019 16:20:29 LAT = -31746138 LON = -65001157 3144.76S / 06500.06W
    11/13/2019 16:20:30 LAT = -31746143 LON = -65001149 3144.76S / 06500.06W
    11/13/2019 16:20:31 LAT = -31746148 LON = -65001141 3144.76S / 06500.06W
    APRS UPDATE
    BEFORE
    AFTER
    11/13/2019 16:20:37 LAT = -31746137 LON = -65001157 3144.76S / 06500.06W
    and there it is. but if I restart the serial monitor it counts again until the next aprs update

  22. It is truly a nice and helpful piece of information. I am glad that you simply shared this helpful info with us. Please stay us up to date like this.
    Thank you for sharing.

  23. Hi Billy and thanks for all the work you have done.

    Just finished the project on a protoboard and having low audio received on the other end.

    Have tried adjusting the RV1 levels in order to improve it but makes no difference.

    Any idea of what should I try?

    Thanks in advance!
    Nicolas

  24. Hola Billy encontre la manera de hacerlo funcionar con arduino nano
    // read TX LED pin and wait till TX has finished (PB5) digital write 13 LED_BUILTIN
    Serial.println(F(“BEFORE”));
    while(bitRead(PORTB,5));
    Serial.println(F(“AFTER”));
    // start SoftSerial again

    // turn off SoftSerial to stop interrupting tx
    // COMENT THIS LINE ****** GPSSerial.end(); ****** COMENTE ESTA LINEA!!!!!!

    GPSSerial.begin(9600);
    }

    /*
    ** Convert degrees in long format to APRS string format
    SIMPLY COMMENTING THE GPSSERIAL.END LINE

    THANKS FOR YOUR TIME

  25. Hello Billy, I’m not a engineering but I’m trying to make an experiment. Can it be displayed on the web of aprs.fi? Or how do I see my location using the device?

  26. Hi, Billy.
    on june 8,2019 you report about an update. you should take the circuit diagram of KICAD. only the circuit diagram is from april 16,2019. i miss the changes and extensions in it.
    sorry for my questions.
    sigi

  27. PCB

    Oh yes !!! We do have also PCB ready credits to aronaut. Thank you !!!

    Please,can you help me.search the path to aronaut.4 ham operator want to buy the board.

    73de
    sigi

  28. Hi Billy! finally works! thanks for all your help.

    The thing is that I would like to add an external LED in order to know when the position is achieved without having to look the module itself.

    Do you know how to do this based on your code?

    Thanks again.

    Nicolás

  29. Hi Billy, could you advance something with the theme of smartbeaconing?
    the system still works very well with the arduino nano

  30. Billy do You plan to support some temperture sensors in Your project ? Maybe BME280 or DHT22 ?
    I plan to release ballon with this tracker, temp sensors would be very helpfull
    BTW – how often this tracker send frames ? can I set it somewhere in the code ?

  31. 2.
    PTT delay – I plan to use it with baofeng pmr who is able to work on 2m ( BF-T1 ) Point is – this radio transmit signal after some short time after pushed ptt. Do You have some setting who delay aprs frame after PTT ?

Leave a Reply to Michal Cancel reply

Your email address will not be published. Required fields are marked *

*