Plan: ride through cranking, shut down at ignition off

UPS input comes from the ignition-switched socket via a 15 V PD
trigger, so input loss means cranking or ignition off. The INA219
(monitor-only) gives the battery current sign; a host service would mark
cranks, then after a grace period close the recording and power off,
with a voltage floor as backstop. Records the open hardware problem:
after poweroff the UPS keeps the board powered, so it drains and
doesn't auto-start at ignition on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mikkeli
2026-10-09 17:10:51 +09:00
parent 0b3783dac0
commit fe284ce540
2 changed files with 54 additions and 0 deletions
+1
View File
@@ -71,6 +71,7 @@ type: reference
- First read-only check (2026-10-09, on input power, charged): bus 12.34 V, shunt ≈ 0 mV (idle). Chip at power-on defaults (config `0x399f`,
calibration unprogrammed), so read current from the **shunt-voltage register** (0x01, 10 µV/LSB) rather than the current register.
- Fed from the ignition-switched cigarette socket via a **15 V PD trigger** (15 V / 3 A, inside the 15–19 V rating). Plan: [car power](impl/plans/POWER.md).
- Ignition-off shutdown (not built yet): on input loss the battery current turns clearly negative (discharging). A small service watches the
INA219, waits out a grace period longer than a crank (30–60 s), then runs `systemctl poweroff`, with low battery voltage as a hard backstop.
The shunt value is unconfirmed; check the schematic before converting shunt mV to amps.