Sim7000gpstracker
This is simple GPS vehicle tracker base on SIMCOM SIM7000E/G/A module. Works for GSM/LTE-M networks around the globe
Install / Use
/learn @mcore1976/Sim7000gpstrackerREADME
sim7000gpstracker
This is simple GPS vehicle tracker base on SIMCOM SIM7000E/G/A module. Works for all GSM/LTE-M/NB-IOT networks around the globe - see video here : https://www.youtube.com/watch?v=4B5GHRsYm28 and here https://www.youtube.com/watch?v=uZeoT4VezuE
DIY cheap GPS motorbike/car tracker based on ATMEGA 328P (arduino uno chip) using SIMCOM : SIM7000E/SIM7000G/SIM7000A module from China (includes GPS and GNSS function). The total cost is below 40USD ( as in 2020, BK-7000 module costs 25$ ) and positioning accuracy is ~1-20 meters ( tested in Europe location). The BK-7000 dev board can be bought here : http://www.and-global.com/index.php/product/SIM7000G%20breakout.html or https://and-global.en.alibaba.com/
You can find SIMCOM modules guides here : https://simcom.ee/documents/
The device when texted by mobile phone polls info from GPS of SIM7000 module (if can fix to sattelites - tries several minutes to fix). Collected location information is send back as text message to your phone as Google Map link.
The ATMEGA 328P AVR-GCC code provides SMS (mobile texting) control of GPS tracker behavior. Command can be send in lower or upper letters. If command is correct it will be responded with appropriate text message confirmation. Following commands are available :
-
Command "MULTI" gives CONTINOUS MODE of positioning and sends 5 times GPS location in 3-4 minutes interval. Simply send a text message MULTI to your simcard in GPS tracker to receive five GPS positions in 20 minutes sequence.
-
Command "SINGLE" gives single GPS/GSM positioning response. Simply send a text message SINGLE to your simcard in GPS tracker to receive single/current GPS position.
-
Command "GUARD" has been added to notify caller of GPS position change using text message (~300-500 meter sensivity is hardcoded but can be changed in the program). "GUARD MODE" can be stopped by sending "STOP" message at least once (getting out of this mode is confirmed by text message) or ends up automatically after first detection of movement.
-
Command "HTTP" ( only in experimental file "main10.c") - will post GPS position data every 2 minutes to your HTTP server ( you have to define it within the code before you compile it ) using HTTP GET command with parameters "longtitude", "latitude", "time" so you could watch/process data online on your WWW server. To get out of this mode send "STOP" command. But REMEMBER - Using GPRS/LTE to send HTTP / TCP IP requires good power source for SIM7000 board otherwise it will restart itself with "UNDERVOLTAGE WARNING"...
-
Command "ACC" (only in experimental file "main9.c" ) - checks the voltage of PC1 pin of ATMEGA, that must be connected over resistor divider to CAR 12V battery ( must use voltage divider resistors 10kOhm/47kOhm when aplying voltage) to provide information if Car battery needs to recharge or if there is anything wrong with it
BILL OF MATERIAL LIST (as for year 2019):
- SIM7000 based board BK-7000 (25-30 USD on Aliexpress )
- search for "www.and-global.com" boards BK-7000 or equivalent...
-
GPS (passive) antenna with IPEX / U.FL connector matching BK-SIM7000 board - 2 USD
-
GSM antenna with IPEX / U.FL connector matching BK-7000 board / SIM7000 - 1 USD
-
ATMEGA 328P (arduino uno) - 2 USD or ATMEGA328P based board : https://www.theengineeringprojects.com/2018/06/introduction-to-arduino-pro-mini.html
-
XTAL 8MHz - quartz crystal with 8 MHz frequency to ensure clock stability of ATMEGA and keep it synchronized with serial port of SIM7000 module even when temperature changes (internal RC oscillator in ATMEGA is very unstable). Using XTAL is optional (compile scripts configure internal RC clock by default ) but i do RECOMMEND using XTAL due to poor internal clock of ATMEGA. This one costs 0.2USD
-
2 x 22pF capacitor for XTAL - 0.2 USD
-
3x 1N4007 (1 USD) - to convert 5V from powerbank to 3.3V for ATMEGA328P VCC ( only for BK-808 board and others that require TTL 3.3V logic)
-
1x 1000uF / 16V capacitor ( 0.5 USD) - connect to VCC & GND of SIM7000 board AND if needed to existing 470uF (parallel) on the SIM7000 board if it is having problems while attaching to the GSM/LTE network - usage of this capacitor depends on type of SIM7000 board
-
100nF (or some other in range 100nF-1uF) / 12V (or higher) capacitor (0.2 USD) - connect to VCC & GND of ATMEGA328P ( if not using "Arduino Pro Mini" board)
-
universal PCB, pins & connector (2 USD) or some wires with pins if you going to use boards like "Arduino Pro Mini" instead
-
USB Powerbank 5V to make it work...
CONNECTIONS TO BE MADE :
- SIM7000 board RXD (BK-7000 pin R) to ATMEGA328 TXD PIN #3,
- SIM7000 board TXD (BK-7000 pin T) to ATMEGA328 RXD PIN #2
- SIM7000 board DTR (BK-7000 pin S : SLEEP PIN) to ATMEGA328 PC5 PIN #28
- SIM7000 board GND (BK-7000 pin G ) : to powerbank GND
- SIM7000 board VCC (BK-7000 pin V / PWRIN ) : to powerbank +5V VCC
- SIM7000 board PWRKEY (BK-7000 pin K - left unused - it is internally bound to GND, however when breaking this connection it can be used to switch on/off whole SIM7000 board)
OPTIONAL) SIM7000 RI/RING if available (No such pin on BK-7000 board) - to ATMEGA328P INT0 pin #4, and then you may experiment with ATMEGA POWERDOWN mode by uncommenting appropriate portion of the source code. I didn't have such board so I couldn't check this option.
-
Capacitor 1000uF between +5V and GND of powerbank (optional, most of them already has some huge capacitors)
-
put 3x 1N40007 diodes IN SERIAL between 5V VCC and ATMEGA328P VCC PIN #7 (only for BK808 board and others that use 3.3V TTL logic) - ATMEGA must be powered from ~3.3V to adopt TTL logic levels of outputs TXD/RXD of BK-7000 / SIM7000 board
-
put 100nF capacitor between ATMEGA328P VCC pin #7 and ATMEGA328P GND pin #8 & PIN#22
-
connect GPS passive antenna and GSM antenna to appropriate IPEX / U.FL connectors of BK-7000 / SIM7000 board. Probably it can work with active GPS antenna (but you would need to add another resistor for pullup antenna input to VCC - this is decribed in SIM7000-Hardware-design guide PDF)
-
BK-7000 board sametimes may have TO SMALL electrolytic capacitor (mine had only 470uF). If you have problems with GSM/LTE network registraion on your SIM7000 board then probably you have to solder/add another big capacitor (I have used 2200uF/10V, but it can be 1000uF/10V ) in parallel to make this board work correctly. Otherwise it may continously restart itself while trying to register to the 2G network.
-
Connect crystal 8MHz between pins 9 & 10 of ATMEGA 328p and add blocking capacitors 22pF between crystal pins and GND line. If you want to use crystal pleas modify "compileatmegaX" file by putting appropriate l-fuse value to avrdude command (see content of "compileatmegaX" file)
SOURCE FILE OPTIONS :
You can find several boards with SIM7000 on the market. Some of them have full pinout like GND,RXD,TXD,DTR,RING - but others may have only serial port exposed : GND, RXD, TXD. Some boards are using 3.3V TTL logic on serial port, but others use 5V TTL logic. You have to pay attention to all the details and consult the seller before buying development board.
Below there are two types of source files provided, first for BK-7000 board (with PIN DTR/SLEEP and RXD/TXD) and second file for any SIM7000 based board with only RXD,TXD pins.
------ for BK-7000 AND-GLOBAL board or other SIM7000 board WITH DTR/SLEEP pin exposed --------
"main7.c" (+ compilation script "compileatmega7" Linux/"compileatmega7.bat" Windows) - source file for SIM7000 boards WITH DTR/SLEEP PIN exposed as BK-7000 / SIM7000 development board from AND-GLOBAL. To use this file you will have to attach ATMEGA PC5 PIN #28 to SIM7000 board DTR/SLEEP pin.
------- for other boards ( that do not have neither RING nor DTR pin exposed ) ------
Pay attention to type of TTL logic the board uses. They have to match on both sides - ATMEGA328P and SIM7000 board - otherwise you may kill the SIM7000 board. If you want to use board that has 5V TTL logic DO NOT put 1N4007 Diodes to ATMEGA328P. If you want to use 3.3V TTL logic , you will probably need to connect 3.3V from ATMEGA VCC (after 3x 1N4007 Diode drop it from 5V) to VMCU PIN (if available) of SIM7000 board to switch it to 3.3V mode. You need to check all the details in SIM7000 board manual from your board vendor.
"main8.c" (+ compilation script "compileatmega8" Linux / "compileatmega8.bat" Windows) - source file for other SIM7000 boards without DTR and RING pin. To use this source file only RXD, TXD, GND lines have to be connected from SIM7000 board to ATMEGA 328P.
COMPILATION ON LINUX PC :
Link to video how to program the chip : https://www.youtube.com/watch?v=7klgyNzZ2TI
To upload program code to the chip using cheapest USBASP programmer (less than 2 USD on eBay/Aliexpress) look at this page : http://www.learningaboutelectronics.com/Articles/Program-AVR-chip-using-a-USBASP-with-10-pin-cable.php
The script attached in repository ( "compileatmegaX") can be used to upload data to the chip if you have Linux machine with following packages : "gcc-avr", "binutils-avr" (or sometimes just "binutils"), "avr-libc", "avrdude" and optionally "gdb-avr"(debugger only if you really need it) . For example in Ubuntu download these packages using command : "sudo apt-get install gcc-avr binutils-avr avr-libc gdb-avr avrdude". After doing it you will be able to run compilati
Related Skills
node-connect
341.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.4kCommit, push, and open a PR
