loading
Bring out your 3D glasses and enjoy viewing in a novel way! I have added a new dimension to my instructable. If you do not have 3D glasses, then you can make one yourself. The following link explains how to make 3D glasses ( link ).

Please Note: This instructable contains 3D images which are best viewed with Red and Cyan 3D Glasses. However, for those of you who do not have 3D glasses, this instructable also contains 2D images.




Every year about 700,000 vehicles get stolen in US. In fact, a car is stolen every 45 seconds.

We all love our cars and whether it is a roaring Lamborghini or a purring Prius, we are attached to it and wish that it never gets stolen.

I am very attached to my family car and take lots of precaution that I do not park my car in secluded places or double check that I always lock my car when I park it anywhere and always carry my car keys with me. However, I am still worried whether my car is safe. In order to get rid of these genuine worries, I decided to design my own low cost car tracking system.

In this instructable, I have explained the process of building one's very own Global Car Tracking System -'Athena' - for a cost of just 100$. The steps for building this device is very simple and explained in a lucid manner. The skills required for you to build this is minimum (Basic knowledge about electronics and the Arduino IDE).

I have christened this device by the name 'Athena' because Athena is the Greek Goddess of navigation. 

So what are we waiting for.....let's get started.......

    

Step 1: Parts Needed:

The following is a list of parts needed to build 'Athena' :-

Supplies :
  1. Arduino Uno
  2. Arduino GSM Shield (I have used a SIM900 GSM/GPRS Shield Module)
  3. GPS Module
  4. Adapter Plug for powering the Arduino
  5. 4pcs of LM7805 IC
  6. PCB
  7. Wires
  8. Male Header Pins
  9. Female Header Pins
  10. Project Enclosure
Tools :
  1. Soldering Iron
  2. Solder
  3. Soldering Wax
  4. Drill
  5. Hacksaw



 

Step 2: The Circuit: Voltage Regulator Circuit

The Arduino and GSM shield operate at voltages between 5 volts and 12 volts. Although the car has a 12 volt battery and electrical system, the voltage can sometimes spike up and damage the Arduino if connected directly. Hence to be on the safer side, I have decided to use an LM7805 Voltage regulator to regulate the 12 volts input voltage to 5 volts. The LM7805 IC generates an output of 5 volts 0.5 amps. Since the GSM module can sometimes draw upto 2 Amperes of current, I have used 4 pcs of LM7805 IC to meet the requirement.

The Circuit :
  1. Cut the PCB using a hacksaw into a piece large enough to fit the 4pcs of LM7805 IC (Refer to Pic. 1).
  2. Arrange the LM7805 in a parallel connection on the PCB (Refer to Pic. 1) and bend the leads of the IC to connect them in parallel(Refer to Pic. 3)
  3. Solder Wires to the 12v Input of LM7805, Ground Input, 5v Output of LM7805 and Ground Output.
  4. Connect the Adapter plug to the 5v Output and Ground Output Wires. The final product should look like Pic. 5 

Step 3: Preparing the Project Enclosure: Drilling Holes

In this step you will drill the holes to mount the Arduino and the GSM Antenna to the project enclosure.
  1. Drill four holes at the bottom of the project enclosure to secure the Arduino Uno in it.
  2. Drill a hole on the left wall of the enclosure big enough for the USB cable to connect to the Arduino. 
  3. Drill a hole on the right wall for the GSM Module Antenna.
  4. Drill two holes on the right wall for the Power Input wires.

Step 4: Wiring the GPS Module

The GPS module must be connected in a detachable manner to the Arduino Uno. If wires are soldered to the module, then the module cannot be reused for some other application or project. Hence I have used header pins to create a detachable connection between the GPS module and the Arduino. The following are the steps to create a detachable connection:-
  1. Cut four pieces of wire and solder the male header pins to one end of the wire. Wrap the soldered ends of the wire in insulation tape(Refer to Pic. 3).
  2. If female header pins are available, then solder the other ends of the wire to the female header pins. (Top tip: If female header pins are not available, then briefly heat the ends of the wire over a candle to partially melt and loosen up the insulation on the wire. Then force each of the wires into the Vcc, Gnd , Tx and Rx pins of the GPS Module. Refer to the Pic. 4)
  3. After connecting the wires to the Vcc, Gnd , Tx and Rx pins, the GPS module should look like Pic. 6  

Step 5: Final Assembly

Now you can assemble all the parts of the Global Tracking System.
  1. Place the Arduino Uno in the project enclosure and fasten it with screws or zip tie(Refer to Pic. 1).
  2. Insert the Adapter plug into the Arduino and place the Voltage Regulator Circuit into the enclosure. Insert the Input Voltage wires through the two holes drilled in the enclosure(Refer to Pic. 3).
  3. Screw the GSM antenna in place(Refer to Pic. 5). Insert SIM card into the GSM module and place the module over the the Arduino Uno( Refer to Pic. 7).
  4. Place the GPS module in the project enclosure and connect it to the GSM shield in the following manner. Connect the Vcc pin from the GPS module to 5v on the GSM Shield. Connect the Gnd pin from the GPS module to Gnd pin on the GSM Shield. Connect the RXD pin from the GPS module to Pin 5 on the GSM Shield. Connect the TXD pin from the GPS module to Pin 4 on the GSM Shield. 

Step 6: Programming the Arduino:

Before you can program the Arduino Uno, you must first install the Tiny GPS library for the GPS Module.
These are the steps to install the library :-
  1. Download the Tiny GPS library for the Arduino. (link)
  2. Extract the zip file to the folder: " Libraries/Documents/Arduino/libraries "
  3. Now you would see the library under   " Sketch --> Import Library "  in the Arduino IDE.
  4. You can proceed with the Arduino Uno programming.

The following is the source code for the Arduino. Copy the code below and load it on the Arduino :-

//Program written for Global Car Tracking System by Jayvis Gonsalves
#include <SoftwareSerial.h>
#include <string.h> 
#include <TinyGPS.h>
SoftwareSerial Sim900Serial(2, 3);
byte buffer[64];                             // buffer array for data recieve over serial port
int count=0;                                 // counter for buffer array
SoftwareSerial GPS(4, 5);
TinyGPS gps;
unsigned long fix_age;
long lat, lon;
float LAT, LON;
void gpsdump(TinyGPS &gps);
bool feedgps();
void getGPS();
void setup()
{
  Sim900Serial.begin(19200);     // the SIM900 baud rate
  GPS.begin(9600);                   // GPS module baud rate  
  Serial.begin(9600);                  // the Serial port of Arduino baud rate.
  delay(500);
  Sim900_Inti();
}
 
void loop()
{
  Sim900Serial.listen();
  if (Sim900Serial.available())                     // If date is comming from from GSM shield)
  {
    while(Sim900Serial.available())              // reading data into char array 
    {
      buffer[count ]=Sim900Serial.read();  // writing data into array
      if(count == 64)break;
     }
    Serial.write(buffer,count);                     // if no data transmission ends, write buffer to hardware serial port
    Cmd_Read_Act();                               //Read the 'COMMAND' sent to SIM900 through SMS
    clearBufferArray();                               // call clearBufferArray function to clear the storaged data from the array
    count = 0;                                          // set counter of while loop to zero
 
 
  }
  if (Serial.available())                       // if data is available on hardwareserial port ==> data is comming from PC or notebook
    Sim900Serial.println(Serial.read());       // write it to the GPRS shield
}
void clearBufferArray()                             // function to clear buffer array
{
  for (int i=0; i<count;i )
    { buffer[i]=NULL;}                                // clear all index of array with command NULL
}
void Sim900_Inti(void)
{
  Sim900Serial.println("AT CMGF=1");    // Set GSM shield to sms mode
  Serial.println("AT CMGF=1");
  delay(500);
  Sim900Serial.println("AT CNMI=2,2");
  Serial.println("AT CMGF=1");
  delay(500);
}
void Cmd_Read_Act(void)                       //Function reads the SMS sent to SIM900 shield.

  char buffer2[64];
  for (int i=0; i<count;i )
  { buffer2[i]=char(buffer[i]);}  
    
  if (strstr(buffer2,"INSTRUCTABLES"))    //Comparing password entered with password stored in program  
  {
      Serial.println("Password Authenticated.");
      Serial.println("Sending reply SMS. ");
      SendTextMessage();            
  }
  
}
void SendTextMessage()
{
  
  
Sim900Serial.print("AT CMGF=1\r");    //Sending the SMS in text mode
delay(100);
Sim900Serial.println("AT CMGS = \"**********\"");//The predefined phone number
delay(100);
Sim900Serial.println("Please wait while Module calculates position");//the content of the message
delay(100);
Sim900Serial.println((char)26);//the ASCII code of the ctrl z is 26
delay(100);
Sim900Serial.println();
int counter=0;
GPS.listen();


for (;;)
{
   long lat, lon;
   unsigned long fix_age, time, date, speed, course;
   unsigned long chars;
   unsigned short sentences, failed_checksum;
   long Latitude, Longitude;
    
   // retrieves /- lat/long in 100000ths of a degree
   gps.get_position(&lat, &lon, &fix_age);
   getGPS();
   Serial.print("Latitude : ");
   Serial.print(LAT/1000000,7);
   Serial.print(" :: Longitude : ");
   Serial.println(LON/1000000,7);
   if (LAT == 0 && LON == 0)
  {
    continue;    
  } 
  counter ;
  if (counter<30)
  {
    continue;    
  }
  
  Sim900Serial.print("AT CMGF=1\r");    //Sending the SMS in text mode
  delay(100);
  Sim900Serial.println("AT CMGS = \"**********\"");//The predefined phone number
  delay(100);
  Sim900Serial.print("Latitude : ");
  Sim900Serial.print(LAT/1000000,7);
  Sim900Serial.print(" :: Longitude : ");
  Sim900Serial.println(LON/1000000,7);//the content of the message
  delay(100);
  Sim900Serial.println((char)26);//the ASCII code of the ctrl z is 26
  delay(100);
  Sim900Serial.println();
  counter=0;
  break;
 }      
}

