Skip to content

Fix Heltec T114 ADC multiplier - #7520

Merged
thebentern merged 1 commit into
meshtastic:masterfrom
OnyxClawe:master
Sep 1, 2025
Merged

Fix Heltec T114 ADC multiplier#7520
thebentern merged 1 commit into
meshtastic:masterfrom
OnyxClawe:master

Conversation

@OnyxClawe

Copy link
Copy Markdown
Contributor

The current ADC multiplier for the Heltec T114 reports 95% at a full battery charge. I've adjusted it to 4.99 to correct for this. A full charge now results in 100% battery being reported instead of 95%.

🤝 Attestations

[✅] I have tested that my proposed changes behave as described.
[✅] I have tested that my proposed changes do not cause any obvious regressions on the following devices:
    [✅] Heltec T114 V2

@OnyxClawe

Copy link
Copy Markdown
Contributor Author

Apologies for the lack of a label! Im very new to github and i do not see an option to add a label. This is a bugfix

@thebentern thebentern added the bugfix Pull request that fixes bugs label Jul 31, 2025
@thebentern

Copy link
Copy Markdown
Contributor

@OnyxClawe what battery mAH rating does this correspond to?

@OnyxClawe

Copy link
Copy Markdown
Contributor Author

@thebentern
I used a 3000mAh cell in my testing

@alexl83

alexl83 commented Aug 12, 2025

Copy link
Copy Markdown

I'm running this change (cherry-picked) on 2.6.11 latest beta on my heltecs T114, everything runs fine

Updated ADC, Full charge now results in 100% charge being reported instead of 95% charge
@thebentern
thebentern merged commit edeb25c into meshtastic:master Sep 1, 2025
77 of 78 checks passed
fifieldt pushed a commit to fifieldt/meshtastic-firmware that referenced this pull request Sep 2, 2025
Updated ADC, Full charge now results in 100% charge being reported instead of 95% charge

Co-authored-by: OnyxtheDragon <58921814+OnyxtheDragon@users.noreply.github.com>
fifieldt pushed a commit that referenced this pull request Sep 2, 2025
Updated ADC, Full charge now results in 100% charge being reported instead of 95% charge

Co-authored-by: OnyxtheDragon <58921814+OnyxtheDragon@users.noreply.github.com>
alexl83 pushed a commit to alexl83/firmware that referenced this pull request Sep 2, 2025
Updated ADC, Full charge now results in 100% charge being reported instead of 95% charge

Co-authored-by: OnyxtheDragon <58921814+OnyxtheDragon@users.noreply.github.com>
@HarukiToreda

Copy link
Copy Markdown
Contributor

This change is inherently incorrect. The firmware currently assumes that 4.19V = 100%, which misleads users into believing that a fully charged battery should always reach 4.19V. In reality, this is only a suggested nominal value from battery manufacturers.

Batteries with built-in over-voltage protection typically cut off charging earlier:

Many boards stop charging at 4.17V.

The T1114 is even stricter, cutting off at 4.15V.

By forcing the ADC to show “100%” at 4.19V, the reported voltage no longer reflects the true battery voltage. This is misleading and can cause downstream issues, particularly in setups such as solar power systems that rely on accurate voltage readings to trigger cutoffs or protection logic.

The previous ADC calibration, while not flawless, was based on the actual physical resistor values used on the board. Because no resistors are perfect, there was always some variance, but those readings were grounded in the real-world hardware. This made them more accurate to the true voltage than the artificial adjustment to 4.19V.

Accurate voltage reporting is far more important than presenting a cosmetically “perfect” percentage. For users who depend on precise readings for system behavior, convenience adjustments like this introduce unnecessary risk.

Here's the voltage reading with my supplying 4.19V with this PR. Shows we are at 4.24V on the display

20250905_111507

Here's the OLDER firmware reading with my supplying 4.19V. Shows we are at 4.17 on the display

20250905_113512

A more accurate ADC value should be 4.924 to be as close as possible to true Voltage value of the battery.

mehow pushed a commit to mehow/meshtastic-firmware that referenced this pull request Sep 5, 2025
Updated ADC, Full charge now results in 100% charge being reported instead of 95% charge

Co-authored-by: OnyxtheDragon <58921814+OnyxtheDragon@users.noreply.github.com>
@fifieldt

fifieldt commented Sep 5, 2025

Copy link
Copy Markdown
Member

@HarukiToreda , that makes sense to me. Let's revert?

@HarukiToreda

Copy link
Copy Markdown
Contributor

@HarukiToreda , that makes sense to me. Let's revert?

yeah lets revert it. I'll push something to improve this after some more testing

fifieldt pushed a commit that referenced this pull request Sep 6, 2025
thebentern pushed a commit that referenced this pull request Sep 6, 2025
jeek pushed a commit to jeek/Meshtastic-Exploiteers-Hacker-Pager that referenced this pull request Jun 30, 2026
Updated ADC, Full charge now results in 100% charge being reported instead of 95% charge

Co-authored-by: OnyxtheDragon <58921814+OnyxtheDragon@users.noreply.github.com>
jeek pushed a commit to jeek/Meshtastic-Exploiteers-Hacker-Pager that referenced this pull request Jun 30, 2026
Updated ADC, Full charge now results in 100% charge being reported instead of 95% charge

Co-authored-by: OnyxtheDragon <58921814+OnyxtheDragon@users.noreply.github.com>
jeek pushed a commit to jeek/Meshtastic-Exploiteers-Hacker-Pager that referenced this pull request Jun 30, 2026
jeek pushed a commit to jeek/Meshtastic-Exploiteers-Hacker-Pager that referenced this pull request Jun 30, 2026
Itzdavid01 pushed a commit to Itzdavid01/firmware that referenced this pull request Sep 5, 2026
Updated ADC, Full charge now results in 100% charge being reported instead of 95% charge

Co-authored-by: OnyxtheDragon <58921814+OnyxtheDragon@users.noreply.github.com>
Itzdavid01 pushed a commit to Itzdavid01/firmware that referenced this pull request Sep 5, 2026
Updated ADC, Full charge now results in 100% charge being reported instead of 95% charge

Co-authored-by: OnyxtheDragon <58921814+OnyxtheDragon@users.noreply.github.com>
Itzdavid01 pushed a commit to Itzdavid01/firmware that referenced this pull request Sep 5, 2026
Itzdavid01 pushed a commit to Itzdavid01/firmware that referenced this pull request Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants