Pages: [1] 2 3   Go Down
Author Topic: VEHICLE TRACKING WITH ACCIDENT DETECTION  (Read 3528 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

so in my project i have to interface a camera module to the arduino gsm/gps tracker and click pictures according to user's wish and send it to the android app where the picture will be displayed
so how you can send the command from the android app to the arduino  to click the picture and receive it in the android app??
« Last Edit: August 28, 2013, 10:50:51 pm by saurabh64 » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 640
Posts: 50335
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
so how you can send the command from the android app to the arduino  to click the picture
What is the command? How are the android and Arduino communicating?

Quote
and receive it in the android app??
Vvvveeeerrrryyyy sssslllloooowwwwllllyyyy.
Logged

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

basically the android app will get the data that will be sent to the TCP/IP server by arduino(Is it feasible?)  but how to send the command to click an image from the android app??
Logged

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

interface a camera module to the arduino gsm/gps tracker

That interface strikes me as problematic.

It isn't quite clear what you want to achieve (for example, are these still pictures, or videos?) but if you want to have something that works like a digital camera and have the pictures uploaded to somewhere that is accessible to your Android device, you might find that a conventional digital camera with a wireless SD card can do what you need. Alternatively, I remember reading about a GSM modem with an integral camera which could be commanded (by an Arduino) to capture an image and send it over a GSM network. If you could arrange for the captured image to be uploaded to some internet-based file sharing system, the Android device could presumably access it from there. The key thing about both options is that the Arduino never has to deal with the actual image data.
Logged

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

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

I'll give my 2 cents from basic network programming perspective.

Assuming that you are using some ethernet shield with a TCP/IP stack...you are communicating at very high speed. This is not the same as your Serial communication speed.
So if you have TCP/IP stack then any kind of inter-computer communication is theoretically possible. You are only limited to what libraries you can find.

Using the TCP/IP stack library you can open up a "socket" on a port to listen to on the arduino. Anybody software program (including an Android App) who knows the Adruino IP address could open up the connection to that socket eg. 192.168.1.75:5 (for IP address of 75 and port 5 for example) to send/receive any kind of bytes. You can create your own proprietary protocol to communicate over this socket and interprete the bytes the way you want to. eg. First byte "P" means that you want to take a Picture etc.

If you want to go more standardized approach then you can use the ftp server stack (will depende on the library available with your ethernet shield) will be better. Even better would be to run a mini web server (HTTP) that responds to your commands based on the URL eg. http://192.168.1.1:5/SendPic.html

My quick websearch revealed this link http://subethasoftware.com/2013/04/09/arduino-ethernet-and-multiple-socket-server-connections/
for doing something like this. But once you know exactly your usage scenario then you can figure out how extensible of a protocol you want to use and search for examples of those.

BTW, you are assuming that your other side of the problem is how to communicate with your camera from Adruino to click its shutter and how to access the storage of that camera (sd card?).
Logged

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

interface a camera module to the arduino gsm/gps tracker

That interface strikes me as problematic.

It isn't quite clear what you want to achieve (for example, are these still pictures, or videos?) but if you want to have something that works like a digital camera and have the pictures uploaded to somewhere that is accessible to your Android device, you might find that a conventional digital camera with a wireless SD card can do what you need. Alternatively, I remember reading about a GSM modem with an integral camera which could be commanded (by an Arduino) to capture an image and send it over a GSM network. If you could arrange for the captured image to be uploaded to some internet-based file sharing system, the Android device could presumably access it from there. The key thing about both options is that the Arduino never has to deal with the actual image data.


yep! storing the captured image on sd card and then sending it over the internet via gprs module to the android device
Logged

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

I'll give my 2 cents from basic network programming perspective.

Assuming that you are using some ethernet shield with a TCP/IP stack...you are communicating at very high speed. This is not the same as your Serial communication speed.
So if you have TCP/IP stack then any kind of inter-computer communication is theoretically possible. You are only limited to what libraries you can find.

Using the TCP/IP stack library you can open up a "socket" on a port to listen to on the arduino. Anybody software program (including an Android App) who knows the Adruino IP address could open up the connection to that socket eg. 192.168.1.75:5 (for IP address of 75 and port 5 for example) to send/receive any kind of bytes. You can create your own proprietary protocol to communicate over this socket and interprete the bytes the way you want to. eg. First byte "P" means that you want to take a Picture etc.

If you want to go more standardized approach then you can use the ftp server stack (will depende on the library available with your ethernet shield) will be better. Even better would be to run a mini web server (HTTP) that responds to your commands based on the URL eg. http://192.168.1.1:5/SendPic.html

My quick websearch revealed this link http://subethasoftware.com/2013/04/09/arduino-ethernet-and-multiple-socket-server-connections/
for doing something like this. But once you know exactly your usage scenario then you can figure out how extensible of a protocol you want to use and search for examples of those.

BTW, you are assuming that your other side of the problem is how to communicate with your camera from Adruino to click its shutter and how to access the storage of that camera (sd card?).



issuing a command to capture a image from the android app to the arduino and storing the image on the sd card which will be then sent via gprs back to the arduino this my basic purpose
Logged

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

If you are using this GSM/GPRS shield:

http://arduino.cc/en/Guide/ArduinoGSMShield

Then communication between the Arduino and GPRS is with SoftwareSerial, which has a maximum Arduino -> Shield baud rate of 115.2Kbps (you may need to lower that to 57.6Kbps for reliability, particularly for Shield -> Arduino). To transfer a 3 megapixel JPEG of about 500KB at 115.2Kbps, it would take 35 seconds (and of course at 57.6Kbps, over a minute). It may take a bit longer when you factor in reading the data off the SD card. Is that kind of delay acceptable for your application?
Logged

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

If you are using this GSM/GPRS shield:

http://arduino.cc/en/Guide/ArduinoGSMShield

Then communication between the Arduino and GPRS is with SoftwareSerial, which has a maximum Arduino -> Shield baud rate of 115.2Kbps (you may need to lower that to 57.6Kbps for reliability, particularly for Shield -> Arduino). To transfer a 3 megapixel JPEG of about 500KB at 115.2Kbps, it would take 35 seconds (and of course at 57.6Kbps, over a minute). It may take a bit longer when you factor in reading the data off the SD card. Is that kind of delay acceptable for your application?


Yes . But I'll be using different gsm shield
Logged

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

Is that kind of delay acceptable for your application?
Yes
Ok. So I'm a little fuzzy on your application. Do I have this right:

Arduino+Camera+SD Card+GPRS <-> Internet <-> Android device

So, you want to open the web browser on the Android device to a web page served up by the Arduino. This web page has a button to "take picture". When clicked, the Arduino then signals the camera to take a picture, which is stored on the SD card, and then this image is read from the SD card and sent over GPRS and the internet back to the Android device.

Is that correct?
Logged

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

My question exactly!
Your objective is not exactly clear. Also, overall purpose is unclear as well.

Seems to me like this is an academic exercise instead of just trying to solve a real problem.
I mean, if you really want to  take pictures remotely then you don't even need Arduino in the picture (lol)! Any modern phone has all your components (Camera, GPS, gprs and a software platform) built in. Just write two apps that talk to each other on two different phones. One to send the request and other one to listen to requests, take picture and send it back along with any extra data like GPS coords that you need.

If you must use Arduino, is this meant to be a mobile device or stationary? If mobile, you'll have to worry about an enclosure and power for the Arduino on top of all the individual pieces of this project that you need to figure out.
Logged

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


ok this image will give you'll the idea of what i want to do

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

this is because last year somebody had done same project using PIC microcontroller

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

google maps will be used to view the coordinates


Is server required to store the data sent from the gsm module as an interface between the CELL TOWER(INTERNET) and the ANDROID DEVICE?
« Last Edit: September 01, 2013, 01:59:35 pm by saurabh64 » Logged

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

Basically this is my final year project
REAL-TIME VEHICLE TRACKING WITH ACCIDENT DETECTION
Well, why didn't you just say so from the beginning?
Logged

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

Basically this is my final year project
REAL-TIME VEHICLE TRACKING WITH ACCIDENT DETECTION
Well, why didn't you just say so from the beginning?

Hmm sorry about that .But I need help as I am new to arduino
Logged

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

The approach that seems best to me would be to set up a local area network in the vehicle with a GPRS interface to the public internet. Then you can use plain old IP cameras for the video elements, which avoids a lot of problems which would be very difficult to solve with an Arduino. You can get dedicated 3G/Ethernet routers for under twenty quid, for example many MiFi routers provide a local Ethernet port, and Ethernet hubs cost peanuts. Add in an Arduino with an Ethernet interface and an IP camera with an Ethernet interface, and you have the basis of a working solution. There are other approaches that would be viable - many domestic ADSL routers provide a USB host socket and can be configured to fall back to a 3G connection via a USB-connected 3G modem if the DSL fails, but I think that using a self-contained 3G router would be less technically challenging.
« Last Edit: August 29, 2013, 07:01:38 am by PeterH » Logged

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

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