void getGPS()
{
   bool newdata = false;
   unsigned long start = millis();
   while (millis() - start < 1000)
   {
      if (feedgps ())
      {
         newdata = true;
       }
     }
     if (newdata)
   {
      gpsdump(gps);
    }
}
bool feedgps()
{
   while (GPS.available())
 {
      if (gps.encode(GPS.read()))
        return true;
      }return 0;
}
void gpsdump(TinyGPS &gps)
{
   gps.get_position(&lat, &lon);
   LAT = lat;
   LON = lon;
   {
      feedgps(); 
    }
  }









 

Step 7: Testing

Now that you have built the 'Athena', it is time to install it in your vehicle. The device can be installed anywhere in the car: the hood, cabin or trunk. Remember that the device must be hidden from view and difficult to locate by a car thief. The device must directly be connected to the 12v Car battery as it must run even when the car is switched off.

Steps to track down your vehicle using 'Athena' :-
  1. When your car is stolen and you wish to track your car, simply send a text message containing the password to your car.
  2. Athena then verifies the password you entered with the password stored in its program. If the password matches, then Athena sends an acknowledgment SMS to the predefined phone/cell number stored in it.
  3. Athena then begins to calculate its GPS position and once a GPS lock is acheived, it sends the coordinates of its location to the number stored in its program.
  4. After you receive the Coordinates in your message, copy them to the search bar in google maps to reveal the position of your stolen car.   

And there you go...congratulations!!! You have built your very own Global Car Tracking System.

If you have any difficulties building this instructable, do feel free to ask.

GREAT!!!!! NOW GO AHEAD AND CONSTRUCT ONE YOURSELF!!!!! : )
 
