How to Make a GPS Tracking Device from Scratch

A basic GPS tracking device combines three core components: a GPS receiver to determine location, a microcontroller to process that data, and a communication module to send coordinates to a server or phone. You can build a functional one for roughly $20–$50 in parts, and the whole assembly fits in a container smaller than a deck of cards.

Components You Need

Every DIY tracker starts with the same basic parts list. A GPS module receives satellite signals and outputs location coordinates. Popular options include the NEO-6M and NEO-7M modules, which cost between $5 and $15 and provide accuracy within a few meters. These modules output standard location sentences over a serial connection to your microcontroller.

The microcontroller is the brain. An Arduino Nano or an ESP32 board works well for beginners. The ESP32 has built-in Wi-Fi and Bluetooth, which can be useful if you want local connectivity in addition to cellular. For the cellular communication module, you need something that sends location data over a mobile network to a server you can check from your phone or computer. A rechargeable lithium battery (typically 1000–3000 mAh) and a plastic enclosure round out the build.

Choosing a Cellular Module

This is the single most important decision in your build, because it determines whether your tracker actually works on today’s networks. The SIM800L module appears in countless online tutorials, but it operates on 2G GSM networks. In North America, 2G is essentially dead. AT&T shut down its 2G network in 2017, Verizon ended 2G in 2020, and Canadian carriers followed suit. Even in Europe, carriers like Vodafone plan to switch off 2G by 2028–2030 depending on the country.

Instead, look for modules that support LTE-M or NB-IoT. These are 4G protocols designed specifically for low-power devices like trackers. The SIM7000 and SIM7080 series support these protocols and are widely available. They cost a bit more ($15–$25 versus $5 for a SIM800L) but will actually connect to modern networks. You’ll also need an IoT SIM card from a provider. Some carriers offer pay-as-you-go IoT plans where you only pay for data when the device transmits, which keeps monthly costs under a few dollars since trackers send very little data.

LoRa as an Alternative

If you’re tracking something within a fixed area, like farm equipment or assets on a large property, LoRaWAN is worth considering. LoRa modules consume very little power, operate on unlicensed radio frequencies (no SIM card or data plan needed), and can reach 10–15 km in rural areas. The tradeoff is that you need a LoRa gateway within range to receive the signals, and the data bandwidth is extremely low. For most people building a general-purpose tracker, cellular is the simpler path.

Wiring the Circuit

GPS modules and cellular modules both communicate with the microcontroller over serial connections (TX and RX pins). The critical detail most tutorials gloss over: voltage levels. GPS chips run on 3.3V, and some cellular modules need 3.4V or higher. The SIM900D, for example, won’t function reliably at 3.3V and needs at least 3.4V to operate. If your microcontroller runs at 5V (like most Arduinos), you need a logic level shifter between the boards to avoid damaging the 3.3V components.

For power, you have two practical options. You can run everything from a single lithium cell (3.7V nominal) with a small voltage regulator to provide a stable 3.3V line for the GPS chip. Or you can use a 5V USB power bank and regulate down for the individual modules. The lithium cell approach gives you a more compact build. Connect the GPS module’s TX pin to a serial input on the microcontroller, and the cellular module’s TX/RX pins to a second serial port. Most microcontrollers support at least two serial connections, either in hardware or through software serial libraries.

Programming the Microcontroller

The software logic is straightforward. Your code does three things in a loop: read GPS coordinates from the GPS module, format them into a data packet, and send that packet through the cellular module to a tracking server. The GPS module outputs location data as text strings containing latitude, longitude, speed, and time. Your code parses these strings to extract the coordinates.

For the server side, Traccar is a free, open-source tracking platform that runs on a computer or cloud server and displays device locations on a map. Your device connects to Traccar over TCP or UDP and sends location packets in a format the server recognizes. The device first sends a login message with its unique identifier (the cellular module’s IMEI number works well for this). If the server responds within five seconds, the connection is established and location reporting begins. If it doesn’t respond in time, the device treats the connection as failed and retries.

You can also skip running your own server entirely and use a simple HTTP request to send GPS coordinates to a free service or even a Google Sheets spreadsheet via a webhook. This is less elegant but gets a working prototype running faster.

Battery Life and Reporting Intervals

How often your device reports its location has an enormous effect on battery life. A typical GPS tracker draws about 4 mA in standby and 8 mA when actively getting a GPS fix and transmitting data. With a 1000 mAh battery, that works out to roughly 10 days of standby or about 5 days of continuous tracking.

The real-world numbers depend heavily on your reporting interval. At the default 10-minute interval that most commercial trackers use, you get a good balance between useful tracking and reasonable battery life. Drop that interval to 1–2 minutes and battery life plummets to 8–10 hours, comparable to running GPS navigation on your phone all day. For tracking a parked vehicle or a stationary asset, you can extend battery life dramatically by programming the device to sleep and only wake up on a schedule, or when a motion sensor detects movement.

A 3000 mAh lithium cell (about the size of a credit card, 5–7mm thick) gives you roughly three times those numbers. If you need weeks of battery life, pair a large battery with a 30- or 60-minute reporting interval and aggressive sleep modes between transmissions.

Choosing an Enclosure

Use a plastic enclosure. GPS signals and cellular radio waves pass through plastic freely, while metal cases block them. Steel and aluminum provide electromagnetic shielding by design, which is exactly what you don’t want for a device that depends on receiving satellite signals and transmitting cellular data. A simple ABS plastic project box from any electronics supplier works perfectly.

If the GPS module uses a ceramic patch antenna (the small square component on the module’s surface), orient it face-up inside the enclosure, toward the sky. Avoid placing the cellular module’s antenna directly next to the GPS antenna, as the cellular transmissions can interfere with the weaker GPS signals. Even a couple of centimeters of separation helps. Use hot glue or foam tape to secure components inside the box so they don’t shift around.

Legal Restrictions on Tracking Devices

Building a GPS tracker is legal. Placing one on someone else’s property without their consent is not, and the specifics vary by state. In Florida, you cannot knowingly install a tracking device on another person’s property without their consent. Delaware, Michigan, Oregon, Rhode Island, and Texas specifically prohibit placing trackers on motor vehicles without the owner’s consent. Minnesota and Hawaii go further, requiring a court order for any use of a mobile tracking device, with limited exceptions.

Seven states, including California, Florida, Hawaii, Louisiana, Minnesota, New Hampshire, and Virginia, have broad prohibitions that cover tracking devices used on any property or person, not just vehicles. New Hampshire’s law is particularly expansive: no one may place an electronic device on the person or property of another and obtain location information without consent.

Tracking your own vehicle, your own belongings, or a pet is generally fine everywhere. The legal issues arise when you track another person or their property without knowledge or consent. If you’re building a tracker for fleet management, make sure employees or drivers are informed and have agreed to monitoring.