Skip to content

Adding an PackSize for the 2200 mAh cylindrical battery: https://www.adafruit.com/product/1781 #23

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

Merged
merged 2 commits into from
Mar 7, 2023

Conversation

edanidzerda
Copy link
Contributor

I'm using the 2200 mAh battery in my project with an ESP32-S2. While it is working perfectly using a value of PackSize.MAH2000, I wanted to be able to specify the perfect PackSize. I tested this one line patch on my ESP32-S2. I couldn't tell a difference in the output, although I only tested the "cell percent" from between 90.4 and 94.9.

Thanks for everyone's work on CircuitPython! It's really been a pleasure to work with.

Adding an PackSize for the 2200 mAh Cylindrical battery: https://www.adafruit.com/product/1781
@jposada202020 jposada202020 requested a review from a team February 20, 2023 20:41
@edanidzerda
Copy link
Contributor Author

For the record, I did totally guess at the "value" of 0x2F. 2000 used 0x2D, so I left a space for 2100 if that used 0x2E... I found the datasheet https://cdn-shop.adafruit.com/product-files/1781/C2253_-_ICR18650_2200mAh_3.7V_with_PCM_20140728_APPROVED_8.18.pdf but I couldn't find anything that looked like the values in PackSize structure. 😞

@jposada202020
Copy link
Contributor

Just for reference, of the reviewer values comes from this graph.
image
And then convert to HEX

@dhalbert
Copy link
Contributor

dhalbert commented Mar 7, 2023

@jposada202020 so do you think the value chosen (0x2f == 47) is the best choice?

@jposada202020
Copy link
Contributor

@dhalbert I would prefer that we use (0x2f == 48)
image

@dhalbert
Copy link
Contributor

dhalbert commented Mar 7, 2023

@edanidzerda Based on the graph measurements above, how about 0x30 (= 48 decimal)?

@edanidzerda
Copy link
Contributor Author

I did more pixel peeping on the image that I would like to admit 😄 Based on the purple line being 3 pixels high, I agree: there is only room for one more 3 pixel line to fit "49" under the line on the chart for 50.

I pushed a commit updating to 0x30, let me know if there's anything else I can do to help.

Copy link
Contributor

@jposada202020 jposada202020 left a comment

Choose a reason for hiding this comment

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

Thank you very much @edanidzerda!. :) LGTM. At least in the future if folks find a problem they cannot say that we did not take a closer look 🔎

@jposada202020 jposada202020 merged commit 3f3b459 into adafruit:main Mar 7, 2023
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Mar 13, 2023
Updating https://github.com/adafruit/Adafruit_CircuitPython_BNO08X to 1.1.10 from 1.1.9:
  > Merge pull request adafruit/Adafruit_CircuitPython_BNO08x#39 from xenomorpheus/main
  > Add upload url to release action
  > Add .venv to .gitignore

Updating https://github.com/adafruit/Adafruit_CircuitPython_DRV2605 to 1.3.0 from 1.2.8:
  > Merge pull request adafruit/Adafruit_CircuitPython_DRV2605#34 from kriswilk/patch-1
  > Add upload url to release action
  > Add .venv to .gitignore

Updating https://github.com/adafruit/Adafruit_CircuitPython_LC709203F to 2.2.11 from 2.2.10:
  > Merge pull request adafruit/Adafruit_CircuitPython_LC709203F#23 from edanidzerda/main
  > Add upload url to release action

Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE to 9.0.2 from 9.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_BLE#183 from brentyi/main
  > Add upload url to release action
  > Add .venv to .gitignore

Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Text to 2.26.0 from 2.24.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#184 from Neradoc/fix-multiple-lines-in-bitmaplabel
  > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#186 from Neradoc/fix-bitmap-label-anchored-position

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Added the following libraries: Adafruit_CircuitPython_GFX

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Updated download stats for the libraries
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.

3 participants