Repeater, room server, companion: SenseCAP Solar reads its battery voltage correctly again
pub-release / release (push) Successful in 41m4s
pub-release / release (push) Successful in 41m4s
Changelog: SenseCAP Solar (repeater, room server, companion): the battery voltage reads correctly again; since the previous release it read 0.1-0.15 V high, so the low-voltage cutoff would have let the cell run lower. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ba6f6cd073
commit
540f87ca77
2 files changed
+10
-3
No files matched your search
+6
-2
@@ -278,8 +278,12 @@ is decided at boot.
|
|||||||
- **SenseCAP Solar battery divider (`VBAT_ENABLE`)**: held `HIGH` (off) at boot
|
- **SenseCAP Solar battery divider (`VBAT_ENABLE`)**: held `HIGH` (off) at boot
|
||||||
and set back to `HIGH` right after `getBattMilliVolts()`, instead of staying
|
and set back to `HIGH` right after `getBattMilliVolts()`, instead of staying
|
||||||
`LOW`. `initiateShutdown()` still drives it `LOW` when it arms the LPCOMP
|
`LOW`. `initiateShutdown()` still drives it `LOW` when it arms the LPCOMP
|
||||||
wake. Open question: with the divider off, the ADC pin may sit near VDD +
|
wake. It saves ~2.8 µA (4.2 V over 1.5 MOhm). With the old 10 ms settle the
|
||||||
0.3 V on a full cell. This is yet to be checked with a meter on the board.
|
reading came out 110-150 mV high (mast-three and second-mast after the OTA of
|
||||||
|
26.-27. 11. 2026, both at night, remote-mast without the change flat): the ADC
|
||||||
|
node starts high with the divider off. The settle is 100 ms now; still to be
|
||||||
|
checked against a meter, and whether the ADC pin sits near VDD + 0.3 V on a
|
||||||
|
full cell.
|
||||||
|
|
||||||
**Runtime knobs from the same night**, for comparison (paired deltas):
|
**Runtime knobs from the same night**, for comparison (paired deltas):
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,10 @@ public:
|
|||||||
int adcvalue = 0;
|
int adcvalue = 0;
|
||||||
analogReadResolution(12);
|
analogReadResolution(12);
|
||||||
analogReference(AR_INTERNAL_3_0);
|
analogReference(AR_INTERNAL_3_0);
|
||||||
delay(10);
|
// CUSTOM (TeTeHacko): the divider is off (VBAT_ENABLE HIGH) between reads
|
||||||
|
// since #27, so the ADC node starts high. 10 ms left ~+110..150 mV on the
|
||||||
|
// reading (mast-three and second-mast, 26.-27. 11. 2026); 100 ms settles it.
|
||||||
|
delay(100);
|
||||||
adcvalue = analogRead(BATTERY_PIN);
|
adcvalue = analogRead(BATTERY_PIN);
|
||||||
digitalWrite(VBAT_ENABLE, HIGH);
|
digitalWrite(VBAT_ENABLE, HIGH);
|
||||||
return (adcvalue * ADC_MULTIPLIER * AREF_VOLTAGE) / 4.096;
|
return (adcvalue * ADC_MULTIPLIER * AREF_VOLTAGE) / 4.096;
|
||||||
|
|||||||
Reference in new issue
Block a user