Intro | Build it! | Command reference | How it works | Download | Customize | Todo | phpBB forum
Other projects: GPS Finder | One-LED clock for people with limited vision | GPS speedometer with setpoint and relay output

How to build the Open GPS Tracker

PC boards, kits, and assembled units are for sale here!

The tracker is easy to build on a perfboard. I used a basic one-pad-per-hole perfboard and 26-gauge wire, but 30-gauge would probably be better. All the electronic parts are available from Mouser Electronics. Radio Shack sells the perfboard and the 2.5mm plug for the phone. You could also buy these from Mouser.

If you are building a tracker, please post in the user forum. I am looking for bug reports, pictures, and information about how the tracker works for you. I will provide technical support to people who are building units.

Click here for information about using the Aarlogic GPS 3A GPS module and Telit GC864 GSM module.

Caution: I have seen two units with the power transistor installed backward. If you reverse the emitter and collector, the transistor will conduct weakly. The power light comes on, but the device either returns NO DATASTREAM or never replies. With the regulator and transistor installed side by side, and the output of the regulator next to the emitter of the transistor, the flat sides of the two components face in opposite directions. If they are facing the same way, the circuit will not work!

The Mouser Electronics (http://www.mouser.com) order is listed below. This order includes an AVRISP2, which you may not need if you already have an AVR programmer. I've included two each of all the small parts, and three of the GPS module connectors. This connector is the only tricky part of the build. It is easy to ruin one, as I did. For testing, you can just insert the 26-gauge wire into the socket on the GPS module, but for permanent assembly you need the connector. The connector has one extra pair of pins, which you should cut off. You will be soldering to the long side and plugging the short side into the GPS unit.

You need to solder to four pins on the GPS header, three of which are right next to each other. Clamp the header with a small vice or a "third hand" clip. Bend the wire into a loop with pliers and attach it to the pin, then carefully solder it. I solder pin 3 and pins 7 and 11 first, putting the wires down low near the plastic separator, then solder pin 9 with the wire up high away from pins 7 and 11. Check for shorts with a meter.

GPS connector Circuit board

I superglued the IC socket and the two rows of three pins for the programming port, then wired those together and installed the rest of the components. Put the 0.1uF capacitor right next to the IC socket. The GPS module is attached to the board with 2-32 size screws, nuts, lock washers, and 1/4 inch spacers, which are not quite long enough. Get 3/8 inch spacers if you mount it this way.

Mouser Part #DescriptionQuantityPrice Each
556-ATTINY84-20PUAtmel AVR microcontroller2$2.90
827-AME8811AEATZ3.3 volt regulator2$0.69
522-ZTX1151APNP transistor with low saturation voltage2$1.51
581-SA105E104M0.1 uF ceramic capacitor10$0.08
581-TAP106K006SCS10 uF tantalum capacitor4$0.50
855-M50-35012421.27mm M50 connector for GPS device3$1.45
171-0025-EX2.5mm stereo plug for phone2$1.35
571-1-390261-3 or
571-26415994
14 pin IC socket2$0.15
604-WP937EGWTwo-color red/gren LED2$0.34
604-WP132XIDRed LED2$0.12
660MF1/4DC3321FResistor 3.32K ohm5$0.03
660MF1/4DC4700FResistor 470 ohm5$0.03
755-1N4148T-77Switching diode5$0.03
12BH431-GR3 AAA battery holder1$0.89
571-41032390Pin header 40-pin breakaway1$1.57
340-V23993-A1035DVincotech GPS receiver module1$61.50
556-ATAVRISP2AVRISP2 USB AVR programmer1$35.91

Drawings below donated by Empowered Web Development

Microcontroller schematic


Power supply schematic for 4.5V battery

Programming plug

GPS module socket, module facing antenna down


Checkout process

When you finish building the project, perform these checks. This will prevent destruction of components and verify that the circuit is built correctly.
Unpowered checks with no batteries, MCU, phone, or GPS installed: Powered checks with batteries but no MCU, phone, or GPS installed: Reading status codes
The two-color status LED blinks to provide status codes. Status codes are two-digit numbers which assist in debugging. The first digit is always shown in green, and the second digit in red. For example, one green blink followed by three red blinks is code 13. Three green blinks followed by two red blinks is code 32. The status codes are displayed one at a time from a queue, so the event that caused a status code may be over by the time the code is displayed.

CodeDescription
11phone polled
12send message failed
13phone poll failed
14no phone number defined
21invalid password
31power on or reset
32watchdog reset
33eeprom initialized from defaults
34remove jumper to reinit

Final checkout and setup

Setting the reply address
The GPS tracker stores a reply address, and always sends messages to the reply address. It does not care where the messages come from, because messages sent from email do not include the From address (using AT&T GoPhone service.) The reply address can be a mobile phone number or an email address. Regardless of where commands are sent from, replies go to the reply address.

To set the reply address to a mobile phone number, use a mobile phone to send a text message to the tracker's phone number:
GPS SETADDRESS 8185551212
where 8185551212 is the mobile number you want tracker messages sent to. The "GPS" must be uppercase. The SETADDRESS can be upper or lower case. After sending the message, the tracker's phone display should light, the tracker status light should blink code 11, and you should receive a reply saying "COMMAND EXECUTED".

To set the reply address to an email account, you need your carrier's Email Gateway number, which is a special phone number used to route text messages to an email account. For AT&T the Email Gateway number is 121. For other carriers, go into the phone's SMS settings (Messages, Options, Message Setup, Text Messages, Email Gateway) and look up the Email Gateway number. Send a text message to the tracker:
GPS SETADDRESS 121 user@domain.com
where "GPS" is in uppercase, 121 is the Email Gateway, and user@domain.com is the email address. For AT&T service, you can send an email to phone-number@txt.att.net (8185551212@txt.att.net) to send a text message. For other carriers, you will have to look up the correct email address. The tracker will reply "COMMAND EXECUTED."

Requesting a locate
Once you have set your reply address, you can request a locate. Send the message:
GPS LOCATE
where GPS is in uppercase. The tracker's phone display will light, the status LED should blink code 11, and the GPS power LED should come on. For the first locate, it will usually stay on for a minute or more. When the GPS light goes out, the status LED will blink code 11 again, and you should receive a reply:
LOCATE POS 34 05.8779 N 118 20.6368 W ALT 377 FT SPEED 0.0 MPH COURSE 11.05 AT 08/04/05 22:31:51 UTC SATS 04
This is a location report from the tracker. The fields are:

If you get a valid location report, your tracker works. If you get "GPS TIMED OUT WAITING FOR FIX" the tracker is not in GPS coverage. Although the A1035 gets a fix inside most buildings, steel construction can block the signal. Take the device outside and try again.

If you get "NO DATASTREAM FROM GPS DEVICE" your GPS module is not sending any data to the microcontroller. Check for faulty connections and verify that power is applied to the GPS module when the GPS power LED is lit. Dead GPS batteries can also cause this error, since the microcontroller needs less power than the GPS module.

Securing your tracker
The "GPS" prefix you have been putting before commands is actually a default password. You can and should change it. Anyone who knows your password can change it and take control of the tracker. Unlike commands, the password is case sensitive. To change it, send a text message like:
GPS SETPASSWORD newpass newpass
Where "newpass" is the new password you want to set. It must be between three and sixteen characters, and must be repeated twice after SETPASSWORD. You should get back "PASSWORD CHANGED." You would then have to send "newpass LOCATE" to request a locate, for example. If you lose your password, you need physical access to the tracker to clear the configuration (see the command reference.) Messages sent without the correct password will be ignored.

Other things the tracker can do
So far you have seen the normal mode, in which the tracker replies immediately to requests. The tracker has two other modes: tracking and powersave.

In tracking mode, the tracker automatically takes GPS fixes, and sends you a message when it starts moving, when it stops moving, when it goes out of GPS coverage, and periodically while it is moving. You can plot the fixes on Google Maps or a similar service to follow the tracker's movements. You can configure how often the tracker takes a fix and how often it alerts you. You can also set a speed limit and receive an alert if it is exceeded.

In powersave mode, the tracker turns the phone power on and off periodically, allowing the phone battery to last longer than its typical standby time. For example, the phone may be off for an hour and on for ten minutes. In this case, it can take up to an hour for the tracker to reply to messages. You can remotely take the tracker out of powersave mode when you need location reports. Tracking and powersave modes are mutually exclusive; setting one mode clears the other.

The tracker has several configurable options, and a status command that reports the current settings, the phone battery status, the phone signal strength, and the firmware revision. You can set a name which will be prefixed to all tracker replies, so several trackers can report to the same destination. See the command reference for details.