Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Accident Detection And Messaging System Using GSM And GPS

By Salman Khan October 27, 2014

 

The main aim of the project Accident Detection and Messaging System is to inform the Ambulance and Police of the accident site and arrange for necessary steps to control the situation. This system is not only efficient but also worthy to be implemented. . The Accident Detection and Messaging System can be fitted in the vehicle (Ambulance or the Police) and they are informed about any such untoward incident at the go. 

Prototype of Arduino based Car Accident SMS Alert System

Fig. 1: Prototype of Arduino based Car Accident SMS Alert System

Accident Detection and Messaging System execution is simple as the system makes use of GSM and GPS technologies. GPS is used with arduino for taking the coordinates of the site of the accident while GSM is used with arduino for sending the coordinates to cell phones. To make this process all the controls are made using Arduino whereas a LCD is used to display the coordinates.It is assumed that the reader has gone through the project how to get started with the arduino and 16×2 LCD with arduino.

Block Diagram of Arduino based Car Accident SMS Alert System

Fig. 2: Block Diagram of Arduino based Car Accident SMS Alert System

How it Works

Accident Detection and Messaging System is easy and the components used are Vibration Sensor, which detects the accident and in turn sends the signals to Arduino. At this point the Arduino takes control and starts collecting the coordinates received from the GPS which are later sent to the Central Emergency Monitoring Station by using the GSM Module.

Circuit Diagram & Programming

Circuit Diagram Explanation

The circuitry of Accident Detection and Messaging System is similar to vehicle tracking system. The Tx pin of Arduino is directly connected with Rx pin of GSM module and the Rx pin of Arduino is directly connected with the Tx pin of GPS receiver. The output pin of Vibration sensor is connected with pin number 9 of Arduino. The 16×2 LCD’s data pins are connected with the arduino’s pin number 4,5,6,7 and command pin rs and en of LCD are connected with arduino’s pin number 2 and 3. The rw pin of LCD is directly connected with ground. Vibration sensor module sends active low signal when the accident occurs.

Another important aspect of the project is the Power Supply. The Vibration Sensor requires about 9 Volt of DC supply, if we opt for a 5 Volt DC power supply then this circuit will not work properly.

Image showing Vibration Sensor connected to Arduino Circuit for detecting Car Accident

Fig. 3: Image showing Vibration Sensor connected to Arduino Circuit for detecting Car Accident

Programming

The Programming of this project is also similar to that of vehicle tracking system but here an “if” statement is used for sending coordinates when vibration sensor sends low signal to the Arduino.

Before you embark upon building Accident Detection and Messaging System you have to select the same baud rate of GSM and GPS device, but if you are using different baud rate module or device you will face some problem related with the baud rate.

In this system we have used two different baud rates:

4800 bps baud rate for GPS Module and 9600 bps baud rate for GSM Module. When we takes Coordinates from GPS then we have use 4800 bps baud rate and when we have to send Coordinates to control room then we used 9600 bps baud rate.

Components Required

1.      .Arduino

2.     GSM Module

3.     GPS Module

4.      Vibration Sensor module

5.      16×2 LCD

6.      Power Supply

7.      Connecting Wires

Project Source Code

###

#include<LiquidCrystal.h>
LiquidCrystal lcd(2,3,4,5,6,7);

#define vibrate_sense 9

char str[70];
char *test="$GPGGA";      
char logitude[10];
char latitude[10];

int i,j,k;
int temp;
//int Ctrl+z=26;    //for sending msg
int led=13;

void setup()
{
  lcd.begin(16,2);
  Serial.begin(4800);
  pinMode(vibrate_sense, INPUT);
  pinMode(led, OUTPUT);
  lcd.setCursor(0,0);
  lcd.print("GPS Besed Vehicle ");
  lcd.setCursor(0,1);
  lcd.print("Tracking System");
  delay(3000);
}

void loop()
{
  if (digitalRead(vibrate_sense)==0)
  {
    for(i=18;i<27;i++)          //extract latitude from string
    {
      latitude[j]=str[i];
      j++;
    }
   
    for(i=30;i<40;i++)          //extract longitude from string
    {
      logitude[k]=str[i];
      k++;
    }
   
    lcd.setCursor(0,0);        //display latitude and longitude on 16X2 lcd display 
    lcd.print("Lat(N)");
    lcd.print(latitude);
    lcd.setCursor(0,1);
    lcd.print("Lon(E)");
    lcd.print(logitude);
    delay(100);
    Serial.begin(9600);
    Serial.println("AT+CMGF=1");    //select text mode
    delay(10);
    Serial.println("AT+CMGS="9610126059"");  // enter receipent number
    Serial.println("Vehicle Accident Happend at Place:");
    Serial.print("Latitude(N): ");             //enter latitude in msg
    Serial.println(latitude);                  //enter latitude value in msg
    Serial.print("Longitude(E): ");            //enter Longitude in Msg
    Serial.println(logitude);                  //enter longitude value in msg
    Serial.print("Help Please");
    Serial.write(26);                      //send msg  Ctrl+z=26
    temp=0;
    i=0;
    j=0;
    k=0;
    delay(20000);                        // next reading within 20 seconds
    Serial.begin(4800);
  }
}

void serialEvent()
{
  while (Serial.available())            //Serial incomming data from GPS
  {
    char inChar = (char)Serial.read();
     str[i]= inChar;                    //store incomming data from GPS to temparary string str[]
     i++;
     if (i < 7)                      
     {
      if(str[i-1] != test[i-1])         //check for right string
      {
        i=0;
      }
     }
    if(i >=60)
    {
     break;
    }
  }
}

###

 


Circuit Diagrams

Circuit-Diagram-Arduino-Based-Car-Accident-SMS-Alert-System

Project Video


Filed Under: Electronic Projects
Tagged With: Arduino, detection, gps, gsm
 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • Multiple DC/DC converters and a single input source
  • Voltage mode pushpull is a nonsense SMPS?
  • High Side current sensing
  • Reducing "shoot-through" in offline Full Bridge SMPS?
  • MOSFET thermal noise in Weak vs Strong inversion

RSS Electro-Tech-Online.com Discussions

  • PIC KIT 3 not able to program dsPIC
  • Failure of polypropylene motor-run capacitors
  • Siemens large industrial PLC parts
  • Wideband matching an electrically short bowtie antenna; 50 ohm, 434 MHz
  • Curved lines in PCB design

Featured – RPi Python Programming (27 Part)

  • RPi Python Programming 21: The SIM900A AT commands
  • RPi Python Programming 22: Calls & SMS using a SIM900A GSM-GPRS modem
  • RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi
  • RPi Python Programming 24: I2C explained
  • RPi Python Programming 25 – Synchronous serial communication in Raspberry Pi using I2C protocol
  • RPi Python Programming 26 – Interfacing ADXL345 accelerometer sensor with Raspberry Pi

Recent Articles

  • What is AWS IoT Core and when should you use it?
  • AC-DC power supply extends voltage range to 800 V DC
  • Infineon’s inductive sensor integrates coil system driver, signal conditioning circuits and DSP
  • Arm Cortex-M23 MCU delivers 87.5 µA/MHz active mode
  • STMicroelectronics releases automotive amplifiers with in-play open-load detection

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe