Series: Building Infrastructure for an Autonomous Drone Fleet (4/4)

Part 1: Device Identity · Part 2: Telemetry · Part 3: Monitoring · Part 4: Battery Management

Why Battery Tracking Matters

Drone batteries are expensive, safety-critical, and have limited cycle life. Regulations require knowing which battery was used on which flight. Batteries rotate between aircraft based on charging state and mission requirements. The fleet management problem: which battery is where, right now?

The Manual Approach — And Why It Fails

Traditional: operator scans battery barcode, logs it in a system before each flight. In practice: field operators skip it when they’re busy, the database drifts within days. The gap between “what the system says” and “what’s actually mounted” grows silently. You discover the problem when you need the data — during an incident review.

The Insight: Batteries Identify Themselves

Smart batteries have a BMS (Battery Management System) board with a unique hardware UID. The flight controller reads this UID and broadcasts it as part of standard telemetry. If the drone already reports which battery it’s using every second, why ask a human?

The Lazy Assignment Pattern

“Lazy” because records are created on demand — no upfront provisioning needed. On every telemetry batch: have we seen this hardware UID before? First time seen → create a battery record automatically. Check the current assignment — no assignment → create one. Different battery than last time → record the swap, update. The battery-to-drone mapping stays current without manual intervention.

Swap Detection — Observed, Not Reported

When a technician swaps a battery, the next telemetry cycle updates the assignment. The system logs: “Battery X was replaced by Battery Y on Drone Z at 14:32.” No human action required — the swap is a side effect of normal telemetry ingestion.

Design Decisions and Trade-offs

  • Using the hardware UID as the battery’s identifier: the only globally unique ID that requires no human input
  • Making the legacy fleet management ID optional: auto-discovered batteries don’t exist in the old system yet
  • Non-blocking design: if assignment logic fails, telemetry ingestion continues unaffected
  • What’s not solved yet: battery retirement/decommissioning, manual override of assignments