Reverting changes made by PR #7520 and adjusting ADC - #7878
Merged
Conversation
Adding a counter to show the last time a GPS coordinate was detected to ensure the user is aware how long since the coordinate updated or to identify any errors. I commented out the date so that it can be moved to the Clock screen that is more fitting since it's related data.
This is a PR to show when a phone shares GPS location with the node so you can reliably know what coordinate is being shared with the Mesh.
fifieldt
approved these changes
Sep 6, 2025
thebentern
pushed a commit
that referenced
this pull request
Sep 6, 2025
* ADC value adjustment for T114
jeek
pushed a commit
to jeek/Meshtastic-Exploiteers-Hacker-Pager
that referenced
this pull request
Jun 30, 2026
…astic#7878) * ADC value adjustment for T114
jeek
pushed a commit
to jeek/Meshtastic-Exploiteers-Hacker-Pager
that referenced
this pull request
Jun 30, 2026
…astic#7878) * ADC value adjustment for T114
Itzdavid01
pushed a commit
to Itzdavid01/firmware
that referenced
this pull request
Sep 5, 2026
…astic#7878) * ADC value adjustment for T114
Itzdavid01
pushed a commit
to Itzdavid01/firmware
that referenced
this pull request
Sep 5, 2026
…astic#7878) * ADC value adjustment for T114
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reverts changes made by PR #7520 and adjusts the ADC calibration factor to 4.916.
The T114 originally used an ADC value of 4.90, based on the physical resistor divider on the board. PR #7520 raised this to 4.99 to artificially force the displayed battery voltage to read 4.19 V, which the firmware considers “100%” or fully charged. This approach ignores real-world battery behavior and introduces misleading readings.
To correct this, I decided to find a value that serves as a good medium across devices, prioritizing the display of the true voltage level over a cosmetic “fullness” percentage. I tested six different boards using an RK6006 programmable power supply set to a constant 4.14 V, ensuring the input source was not a variable.
Why This Fix Is Needed
The firmware’s assumption that 4.19 V = 100% is flawed. In reality:
Many batteries with built-in protection stop charging at 4.17 V.
Some boards, like the T1114, cut off at 4.15 V.
By forcing the ADC to align with 4.19 V, the displayed voltage is inflated and no longer reflects the true battery state. This can cause issues for users who rely on accurate voltage for cutoff logic in solar or power-managed systems.
The previous calibration (4.90) reflected actual hardware, though subject to resistor tolerances. The adjustment to 4.99 only created a cosmetic “perfect” 100% while distorting actual values.
Test Data (with ADC = 4.99 from PR #7520)
Error range: +0.02 V to +0.11 V (≈ 0.5%–2.7%)
Test Data (with ADC = 4.916)
Error range: −0.03 V to +0.04 V (≈ ±1%).
Why 4.916
Six boards tested, calibration factors ranged from 4.854–4.948.
Average = 4.916, minimizing error across devices.
Keeps readings within ±0.04 V of true.
Grounded in repeatable hardware testing.
Benefits
Restores true hardware-based accuracy.
Maintains error across devices below ±1%.
Prevents misleading over-voltage reporting.
Provides a single calibration factor validated across multiple devices.
✅ In short: This PR reverts the artificial adjustment from #7520 and replaces it with a tested calibration factor (4.916), validated on six devices with a controlled 4.14 V supply.