Skip to the content
2 layers106.5 × 66 mmTry, the printed circuit board in 3D

IoT vehicle telematics for fleet & logistics — ESP32 + SIM7600G 4G/GPS tracker with fuel-theft detection, tamper/cargo security alarms, offline-resilient MQTT reporting, and OBD2 data over ESP-NOW. Includes firmware, KiCad PCB, and 3D enclosure.

Size
106.5 × 66 mm
Copper layers
2
Thickness
1.6 mm
Parts
18
Nets
20
Pads
59
Tracks, vias
72, 0
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
18 Jun 2026
Updated
18 Jun 2026

Overview

Try is an open-source printed circuit board by Ahmed-YSY, from the Ahmed-YSY/FleetGuard repository on GitHub. It is a 2-layer board of 106.5 × 66 mm with 18 parts on 20 nets, routed with 72 tracks and 0 vias.

It is built around the ESP32-C3-DEVKITM-1. Its parts include 1 IC and 1 connector. It belongs with the home automation and IoT and radio and wireless boards and the ESP32 and RISC-V boards of this library.

Main components

1

README

README.md

FleetGuard 🛡️🚚

A self-contained IoT telematics device for fleet & logistics vehicles — GPS tracking, fuel-theft detection, tamper/security alarms, and offline-resilient cloud reporting.

Built around an ESP32 and a SIM7600G 4G LTE + GPS modem, FleetGuard rides inside the vehicle, talks to a companion OBD2 node over ESP-NOW, watches its own sensors, and streams everything to the cloud over MQTT. When the network drops, it buffers to flash and uploads automatically once it's back — nothing is lost.

Platform Modem Firmware PCB Enclosure


Table of Contents


Overview

FleetGuard is a complete, field-deployable vehicle-telematics unit designed for the logistics industry. It is a two-node system:

  1. The Tracker (main node) — an ESP32 + SIM7600G module that lives in the vehicle. It owns the cellular link, the GPS, the security sensors, the local fuel-level probe, and the offline buffer.
  2. The OBD2 node (companion) — a second ESP that plugs into the vehicle's OBD2 port (via an ELM327 adapter), reads engine data (speed, RPM, fuel level, coolant, etc.), and broadcasts it to the tracker over ESP-NOW — a direct peer-to-peer radio link that needs no Wi-Fi router.

The repository also includes three standalone bench/diagnostic sketches (battery gauge, current monitor, fuel-level probe), the custom PCB, the 3D-printed enclosure, and the bill of materials — i.e. everything required to reproduce the device end to end.

Key Features

  • 📍 Live GPS tracking — position read directly from the SIM7600G, cached to NVS so the last known location survives reboots and deep sleep.
  • ☁️ 4G cloud reporting over MQTT — periodic telemetry plus instant alarms published to an MQTT broker.
  • 🛢️ Fuel-theft detection (3 independent checks):
    1. On-device analog probe drops ≥10 % within 1 second (siphoning).
    2. OBD2-reported fuel level drops ≥10 % within 10 minutes.
    3. Fuel cap opened but no refuel detected within 5 minutes (classic siphon pattern).
  • 🚨 Tamper & cargo security — 4 monitored inputs: device case, fuel cap, and two cargo doors (magnetic reed switches). Any breach raises an immediate cloud alarm.
  • 💾 Offline resilience — if the network is down, events are written to internal flash (LittleFS) and uploaded automatically when connectivity returns.
  • 🔋 Smart power management — heartbeat-driven sleep: stays awake while the engine is on, deep-sleeps for 1 hour when the vehicle has been parked for 5 minutes (modem RF off via CFUN=4), and wakes instantly on any sensor trigger (RTC-capable pins).
  • 📡 Router-free inter-node link — ESP-NOW peer-to-peer between the tracker and the OBD2 node.

System Architecture

mermaid
flowchart LR
    subgraph Vehicle
        OBD[OBD2 Node\nESP32 + ELM327] -- ESP-NOW --> TRK
        SENS[Security sensors\nCase / Fuel cap / 2x Cargo door] --> TRK
        FUEL[Analog fuel probe] --> TRK
        TRK[FleetGuard Tracker\nESP32 + SIM7600G]
        FLASH[(LittleFS\noffline buffer)] <--> TRK
    end
    TRK -- 4G LTE / MQTT --> BROKER[(MQTT Broker)]
    TRK -- GPS --> SAT((GNSS))
    BROKER --> DASH[Fleet Dashboard]

