Saturday, January 8, 2011

How to build your own Trackuino board

Update: the latest information on building the Trackuino board (with slight variations from the process described here) is on the google code project's main page.

Here is how to build your own DYI tracker solution based on the Trackuino firmware and Kyle's PCB. Building the tracker involves a bit of hackery at some points, but I'll try to make it as straight-forward as possible. This is how the finished board looks like:

trackuino_board_640.jpg

Features:

This is a summary of older posts, in case you just landed:

  • GPS: Venus 634FLPx. Supports > 18 Km according to their tech support (to be confirmed empirically)
  • Radio: The board supports Radiometrix's HX1 (300 mW) as well as Argentdata's MX146-8v (500 mw).
  • 1200 bauds AFSK using 8-bit PWM
  • Sends out standard APRS position messages (latitude, longitude, altitude, course, speed and time).
  • Internal/external temperature sensors (LM60) to read temperature in and outside the payload
  • Support for 1 capacitive humidity sensor
  • Cut-down "aka suicide" mechanism: you can hook up a nicrom wire and cut the payload line if your balloon gets stuck aloft for a long time.
  • ICSP header for in-circuit programming
  • 2 x SMA female plugs (1 x GPS in + 1 x radio out)
  • Open source (GPLv2 license), both software and hardware. In other words, do whatever you want with it: modify it, add it to your project, etc. as long as you opensource your modifications as well.

Which radio to pick?

hx1_or_mx146.jpg

Radiometrix's HX1 is cheaper, but Argentdata's MX146-8V is more powerful and thus has a better range. On the other hand, the HX1 version requires fewer components to buy and solder. My take? The HX1 is good enough.

How to build the board?

Both Eagle's schematic and PCB source files are here. You can do the exposure/development/etching process yourself, but I suggest sending it to a PCB house. I made the project public at BatchPCB, so anyone can go and order one. Their prices are not bad, but please comment if you find a better deal.

Components

Here is the bill of materials for the HX1 version and the MX146 version. See what I mean about the HX1 requiring fewer components? Also, these parts are in the schematic, but haven't found a clear purpose for them yet, so don't buy them.

How to build the firmware?

The easiest way is with the Arduino IDE. Download the latest "trackuino-ide-xxxxxxxx.zip" from here. Unzip it in your sketches directory.

Now, you'll have to change some settings. Open the "config.h" tab and:

  • Put your own callsign and SSID here. By default it's nonsense, something like "MYCALL". SSID 11 is good for balloons.
  • Select your type of radio here (HX1 or MX146)
  • Optionally, add some custom comment to the APRS messages, set a different TXDELAY, change the APRS update period (default = 61 seconds), etc.

Now open the trackuino.pde sketch, compile and flash.

If you're comfortable with command line tools, there is also a "trackuino-gcc-xxxxxxxx.tgz" version with Makefiles that you can compile with the gcc-avr toolchain. I like to develop using the gcc-avr toolchain because the IDE doesn't support multi-file projects quite well.

Testing!

Time to test the board! Plug the GPS and TX antennas and power the board. You need at least 6 volts for the HX1 version, and 9 volts for the MX146 version.

I have tested the HX1 version. If someone tries with the MX146, feedback will be very welcome!

And since a picture is worth a thousand words, take a look at this screenshot from APRS.FI and see how far this little HX1 can get. I'm successfully being digipeated by EA5ERC-15, which is an unbelievable 144.5 kilometers away! And I'm at sea level!

Captura de pantalla 2011-01-08 a las 20.29.54.png

 

