Arduino Projects   |   Raspberry Pi   |   Electronic Circuits   |   AVR   |   PIC   |   8051   |   Electronic Projects

Accident Detection And Messaging System Using GSM And GPS

Description

Comments

plz tell me abount componenst used for this project work, and circuit diagram

sir, i'm getting lattitude and longitude values in lcd but not receivng any messege to phone. 

can you give me the solution for this.

Could You Send me about the full details of the project???

Nice work man!!

go ahead!!

All the best..

nice work dude??????

why you are not uploading full description about your project,,,,

 

good 

awesome project & wish u the best

plz saddam sir give me require component list....

plz give me source code

 

SIR ITS VERY URGENT FOR ME TO KNOW Y THIS CODE IS NOT WORKING IN INTEL GEN2.I AM NOT RECEVING MSG ON MY PHONE.I AM USINF SIM 900A MODULE.please do help me as soo as possible.

 

Greetings, Mr. Khan

I have a few questions that have not been answered in your paragraph. Since we would like to use almost the exact project of yours, do we have to use the same BPS of your GSM & GPS even though their BPS are different? Because you mentioned that if their BPS aren't similar, there could be trouble with functioning. However, if I'm using both with same company name and BPS rate, do I have to modify the programming you posted? Same thing with the gyroscope & shock sensors; we're using all the mentioned components from ARDUINO. If there's any changes I should make regarding the programming, please inform me ASAP.

 

Looking forward to your reply!

best project

awesome project,am I use there sim908c module?

thank u so much for giving me source code

Hey can you share me  source code bro?

plz email me [email protected]

Sir, can get coding for this project....its would help my FYP....kindly reply me as sooon as possible

and full details of this project....

hello saddam khan

can i have the source code and software required for it 

can u please send me components and let me know how much it will cost

please send me to this mail id [email protected]

sir my project BLACK BOX FOR CAR  so i am using arduino at mega2560 and there are some more specifications how to implement them pls give ur feedback

 

Please enlarge the circuit diagram image

saddam khan ur code really dont works because of the serial.write(26) is incomplete statement 

so plz dont cheat the people

if you have corrected the program pls mail me

[email protected]

[code]#include<LiquidCrystal.h>

#define buzzer 8
#define A 9
#define B 10
#define C 11
LiquidCrystal lcd(7,6,5,4,3,2);
 
 
char str[60];
char *test="$GPGGA";      
char longitude[9];
char latitude[10];
 
int i,j,k;
int temp;
int led=13;
 
void setup()
{
  lcd.begin(16,2);
  Serial.begin(9600);
  Serial.begin(4800);
  pinMode(buzzer,OUTPUT);
  pinMode(A, INPUT);
  pinMode(B, INPUT);
  pinMode(C, INPUT);
  pinMode(led, OUTPUT);
  lcd.setCursor(0,0);
  lcd.print("ACCIDENT DETECTION");
  lcd.setCursor(0,1);
  lcd.print(" MSG System");
  delay(3000);
  lcd.clear();
}
void serialEvent()
{
  while (Serial.available())            //Serial incoming data from GPS
  {
    char inChar = (char)Serial.read();
     str[i]= inChar;                    //store incoming data from GPS to temporary string str[]
     i++;
     if (i < 7)                      
     {
      if(str[i-1] != test[i-1])         //check for right string
      {
        i=0;
      }
     }
    if(i >=40)
    {
     break;
    }
  }
}
 
