Skip to content

#1286 - Heltec v2 Bat always 79% - #3504

Open
SMonday wants to merge 1 commit into
meshcore-dev:devfrom
SMonday:fix/1286-Heltec-v2-Bat-always-79
Open

SMonday wants to merge 1 commit into
meshcore-dev:devfrom
SMonday:fix/1286-Heltec-v2-Bat-always-79

Conversation

@SMonday

@SMonday SMonday commented Sep 26, 2026

Copy link
Copy Markdown

Fix Battery monitoring for Heltec v2 / v2.1

I have only version V2.1 available for testing. The ADC to voltage conversion was verified with a multimeter.

In Begin() Method the two ADC Inputs for are measured. Based on the result either V2 or V2.1 hardware is selected for further measurements.
Just before entering DeepSleep the MOSFET is disabled to safe energy in deep sleep mode. During running the approximately 13uA are fine.

I would be nice I anybody has a V2 to verify the change. In Meshcore App for my Heltec V2.1 is displayed correctly (with and without battery connected).

See #1286

The V2 and V2.1 use different battery divider pins and resistor ratios, and the divider rail must be enabled after wake.
Probe both candidate inputs at startup, attach only the detected channel, and scale the measurement with the matching ratio.
Add a generic pre-deep-sleep hook so the Heltec board can cut the battery divider rail before sleeping.

Fixes meshcore-dev#1286

This branch has not been deployed

No deployments
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.

1 participant