🚀 Student Guide: Building Your Own GPS Fleet Tracker
A complete cost breakdown and architectural overview for engineering students in Nepal.
🛠️ Hardware Requirements
To build a professional truck tracking system, you need robust hardware that can handle 12V-24V power from the vehicle battery.
| Component | Description | Approx. Cost (NRS) |
|---|---|---|
| Lilygo T-SIM7600/7000 | All-in-one ESP32 + GPS + 4G/LTE SIM module. Reliable and fast. | ~ NRS 8,000 ($60) |
| Diesel Flow Meter | Analog/Digital sensor to measure fuel consumption in real-time. | NRS 1,500 – 2,000 |
| Vehicle Voltage Adapter | Hardwired DC-DC buck converter (24V down to 5V) for the ESP32. | < NRS 1,000 |
| Hosting (BabbalHost) | Shared PHP/MySQL hosting with FTP support for the dashboard. | ~ NRS 1,600 /yr |
| Domain (.com.np) | National domain registry for Nepali citizens/entities. | FREE |
Estimated Budget: NRS 12,000 (One-time)
📐 System Flow (Architecture)
- Data Acquisition: The ESP32 wakes up, fetches GPS coordinates from the SIM7600 module, and reads the analog voltage from the diesel sensor.
- Batch Processing: To save power and handle weak cellular areas, the device stores up to 10 points in RAM before attempting a transmission.
-
API Ingestion: Data is sent via HTTP POST to
api/post_data.php. The server calculates the "Haversine Distance" between points to track daily mileage. -
Reverse Geocoding: Our custom
locations_cachesystem converts Lat/Lng into human-readable addresses (e.g., "Kalanki, Kathmandu") without hitting API rate limits. -
Live Monitoring: The dashboard (
index.php) fetches the data and renders it using Leaflet.js with real-time status updates (Running, Stopped, Offline).