Pages: 1 [2] 3   Go Down
Author Topic: VEHICLE TRACKING WITH ACCIDENT DETECTION  (Read 3527 times)
0 Members and 1 Guest are viewing this topic.
Atlanta, USA
Offline Offline
Edison Member
*
Karma: 55
Posts: 1812
AKA: Ray Burne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Basically this is my final year project
REAL-TIME VEHICLE TRACKING WITH ACCIDENT DETECTION

COMPULSORY THINGS ARE
  • -I'll have to use arduino
  • -display the coordinates etc etc in an android app
  • -image capture

Components i'll be using:
  • arduino uno r3
  • gps module
  • gsm module
  • piezo sensor( to detect the impact during collision)
  • flame sensor
  • vga cam module or 1.3 megapixel cam module

The flame sensor idea is a bit gory, but in the name of science...

Assumption: picture capture is only necessary at collision instant.
Collect all of the data such as GPS info and forward it over GMS to some site such as sensorcloud.com and use your Android phone to log-in and monitor the status of the collected data in near-real time.
If an impact is detected, send the last frame taken by the camera (and I would go ahead and put the camera into video mode at that instant.)

The android app can "pull" the geo cordinates from the sensorcloud database and feed them to google maps to plot the location of the vehicle on a map.

The flame sensor can be used to spray water over the passengers under Arduino control.

Good luck,

Ray


PS: Added another sensor web-link: https://sensormonkey.eeng.nuim.ie/
« Last Edit: August 29, 2013, 08:28:30 am by mrburnette » Logged

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12630
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thinking about this, wouldn't a plain old smartphone be a better platform for this project? That would give you a GPS location, video and still capability, accelerometer, network connectivity, user-friendly development environment and much, much more runtime resources available to you.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Basically this is my final year project
REAL-TIME VEHICLE TRACKING WITH ACCIDENT DETECTION

COMPULSORY THINGS ARE
  • -I'll have to use arduino
  • -display the coordinates etc etc in an android app
  • -image capture

Components i'll be using:
  • arduino uno r3
  • gps module
  • gsm module
  • piezo sensor( to detect the impact during collision)
  • flame sensor
  • vga cam module or 1.3 megapixel cam module

The flame sensor idea is a bit gory, but in the name of science...

Assumption: picture capture is only necessary at collision instant.
Collect all of the data such as GPS info and forward it over GMS to some site such as sensorcloud.com and use your Android phone to log-in and monitor the status of the collected data in near-real time.
If an impact is detected, send the last frame taken by the camera (and I would go ahead and put the camera into video mode at that instant.)

The android app can "pull" the geo cordinates from the sensorcloud database and feed them to google maps to plot the location of the vehicle on a map.

The flame sensor can be used to spray water over the passengers under Arduino control.

Good luck,

Ray


PS: Added another sensor web-link: https://sensormonkey.eeng.nuim.ie/


Thanks smiley
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thinking about this, wouldn't a plain old smartphone be a better platform for this project? That would give you a GPS location, video and still capability, accelerometer, network connectivity, user-friendly development environment and much, much more runtime resources available to you.

Ya that would be easier to do but for the sake of complexity.
8 people in the project group .Marks will be allotted based on how much work you do
So I'll have to use some complex device, Arduino platform in my case
and there will be enough work like interfacing the hardware,coding the hardware part , software part etc
for each member from the group
because in case of smartphone everything will be available readymade  so the work divided will be very less for each group member


Logged

Albuquerque, NM
Offline Offline
Newbie
*
Karma: 2
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Now that we know your objective..
You need to figure out several pieces of this puzzle .. each of which can be assigned to an individual in your group.