56 comments:

  1. What a timely post! This is my Saturday Project for today. Thanks for all of your effort in this, I'll keep an eye on you on aprs.fi today :)

    ReplyDelete
  2. @david: good luck and please share your experience!

    @the worlds: wow! Post your results! and a picture of the milled PCB! And a video!!

    ReplyDelete
  3. What kind of antenna are you using? I'm trying to figure out APRS for my own balloon launch.

    ReplyDelete
  4. Hi! My last reply seems to have gotten lost, but I can't find your email and I'd love to talk to you about your designs (I'm KF7FER).

    Can you contact me at bradb667 at gmail.com?

    Thanks! Brad.

    ReplyDelete
  5. @Matt: I've been suggested by another colleague a j-pole like this: http://www.kb3kai.com/j-pole.php.

    @Brad: just emailed you.

    ReplyDelete
  6. I've been looking at the code -- are you driving the HX1's TXD with just a square wave? That works? Why didn't you have to generate a sinewave?

    ReplyDelete
  7. Hello Javi :)

    Recently I made a choice to move to ATMega644p running with external crystal at 7.3mhz. Is your code going to work as it is done with ATMEga328 at 16mhz?

    ReplyDelete
  8. Hey Kon, it should work okay. Just make sure you define F_CPU and everything (the playback rate, timing functions, etc.) should scale down properly. If you're using the command line version of the firmware, F_CPU is defined in Makefile.user. If you're using the IDE version, you'll probably need to edit Arduino's "boards.txt" file and add a new configuration for your specific set-up.

    Let me know how it goes.

    ReplyDelete
  9. @Matt: I'm using PWM to generate the audio. The HX1 has a low-pass filter that "integrates" the square pulse and turns it into a nice sine waveform. Take a look at my previous post about PWM

    ReplyDelete
  10. Hi Javi, how can I get a license to use the 144.800 MHz band used by APRS in Spain? Is it really necessary?

    BTW, when do you plan to launch your balloon? I could participate and learn a thing or two from the experience so I could apply to mine :)

    Regards,

    ReplyDelete
  11. Hi Juampe, just emailed you with some info on the license tests in Spain.

    ReplyDelete
  12. @juampe: ok, nevermind, I can't find your email, so here I go:

    Yes, you need a license to be able to use the radio amateur bands. The tests are scheduled regularly in every major city and the next one is on may, 7th. I think you can also ask for an individual test scheduled just for you. Take a look at the FEDI-EA page., they have some sample exercises and the list of topics.

    I'm planning to launch this summer, and of course, you're very welcome to join! Give me an email address and we'll stay in touch.

    ReplyDelete
  13. Great! :)

    Go ahead: the name I used dot lopez at gmail dot com.

    Regards,

    ReplyDelete
  14. Where did schematics go on the link you provided?

    ReplyDelete
  15. trackuino-avr.sch and trackuino-avr.brd

    ReplyDelete
  16. When I click on http://code.google.com/p/trackuino/source/browse/#svn%2Ftrunk%2Feagle there's nothing to download. Assist? Or am I blind? (wouldn't doubt it)

    ReplyDelete
  17. Hmmm... When you click on that link, you should be at the the source code tree. If you click on any file, you should see a link to "Download the raw file", to the right.

    Or... go to the downloads area and get the .zip package. The .sch and .brd files are inside it.

    ReplyDelete
  18. Thank you very much, found it on the downloads area link. I'm working on something similar but instead of the HX1, I merely need the line to connect to a radio input I already have.

    Any suggestions or input you might have since you've now "been there/done that"?

    I love the idea of the HX1 though and will be ordering one so I can replicate your board and tinker with it.

    ReplyDelete
  19. @Terry: Well, there are two things: the PTT line and the mic input.

    The PTT is handled differently depending on the radio. On the HX1, the PTT is pulled high to transmit, but on some radios it needs to be shorted to 0v. The current behavior of the trackuino firmware is pull up to 5v to transmit, so you might have to add an inverter stage if your radio is of the pull-down kind, which can be easily done with an open-collector BJT set-up (I included a rudimentary ASCII schematic on the trackuino's config.h file).

    On the MIC input: the output of the Arduino is 0..5v peak to peak. Some radios will expect an input in the range of millivolts, so you might need to translate levels down. A simple resistors divider will do. I've successfully used an ICOM 229H as a transceiver. I can try to find the exact schematic I used, but I remember this radio happily tolerated all kinds of abuses. I could feed it from 2Vpp to 200mVpp without noticeable difference on the decoded signal.

    ReplyDelete
  20. Javi: Thank you again for you input. That's pretty much exactly what I was thinking needed to be done. I'll take the radio apart and see which pull type it needs.

    That's why I was interested in your setup since, aside from the HX radio, everything else would be about the same for mine. If I can get on this soon and get something working I'll report back.

    ReplyDelete
  21. @Terry: see if you can find online manuals for your radio before taking it apart... I happened to find a scanned copy of mine (icom 229h), and they usually go into these kind of details.

    I forgot to mention, if you take a look at the trackuino schematic, you'll see both methods implemented there: the HX1 is pulled high to transmit, but the MX146 is shorted to 0v through an NPN BJT.

    The audio also goes through a low-pass filter, which doubles as a voltage divider to match the 0..500 mV peak-to-peak required by the MX146 (the low side of the divider is the internal 600 ohm impedance of the MX146). The LPF is followed by a coupling capacitor to get rid of the arduino's DC bias. None of this is needed for the HX1 since it's got its own LPF + coupling built-in, which makes everything so much cleaner.

    ReplyDelete
  22. Javi, We have built a homebrew version of the Trackuino, and will be flying it at this year's Great Plains Super Launch in Colorado. However, we are stumped by one thing...we don't see how to include temperature in the APRS message! We have been over the code and must be missing something obvious. We are using the LM60 you recommend.

    Thanks, Mike

    ReplyDelete
  23. If you are using the latest firmware (1.1), then it should be there already. Look for something like: "/Ti=XX/Te=YY" in the comment area, where Ti/Te are the internal/external LM60 readouts.

    The code that generates APRS messages is in "aprs.cpp", you can also change that to better suit your needs!

    ReplyDelete
  24. Hi Javi,

    I did use the Softserial instead of the Arduino comm TX,RX and I did not get the good packet out which somekind of distortion out of the audio packet. but the Arduino Comm port worked fine. Any idea. did you eve try to use Softserial.h

    ReplyDelete
  25. Siam Square: Softserial keeps interrupts disabled most of the time, so it disrupts the modem. You can try adding this line after aprs_send(): while (modem_busy()) ;

    That will keep the program in a loop while the modem is transmitting and prevent it from being disturbed.

    ReplyDelete
    Replies
    1. Hi Javi,

      I did added this while (modem_busy()) ; after the Aprs_send(0: in the main loop. it still send out the broken packet , I can hear from the receiver.

      It would be very convenient if we can use the softserial

      Delete
  26. This comment has been removed by the author.

    ReplyDelete
  27. Siam Square: well, then.. I'm out of clue. This should work with Arduino 0023 and the built-in SoftwareSerial library. Arduino 1.0 has a new soft serial library (formerly known as NewSoftwareSerial) that is interrupt driven and WILL break the modem.

    ReplyDelete
  28. This comment has been removed by the author.

    ReplyDelete
  29. You can still use the NewSoftwareSerial library, but you have to call end() before sending the APRS frame, then begin() again before reading GPS data. NewSoftwareSerial has an interrupt service routine that goes off on incoming serial data and disables interrupts for the WHOLE duration of the received byte. So, it obviously breaks everything else that relies on interrupts. By calling end() you momentarily disable that ISR.

    ReplyDelete
    Replies
    1. Thank you Javi, it worked with Newsoftserial now, Packet looked very stable audio,

      Here the code:-

      void loop()
      {
      int c;



      if (millis() >= next_tx_millis) {
      // Show modem ISR stats from the previous transmission
      #ifdef DEBUG_MODEM
      modem_debug();
      #endif
      mySerial.end( );
      aprs_send();
      digitalWrite(LED_TX,HIGH);
      delay(1000);//help to delay a bit before

      mySerial.begin(4800); //restart SOFTSERIAL Thank Javi
      digitalWrite(LED_TX,LOW);
      next_tx_millis = millis() + APRS_PERIOD;
      }


      My project now is done.

      Thank you very much for your kind respond to my post and help m to solved this feature.

      73

      Nimit - K6XOX

      http://blog.siamsq.net

      Delete
  30. Dear All:

    Is there a way to just transmit telemetry data?

    I don't want to transmit GPS positions.

    How can i change the code to achive that.

    Regards.
    Alfredo Mendiola Loyola
    Lima, Perù

    ReplyDelete
  31. Hi I have been leaning electronics not for a long time ¡
    But this project caught my curiosity!!!
    If I built this unit, where can I get the data that I´ll be receiving? with another Arduino board while Tackauino is working? or the data from the trackauino it is saved in a SD?


    I will be realy glad if you can give me a hand!

    P.S: Also, I couldn't find the pcb

    my email is pedrosm9@gmail.com

    ReplyDelete
    Replies
    1. You need a VHF receiver and a TNC or software decoder (like AGWPE) to decode the signal. You can also see your beacon on http://aprs.fi assuming you have an igate near you. Remember you also need a license to transmit.

      On the top right section of the blog there is a link to the "Project page at Google Code". Follow the Downlad link and you will find the necessary downloads. Also check out the wiki. The board described in this post is phased out because of the GPS. You should be building the latest version of the shield instead.

      Delete
  32. Hey I am trying to send a weather balloon to the stratosphere, will the VHF antenna be enough to track it while in high stratosphere? I was thinking to get a UHF transmitter but I do not know if it will work with this board. Will it?

    ReplyDelete
    Replies
    1. Yes, a 1/4 wave with radials will cover hundreds of Km with just 300 mW when above ~3 Km high.

      Delete
  33. Hi Javi,

    Would this work to track vehicles? I have a small business and would like to be able to keep track of my employees but can't afford a commercial system.

    Regards

    ReplyDelete
  34. Hi I am quite interested in building one these but noticed that some of the parts on the list are on Farnell's Website anymore, are there any suggested replacements for the 3 way terminal block, the 2 way terminal block and the 22uF capacitor. Or does anyone know somewhere else I could get those parts?
    Thanks a bunch in advance

    ReplyDelete
    Replies
    1. *sorry I meant they aren't on their site anymore

      Delete
  35. sorry I can't compile trackuino.pde on Arduino: 1.5.6-r2 (Windows 7)
    error file where buzzer_avr.cpp >>>>>>>
    Arduino: 1.5.6-r2 (Windows 7), Board: "Arduino Uno"

    Build options changed, rebuilding all

    buzzer_avr.cpp: In function 'void buzzer_setup()':
    buzzer_avr.cpp:47: error: 'OUTPUT' was not declared in this scope
    buzzer_avr.cpp:47: error: 'pinMode' was not declared in this scope
    buzzer_avr.cpp:48: error: 'LOW' was not declared in this scope
    buzzer_avr.cpp: In function 'void __vector_13()':
    buzzer_avr.cpp:104: error: 'LOW' was not declared in this scope

    This report would have more information with
    "Show verbose output during compilation"
    enabled in File > Preferences.

    Please,tell me T^T

    ReplyDelete
    Replies
    1. Use version 1.51 (click on "Download ZIP" to download)

      Delete
    2. firmware 1.51 compiles fine with arduino 1.5.7 here... Make sure you buzzer_avr.cpp includes Arduino.h. Post a screenshot in the forums otherwise.

      Delete
    3. Sorry, I did as you said but I have not compile.
      1.5.7 (Windows 7), Board- -Arduino Uno-
      error is >>>>>>
      afsk.cpp:36:22: fatal error: WProgram.h: No such file or directory
      #include compilation terminated.
      What should I do next?

      Delete
    4. There is no way you are using the 1.51 version I told you to use, since line 36 in 1.51 doesn't have such an include. Make sure you are on 1.51 using the above link.

      Delete
    5. I using firmware 1.51 and using arduino 1.5.7

      Delete
    6. I do not know what's going on with the program.

      Delete
    7. As I said earlier, please use the forum and post a screenshot.

      Delete
    8. ^^ Thx you so much. this now I can compile.

      Delete
  36. This comment has been removed by the author.

    ReplyDelete
  37. Hey, I was wondering if anyone had any info/schematic on the board in the first photo, ie: a single chip solution? I would really appreciate it if anyone could help!

    ReplyDelete
  38. Which Arduino board would you recomend?

    ReplyDelete
  39. Harrah's Resort and Casino - DrmCD
    Get Directions to Harrah's Resort and Casino, Holiday 목포 출장샵 residences and suites, 익산 출장샵 including duplex 인천광역 출장샵 king and 춘천 출장안마 two 김천 출장마사지 queen beds. · On site casino.

    ReplyDelete