Introduction: Track ME

About: I like making things, specially if they can move.

Track ME is a "small" GPS, SD Card, and GSM Shield controlled by an Arduino Mega. Call me and get my location.

Step 1: Intro

A while back I decided to build a Car/Personal tracker.

This was my first prototype on this direction.

The system itself is very simple. Just an Arduino Mega, a GPS, a GPRS Shield and an SD Card. This last one is optional but I included because I thought in launching a challenge to my friends in Facebook, they call the system and get an SMS with my position or my last known position, in the end I would know how called me.

The system is always searching for the actual position. If someone calls the number of the SIM card, the system will send an SMS with the actual position and with a link to google maps. For example:

Hugo location is now: Lat: 54.315010, Log: 10.130997. http://maps.google.com/maps?q=54.315010,+10.13099...

If the GPS is not receiving any position, the system will send the last known position. For Example:

I can not seem to find Hugo. Last time that I've saw him, was in: Lat: 54.315010, Log: 10.130997. http://maps.google.com/maps?q=54.315010,+10.13099...

The date, time, position and SMS status and caller phone number are then stored in the SD Card.

Step 2: Components

For this project, you will need:

1x Arduino MEGA
1x GPRS Shield (It is also possible to use other GSM shields available in the market)

1x GPS (I used the NEO 6, very popular in ebay)

1x SD Card Shield

1x 9V Battery

1x Plastic

Box Some wires

Step 3: Connect All

Before assembly you will need to do the following steps.

  1. Remove the SIM pin code. Place the SIM card in phone and remove the SIM pin at the beginning of the cell phone startup.
  2. Insert SIM card in the SIM card holder in the GPRS shield. In the case of my GPRS shield, the card holder is located on the bottom of the shield.
  3. Setup the jumper to Software Serial (Optional). On my shield there are 2 jumpers that allow connections to pins 7 and 8 or pins 0 and 1. Because I want to use the normal Serial Communication port in the Arduino Mega, the jumpers need to be placed in SWserial position. When assembled I connected pins 7 and 8 to Serial Communication port 1, pins 17 and 18 in the Arduino Mega.

After performing the previous steps, place the GPRS shield in the Arduino Mega.

Then place the SD Card Shield on top of the GPRS shield.

Now connect pins 8 and 7 to pins 18 and 19 (Serial 1).

The SD Card Shield, that was designed for Arduino Uno, and uses pins 10 to 13 for SPI, so in order for this to work on Mega, they need to be "passed" to the SPI pins on MEGA.

Arduino UNO SPI pins - Arduino MEGA SPI pins

MOSI - 11 to 51

MISO - 12 to 50

SCK - 13 to 52

SS - 10 to 53

Using the prototyping area on the SD Card shield, I solder the GPS module.

Step 4: Assembly

After everything connected I placed the system inside a case.

The power from the system comes from a 9V battery connect in the DC power jack.

Step 5: Software

The library used for the GPRS Shield can be found where:

GPRS Library Download

After download, install in the correct Arduino library folder.

It is necessary to do some changes in order to use the Arduino Mega:

1) Open GSM.h in the library folder and comment/"decomment" the appropriate lines like below e.g. for Arduino Mega:

//#define UNO

#define MEGA

2) In HWSerial.h decomment the line for Mega definition e.g. for Arduino Mega:

#define MEGA

The library used for the GPRS Shield can be found where:

GPS Library Download

The program it self runs in a very simple manner. After all of the start up routines (GPRS, GPS and SD card initialization), the GPS will attempt to determine the number of satellites that he has available and a valid GPS coordinates point.

If call is placed during this period, the call will be automatically rejected and nothing will happen.

When the GPS has a valid location and is detecting more than 3 satellites (I'm assuming where that the GPS has good reception), if a call is placed, the system will send an SMS to the call number with my position.

All of these data will be stored in the SD card. If the GPS has less then 3 satellites, no valid position can be retrieved, so if a call is placed, the call number will receive an SMS with my last known position. Again all data is stored in the SD card.

The program can be found where:

Program Code Download

Step 6: Pros and Cons

Since this is a prototype, there are a lot of thing that didn't work ok. But the objective is always to improve.

First the battery only lasts for one hour!! I did not implement any energy saving mechanics in the software. So for future improvements "Sleep Mode" is a must. The size was also reviewed and I design a complete new board.

Please write me if you found any mistake or if you have any suggestion/improvement or questions.
Thanks for reading.

Hugo Gomes

P.S. If you like my tutorial, please share it and leave a me a vote :)

Arduino Contest 2016

Participated in the
Arduino Contest 2016

First Time Authors Contest 2016

Participated in the
First Time Authors Contest 2016

IoT Builders Contest

Participated in the
IoT Builders Contest