Build a GPS tracker with SIMCom SIM808

Veröffentlicht von philipp am

[latexpage]

Arduino Pro Mini

MPU_INTERRUPT = 2
DTR = 6 to pin „S“
GPSFET = 7 to gate pin of GPS MOSFET
VCC = 8
pwrBtn = 9 to pin „K“
A4 – SDA
A5 – SCL

General Pinning

Schematic

 


Tasklist when a new SIM808 mini is made

  • remove R104 on SIM808 board
  • change AP1084 regulator resistors to R1 = 51k, R2 = 120k
  • Flash new firmware (more info in „SIM800H EAT_FW_Download Tool_V104.pdf“)
    • turn power off
    • connect RX & TX
    • open SIM800_Series_download_Tools_Customer_v1.19/Flash_tool.exe as admin
    • choose target = SIM808, port = UART, choose COM-port, baud=460800
    • as download file choose 1418B04SIM808M32.cfg (first check simcom.ee for new version)
    • click „Start Download“ button
    • turn power on
    • PWRKEY has to be pulled low the whole time
    • reboot when finished
  • add resistors to DTR and SIM808-RX for 3.3V to 2.8V level shift (SIM808_Hardware Design_V1.02.pdf, page 36)
  • remove GPS antenna connector on SIM808 board and add N-channel MOSFET between middle-pin of the connector and GND
  • swap regulator of Arduino Pro Mini from MIC5205 to MCP1700 (for pinning have a look at Arduino_Pro_Mini_Regulator_Wechsel.jpg)
  • cut LEDs of Arduino Pro Mini
  • add more capacitors to the marked positions in schematic (do not replace, just solder them onto the existing ones)
  • for more details of the modifications have a look at the schematic

 


After hardware setup open Arduino Project „TestAES“. It is necessary to initialise the Random Number Generator (RNG) on the Arduino. Generate a random set of 8 symbols and enter them into TestAES variable „randomNumber“. Compile and flash it to the device and let it run about 1h and 5min. Watch the output on the serial monitor. The RNG automatically saves a new initialiser to the EEPROM every hour. (RNG from ArduinoLibs) –> when autosavetime is set to 10mins it does not change the EEPROM??? –> so I’d say its not necessary


Add User to DB

On the server go to /var/www/ and change owner and group of map_register_save from root:root to www-data:www-data.

chown www-data:www-data -Rv /var/www/map_register_save

Then go to https://surrouter.asuscomm.com:8080/map_register_save/ and create new user.

In phpmyadmin duplicate ID0, ID0Blocks and ID0Statistics without data and change number of ID in name.

Generate an AES password and paste it into the according field of the user. Use Octave script to convert AES password to HEX values and insert them into the code.

Done.


Es wurden in der Datenbank die Spalten: lat, lng, alt, vel und distance von varchar einer bestimmten Länge auf  decimal variablen mit bestimmter Länge und Nachkommazahlen geändert. Hat beim Umkonvertieren der Tabellen rund 25% der Größe der Tabelle gespart.

ALTER TABLE `ID0BCKP` CHANGE `lat` `lat` DECIMAL(8,6) NOT NULL;
ALTER TABLE `ID0BCKP` CHANGE `lng` `lng` DECIMAL(9,6) NOT NULL;
ALTER TABLE `ID0BCKP` CHANGE `alt` `alt` DECIMAL(5,1) NOT NULL;
ALTER TABLE `ID0BCKP` CHANGE `vel` `vel` DECIMAL(4,1) NOT NULL;
ALTER TABLE `ID0BCKP` CHANGE `distance` `distance` DECIMAL(8,1) NOT NULL;

 

For user notification, grab users phone and add @get_id_bot to Telegram chats. Take the received user id and add it to map_get/index.php.

 

Updated pricing model by 16th of July 2018:

–> activate Roads API

https://console.cloud.google.com/

https://console.developers.google.com/

Info:

https://cloud.google.com/maps-platform/pricing/sheet/

https://cloud.google.com/maps-platform/user-guide/

Kategorien: Bastelprojekt

0 Kommentare

Schreibe einen Kommentar

Avatar-Platzhalter

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert