GPS vehicle tracker with anti-theft engine cut
Two-wheeler theft is one of the most common crimes in Indian cities, and fleet owners want to know where their vans are. A tracker that reports location over 4G, alerts on movement when parked and can stop the engine helps both.
- Parts
- ₹3,320
- Build
- 14 weeks
- Board
- ESP32
- Objectives
- 5
Block diagram
- GPS moduleGives position and speed
- MPU6050Senses movement while parked
- ESP32Runs the tracker logic
- 12 V to 5 V supplyRuns from the vehicle battery
- 4G modemSends location to a server and SMS
- RelayCuts the engine in the model
- Cloud dashboardStores readings, plots trends and sends alerts+
Objectives
- To report location every 30 s while moving over 4G to a web map.
- To send an SMS alert when the parked vehicle moves.
- To stop the engine in the model on an SMS command, only when speed is below 5 km/h.
- To measure location error against a phone GPS on a 5 km route.
- To publish readings over MQTT and show them on a live dashboard with threshold alerts.
Parts and specifications
- ESP32 DevKit V1Dual-core 240 MHz, 520 KB SRAM, Wi-Fi + Bluetooth, 3.3 V logic, 12-bit ADC (use ADC1 pins when Wi-Fi is on)₹450Buy
- NEO-6M GPS module2.5 m CEP accuracy, 1 Hz NMEA on UART 9600, cold start about 27 s, needs open sky₹450Buy
- MPU6050 accelerometer and gyro3-axis ±2 to ±16 g and ±250 to ±2000 °/s, 16-bit, I²C 0x68, motion interrupt pin₹150Buy
- A7670C 4G LTE module4G Cat-1 with 2G fallback, SMS, calls and data, works with any Indian SIM including Jio; 3.4 to 4.2 V, 2 A peaks₹1,500Buy
- 5 V relay module (1 channel)10 A 250 V AC contacts, coil 70 to 80 mA, optocoupled input; many trigger at 3.3 V, check yours₹70Buy
- LM2596 buck converter4 to 40 V in, 1.25 to 37 V out, up to 2 A continuous (3 A peak), about 85% efficient₹180Buy
- TP4056 charger with protection1 A CC/CV Li-ion charging to 4.2 V, DW01 protection cuts at about 2.5 V₹40Buy
Total about ₹3,320 at typical online prices. Tap a part for its pinout and datasheet notes.
Design calculations
One position (about 60 bytes with HTTPS headers about 600 bytes) every 30 s for 4 hours of driving a day ≈ 290 KB a day, about 9 MB a month.
Haversine: d = 2R × asin(√(sin²(Δφ/2) + cosφ1 cosφ2 sin²(Δλ/2))), R = 6371 km. Sum it for the trip distance.
ESP32 light sleep, GPS off, modem in sleep ≈ 15 mA from 12 V through the buck. A 35 Ah bike battery loses about 0.36 Ah a day, so it lasts weeks.
Pin map
| Signal | Pin or connection |
|---|---|
| GPS TX → RX1 | GPIO 4 |
| A7670C TX/RX / PWRKEY | GPIO 16 / 17 / 5 |
| MPU6050 SDA / SCL / INT | GPIO 21 / 22 / 19 |
| Ignition relay | GPIO 26 |
| Power | 12 V → LM2596 4.0 V → modem; LM2596 5 V → ESP32 VIN |
Firmware outline
- On ignition (or movement) power the GPS and read NMEA RMC sentences for position, speed and time.
- Every 30 s while moving, POST JSON to the server over 4G (AT+HTTPPARA / AT+HTTPACTION).
- When parked, arm the MPU6050 motion interrupt; on movement without ignition send an SMS alert.
- Parse incoming SMS; 'STOP <PIN>' sets the relay only if speed < 5 km/h.
- Buffer positions in flash when there is no network and send them later.
Test plan
| Test | Expected result |
|---|---|
| 5 km drive with a phone recording too | Track error mostly under 10 m |
| Model moved while parked | SMS within 30 s |
| 'STOP 1234' while moving | Ignored until speed < 5 km/h |
| Tunnel or no network | Points sent later, none lost |
These rows start your results table when you plan the project.
Viva practice
Say your answer out loud first, then check. The first 2 answers are free; Maker opens all 5.
Make it yours
One or two upgrades for a mini project, two to four for a major one.
Build these first
Datasheets and sources to cite
- u-blox NEO-6 datasheet
- SIMCom A7670 series AT command manual
- AIS 140 (vehicle tracking for public transport)
About this project
How much does the gps vehicle tracker with anti-theft engine cut project cost?
About ₹3,320 for the parts in the base list: ESP32 DevKit V1, NEO-6M GPS module, MPU6050 accelerometer and gyro, A7670C 4G LTE module, 5 V relay module (1 channel), LM2596 buck converter × 2, 18650 backup cell, TP4056 charger with protection, 12 V adapter (stands in for the vehicle battery).
How long does it take?
About 12 weeks for the base project, built on an ESP32. Each upgrade adds time.
Which branches is it suitable for?
Electronics and Communication, Computer Science / IT (IoT, AI), Instrumentation, as a major project.
Which pins and design calculations does it use?
GPS TX → RX1 on GPIO 4; A7670C TX/RX / PWRKEY on GPIO 16 / 17 / 5; MPU6050 SDA / SCL / INT on GPIO 21 / 22 / 19. Worked calculations on this page: data use, distance between fixes, parked current.
How do I test it?
5 km drive with a phone recording too: Track error mostly under 10 m. Model moved while parked: SMS within 30 s. 'STOP 1234' while moving: Ignored until speed < 5 km/h. Tunnel or no network: Points sent later, none lost.
What are the objectives?
To report location every 30 s while moving over 4G to a web map. To send an SMS alert when the parked vehicle moves. To stop the engine in the model on an SMS command, only when speed is below 5 km/h. To measure location error against a phone GPS on a 5 km route.
