Repeater (SenseCAP Solar): on a flat battery it no longer starts, it waits until the panel recharges it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5.5 committed 2026-11-23 13:13:46 +01:00
1 parent 8e6ee952bf
commit 0066d073db
3 files changed
+31

No files matched your search

+24
View File
@@ -170,6 +170,30 @@ a half-drained `rxlog`/`pktlog` page would otherwise wait for the next
connection event — the bridge drains those on a 2-minute duty cycle, so a slower
drain directly costs collected frames.
## A mast that runs flat (boot protection)
A panel that gets no direct sun in winter (remote-mast faces east, 11/2026:
-50 mV a day from mid-November with consumption unchanged) eventually drains
the cell. Without protection the node then browns out, and every bit of
light restarts it on a cell that cannot hold it -- a boot loop at the edge.
`SenseCap_Solar_repeater` builds with `NRF52_POWER_MANAGEMENT` (upstream code,
wired in `variants/sensecap_solar`, only the switch was off): at boot the
node reads the battery and, below **3.3 V** (`PWRMGT_VOLTAGE_BOOTLOCK`), goes to
SYSTEMOFF with the LPCOMP armed on the battery input; it wakes when the
battery rises past the comparator threshold (3/8 VDD, ~3.4-3.7 V on the cell
per `variant.h`) and boots normally. USB power skips the check.
What it does **not** do: switch off a running node as the battery falls --
nothing in the firmware calls the runtime low-voltage shutdown. It protects
the restart, not the discharge. The clock goes back to the build epoch after
such a restart, as after any power loss (`gps duty` resyncs it, `time` sets it).
**Not yet verified on hardware**: the thresholds come from `variant.h`. Bench
test with an adjustable supply on the battery terminals: boot at 3.2 V must
stay dark, raising it to ~3.8 V must wake the node by itself; `get boot`
then shows `RESETREAS=0x00020000` (bit 17, wake from LPCOMP).
## Measuring this yourself — two traps
1. **A solar node measured on its USB side measures the CHARGER.** With a