Providing Smart Technology Solutions


You have now learned how to connect the sensor and the GPS to the microcontroller. If you started reading from this blog you can first refer to my blogs containing earlier parts at –




Now the last thing required in our project and that is the GSM modem. I had written about the GSM modem i.e SIM 300 in my earlier blogs which you can see at –


After doing these things, we can individually sense, find location and send SMS. But for my project it is essential to do all the 3 things simultaneously. So that whenever an accident is detected, it should find the location of the spot and send the location at the emergency number for calling for help.

So, the final setup which I made looked something like this –

I packed the three things in a box. The 2 modems and arduino is packed in a plastic box for protection. The adaptor ports of all the three boards are connected with a main port which is used to connect with a single 12 volt adaptor. The whole setup is shown below –

And the back view –

The above pictures were taken at the time of my project i.e when I was doing my engineering and working on this project.

Now after finishing the hardware, its time to write the arduino code. The code which I had written is shown below:-

//The code is written by Abishai.

#include <SoftwareSerial.h>

const int ledPin = 13;

const int crashSensor = A0;

const int threshold = 4;

int sensorReading = 0;

#define rxPin 9

#define txPin 8

SoftwareSerial gps = SoftwareSerial(rxPin, txPin);

byte byteGPS = 0;

int i = 0;

int h = 0;

char inBuffer[300] = “”;

char GPS_RMC[100]=””;

void setup(){

pinMode(rxPin, INPUT);

pinMode(txPin, OUTPUT);



pinMode(ledPin, OUTPUT);



void loop(){


sensorReading = analogRead(crashSensor);

if (sensorReading >= threshold) {

digitalWrite(ledPin, HIGH);









byteGPS = 0;

byteGPS = gps.read();

while(byteGPS != ‘R’){

byteGPS = gps.read();






i = 4;

while(byteGPS != ‘*’){

byteGPS = gps.read();





Serial.print(“Location Is: “);

h = 0;

while(GPS_RMC[h] != 42){







delay (60000);



My project is working properly. There are many future expansion for my project which can make it best and most useful for the injured person.

You can watch working of my project on youtube from the link below :-

Please do comment.



  1. joj john vasrghese
    October 25, 2012

    thank u for this amazing arduino project

  2. Prashant Kulkarni
    December 6, 2012

    hey dude ur awesome!!:)

  3. Saurav Suman
    December 7, 2012

    nyc work

  4. Abirami Balasubramaniam
    December 9, 2012

    Nice project Mr Abishai…………. Thanks for sharing knowledge with us….

  5. ramteja
    March 8, 2013

    video itself is awesome superb like ….thanks for sharing this

  6. Abishai
    March 9, 2013

    Thanks Ramteja……..

  7. Fatih Orhan (@karabey_)
    March 28, 2013

    Hi Abishai, Can I get in touch with you about a Project for Car Crash Monitoring? Please PM me over twitter. Thanks

  8. Azhar Inamdar
    April 6, 2013

    Wonderful Project..!! I am working at this as a 6th Semester Mini Project ..!! But I am supposed to make use of ARM7 processor…!! i will be in a colossal owe to you if you guide me in coding this..!!

  9. Pulkit
    April 27, 2014

    Hi, I tried using your codes for a similar project. But it gives an error-
    ‘BYTE’ keyword is no longer supported. Please use Serial.write() instead.

    How do I correct this? I tried replacing byteGPS with Serial.write() but I’m not able to understand what all I should change.
    Please help!

  10. Pulkit
    April 27, 2014

    Brilliant work by the way!

  11. prjboss
    May 6, 2014

    I am using skg13c gps module. I am getting invalid, i came to know by V alphabet from RMS format. Locations are 0000.
    How to solve this problem. Is their any setting we have to do.
    and How?

  12. daleevr
    June 21, 2015

    Fantasic project….good work!. I am working on something similar but would like to use wifi to send email. Could you help please?


    • Abishai
      June 21, 2015

      Sure, discuss your idea.

      • daleevr
        June 21, 2015

        Thanks very much for getting back to me. I’m somewhat new to this but not totally!
        I have been ask to put a crash sensor on golf carts that are being used in warehouses where wifi is available 24 hours a day. If the golf cart crashes, hits a overhead rack or just any hard enough contact that would cause damage to the object and/or the golf cart that it would send an email by their wifi. I need to be able to adjust crash sensor for different values. What I need for this and the code I’m unsure of to make this work. Again thanks for your help and getting back to me!

  13. Abishai
    June 22, 2015

    No problem. You will have to use a WiFi shield with your arduino and write a program that will send email. For sensor you can use accelerometer and give user specific buttons for changing the sensitivity of the device.

    • daleevr
      June 22, 2015

      Hi Abishai, Thanks so much! I will get what is needed on order and hope I can get the code written! I think the code is going to be the challenge for me. Hopefully I can get some example code to get me started. Thanks again!

  14. Suhaib
    October 16, 2016

    Nyc work
    How long did you take to make
    And pls tell me the total cost as well as the individual cost of parts used to make the project we need to prepare this for an exhibition

    • daleevr
      October 17, 2016


      What I need is a way to adjust sensitivity of the crash sensor externally and no gps or cellular. I need it to be wifi and sends an email instead of a sms. Is this possible?



      • Abishai
        October 23, 2016

        Yes it is possible.

  15. prabhul
    November 12, 2016

    i need the circuit diagram

Leave a Reply...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


This entry was posted on June 19, 2012 by in Projects.

Physical Computing Mini-Projects


fun and learning with electronics


Providing Smart Technology Solutions

%d bloggers like this: