-
Notifications
You must be signed in to change notification settings - Fork 4
Smart Vehicle Tracker
| Name | GitHub |
|---|---|
| Yussuf Abdelkarim | Youssefibrahim03 |
| Ismail Dahshan | ismaileldahshan1 |
| Amr Eid | GH_UID2 |
Github Repo: https://github.com/ismaileldahshan1/Smart_Vehicle_Tracker
Vehicle theft remains a serious and growing problem in Egypt, with limited affordable solutions available to everyday car owners. Existing GPS trackers on the market require expensive cellular subscriptions and lack integration with the vehicle's own diagnostic system, meaning they can only report location — not whether the engine is actually running or the car is being driven.
This project proposes a smart vehicle tracker built around a Nucleo STM32L432KC microcontroller running FreeRTOS. The system plugs into the car's OBD-II diagnostic port via an ELM327 Bluetooth adapter (connected through an HC-05 Bluetooth module) to read real-time engine data such as vehicle speed and RPM. Simultaneously, a NEO-6M GPS module tracks the car's geographic location. If the vehicle moves without the owner's authorization, a SIM800L GSM module immediately sends an SMS alert to the owner's phone containing the car's live GPS coordinates as a Google Maps link. The system provides a complete anti-theft solution: it knows both where the car is and what it's doing — all without requiring WiFi or internet subscriptions.
MVP:
- OBD-II engine data reading (speed, RPM) via ELM327 Bluetooth → HC-05 → UART
- Continuous GPS position tracking with NMEA sentence parsing (NEO-6M)
- Anti-theft detection: alert triggered when vehicle speed > 0 while system is armed
- SMS alert to owner via SIM800L GSM module with Google Maps location link
- Arm/disarm system state via serial command or software flag
- FreeRTOS task architecture with queues and semaphores for inter-task communication
- UART serial logging of GPS coordinates, OBD-II data, and events
Stretch Goals:
- Periodic location updates via SMS at configurable intervals while car is moving
- Speed threshold alerts (notify owner if car exceeds a set speed)
- Trip logging with timestamps — start/end location and duration over UART
- Geofence boundary detection with configurable safe zone
Hardware Architecture connections:

The system is organized around three input modules and two output modules, all managed by the MCU running FreeRTOS.
Inputs: The ELM327 Bluetooth OBD-II adapter plugs into the car's diagnostic port and communicates wirelessly with an HC-05 Bluetooth module configured in master mode. The HC-05 outputs serial data over UART to the Nucleo, allowing the MCU to send OBD-II PID requests (as simple AT command strings like "010D\r" for speed) and receive parsed responses. The NEO-6M GPS module communicates over a second UART, continuously feeding NMEA sentences that the MCU parses to extract latitude and longitude. System arming is controlled via a software flag toggled through a serial command.
Processing: The MCU runs FreeRTOS with separate tasks for OBD-II communication, GPS parsing, alert logic, SMS transmission, and UART logging. The OBD-II task periodically requests vehicle speed and RPM from the ELM327. The GPS task parses $GPRMC sentences to extract coordinates. The Alert task monitors whether the system is armed and the vehicle is moving (speed > 0) — if both conditions are true, it triggers the SMS task. Tasks communicate through FreeRTOS queues (sensor data → alert logic) and semaphores (shared arm/disarm state).
Outputs: The SIM800L GSM module connects over a third UART and sends SMS alerts to the owner's phone number using standard AT commands. The SMS contains the vehicle's current GPS coordinates formatted as coordinates. A UART debug log outputs all GPS coordinates, OBD-II readings, and system events to a serial terminal for development and diagnostics.
Circuit diagrams, pinout tables, and breadboard layouts.
A table listing component names, part numbers, quantities, costs, and links to datasheets.
Calculations ensuring your power supply can handle the peak current draw of all components combined.
Description of the firmware design (e.g., Bare-metal Superloop, Interrupt-driven, or RTOS).
Visual diagrams mapping out the core logic, state transitions, and interrupt service routines (ISRs).
Explanations of any complex logic used (e.g., PID control loops, digital filtering, sensor fusion).
Compilers, IDEs, and toolchains used (e.g., Keil, PlatformIO, STM32CubeIDE).
How individual hardware components and software functions were tested in isolation.
How the system was tested as a whole.
A log of major bugs, hardware failures, or design flaws you encountered, and the engineering steps you took to solve them.
High-quality photos of the completed build.
A link to a short video showing the system working in real-time under various conditions.
Data showing how well the project met its initial objectives (e.g., "Response time was measured at 12ms, well within our 50ms goal").
Ismail — OBD-II subsystem and Bluetooth communication. Responsible for configuring the HC-05 in master mode and pairing it with the ELM327, writing the OBD-II PID request/response parser over UART, and implementing the OBD-II FreeRTOS task. Also handles FreeRTOS task architecture setup (task creation, queue and mutex configuration).
Youssef — GPS subsystem and SMS alert system. Responsible for interfacing the NEO-6M GPS module, writing the NMEA parser to extract coordinates, interfacing the SIM800L GSM module, implementing the SMS sending logic with AT commands, and formatting the Google Maps link. Implements the GPS and SMS FreeRTOS tasks.
Amr — Alert logic, system integration, and testing. Responsible for the Alert FreeRTOS task (monitoring armed state + vehicle speed to trigger SMS), the arm/disarm mechanism, UART debug logging, power supply design, and overall system integration. Also leads documentation (wiki page, presentation slides) and demo preparation.
Shared responsibilities: All three members contribute to debugging, FreeRTOS tuning (task priorities, stack sizes), and the final demo.
| Date | Milestone | Deliverable |
|---|---|---|
| Mon, Mar 30 | Project kick-off | Brainstorming ideas, team formation begins |
| Tue, Apr 14 | Milestone 1: Team formation | Team finalized (Ismail, Youssef, Amr) |
| Wed, Apr 15 | Milestone 2: Proposal presentation | In-class proposal slides, wiki Sections 1, 2.1, and 7 |
| Apr 16–19 | — | Order HC-05, NEO-6M, SIM800L. Set up FreeRTOS project on STM32. Assign subsystems |
| Mon, Apr 20 | Checkpoint A: Wiki/page setup | Full proposal on course wiki with block diagram, objectives, labor division, and timeline |
| Apr 21–28 | Development sprint 1 | Ismail: HC-05 paired with ELM327, OBD-II PID requests returning speed/RPM on serial terminal. Youssef: GPS NMEA parsing working, SIM800L sending test SMS. Amr: FreeRTOS tasks created and scheduled, UART debug log running |
| Wed, Apr 29 | Milestone 3: Progress demo | Live demo of at least one major subsystem (OBD-II reading speed or GPS + SMS working). In-class progress presentation |
| Apr 30–May 5 | Development sprint 2 | Alert logic integrated: armed + speed > 0 → SMS sent with GPS coordinates. All tasks communicating via queues and mutexes. Full system integration begins |
| Wed, May 6 | Checkpoint B: Integration update | Wiki update with integration status, testing evidence (screenshots, serial logs), and remaining issues |
| May 7–12 | Final sprint | In-car GPS testing. SMS alert timing verification. Edge case handling. Demo rehearsal. Wiki page completed with all sections. Code cleaned up |
| Wed, May 13 | Milestone 4: Final demo | Final in-class presentation, live demo, final code submission, completed wiki page |
https://github.com/ismaileldahshan1/Smart_Vehicle_Tracker
Links to datasheets, tutorials, academic papers, and course materials used during development.