1. Camera shutter control from Arduino
2. Access to the SD card/image storage of the camera from Arduino
3. Adruino to GSM communication
4. Android app
5. Handshaking between Android & Arduino with GSM as the underlying communication (I'm thinking that both sides may have to go via a "known" IP address as an intermediary)
Once you figure out this flow for camera, adding other sensory modules like GPS, Impcact sensor, flame sensor etc also become individual topics but ride on the same communication mechanism as your camera image.

Each of these pieces is an individual problem that you could ask questions about separately (once you think about them), instead of bundling the whole problem into one big rolled up topic.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yeah, will do.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
#include "SIM900.h"
#include <SoftwareSerial.h>
#include "inetGSM.h"
//#include "sms.h"
//#include "call.h"

//To change pins for Software Serial, use the two lines in GSM.cpp.

//GSM Shield for Arduino
//www.open-electronics.org
//this code is based on the example of Arduino Labs.

//Simple sketch to start a connection as client.

InetGSM inet;
//CallGSM call;
//SMSGSM sms;

char rst[50],msg[50],a=27,b=55,c=66,d=34;
int numdata;
char inSerial[50];
int i=0;
boolean started=false;

void setup()
{
  //Serial connection.
  Serial.begin(9600);
  Serial.println("GSM Shield testing.");
  //Start configuration of shield with baudrate.
  //For http uses is raccomanded to use 4800 or slower.
  if (gsm.begin(4800)){
    Serial.println("\nstatus=READY");
    started=true; 
    gsm.forceON();
  }
  else Serial.println("\nstatus=IDLE");
  if(started){
    //GPRS attach, put in order APN, username and password.
    //If no needed auth let them blank.
    if (inet.attachGPRS("internet.wind", "", ""))
      Serial.println("status=ATTACHED");
    else Serial.println("status=ERROR");
    delay(1000);
    //Read IP address.
    gsm.SimpleWriteln("AT+CIFSR");
    delay(5000);
    //Read until serial buffer is empty.
    gsm.WhileSimpleRead();
 
    //TCP Client GET, send a GET request to the server and
    //save the reply.
    numdata=inet.httpPOST("Vehicletracking.com.nu", 80, "/track.php", "vid=25&lat=54&lon=5&speed=55", rst, 50);
    //Print the results.
    Serial.println("\nNumber of data received:");
    Serial.println(numdata); 
    Serial.println("\nData received:");
    Serial.println(rst);
     Serial.println("SIGNAL QUALITY");
      gsm.SimpleWriteln("AT+CSQ");
  }
};

void loop()
{
  serialhwread();
  serialswread();
};

void serialhwread(){
  i=0;
  if (Serial.available() > 0){           
    while (Serial.available() > 0) {
      inSerial[i]=(Serial.read());
      delay(10);
      i++;     
    }
   
    inSerial[i]='\0';
    if(!strcmp(inSerial,"/END")){
      Serial.println("_");
      inSerial[0]=0x1a;
      inSerial[1]='\0';
      gsm.SimpleWriteln(inSerial);
    }
    //Send a saved AT command using serial port.
    if(!strcmp(inSerial,"TEST")){
      Serial.println("SIGNAL QUALITY");
      gsm.SimpleWriteln("AT+CSQ");
    }
    //Read last message saved.
    if(!strcmp(inSerial,"MSG")){
      Serial.println(msg);
    }
    else{
      Serial.println(inSerial);
      gsm.SimpleWriteln(inSerial);
    }   
    inSerial[0]='\0';
  }
}

void serialswread(){
  gsm.SimpleRead();
}


In the above code what we want to do is dynamically get the values like latitude,longitude,speed etc. from gps module and send to the server 'com.nu'
currently we are manually inserting the values as seen in the following code
what changes in the following line should we make to send the updated data without manually inserting individual values?

Code:
numdata=inet.httpPOST("Vehicletracking.com.nu", 80, "/track.php", "vid=25&lat=54&lon=5&speed=55", rst, 50);
Logged

Atlanta, USA
Offline Offline
Edison Member
*
Karma: 55
Posts: 1812
AKA: Ray Burne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
In the above code what we want to do is dynamically get the values like latitude,longitude,speed etc. from gps module and send to the server 'com.nu'

Take a look at an Arduino example in any GPS code and you'll see how the values are assigned... use an example for the GPS module you intend on using.  Say, if using Adafruit's GPS, then her example is here:
https://github.com/adafruit/Adafruit-GPS-Library/blob/master/examples/parsing/parsing.pde
Code:
    Serial.print("\nTime: ");
    Serial.print(GPS.hour, DEC); Serial.print(':');
    Serial.print(GPS.minute, DEC); Serial.print(':');
    Serial.print(GPS.seconds, DEC); Serial.print('.');
    Serial.println(GPS.milliseconds);
    Serial.print("Date: ");
    Serial.print(GPS.day, DEC); Serial.print('/');
    Serial.print(GPS.month, DEC); Serial.print("/20");
    Serial.println(GPS.year, DEC);
    Serial.print("Fix: "); Serial.print((int)GPS.fix);
    Serial.print(" quality: "); Serial.println((int)GPS.fixquality);
    if (GPS.fix) {
      Serial.print("Location: ");
      Serial.print(GPS.latitude, 4); Serial.print(GPS.lat);
      Serial.print(", ");
      Serial.print(GPS.longitude, 4); Serial.println(GPS.lon);
     
      Serial.print("Speed (knots): "); Serial.println(GPS.speed);
      Serial.print("Angle: "); Serial.println(GPS.angle);
      Serial.print("Altitude: "); Serial.println(GPS.altitude);
      Serial.print("Satellites: "); Serial.println((int)GPS.satellites);
Logged

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12630
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

what changes in the following line should we make to send the updated data without manually inserting individual values?

Code:
numdata=inet.httpPOST("Vehicletracking.com.nu", 80, "/track.php", "vid=25&lat=54&lon=5&speed=55", rst, 50);

If the values you're referring to are 25, 54, 5, 55 then you can replace that string literal with a char array which contains the string you want to send. You can use snprintf() to format the message in the char array.

Code:
int vid, lat, lon, speed; // variables containing the values that you want to send

... assign the values to the variables here

char params[40]; // make this big enough for your longest string, plus one for the null terminator
snprintf(params, sizeof(params), "vid=%d&lat=%d&lon=%d&speed=%d", vid, lat, lon, speed);
numdata=inet.httpPOST("Vehicletracking.com.nu", 80, "/track.php", params, rst, 50);
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thnx .Finally got it to send the gps values and retrieve in android app.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have integrated gsm module and gps receiver
Now I have to connect ov7670(FIFO) to arduino mega 2560

I have to do two things

i)Test the ov7670 to capture images ( dont have an LCD to view it!)
ii)Integrate it with gsm gps

How am i supposed to connect it to mega?
Logged

Idaho, US
Offline Offline
Edison Member
*
Karma: 21
Posts: 1021
Special User
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

https://www.google.com/search?q=arduino+ov7670
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Some helpful info please .
Ive done google search , this website is my last resort smiley-confuse smiley-sad
Logged

Idaho, US
Offline Offline
Edison Member
*
Karma: 21
Posts: 1021
Special User
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Some helpful info please .

What, specifically, have you tried, and in what manner did it fail?
Logged

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12630
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Some helpful info please .
Ive done google search , this website is my last resort smiley-confuse smiley-sad

That's curious, because the link above returned a load of relevant articles for me. If all that information isn't enough to answer your question, perhaps you ought to be more explicit about what your problem is. If the question is just "How do I ...?" then that search answers it.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Pages: 1 [2] 3   Go Up
Jump to: