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

OCV vs. SOC curve configuration improvements #77

Merged
merged 5 commits into from
Jul 29, 2024

Conversation

martinjaeger
Copy link
Member

Previously, only a pre-selected OCV vs. SOC curve for different cells could be selected, but the curve was not exposed via ThingSet. For the custom cell, every value had to be configured manually.

With the new approach, the custom cell is removed and instead the actual cell configuration can be pre-set with default values for different cell types. These actual values are now also exposed via ThingSet and can be adjusted as well.

This avoids having OCV and SOC arrays with all zeros exposed to the
user via ThingSet.

The curves can be initialized with default values for a certain cell
and afterwards be customized.
Instead, the pre-populated typical values for certain chemistries should
be adjusted to avoid having totally invalid configurations (e.g. SOC
lookup tables with 0 V)
@martinjaeger martinjaeger requested a review from pasrom July 23, 2024 07:52
Copy link
Collaborator

@pasrom pasrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this change on v0.4.1 hardware and it works as expected.

To set the OCV/SoC arrays via the USB-C shell, ensure CONFIG_SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE=256 is configured; otherwise, the warning W: RX ring buffer full will occur, and the new values won’t be applied. Should this generally be increased, or should it work via the serial console using connector J6 as described here?

What I tested (leaving this note here for anyone searching for this information):

  • thingset !Conf/xPresetLFP [45] fills the OCV/SoC values for LFP.
  • thingset =Conf {\"sOcvPoints_V\" :[3.392,3.314,3.309,3.308,3.304,3.296,3.283,3.275,3.271,3.268,3.265,3.264,3.262,3.252,3.240,3.226,3.213,3.190,3.177,3.132,2.8]} changes the last value from 2.833 to 2.8 and it works.

@martinjaeger
Copy link
Member Author

Thanks for testing.

I've only tested writing using the Android app via Bluetooth (I'm about to finally publish it in the Play store...) and afterwards checked the values on the shell. Looks like I should have tested writing on the shell as well ;)

It makes sense to increase the buffer size. Will add a commit, probably on Monday.

@martinjaeger martinjaeger requested a review from pasrom July 29, 2024 06:42
Copy link
Collaborator

@pasrom pasrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@martinjaeger martinjaeger merged commit 0b436bc into main Jul 29, 2024
2 checks passed
@martinjaeger martinjaeger deleted the soc-ocv-configuration branch July 29, 2024 10:06
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.

2 participants