GPS Tracker and Spy Microphone
This project is a GPS Tracker (Locator) with Arduino AVR board (UNO/NANO) and Ai thinker A9G GPS/GSM/GPRS module.
The Arduino board reads the GPS data and sends it to the web server/host via GPRS. Then you can see the location on map with the Google Map API.
You can call to your “SIM Card” number, then it will be answered automatically and you can hear the voices with the A9G board’s microphone.
For the google map api, you need a web server or host, including a domain address.
There are the following files in this project:
- gpsLocator/gpsLocator.ino – Main handler file.
- gps/gps.php – Google Map API .php file.
- gps/current_loc.txt – The last geo location and update date.
- gps/all_loc.txt – All received locations and dates.
The file in the “gpsLocator” folder must upload on the Arduino board and the file in the “gps” folder must upload to your server/host.
Your server/host must support php.
The “AI Thinker A9G Module” (board) has a SIM card slot (bottom of the board) and supports GSM/GPRS protocol. Also it has an internal GPS module.
The above board has a standard GSM/GPRS antenna (connect it to the right connector between the pin headers) and a standard GPS antenna (left connector).
There’s an on-board microphone on this module which is using as a voice transmitter for this project.
- Before using this board for this project, be sure that it supports the “AT Commands”. Otherwise you can simply flash the “A9G AT Commands Firmware”.
Use the schematic/connections in the manual file for the project.
In case you’re using Arduino Nano (or other similar boards), just connect the Tx of your board to the Rx of A9G (Red wire) and the Rx of your board to the Tx of A9G (Blue wire).
And also tie the grounds (Black wire).
- It’s recommended to use a standard and separate power source for the A9G board.
Upload the “gps” folder (and all of the files inside) on your host. If you upload it in your “www” or “public_html” folder, then you can access the web api and see the last location on the google map, with this address: “your-domain.x/gps/gps.php”.
Then open the Arduino file (gpsLocator.ino) and insert your domain address in the following “define” variable:
#define DOMAIN_NAME “your-domain.com”
If you’re going to change the .php file name or its directory path, set it in the following variable too:
#define GPS_PATH “gps/gps.php”
You can change the location update interval timer of the map api, with changing “setTimeout(update, 20000);” in the .php file. The unit of timer is milliseconds.
The project is available in the following:
More projects in out Blog.