Introduction: CarTracker

About: Lazy Old Geek

Have you come out of a store and said to yourself, where did I park my car? Well, I have. Now, there are a lot of smartphone applications that can help you locate your car but smartphones are expensive.

So this Lazy Old Geek (L.O.G.) decided to make my own.


When you park your car, you press the button, car tracker calculates the car location GPS coordinates and stores them in EEPROM so the car tracker can be turned off. When you’re leaving a store looking for your car, the car tracker reads the new GPS and displays how far from your car you are and points in the direction of your car.

Step 1: Car Tracker Module

NOTE: This PCB was also used in MonkeyDogTracker Instructable:

It does not need an nrf24L01+ module and uses a different sketch.

The display module consists of several major components(purchased on ebay):

A Ublox NEO-6M GPS(see picture)

An LSM303DLHC magnetometer (see picture)

An LCD5110 display (see picture)

A custom Arduino PCB

A Lithium battery (see pictures)

For the battery, I selected a 3.7Vdc Lithium Ion battery also bought on ebay. This is a common type for replacement batteries for some smartphones and tablets. These come in various sizes and capacities. I had to solder a JST2.0 connector to the batteries. I hadn’t really decided on which one to use.

You can also use 18650 batteries.

I also purchased a USB Li Ion 1A battery charger and added a JST2.0 connector to charge these batteries (see picture).

Warning: The standard USB port on a computer will often only put out 0.5A. While this will work, it will take longer. The charging will be faster if a 1 or 2A source is available, such as a USB 2A AC adapter.

Arduino PCB schematic is attached. Power is regulated with a 3.3Vdc regulator. S1 is the pushbutton. U$1 is a pushbutton on/off switch:

Buz1,2 are pads for a buzzer, not used.

There is a connector labeled nrf24L01+, also not used.

There is a USB-BUB type connector for loading Arduino sketches.

The two pictures with displays shows an ‘arrow’ pointing in the direction of the collar and the distance to it.


The GPS continuously reads the latitude and longitude of the CarTracker. When the button is pressed, the coordinates are saved to the EEPROM. E.g., this would be the location of your car.

Now, let’s say you walk out of a store and are looking for your car. Power up the CarTracker. Do not push button. The GPS will read the coordinates of the store and will calculate distance and direction from there to the stored location (of the car). The compass will orient the display so the display will point to the car and will display the distance.

Step 2: Arduino Sketches

Car tracker sketch:

Remember: In the Arduino environment, this a Pro Mini 8MHz 3.3V Board and Processor. But I’m using the ‘standard’ USB-BUB pinout so you need a USB-BUB or equivlaent (PL2303).

GPS: TinyGPS++ library

LSM303DLHC: Unfortunately, I can’t remember where I got this Arduino library. I think it was from Pololu. Anyway, I’ve attached the library.

So the Pololu library has a Calibrate sketch to ‘calibrate the LSM303DLHC. Here is the description:

CALIBRATE: This program is similar to the Serial Calibrate example, but instead of printing the most recent readings, it prints a running minimum and maximum of the readings from each magnetometer axis to the LCD5110 display. These values can be used to calibrate the heading() functions and the Heading example after moving the LSM303 through every possible orientation.

I modified it so that the Mins and Maxs will display on the LCD5110. Run this sketch on the CarTracker module. Run sketch, slowly, twist and turn the module in all orientations. Record the Mins and Maxs on the display, then plug them into CarTracker sketch, replacing the values in the following lines:

compass.m_min = (LSM303::vector){-433, -600, -546};

compass.m_max = (LSM303::vector){+570, +488, +579};

This should improve the compass accuracy.

WARNING: When I updated to Arduino to 1.6.1, I had to update Adafruit_GFX and Adafruit_PCD8544 libraries. Here's the latest:

CarTracker Sketch Summary:

Besides setup() and loop(), I wrote six functions:

void setSetPoint(); // set SetPoint, stores latitude and longitude to EEPROM

void getGPS(); // get current GPS data

void calculate(); // calculate distance and heading

int getHeading(); // get heading using compass

byte getPostion(int); // get position using heading

void displayDirection(); // display info

setup() reads EEPROM set point coordinates, starts GPS, compass, sets up LCD5110

loop() gets current GPS, calculates distance and heading to set point. Displays direction to set point and distance.

if button is pushed, GPS coordinates are stored to EEPROM as set point.

Other Arduino software:

Compass: Simple compass that points North and shows heading on LCD. (

GPStoLCD: GPS coordinates to LCD5110 (

Step 3: Improvements - Conclusions

Possible Improvements:

Some people use parking garages with several levels. The GPS should be able to display the difference in height.

Enclosure for the CarTracker module.

TIP: When first starting, the GPS modules take a while to start receiving. There’s a green LED on the module that will start blinking when it is running but it may take a couple of minutes for the coordinates to settle.

Getting it all to work:

Not Easy.

CarTracker module: The GPS module should blinking. This means it is working. When I’m developing code, I leave the computer connected and send serial messages to the serial monitor like GPS coordinates to make sure they’re working. Then you can send the distance and direction to the serial monitor to make sure that’s working correctly. Once that’s okay, then send it to the LCD5110 display.

Battery life: Battery life can be extended by removing blinking LED from GPS.

Conclusions: Well, it seems to work well. I don’t really use it as it’s rather bulky and requires that I remember to push the button when leaving my car.

By the way, it could be used for other purposes like starting a hike so you can find your way back to the starting point.