-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add: Ina219 current/voltage sensor over I2C #381
Conversation
Suke0811
commented
Sep 20, 2024
•
edited
Loading
edited
- Hardware to be tested, at least it seems to be alive so far
Q: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good, few fixes inline.
Let's get it tested before merging?
Co-authored-by: Richard Lin <[email protected]>
Co-authored-by: Richard Lin <[email protected]>
I used https://github.com/RobTillaart/INA219 instead of the adafruit library since they assume a predefined shunt resistor and no mechanisms to change it without modifying the library. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hooray!
Actually, would it make sense to specify the default shunt resistance t 0.1ohm for compatibility with the Adafruit board? edit - I guess 2mOhm is what is in the TI reference datasheet, though 0.1ohm might be a good default for things that don't process serious power. idk 🤷♀️, either's fine I guess, feel free to merge as-is. |
Adafruit lib has hardcoded calibration with a set shunt resistor, so maybe it's not good for general purposes. In the inline comment, they say implement your own lol
|
Fair enough! 2mOhm it is, and the datasheet is probably a more authoritative source anyways. |