Repository Structure

text
FleetGuard/
├── Ahmeds_Final_Code/          # ⭐ Main tracker firmware (ESP32 + SIM7600G, MQTT, GPS, sleep, security)
│   └── Ahmeds_Final_Code.ino
├── Ahmeds_Battery_Percentage/  # Standalone: 1S LiPo fuel gauge (MAX17048) + Wi-Fi dashboard
│   └── Ahmeds_Battery_Percentage.ino
├── Ahmeds_Current_Sensor/      # Standalone: INA226 current/power monitor + Wi-Fi dashboard
│   └── Ahmeds_Current_Sensor.ino
├── Ahmeds_Fuel_Level/          # Standalone: analog fuel-probe reader + Wi-Fi dashboard
│   └── Ahmeds_Fuel_Level.ino
├── Ahmeds_PCB/                 # KiCad project + Gerber/drill manufacturing files (JLCPCB)
├── Ahmeds_Enclosure/           # Autodesk Inventor 3D enclosure (case top/bottom + PCB assembly)
└── Ahmeds_BOM/                 # Bill of materials (v1 and v2)

Firmware Modules

SketchRoleConnectivityHighlights
Ahmeds_Final_CodeProduction tracker4G LTE (SIM7600G), MQTT, ESP-NOWGPS, fuel-theft x3, 4 security inputs, offline flash buffer, deep sleep
Ahmeds_Battery_PercentageBench toolWi-Fi AP (FleetGuard → 192.168.4.1)MAX17048 fuel gauge, live WebSocket dashboard, CSV log
Ahmeds_Current_SensorBench toolWi-Fi STA (fixed IP)INA226 current/voltage/power, peak + coulomb-counted Ah, waveform
Ahmeds_Fuel_LevelBench toolWi-Fi AP (FleetGuard → 192.168.4.1)Smoothed/calibrated tank %, theft & refuel detection

The three bench sketches were used to characterize the sensors individually before the logic was integrated into the production tracker firmware.

Hardware

Core components (see Ahmeds_BOM/ for the full costed list):

CategoryPart
MCUESP32-WROOM (Wi-Fi + Bluetooth)
Cellular + GPSSIM7600G (4G LTE)
OBD2 interfaceELM327 (Bluetooth/Wi-Fi)
Current sensingINA226 / ACS712
Battery gaugeMAX17048 / ZB2L3 tester
Power18650 cells (9000 mAh) · 1S 15A BMS · TP5100 charger · XL6009 / MT3608 boost · LM2596 buck
Fuel probe (bench)Water-level sensor (stand-in for a real capacitive/resistive sender)
FabricationCustom 4-layer-ready KiCad PCB (manufactured at JLCPCB)
MechanicalCustom Autodesk Inventor enclosure (top + bottom + PCB mount)

PCB — open Ahmeds_PCB/Try.kicad_pro in KiCad. Gerber + drill files are included for direct ordering. Enclosure — open the .iam/.ipt files in Ahmeds_Enclosure/ with Autodesk Inventor.

Getting Started

Prerequisites

  • Arduino IDE (or arduino-cli) with the ESP32 board package installed.
  • Required libraries: TinyGSM, PubSubClient, ArduinoJson, LittleFS (bundled with ESP32 core), and for the bench sketches arduinoWebSockets (Markus Sattler) and INA226.

Flashing the tracker

  1. Open Ahmeds_Final_Code/Ahmeds_Final_Code.ino in the Arduino IDE.
  2. Select your ESP32 board and the correct COM port.
  3. Set the partition scheme to one that includes a SPIFFS/LittleFS region.
  4. Update the configuration values for your SIM and broker.
  5. Upload, then open the Serial Monitor at 115200 baud.

Serial commands: saved dumps the offline queue · clear wipes the offline log.

Configuration

Edit these near the top of Ahmeds_Final_Code.ino:

cpp
const char* apn         = "internet";              // your SIM's APN
const char* mqtt_server = "broker.hivemq.com";     // MQTT broker (move to your own for production)
const int   mqtt_port   = 1883;
const char* mqtt_topic  = "monztrack/device01/gps";

Pin map (ESP32-WROOM):

LabelPinFunction
ESP32_TX_PIN12→ SIM7600 RX
ESP32_RX_PIN14← SIM7600 TX
PWRKEY_PIN27SIM7600 power key
PIN_S133Device-case tamper
PIN_S232Fuel-cap switch
PIN_MAG115Cargo door 1
PIN_MAG218Cargo door 2 (no deep-sleep wake)
FUEL_PIN34Analog fuel probe (ADC1)

⚠️ Before You Publish — Security Checklist

This repository is configured to be public. Keep these points in mind:

  • 🔑 Demo Wi-Fi credentials are in the source. All sketches use the SSID FleetGuard with password A12345678a. Because the repo is public, anyone can read this password — it's fine for bench testing, but change it before deploying a real device.
  • 🌐 Public MQTT broker (broker.hivemq.com) — anyone can subscribe to your topic. Move to a private, authenticated broker for production.

Recommended for production: move secrets into a secrets.h (git-ignored) or build flags, use a unique per-device Wi-Fi password, and add MQTT username/password + TLS.

Author

Ahmed Yousef Saeed Khalifa Project: SGU Logistics — FleetGuard

License

© Ahmed Yousef Saeed Khalifa. All rights reserved. See LICENSE.

The source headers declare "All rights reserved." If you'd prefer this to be open-source (so others can use, study, and contribute), replace LICENSE with an MIT or Apache-2.0 license.

Parts

18
QtyValueFootprintReferences
8MountingHole_3.2mm_M3MountingHole:MountingHole_3.2mm_M3IN-, IN+, IN+, IN+, IN+, IN+, OUT-, OUT+
4SW_SPSTConnector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_VerticalSW_MG3, SW_MG4, SW1, SW2
25VConnector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_VerticalPower_Source1, Solar_Source
1ESP32-C3-DevKitM-1RF_Module:ESP32-C3-DevKitM-1U2
1Sim 7600GConnector_PinSocket_2.54mm:PinSocket_1x07_P2.54mm_VerticalJ2

The 16 most common of 18 parts.

Similar boards

  • 2 layers60 × 40 mmEsp ppo v2, the printed circuit board in 3D

    Esp ppo v2

    iho77/ppo_v2

    This work is licensed under a [Creative Commons Attribution-NonCommercial 4.0 International License][cc-by-nc].

    19 parts5
  • 2 layers226.3 × 90.5 mmClockclock main, the printed circuit board in 3D

    Clockclock main

    TiboDevC/clockclock

    Personal project of a kinetic clock inspired by Humans Since 1982, using 48 stepper motors to display time in an artistic and dynamic way.

    132 parts3GPL-3.0
  • 4 layers58 × 60 mmProject 6 esp32 solar prototype, the printed circuit board in 3D

    Project 6 esp32 solar prototype

    Abineshpk007/KICAD-solar_panel_monitoring_prototype

    This is my PCB, there are many outer like it but this is mine

    15 parts1
  • 2 layers115.4 × 66.5 mmCNC Router, the printed circuit board in 3D

    CNC Router

    diaxxu/CNC-Router

    a challenge i gave myself to make something great ! yes its a cnc milling / laser / plotter machine

    34 parts1MIT
  • 2 layersHail Mary, the printed circuit board in 3D

    Hail Mary

    saniyafatima07/Hail_Mary

    Lakshya: Low Cost Precision Guidance and Smart Electronic Fuze System

    11 parts1
  • 2 layers70.8 × 51.4 mmESS Bottom, the printed circuit board in 3D

    ESS Bottom

    shrimp-18/ESS-Wristband

    A hardware Project:- Wristband

    14 parts1
  • 2 layersControls, the printed circuit board in 3D

    Controls

    VladimirVladimirovMinkov/UOA_HPA

    This is a code and document repository for the University of auckland Aeronaughtics Club Human Powered Aircraft

    16 parts1
  • 2 layers137 × 54.5 mmHackthon PCB, the printed circuit board in 3D

    Hackthon PCB

    vruga/esp_medmonitor

    KiCAD project for dual-node ESP32 medical monitoring and security system.

    10 parts1

Questions

How big is the Try PCB?

It measures 106.5 × 66 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Try use?

18 parts, built around the ESP32-C3-DEVKITM-1. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Try KiCad files?

From the Ahmed-YSY/FleetGuard repository on GitHub, at the commit this page was made from: the board is Ahmeds_PCB/Try.kicad_pcb and its schematic Ahmeds_PCB/Try.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Try design in my own project?

Its repository states no licence, so its author keeps all rights: ask Ahmed-YSY before reusing the design.