PAC1934 currents from the shunt values (R72 to R75, Project-Okapi #21)

未关闭
#13 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
arduino, cpp
领域
embedded-iot

调研方向

Read Okapi.cpp around the comments at lines 182 and 237–239 to trace the PAC1934 voltage reads and current logging row. Check how the existing ADS1115 path populates IBeta and ISolar, then compare the PAC1934 setup with the shunt table and DS20005850B. Completion includes choosing snapshot or accumulated energy and verifying the stated zero-load and 1 A readings on a board.

由索引模型根据 Issue 内容生成。

描述

The PAC1934 (U32) reads its four VBUS voltages today, but not its currents: Okapi.cpp says they wait on the shunt values (line 182, and the comment at lines 237–239). The values are now on the KiCad board (NorthernWidget/Project-Okapi#21, closed as the hardware half of this issue):

Channel Rail Shunt Full scale LSB
1 V_PRIME (alkaline backup) R73, 20 mΩ 5 A 76 µA
2 V_LI (the LiPo cell) R72, 20 mΩ ±5 A 153 µA (bipolar)
3 V_BETA (the LiPo rail) R75, 20 mΩ 5 A 76 µA
4 V_SOLAR_IN R74, 50 mΩ 2 A 31 µA

The current is VSENSE / R, with VSENSE at 100 mV full scale over 16 bits (DS20005850B). Channel 2 sits across the cell's protection FET with SENSE+ on the board side, so it reads charging as positive when set bipolar.

To do:

  1. Read VSENSE per channel and convert with the table above; replace the two comments.
  2. Decide which currents the row carries. It logs IBeta and ISolar today, from the ADS1115 path that the 2024 board does not have.
  3. Snapshot or accumulated energy: the chip can do either, and the choice is open (NW-Status DECISIONS, B7).

Accept on a board, from Project-Okapi/docs/v0.7-pre-build-checks.md step 5: with no load, each channel within the chip's ±0.02 mV offset (±1 mA on 20 mΩ, ±0.4 mA on 50 mΩ); with a known 1 A through a channel, 20 mV on a 20 mΩ shunt and 50 mV on the 50 mΩ one.

🤖 Generated with Claude Code

https://claude.ai/code/session_017F2gr2axqf8HWh46zhsQyY

主要语言
C++
星标
1
派生
0
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NorthernWidget/Okapi_Library 的其他 Issue

查看 NorthernWidget/Okapi_Library 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。