Skip to content

fix(go): enforce battery thermal protection - #64

Merged
Gingerman1996 merged 6 commits into
developmentfrom
go/feat/improve-battery-protection
Aug 13, 2026
Merged

fix(go): enforce battery thermal protection#64
Gingerman1996 merged 6 commits into
developmentfrom
go/feat/improve-battery-protection

Conversation

@samuelbles07

@samuelbles07 samuelbles07 commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Enforce the AirGradient Go battery operating-temperature policy to prevent charging or discharging outside safe limits and show the correct shutdown warning for hot and cold conditions.

Changes

  • Configure and verify the BQ25629 NTC and OTG thermal profile during initialization.
  • Limit charging to 0–45 °C with 2–43 °C recovery hysteresis, and disable charging for invalid NTC readings.
  • Request protective shutdown outside the -10–60 °C discharge range in interactive and Offline paths.
  • Add distinct hot and cold shutdown screens while retaining the legacy BLE overheat reason for compatibility.
  • Update Go battery, display, orchestrator, and BLE documentation.

Validation

  • Host test suite passed: 1288/1288.
  • idf.py -C products/go build passed.
  • git diff --check and Markdown lint passed.

static constexpr int16_t OT_CHARGE_HOT_RESUME_C = 47;
static constexpr int16_t OT_SHIP_THRESHOLD_C = 60;
// --- Battery temperature thresholds ---
static constexpr int16_t CHARGE_MIN_TEMPERATURE_C = 0;

@mattMRBH mattMRBH Aug 12, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. In Line 419-420: Why did "hysteresis" decrease from 3C to 2C for hot and cold recovery?

  2. In Line 421: DISCHARGE_MIN_TEMPERATURE_C set to -10C? The AG Go's operating temperature on the manual is down to -20C, and while I don't have any hardware documentation at this point, I feel like the cell being used is a PKCELL LIPO785060 2500 mAh 3.7Vdc(nom) cell, which also supports discharge down to -20C, unless another component in the design sets this limit.

  3. In Line 413: EDV_SHIP_THRESHOLD_V = 2.9f. This should be set to 3.0f as the discharge cutoff voltage for the PKCELL is 3.0 Vdc.

If a different cell is being used with different specifications, please accept my apologies as I didn't want to pull the cell off my brand-new AG Go, just yet... :)

@Gingerman1996
Gingerman1996 merged commit e4f3197 into development Aug 13, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants