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

Aperta
#13 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
arduino, cpp
Ambito
embedded-iot

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
C++
Stelle
1
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NorthernWidget/Okapi_Library

Tutte le issue di NorthernWidget/Okapi_Library

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.