Container Fleet Tracking
Theo dõi Đội xe Container
GPS+Modbus tracker on ESP32+ML307 4G, pushes position & door sensor every 30s — self-hosted Traccar.
Problem
A logistics firm runs 180 domestic-route containers, with no visibility into where each one is or whether doors were opened en route (theft risk). Commercial trackers cost $20-30/month/vehicle — far too much for the fleet.
Architecture
ESP32 + ML307 4G modem (Hardserial) + Neo-6M GPS + magnetic door sensor → C++ firmware with wake-on-shock + 30 s interval → custom Traccar protocol → Postgres (history) + Redis (live state). 6000 mAh Li-ion + vehicle-power charger → 6 months between battery changes if the vehicle runs regularly.
Stack & rationale
- ML307: cheap ($8), solid AT-command set, ~6 mA idle.
- Wake-on-shock (MPU6050): 10× battery savings when parked.
- Self-hosted Traccar: open-source, custom protocol is easy, no license fees.
Results
| Metric | Value |
|---|---|
| Trackers in production | 124 |
| Cost / vehicle / month | <$2 (vs $25 commercial) |
| Door-open events caught | 17 (14 actioned in time) |
| Avg GPS accuracy | 4.2 m |
| Avg battery life | 5.8 months |
Lessons
DIY trackers only beat commercial pricing if fleet >50 (high hardware NRE). Port/depot geofences need a 200 m buffer to avoid false triggers.