<p>Hi. This indestructible was good. But can you make another one demonstrating how to make a gps tracker that would show its position in real time on Google maps ? That would be very useful. Thank you.</p>
<p>Hi! Nice instructable! I did a similar project, which can be found here:<br><br><a href="http://www.instructables.com/id/Track-your-car-with-an-Arduino-based-Lojack/" rel="nofollow">http://www.instructables.com/id/Track-your-car-wit...</a></p><p>We used a similar hardware similar hardware strategy, although I used a full GSM shield and I use an off the shelf 12V car power adapter rather than a homebrew voltage adapter.</p><p>Our software is quite a bit different, tho. My device is sampling the GPS every 30 seconds and sending its current location to a remote server, which then stores the info in a mysql database. I then have a web front end that shows the current location in google maps.</p><p>I like the idea of being able to send messages to the device via SMS, and I may add that in should I ever get some free time!</p><p>Thanks for your instructable - it's always nice to see how other people solve a problem.</p>
<p>It was really easy to do following this code..</p><p>Thanks it worked.</p>
<p>i'm using new Arduino GSM Shield integrated antenna (telefonica/bluevia) to built this tracking device and encountered some problem. my tracking device is able to receive sms and get the coordinates. but it cannot reply the sms to the predefined number. the image is my current output.<br></p><p>and this is my coding program. Can someone help me figure out what seem to be the problem and how to solve it. Thanks</p><p>#include &lt;SoftwareSerial.h&gt;</p><p>#include &lt;string.h&gt; </p><p>#include &lt;TinyGPS.h&gt;</p><p>SoftwareSerial Sim900Serial(2,3);</p><p>byte buffer[128]; // buffer array for data recieve over serial port</p><p>int count=0; // counter for buffer array</p><p>SoftwareSerial GPS(4,5);</p><p>TinyGPS gps;</p><p>unsigned long fix_age;</p><p>long lat, lon;</p><p>float LAT, LON;</p><p>void gpsdump(TinyGPS &amp;gps);</p><p>bool feedgps();</p><p>void getGPS();</p><p>void SIM900power() // software equivalent of pressing the GSM shield &quot;power&quot; button</p><p>{</p><p> digitalWrite(9, HIGH);</p><p> delay(1000);</p><p> Sim900_Inti();</p><p> }</p><p>void setup()</p><p>{</p><p> Sim900Serial.begin(19200); // the SIM900 baud rate</p><p> GPS.begin(9600); // GPS module baud rate </p><p> Serial.begin(19200); // the Serial port of Arduino baud rate.</p><p> delay(500);</p><p> Sim900_Inti();</p><p>}</p><p>void loop()</p><p>{</p><p> Sim900Serial.listen();</p><p> if (Sim900Serial.available()) // If date is comming from from GSM shield)</p><p> {</p><p> while(Sim900Serial.available()) // reading data into char array </p><p> {</p><p> buffer[count++]=Sim900Serial.read(); // writing data into array</p><p> if(count == 64)break;</p><p> }</p><p> Serial.write(buffer,count); // if no data transmission ends, write buffer to hardware serial port</p><p> Cmd_Read_Act(); //Read the 'COMMAND' sent to SIM900 through SMS</p><p> clearBufferArray(); // call clearBufferArray function to clear the storaged data from the array</p><p> count = 0; // set counter of while loop to zero</p><p> }</p><p> if (Serial.available()) // if data is available on hardwareserial port ==&gt; data is comming from PC or notebook</p><p> Sim900Serial.println(Serial.read()); // write it to the GPRS shield</p><p>}</p><p>void clearBufferArray() // function to clear buffer array</p><p>{</p><p> for (int i=0; i&lt;count;i++)</p><p> { buffer[i]=NULL;} // clear all index of array with command NULL</p><p>}</p><p>void Sim900_Inti(void)</p><p>{</p><p> Sim900Serial.println(&quot;AT+CMGF=1&quot;); // Set GSM shield to sms mode</p><p> Serial.println(&quot;AT+CMGF=1&quot;);</p><p> delay(500);</p><p> Sim900Serial.println(&quot;AT+CNMI=2,2&quot;);</p><p> Serial.println(&quot;AT CMGF=1&quot;);</p><p> delay(500);</p><p>}</p><p>void Cmd_Read_Act(void) //Function reads the SMS sent to SIM900 shield.</p><p>{ </p><p> char buffer2[64];</p><p> for (int i=0; i&lt;count;i++)</p><p> { buffer2[i]=char(buffer[i]);} </p><p> if (strstr(buffer2,&quot;TRACK&quot;)) //Comparing password entered with password stored in program </p><p> {</p><p> Serial.println(&quot;Password Authenticated.&quot;);</p><p> Serial.println(&quot;Sending reply SMS. &quot;);</p><p> SendTextMessage(); </p><p> }</p><p>}</p><p>void SendTextMessage()</p><p>{</p><p> Sim900Serial.print(&quot;AT+CMGF=1\r&quot;); //Sending the SMS in text mode</p><p> delay(100);</p><p> Sim900Serial.println(&quot;AT + CMGS = \&quot;+60103843894\&quot;&quot;);//The predefined phone number</p><p> //Sim900Serial.print(&quot;AT+CMGS=&quot;); </p><p> //Sim900Serial.println(&quot;+60174432599&quot;);</p><p> delay(100);</p><p> Sim900Serial.println(&quot;Please wait while Module calculates position&quot;);//the content of the message</p><p> delay(100);</p><p> Sim900Serial.println((char)26);//the ASCII code of the ctrl z is 26</p><p> delay(100);</p><p> Sim900Serial.println();</p><p> delay(5000);</p><p> int counter=0;</p><p> GPS.listen();</p><p>for (;;)</p><p>{</p><p> long lat, lon;</p><p> unsigned long fix_age, time, date, speed, course;</p><p> unsigned long chars;</p><p> unsigned short sentences, failed_checksum;</p><p> long Latitude, Longitude;</p><p> // retrieves /- lat/long in 100000ths of a degree</p><p> gps.get_position(&amp;lat, &amp;lon, &amp;fix_age);</p><p> getGPS();</p><p> Serial.print(&quot;Latitude : &quot;);</p><p> Serial.print(LAT/1000000,7);</p><p> Serial.print(&quot; :: Longitude : &quot;);</p><p> Serial.println(LON/1000000,7);</p><p> /*if (LAT == 0 &amp;&amp; LON == 0)</p><p> {</p><p> continue; </p><p> } </p><p> counter ;</p><p> if (counter&lt;30)</p><p> {</p><p> continue; </p><p> }</p><p> */ </p><p> Sim900Serial.print(&quot;AT+CMGF=1\r&quot;); //Sending the SMS in text mode</p><p> delay(100);</p><p> Sim900Serial.println(&quot;AT + CMGS = \&quot;+60103843894\&quot;&quot;);//The predefined phone number</p><p> delay(100);</p><p> Sim900Serial.print(&quot;Latitude : &quot;);</p><p> Sim900Serial.print(LAT/1000000,7);</p><p> Sim900Serial.print(&quot; :: Longitude : &quot;);</p><p> Sim900Serial.println(LON/1000000,7);//the content of the message</p><p> delay(100);</p><p> Sim900Serial.println((char)26);//the ASCII code of the ctrl z is 26</p><p> delay(5000);</p><p> Sim900Serial.println();</p><p> counter=0;</p><p> break;</p><p> } </p><p>}</p><p>void getGPS()</p><p>{</p><p> bool newdata = false;</p><p> unsigned long start = millis();</p><p> while (millis() - start &lt; 1000)</p><p> {</p><p> if (feedgps ())</p><p> {</p><p> newdata = true;</p><p> }</p><p> }</p><p> if (newdata)</p><p> {</p><p> gpsdump(gps);</p><p> }</p><p>}</p><p>bool feedgps()</p><p>{</p><p> while (GPS.available())</p><p> {</p><p> if (gps.encode(GPS.read()))</p><p> return true;</p><p> }return 0;</p><p>}</p><p>void gpsdump(TinyGPS &amp;gps)</p><p>{</p><p> gps.get_position(&amp;lat, &amp;lon);</p><p> LAT = lat;</p><p> LON = lon;</p><p> {</p><p> feedgps(); </p><p> }</p><p> }</p>
<p>Hi I was wondering if you ever got this to work. for some reason I am having the same exact issue as you.</p>
<p>i found the solution. if you want my sketch coding, just provide your email.</p>
<p>Por favor, poderia compartilhar comigo o seu c&oacute;digo, desde j&aacute; agrade&ccedil;o pela sua aten&ccedil;&atilde;o...duflorezi@hotmail.com</p>
<p>Por favor, poderia compartilhar comigo o seu c&oacute;digo, desde j&aacute; agrade&ccedil;o o seu esfor&ccedil;o.</p>
<p>please send me the code to Mahmadouban@gmail.com </p><p>thanks.</p>
Please send me the sketch mithereal@gmail.com
<p>please send me the code myislam.co@gmail.com</p>
<p>Hi,</p><p>Please send me the code as well. I hope you are still sending these... Thanks.</p>
<p>hi, not sure if you're still doing this, but I was hoping you could send me the code at danigraham01@gmail.com</p><p>Thanks so much!</p>
<p>please send me the code.</p><p>riteshkatras18@gmail.com</p>
<p>rabah.sobaihi@gmail.com</p>
<p>I don't know if you'll get a notification to see this, but could you please send your solution sketch to me, please?</p><p>buttin.specter@gmail.com</p>
<p>The Global Car Tracking System(3D Images)</p><p>please send the code to siva2embdded@gmail.com </p>
<p>please send the code to vivekpk007@gmail.com or vivekpk007@live.in</p>
<p>@ MUHAMMAD ABDUH I would love your sketch coding because I am working on building this now and I looking over this coding and I don't understand some of it. I would like to know that once I am done putting the code and phone number in and am finally ready to test the GPS, where am I sending my password to? Is there a certain code I put in my phone to actually text my car if so what is it? My email address is happy_2_work@yahoo.com. Any suggestions you have to help me would be greatly appreciated. </p><p>THANKS</p>
<p>can you please send me your coding &quot;phalozeka@gmail.com&quot;</p>
<p>salam, bro can you share your sketch coding with me, zaf_unknown_11@yahoo.com</p>
<p>Could you email your sketch to me? alvin.jin2000@gmail.com</p>
<p>Hello Muhammad , </p><p>What's the solution? alpharoboticsteam@gmail.com</p><p>Best regards , Nelu</p>
<p>Hey Nice job......could you please share the code with me....my mailid is sumitsw123@gmail.com</p><p>Best Regards</p>
<p>hey can u please send me the correct code as its not working for me as well.</p><p>My id is: madhavaggarwal55@gmail.com</p>
<p>good day, you could pass me the correct code too, because I'm having the same problem with the coordinates, I get only 00000000, thanks. my email is henriqro@gmail.com</p>
<p>Hey guy i have much Problems pls can u send me your sketch too.</p><p>settari.d@sbg.at</p>
<p>didi you het the sketch to send it to me, i can get his working to</p>
<p>Hey guy thanks alot here is my sketch.</p><p>My Problem is that i get an SMS but the Coordinates are ever 0.00000 0.00000</p><p>i dont receive the wright coordinates.</p><p>I use the Adafruit gps Breakoutboard</p><p>maybe i have a problem with the tiny gps library</p><p>#include &lt;SoftwareSerial.h&gt;</p><p>#include &lt;string.h&gt;</p><p>#include &lt;TinyGPS.h&gt;</p><p>SoftwareSerial Sim900Serial(2,3);</p><p>byte buffer[128]; // buffer array for data recieve over serial port</p><p>int count=0; // counter for buffer array</p><p>SoftwareSerial GPS(4,5);</p><p>TinyGPS gps;</p><p>unsigned long fix_age;</p><p>long lat, lon;</p><p>float LAT, LON;</p><p>void gpsdump(TinyGPS &amp;gps);</p><p>bool feedgps();</p><p>void getGPS();</p><p>void SIM900power() // software equivalent of pressing the GSM shield &quot;power&quot; button</p><p>{</p><p>digitalWrite(9, HIGH);</p><p>delay(1000);</p><p>Sim900_Inti();</p><p>}</p><p>void setup()</p><p>{</p><p>Sim900Serial.begin(19200); // the SIM900 baud rate</p><p>GPS.begin(9600); // GPS module baud rate</p><p>Serial.begin(19200); // the Serial port of Arduino baud rate.</p><p>delay(500);</p><p>Sim900_Inti();</p><p>}</p><p>void loop()</p><p>{</p><p>Sim900Serial.listen();</p><p>if (Sim900Serial.available()) // If date is comming from from GSM shield)</p><p>{</p><p>while(Sim900Serial.available()) // reading data into char array</p><p>{</p><p>buffer[count++]=Sim900Serial.read(); // writing data into array</p><p>if(count == 64)break;</p><p>}</p><p>Serial.write(buffer,count); // if no data transmission ends, write buffer to hardware serial port</p><p>Cmd_Read_Act(); //Read the 'COMMAND' sent to SIM900 through SMS</p><p>clearBufferArray(); // call clearBufferArray function to clear the storaged data from the array</p><p>count = 0; // set counter of while loop to zero</p><p>}</p><p>if (Serial.available()) // if data is available on hardwareserial port ==&gt; data is comming from PC or notebook</p><p>Sim900Serial.println(Serial.read()); // write it to the GPRS shield</p><p>}</p><p>void clearBufferArray() // function to clear buffer array</p><p>{</p><p>for (int i=0; i&lt;count;i++)</p><p>{ buffer[i]=NULL;} // clear all index of array with command NULL</p><p>}</p><p>void Sim900_Inti(void)</p><p>{</p><p>Sim900Serial.println(&quot;AT+CMGF=1&quot;); // Set GSM shield to sms mode</p><p>Serial.println(&quot;AT+CMGF=1&quot;);</p><p>delay(500);</p><p>Sim900Serial.println(&quot;AT+CNMI=2,2&quot;);</p><p>Serial.println(&quot;AT CMGF=1&quot;);</p><p>delay(500);</p><p>}</p><p>void Cmd_Read_Act(void) //Function reads the SMS sent to SIM900 shield.</p><p>{</p><p>char buffer2[64];</p><p>for (int i=0; i&lt;count;i++)</p><p>{ buffer2[i]=char(buffer[i]);}</p><p>if (strstr(buffer2,&quot;Seda&quot;)) //Comparing password entered with password stored in program</p><p>{</p><p>Serial.println(&quot;Password Authenticated.&quot;);</p><p>Serial.println(&quot;Sending reply SMS. &quot;);</p><p>SendTextMessage();</p><p>}</p><p>}</p><p>void SendTextMessage()</p><p>{</p><p>Sim900Serial.print(&quot;AT+CMGF=1\r&quot;); //Sending the SMS in text mode</p><p>delay(100);</p><p>Sim900Serial.println(&quot;AT + CMGS = \&quot;06601524106\&quot;&quot;);//The predefined phone number</p><p>//Sim900Serial.print(&quot;AT+CMGS=&quot;);</p><p>//Sim900Serial.println(&quot;+60174432599&quot;);</p><p>delay(100);</p><p>Sim900Serial.println(&quot;Bitte warten Sie bis das Modul die Position ihres Fahrzeugs berechnet hat&quot;);//the content of the message</p><p>delay(100);</p><p>Sim900Serial.println((char)26);//the ASCII code of the ctrl z is 26</p><p>delay(100);</p><p>Sim900Serial.println();</p><p>delay(5000);</p><p>int counter=0;</p><p>GPS.listen();</p><p>for (;;)</p><p>{</p><p>long lat, lon;</p><p>unsigned long fix_age, time, date, speed, course;</p><p>unsigned long chars;</p><p>unsigned short sentences, failed_checksum;</p><p>long Latitude, Longitude;</p><p>// retrieves /- lat/long in 100000ths of a degree</p><p>gps.get_position(&amp;lat, &amp;lon, &amp;fix_age);</p><p>getGPS();</p><p>Serial.print(&quot;Breitengrad : &quot;);</p><p>Serial.print(LAT/1000000,7);</p><p>Serial.print(&quot; :: L&auml;ngengrad : &quot;);</p><p>Serial.println(LON/1000000,7);</p><p>/*if (LAT == 0 &amp;&amp; LON == 0)</p><p>{</p><p>continue;</p><p>}</p><p>counter ;</p><p>if (counter&lt;30)</p><p>{</p><p>continue;</p><p>}</p><p>*/</p><p>Sim900Serial.print(&quot;AT+CMGF=1\r&quot;); //Sending the SMS in text mode</p><p>delay(100);</p><p>Sim900Serial.println(&quot;AT + CMGS = \&quot;06601524106\&quot;&quot;);//The predefined phone number</p><p>delay(100);</p><p>Sim900Serial.print(&quot;Breitengrad : &quot;);</p><p>Sim900Serial.print(LAT/1000000,7);</p><p>Sim900Serial.print(&quot; :: L&auml;ngengrad : &quot;);</p><p>Sim900Serial.println(LON/1000000,7);//the content of the message</p><p>delay(100);</p><p>Sim900Serial.println((char)26);//the ASCII code of the ctrl z is 26</p><p>delay(5000);</p><p>Sim900Serial.println();</p><p>counter=0;</p><p>break;</p><p>}</p><p>}</p><p>void getGPS()</p><p>{</p><p>bool newdata = false;</p><p>unsigned long start = millis();</p><p>while (millis() - start &lt; 1000)</p><p>{</p><p>if (feedgps ())</p><p>{</p><p>newdata = true;</p><p>}</p><p>}</p><p>if (newdata)</p><p>{</p><p>gpsdump(gps);</p><p>}</p><p>}</p><p>bool feedgps()</p><p>{</p><p>while (GPS.available())</p><p>{</p><p>if (gps.encode(GPS.read()))</p><p>return true;</p><p>}return 0;</p><p>}</p><p>void gpsdump(TinyGPS &amp;gps)</p><p>{</p><p>gps.get_position(&amp;lat, &amp;lon);</p><p>LAT = lat;</p><p>LON = lon;</p><p>{</p><p>feedgps();</p><p>}</p><p>}</p>
<p>hi, can you send me your solutions to this problem, i am having the same problem, thank ou very much. my email is: ivancalusic@gmail.com</p>
<p>If you don't mind, could you also send me the sketch? dlutz058@gmail.com. Thanks! </p>
<p>hgaston8893@gmail.com thank you so much and btw what power supply did you end up using?</p>
<p>Hey ! I would really appreciate if you could email me your solution aswell , thank you very much ! My email is : iraklis.stratigis@gmail.com</p>
<p>Hi, Could you email your sketch coding.. Here's my email: jonellbalanay@gmail.com Thanks btw :)</p>
<p>Hi, could I also have the code?</p><p>Email is jeremyishi@gmail.com </p><p>thanks</p>
can you please send me your code to dhiv.md@gmail.com
<p>I will also incorporate call-in disable function so even if the vehicle is moving away it can be disabled. your ideas will be greatly appreacited..thanks again!</p>
<p>Hi Jayvis,</p><p>Thank you for sharing this brilliant piece of work, i am making a similar project but i will incorporate a vibration trigger to initiate call to owner. and if vehicle is moving/stolen it will auto send vehicle plate number/ color/make/model notification to local police station. it would be great if you could give me some pointers and information i can use to do this function. Also im going to use a GSM/GPRS Neoway M590 as my sms/call unit. Will Neoway M590 work with your shared code? Thank you very much! </p>
<p>Hi Jayvis,</p><p>Thank you for sharing this brilliant piece of work, i am making a similar project but i will incorporate a vibration trigger to initiate call to owner. and if vehicle is moving/stolen it will auto send vehicle plate number/ color/make/model notification to local police station. it would be great if you could give me some pointers and information i can use to do this function. Also im going to use a GSM/GPRS Neoway M590 as my sms/call unit. Will Neoway M590 work with your shared code? Thank you very much! </p>
<p>hello even if not actually use this but you help me much if you send me your code my email is jorgemanriquez86@gmail.com</p>
<p>I know nothing of computer coding.</p><p>Can it be things like...&quot;receive&quot; wrong in both of the personal examples listed? Or does the code care nothing of spelling? As I said, I've no idea, but I wanted to point that out.</p><p>I before E, except after C, or in sounds of long A, as in neighbor and weigh. Therefore, receive. Best of luck. I'm knocking on wood; I've never had a vehicle stolen since I've followed rules as an adult. Before age 18 does not count. Nobody knew whose vehicle anyone was driving any day of the week, where I lived.</p>
<p>Hi, </p><p>I got this as SIM900A GSM module and arduino nano insted of those which u used. So plz tell me that can I do the same what you have done in the above project with these? If yes plz tell me the wireing also. Please help me.its important.plz</p>
<p>What is the dimensions? Please help</p>
<p>Hi, <a href="http://www.instructables.com/member/Jayvis+Vineet+Gonsalves/" rel="nofollow">Jayvis Vineet Gonsalves</a>:</p><p>You are connecting this to the 12V car battery, but the lighter power hub will provide no voltage unless the thief turns the key and start the engine. Or you are trying to connect this module directly on the battery without the key in that case the module is constantly draining electricity from the car, which, potentially shorten the battery lifetime or worse, you have to jump start your car every-what days. Have you thought of this problem? Please leave your comments.</p>
<p>Really nice work. I am in the process of building one of these for my Uncle (landscaping business, Jeep was stolen before = loss of income) Commercial examples are $2/300 + and some require subscription. All this for around &euro;50 and a prepay SIM with some credit, too good!! Thank you for bringing this to my attention.</p><p>I've been trying to make a few slight modifications to your code, one is. Seen as most phones these days are smartphones, I want to include a google maps link so you can click direct from the text to your vehicles location.</p><p>The google maps URL system is pretty straightforward, just</p><p><a href="https://maps.google.com/maps?q=46.352524+N+7.228423+W" rel="nofollow">https://maps.google.com/maps?q=46.352524+N+7.22842...</a></p><p>So I was hoping including this to the text message would generate a URL to point to the vehicles location. My code is like this;</p><p>[code]</p><p><em>Sim900Serial.println(&quot;AT CMGS = \&quot;**********\&quot;&quot;);//The predefined phone number</em></p><p><em> delay(100);</em></p><p><em> Sim900Serial.print(&quot;LAT: &quot;);</em></p><p><em> Sim900Serial.println(LAT/1000000,7&quot; N&quot;);</em></p><p><em> Sim900Serial.print(&quot;LON : &quot;);</em></p><p><em> Sim900Serial.println(LON/1000000,7&quot; W&quot;);//the content of the message</em></p><p><em> Sim900Serial.println(&quot;&quot;);</em></p><p><em> Sim900Serial.println</em>&quot;Google maps URL: https://maps.google.com/q=&quot;LAT/1000000,7&quot;+N+&quot;LON/1000000,7&quot;+W&quot;);</p><p><em> delay(100);</em></p><p><em> Sim900Serial.println((char)26);//the ASCII code of the ctrl z is 26</em></p><p>[/code]</p><p>I was wondering if anybody could forsee any problems, I mean the google URL system is just http:/maps.google.com/q=LAT+N+LON+W, don't think too much could go wrong there, but you never know.</p><p>Also I would REALLY appreciate some help if somebody could tell me how to add the speed and heading into the text.</p><p>AND FINALLY, I would like to have 2 separate passwords/triggers, like sending &quot;locate&quot; would behave as the example in the 'ible and text the vehicles LAT, LONG, SPEED, HEADING and the URL once.</p><p>But texting &quot;STOLEN&quot; or &quot;CONTINUOUS&quot; would send the info every 5 mins (or other variable), until &quot;STOP&quot; is received, which would put the system back into standby state.</p><p>I know I have asked a lot of questions and it's a big ask, but these things come naturally to some! I would be REALLY grateful if someone could help me out, but I think some of these suggestions could be of use to others also and help make this amazing instructable even better!!</p>
<p>hi, did you manage to include google maps location to the message?</p>
Hi, haven't got around to building it yet....<br><br>But from the tests I've done, if you output the lat&amp;long in that format<br><br>(https://maps.google.com/q=&quot;LAT/1000000,7&quot;+N+&quot;LON/1000000,7&quot;+W)<br><br>it will create a valid URL with a nice little arrow right on your location.<br><br>I changed the URL generation segment to;<br><br>[CODE]<br><br>SIM900.print(&quot;AT+CMGF=1\r&quot;); // AT command to send SMS message<br> delay(100);<br> SIM900.println(&quot;AT + CMGS = \&quot;+12345678\&quot;&quot;) //The predefined phone number<br> delay(100);<br> Sim900Serial.println(&quot;SAT fix received;&quot;); // The content of the message.<br> Sim900Serial.print(&quot;LAT: &quot;);<br> Sim900Serial.print(LAT/1000000,7);<br> Sim900Serial.println(&quot;&deg; N&quot;);<br> Sim900Serial.print(&quot;LON : &quot;);<br> Sim900Serial.print(LON/1000000,7);<br> Sim900Serial.println(&quot;&deg; W&quot;);<br> Sim900Serial.println(&quot;&quot;);<br> Sim900Serial.println(&quot;Google Maps URL:&quot;);<br> Sim900Serial.print(&quot;https://maps.google.com/q=&quot;);<br> Sim900Serial.print(LAT/1000000,7);<br> Sim900Serial.print(&quot;+N+&quot;);<br> Sim900Serial.print(LON/1000000,7);<br> Sim900Serial.println(&quot;+W&quot;);<br> delay(100);<br> Sim900Serial.println((char)26); //the ASCII code of the ctrl z is 26<br><br>[CODE]<br><br>Seems to work better.<br><br>Let me know how you get on or if you have any suggestions/tips, as I said it's been bumped down my list a bit, but will be building it at some point...<br><br>Good Luck!
<p>hey guy can u send me your full sketch pls</p>

About This Instructable