Skip to content

vihara-ambegoda/BLE-Based-Smart-Vehicle-Key-Tracking-System

Repository files navigation

πŸš—πŸ”‘ BLE Based Smart Vehicle Key Tracking System

A compact BLE smart tracker that helps quickly locate misplaced vehicle keys. Includes custom PCB, firmware, enclosure, and Android BLE app. Helps quickly locate misplaced vehicle keys using BLE proximity and buzzer activation.

Key Tracker Demo


πŸ“š Table of Contents


πŸ“ Introduction

This project originated from a real-world workspace problem: misplaced vehicle keys in an automotive workshop causing delays, inefficiency, and security concerns.

It is an IoT-based smart embedded system that allows workshop staff to locate keys using a smartphone app and BLE technology.

Designed and developed the entire system end-to-end, including hardware, firmware, PCB, enclosure, and mobile app.

This project was developed as part of the Design Project (EN5905) under the guidance of Dr. Samiru Gayan at the University of Moratuwa (2025).


⭐ Why This Problem Is Important

  • Workshops handle many vehicles β†’ keys often get misplaced.
  • Searching for keys wastes valuable technician time.
  • Causes operational delays and customer dissatisfaction.
  • Commercial trackers (Tile/AirTag) are expensive and not customizable.

This project provides a low-cost, portable, and workshop-friendly solution.


🧩 System Overview

Block_Diagram Block_Diagram

Major Components

  • HM-11 BLE module
  • ATmega328P-AU Custom PCB (KiCad-designed PCB fabricated via JLCPCB)
  • Buzzer & LED indicators
  • LiPo battery (3.7V) + TP4056 charging module
  • Custom enclosure
  • Custom Mobile app for BLE communication (built using MIT App Inventor)

πŸ”‘ Key Features

  • πŸ“‘ BLE-based smartphone tracking
  • πŸ”” Tap-to-buzz key locator
  • 🧭 Proximity detection (based on RSSI)
  • πŸ”‹ Low-power operation with sleep mode for longer battery life
  • πŸ› οΈ Fully custom PCB and enclosure
  • 🧩 Compact keychain-sized form factor
  • πŸ”’ Secure BLE pairing

🎯 Project Objectives

  • Build a BLE-based smart key tracking system
  • Provide real-time proximity detection and alerts
  • Design a custom SMD PCB for miniaturization
  • Develop a custom mobile app interface
  • Improve workshop efficiency by reducing time spent searching for keys
  • Improve overall power efficiency

πŸ› οΈ Prototype Stages

πŸ”Ή Stage 1 - Arduino-Based Prototype

  • Arduino Nano (3.3V)
  • HM-11 BLE Module
  • Buzzer + LED
  • LiPo Battery + TP4056
  • Firmware tested using existing BLE Scanner App

Achievements:

  • Validated BLE connectivity
  • Controlled buzzer/LED via smartphone app
  • Measured power consumption and battery behavior
  • Validated concept before PCB design

Prototype

πŸ”Ή Stage 2 - Final Design

  • Designed a custom SMD PCB in KiCad
  • PCB fabrication done through JLCPCB
  • ATmega328P-AU used as the main MCU
  • Integrated HM-11, buzzer, LED, charging module pads
  • Performed SMD soldering of all components
  • Uploading the Code using USB to Serial (UART) TTL converter module and Tested and verified full board functionality
  • Custom compact keychain enclosure
  • Custom mobile app (MIT App Inventor)
  • Low-power firmware with sleep mode and interrupts

Benefits:

  • Significantly smaller, keychain-friendly design
  • Increased reliability vs Arduino prototype
  • Lower power consumption using sleep modes
  • Professional and durable build quality

Final Design

PCB & Enclosure

PCB KiCAD Schematic Design

Schematic

Fabrication Custom PCB – KiCAD Design & Printed PCB

PCB1

3D Enclosure 3D Design

Enclosure

A complete .STL file is attached.

Soldered PCB and Final Assembly

Hardware

BLE

PCB2

Custom App

Mobile App Custom App Design

App

App

A complete .aia file is attached.

Custom App Working

App App App

Bill of Materials (BOM) BOM


πŸŽ₯ Project Demonstration Video

A complete demonstration of the prototype, final PCB, enclosure, BLE functionality, and mobile app operation is included in the attached project video.

Click here to download/view


πŸ”‹ Power Management

Initial Power Calculation

LiPo Battery: 3.7V, 320 mAh

Current Draw = 15.7 mA (measured from Multimeter)

Power = V Γ— I Power = 3.7V Γ— 15.7 mA Power = 0.058 W (58 mW)

Battery Life = 320 mAh / 15.7 mA β‰ˆ 20.3 hours

Optimization

  • BLE module and MCU placed in sleep when idle
  • Wake on command via BLE
  • Efficient SMD layout to reduce losses
  • Rechargeable via TP4056 for convenience

Power Calculation After Optimization

LiPo Battery: 3.7V, 320 mAh

Current Draw = 9.8 mA (measured from Multimeter)

Power = V Γ— I Power = 3.7V Γ— 9.8 mA Power = 0.036 W (36 mW)

Battery Life = 320 mAh / 9.8 mA β‰ˆ 32.65 hours

Both regular code and power optimized codes are attached.


πŸ“‘ BLE Module Decision

❌ Why Wi-Fi Was Not Suitable

  • ESP8266 has a High WiFi power consumption
  • Not suitable for always-on tracking
  • No low-power sleep modes

Adopted Solution:

βœ” HM-11 BLE module

  • Very low power
  • Perfect for periodic wake cycles
  • Small footprint β†’ fits custom PCB

πŸ“¦ Achieved Deliverables

  • Fully working smart BLE key tracker
  • Custom SMD PCB manufactured by JLCPCB (Integrated BLE + buzzer + LED + charging)
  • Mobile app for locating keys via BLE
  • Reduced time searching for keys β†’ improved efficiency
  • Enhanced security for key access
  • Custom keychain-friendly enclosure

πŸ”„ Changes From Original Plan

  • ESP8266 (Wi-Fi) β†’ BLE (HM-11)
  • Coin cell avoided due to peak current demands

πŸš€ Next Steps

  • Finalize keychain enclosure
  • Add app features (proximity map, last-seen location)
  • Further optimize power consumption

πŸ› οΈ Tools & Software Used

  • Arduino IDE (firmware development)
  • MIT App Inventor (custom Android BLE app)
  • KiCad (circuit schematic & PCB design)
  • JLCPCB for PCB fabrication
  • BLE Scanner App (initial BLE testing)
  • Digital Multimeter
  • SMD Rework Station

πŸ™Œ Acknowledgements

I would like to extend my sincere thanks to:

  • My supervisor Dr. Samiru Gayan for guidance, feedback, and support throughout the project.
  • My department team leader for inspiring the original idea based on real workplace challenges.
  • My fellow office mate for helping troubleshoot hardware and software issues during development.