void loop()
{   
  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
    {
      longitude[k]=str[i];
      k++;
    }
    lcd.clear();
    lcd.setCursor(0,1);
    lcd.print(" Lon(E)");
    lcd.print(longitude);
    lcd.setCursor(0,0);        //display latitude and longitude on 16X2 lcd display 
    lcd.print(" Lat(N)");
    lcd.print(latitude);
    delay(2000);
    if (digitalRead(A)== 1)
  {digitalWrite(buzzer, HIGH);
    lcd.clear();  
    lcd.setCursor(0,0);
    lcd.println(" accident happend");
    lcd.setCursor(2,1);
    lcd.print(" front");
    delay(2000);
    lcd.clear();
    lcd.setCursor(1,0);
    lcd.print(" Lon(E)");
    lcd.print(longitude);
    lcd.setCursor(1,1);        //display latitude and longitude on 16X2 lcd display 
    lcd.print(" Lat(N)");
    lcd.print(latitude);
    delay(4000);
    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print("sending sms....");
    delay(250);
    Serial.begin(9600);
    Serial.println("AT+CMGF=1");    //select text mode
    delay(1000);
    Serial.println("AT+CMGS=\"+91***********\"\r");// enter receipent number
    delay(1000);  
    Serial.println("Accident Happend front");
    delay(100);
    Serial.print("Lat(N): ");             //enter latitude in msg
    Serial.println(latitude);                  //enter latitude value in msg
    delay(100);
    Serial.print("Lon(E): ");            //enter Longitude in Msg
    delay(100);
    Serial.println(longitude);                  //enter longitude value in msg
    delay(100);
    Serial.write((char)26);                      //send msg  Ctrl+z=26
    delay(1000);
    temp=0;
    i=0;
    j=0;
    k=0;
    delay(200);                        // next reading within 20 seconds
     
}
else if (digitalRead(B)== 1)
  {digitalWrite(buzzer, HIGH);
    lcd.clear();
    lcd.setCursor(0,0);
    lcd.println(" accident happend");
    lcd.setCursor(0,1);
    lcd.print(" back");
    delay(2000);
    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print(" Lon(E)");
    lcd.print(longitude);
    lcd.setCursor(0,1);        //display latitude and longitude on 16X2 lcd display 
    lcd.print(" Lat(N)");
    lcd.print(latitude);
    delay(4000);
    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print(" sending sms....");
    delay(250);
    Serial.begin(9600);
    Serial.println("AT+CMGF=1");    //select text mode
    delay(1000);
    Serial.println("AT+CMGS=\"+91*********\"\r");// enter receipent number
    delay(1000);  
    Serial.println("Accident Happend Back");
    delay(100);
    Serial.print("Lat(N): ");             //enter latitude in msg
    Serial.println(latitude);                  //enter latitude value in msg
    delay(100);
    Serial.print("Lon(E): ");            //enter Longitude in Msg
    delay(100);
    Serial.println(longitude);                  //enter longitude value in msg
    delay(100);
    Serial.write((char)26);                      //send msg  Ctrl+z=26
    delay(1000);
    temp=0;
    i=0;
    j=0;
    k=0;
    delay(200);                        // next reading within 20 seconds
     
}
else if (digitalRead(C)== 1)
  {digitalWrite(buzzer, HIGH);
{
    lcd.clear();
    lcd.setCursor(0,0);
    lcd.println(" accident happend");
    lcd.setCursor(0,1);
    lcd.print(" left");
    delay(2000);
    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print(" Lon(E)");
    lcd.print(longitude);
    lcd.setCursor(0,1);        //display latitude and longitude on 16X2 lcd display 
    lcd.print(" Lat(N)");
    lcd.print(latitude);
    delay(4000);
    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print(" sending sms....");
    delay(250);
    Serial.begin(9600);
    Serial.println("AT+CMGF=1");    //select text mode
    delay(1000);
    Serial.println("AT+CMGS=\"+91**********\"\r");// enter receipent number
    delay(1000);  
    Serial.println("Accident Happend at left");
    delay(100);
    Serial.print("Lat(N): ");             //enter latitude in msg
    Serial.println(latitude);                  //enter latitude value in msg
    delay(100);
    Serial.print("Lon(E): ");            //enter Longitude in Msg
    delay(100);
    Serial.println(longitude);                  //enter longitude value in msg
    delay(100);
    Serial.write((char)26);                      //send msg  Ctrl+z=26
    delay(1000);
    temp=0;
    i=0;
    j=0;
    k=0;
    delay(200);                        // next reading within 20 seconds
     
}
}
 
else{
     digitalWrite(buzzer,LOW);
    delay(100);
    Serial.println("AT+CMGF=1");    //select text mode
    delay(1000);
    Serial.println("AT+CMGS=\"+91*********\"\r");// enter receipent number
    delay(1000);  
    Serial.println("Vehicle at Place:");
    delay(100);
    Serial.print("Lat(N): ");             //enter latitude in msg
    delay(100);
    Serial.println(latitude);                  //enter latitude value in msg
    delay(100);
    Serial.print("Lon(E): ");            //enter Longitude in Msg
    delay(100);
    Serial.print(longitude);                  //enter longitude value in msg
    delay(100);
    Serial.write((char)26);                      //send msg  Ctrl+z=26
    delay(2000);
    temp=0;
    i=0;
    j=0;
    k=0;
    delay(2000*60);                        // next reading within 20 seconds
}
}
 
 
 

