Power Management
LIA’s firmware spends most of its time in deep sleep when tracking continuously isn’t needed, waking only to acquire a GPS fix and broadcast it over the mesh. The tradeoff is straightforward: shorter sleep intervals mean fresher position data but shorter battery life.
The BMS switch
Section titled “The BMS switch”The board has an accessible physical switch with three positions, though the firmware only ever sees two of them:
- HIGH — continuous (“Beacon”) mode. The status LED stays solid RED, the device never sleeps, and it broadcasts its position every 30 seconds. Intended for short-term, active use (a walk, actively searching for the animal) — it drains the battery quickly compared to the alternative below.
- LOW — sleep-cycle (“Tracker”) mode. The device wakes roughly once a minute, tries to get a fresh GPS fix (giving up after 90 seconds and sleeping anyway if none arrives, rather than draining the battery hunting indefinitely), sends a position if it got one, then cuts power to the radio and GPS and goes back into deep sleep. This is the low-power default for everyday wear.
- OFF — a hardware power cutoff, not a firmware state. This third position disables the regulator that powers the ESP32-S3 entirely, while still allowing the battery to charge. The firmware never sees this position: when the switch is OFF, the MCU has no power to run any firmware at all, so there’s nothing for
isBmsHigh()to read — it’s not a third case the code branches on, it’s the absence of the other two.
Toggling between HIGH and LOW takes effect on the next wake without needing a reflash. Two additional wake sources besides the once-a-minute timer let the device react to the switch (or a charger) sooner rather than waiting out the full interval:
- Flipping the switch to HIGH while the device is mid-sleep wakes it immediately.
- Connecting a charger while the device is mid-sleep also wakes it immediately (there’s no separate USB-presence pin on the board, so the charger-detect signal is used as the closest available proxy for “USB connected”).
Status LED
Section titled “Status LED”- In continuous mode, the status LED is solid RED by default, driven automatically from the switch state.
- Sending
LED ON/LED OFFas a direct message to the device overrides this manually for the rest of that boot — see RGB LED and Meshtastic Configuration. There’s no “back to automatic” command; a fresh boot (e.g. the next sleep-cycle wake) resets to automatic control.
Estimating battery life
Section titled “Estimating battery life”A rough estimate for runtime (in hours) given a battery capacity (mAh), average current draw while awake (mA), average sleep current (mA), duty cycle (fraction of time awake), and depth-of-discharge margin :
Current budget
Section titled “Current budget”is broken down per component below. The status LED figure is the one that dominates: all four status LEDs on the board (see RGB LED) are wired in parallel per channel, so lighting a channel draws 4 × 0.15 A = 0.6 A, not 0.15 A — driving one color drives all four LEDs at once.
| Component | Current | Notes |
|---|---|---|
| ESP32-S3 (active) | ~50 mA | CPU + radio/GPS UART/SPI handling, Wi-Fi/BLE off |
| SAM-M10Q GPS (acquiring/tracking) | ~25–28 mA | Typical for this class of GNSS module; not yet independently measured on LIA hardware |
| SX1262 LoRa (RX idle + periodic TX average) | ~15 mA | TX briefly peaks far higher (100+ mA) at max power; this is a blended average over a send cycle |
| Status LED, one channel solid | ~600 mA | 4 LEDs × 150 mA, wired in parallel per channel (see above) |
| ESP32-S3 + peripherals, deep sleep | ~0.5 mA | PPC cuts SX1262/GPS power entirely; illustrative, not yet measured |
Continuous (“Beacon”, switch HIGH) mode
Section titled “Continuous (“Beacon”, switch HIGH) mode”Never sleeps (), status LED solid the whole time:
| Battery | Capacity | Runtime (80% DoD) |
|---|---|---|
| V1.0 (18650) | 3500 mAh | hours |
| V1.1 (pouch cell) | 1000 mAh | hours |
The status LED alone is roughly 87% of the awake current in this mode — continuous/Beacon mode is meant for short, active sessions (a walk), not all-day use, and this is why.
Sleep-cycle (“Tracker”, switch LOW) mode
Section titled “Sleep-cycle (“Tracker”, switch LOW) mode”The status LED is off between wakes, so the awake current is lighter, but every wake is a real GPS reacquisition (PPC cuts GPS power entirely during sleep, so there’s no hot-fix state to resume from). Each cycle is the awake time plus a fixed ~60-second sleep afterward (kSleepCycleMs, see Sleep/wake tuning below) — it isn’t a 60-second window containing the awake time. Using the one real cold-fix measurement so far — about 36 seconds, see GPS — the cycle is roughly seconds, giving a duty cycle :
| Battery | Capacity | Runtime (80% DoD) |
|---|---|---|
| V1.0 (18650) | 3500 mAh | hours ( 3.3 days) |
| V1.1 (pouch cell) | 1000 mAh | hours |
Sleep/wake tuning
Section titled “Sleep/wake tuning”The main levers, in firmware/services/TrackerService.h:
- Continuous-mode send interval — 30 seconds, fixed.
- Sleep-cycle interval — roughly once a minute.
- GPS fix timeout — currently 90 seconds before a sleep-cycle wake gives up on a fix and sleeps anyway; not yet validated against real cold/warm-fix timing across a range of conditions.
- Motion-triggered activity messages — see Accelerometer; doesn’t currently affect the sleep schedule itself.
Peripheral power control
Section titled “Peripheral power control”The PPC GPIO gates power to the SX1262 radio and the GNSS module together (they share a rail — there’s no way to power one down without the other). The firmware sets this pin high before touching either peripheral and low before deep sleep, so both are fully powered down between wakes in sleep-cycle mode.
See also: Battery, Accelerometer, RGB LED, and Microcontroller.

