Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: allow to define also NUM_CELLS when battery voltage is provided by INA #5360

Closed
fabrizio-zellini opened this issue Nov 15, 2024 · 0 comments
Labels
enhancement New feature or request requires-protos A change in device that requires changes to protobufs Stale

Comments

@fabrizio-zellini
Copy link

Platform

NRF52, ESP32, RP2040, Linux Native, Cross-Platform, other

Description

It is not uncommon to power a remote node with 12.6 volts provided by three big cells, charged by a solar panel followed by a dc/dc converter to obtain 5 volt for the node. In this situation, It would be nice to know the percentage of battery charge, but the percentage show always 100% if i cannot scale the cells. Currently the firmware has a #define NUM_CELLS but it is hard coded, it would be nice if this parameters could be set in the APP, with INA_ADDR

@fabrizio-zellini fabrizio-zellini added the enhancement New feature or request label Nov 15, 2024
@fifieldt fifieldt added the requires-protos A change in device that requires changes to protobufs label Nov 16, 2024
fifieldt added a commit to meshtastic/protobufs that referenced this issue Dec 24, 2024
Currently in firmware we hard-code NUM_CELLS (usually to 1), and our code for calculating battery charge uses this variable in ways like "voltage = v / NUM_CELLS;"

If the battery voltage is one cell around our 4V normal, that works fine. 

However, as reported in meshtastic/firmware#5360 it's not uncommon for solar installs that have multiple batteries set up in a way that looks like 1 cell at 12V to our current code. So, battery charge % is always 100%.

Allowing num_cells as a configuration option will allow those users to specify how many batteries they have and receive accurate readings.
fifieldt added a commit to meshtastic/protobufs that referenced this issue Dec 24, 2024
Currently in firmware we hard-code NUM_CELLS (usually to 1), and our code for calculating battery charge uses this variable in ways like "voltage = v / NUM_CELLS;"

If the battery voltage is one cell around our 4V normal, that works fine.

However, as reported in meshtastic/firmware#5360 it's not uncommon for solar installs that have multiple batteries set up in a way that looks like 1 cell at 12V to our current code. So, battery charge % is always 100%.

Allowing num_cells as a configuration option will allow those users to specify how many batteries they have and receive accurate readings.
@github-actions github-actions bot added the Stale label Jan 16, 2025
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request requires-protos A change in device that requires changes to protobufs Stale
Projects
None yet
Development

No branches or pull requests

2 participants