[/code]

in these i have used 3 vibrations sensor and i am using arduino uno ,16*2 lcd
gps module gsm (simcom)A900,vibration sensor sw 420 

Hello, how are you ?

I used your code but only with One Vibrator Sensor and no buzzer, it worked and i got the gps data from the string after i modified the string length in the code so it could match my gps ones, but the only thing that is really bugging me is that, the 1st reading is always a blank one, is there something in the code or what could it be ?

Hello elseed kamal can u mail me ur modified code and screen shot and ur problem in it this is my mail I'd [email protected] And I forgot to say I am good how abt u
My mail I'd [email protected]

check your mail !!!

setp 1: download Adafruit library .

if you need any help !!
 mail me
in this project i am using force sensor 
#define FORCE 0
 
#include <Adafruit_GPS.h>
#include <SoftwareSerial.h>
Adafruit_GPS GPS(&Serial1);
     
#define GPSECHO false
 
boolean usingInterrupt = false;
 
int value = 0;
float resistance = 0;
 
void setup()
{
  Serial.begin(9600);
  //Serial.println("0.5\" Force Sensitive Resistor Test");
  pinMode(10,OUTPUT);
  GPS.begin(9600);
  GPS.sendCommand(PMTK_SET_NMEA_OUTPUT_RMCONLY);
  GPS.sendCommand(PMTK_SET_NMEA_UPDATE_1HZ); 
  GPS.sendCommand(PGCMD_ANTENNA);
  delay(1000);
}
uint32_t timer = millis();
void loop()
{
 
  char c = GPS.read();
  if (GPSECHO)
  if (c) Serial.print(c);
  if (GPS.newNMEAreceived()) 
  {
    
    if (!GPS.parse(GPS.lastNMEA())) 
      return; 
  }
  if (timer > millis()) timer = millis();
  if (millis() - timer > 1000) 
  {
  timer = millis(); // reset
  
  value = analogRead(FORCE);
  //resistance = ((30 * value)/(1-(value/1023.0)));
 // Serial.println(resistance,DEC);  
 Serial.println(value) ;
  delay(200);
 
  if (GPS.fix)
    
  {
    if(value<150)
  {
   // Serial.print("yes");
    digitalWrite(10,HIGH);
    Serial.print("yes");
  Serial.println("AT+CMGF=1");    //Sets the GSM Module in Text Mode
  delay(1000);  // Delay of 1000 milli seconds or 1 second
  Serial.println("AT+CMGS=\"+917030793675\"\r"); // Replace x with mobile number
  delay(1000);
  Serial.print("Accident occured at:");
  Serial.print("Lat :");
  Serial.print(GPS.latitude/100+0.2422, 4) ;
  Serial.print(",Long :");
  Serial.print(GPS.longitude/100+0.3504, 4);// The SMS text you want to send
  delay(1000);
  Serial.println((char)26);// ASCII code of CTRL+Z
  delay(1000);
  }
    delay(3000);
    digitalWrite(10,LOW);
  }
}
}

Dear sir i having some questionsfrown related to this project

1> does GPS module requires internet?

2>can i use piezoelectric sensor instend of the force sensor?

3>does i need to download gps gsm library to run project?

4> can i use sim28 gps module?

5> can you mail me program for piezoelectric sensor and sim28 gps module?

my mail id is [email protected]

I would be very grateful if you could give me some feedback for my plan. 

ttt

Hello Neeraj, I'm actually intrested in this project, please send me the complete details of this project at [email protected]

Hi sir iAm willing to do the same project so please share me e the total information of these project like source code ,circuit diagram , type of equipments needed and which type of materials we have to use please mail sir iAm new to arduino so iAm asking my mail was mail:[email protected]

sir will u plz send me the circuit diagram

Hello rupa!

Can you send me the circuit diagram?

My mail id: [email protected] 

Hello sir,

          Is this code suitable for Arduino Uno and Arduino mega?

plz mail me at [email protected]

can u plz give thr circuit diagram

hi

    tell me the code for gsm gps one vibration senser and arduino uno

 

hi rupa, I am suufering on this project so plz give me component list with detail information and also programming my Email Id :[email protected]

Mr. Rupa pls mail the corrected statement or code pls.... I am frustrated by trying it to get worked..... My project submission date is so near...
My mail ID is [email protected]
Plz mail me the programming

hello could u please send me the net components required in this project and the circuit diagram with every component in it . my email id is [email protected]

Can you please give me the source code and component list please. Its really very urgent.

Thankyou

hi,

thanks for the circuit.i would like to know that whether we can  send this alert message to more than one mobile number?will the message be automatically sent to the emergency numbers?

gps and gsm module number please

vibration sensor module number too

Gsm-SIM900 GPS-SIM28ML Can we use pressure sensor instead of vibration sensor
Plz tell me the components used because we are doing same project.whether ur source code work properly and also tell me the cost of GPS and gsn module

setp 1: download Adafruit library .

if you need any help !!
in this project i am using force sensor 
#define FORCE 0
 
#include <Adafruit_GPS.h>
#include <SoftwareSerial.h>
Adafruit_GPS GPS(&Serial1);
     
#define GPSECHO false
 
boolean usingInterrupt = false;
 
int value = 0;
float resistance = 0;
 
void setup()
{
  Serial.begin(9600);
  //Serial.println("0.5\" Force Sensitive Resistor Test");
  pinMode(10,OUTPUT);
  GPS.begin(9600);
  GPS.sendCommand(PMTK_SET_NMEA_OUTPUT_RMCONLY);
  GPS.sendCommand(PMTK_SET_NMEA_UPDATE_1HZ); 
  GPS.sendCommand(PGCMD_ANTENNA);
  delay(1000);
}
uint32_t timer = millis();
void loop()
{
 
  char c = GPS.read();
  if (GPSECHO)
  if (c) Serial.print(c);
  if (GPS.newNMEAreceived()) 
  {
    
    if (!GPS.parse(GPS.lastNMEA())) 
      return; 
  }
  if (timer > millis()) timer = millis();
  if (millis() - timer > 1000) 
  {
  timer = millis(); // reset
  
  value = analogRead(FORCE);
  //resistance = ((30 * value)/(1-(value/1023.0)));
 // Serial.println(resistance,DEC);  
 Serial.println(value) ;
  delay(200);
 
  if (GPS.fix)
    
  {
    if(value<150)
  {
   // Serial.print("yes");
    digitalWrite(10,HIGH);
    Serial.print("yes");
  Serial.println("AT+CMGF=1");    //Sets the GSM Module in Text Mode
  delay(1000);  // Delay of 1000 milli seconds or 1 second
  Serial.println("AT+CMGS=\"+917030793675\"\r"); // Replace x with mobile number
  delay(1000);
  Serial.print("Accident occured at:");
  Serial.print("Lat :");
  Serial.print(GPS.latitude/100+0.2422, 4) ;
  Serial.print(",Long :");
  Serial.print(GPS.longitude/100+0.3504, 4);// The SMS text you want to send
  delay(1000);
  Serial.println((char)26);// ASCII code of CTRL+Z
  delay(1000);
  }
    delay(3000);
    digitalWrite(10,LOW);
  }
}
}

Hi 

Sir, I do exactly like your project , and I used GPS module but   unfortunately  she didn't work I don't know whay

Can you help me, and given me a solution 

did u get proper gps data on lcd?