Closed bug report

analyze current fails zero-amp sense traces (Kelvin, LDO input) even with explicit terminals and a Fields solve

noah · ·closed by John Lauer

What: analyze current keeps failing a loaded net on a narrow sense trace that carries no load, even after the pads are declared zero-amp terminals and a same-input Fields solve is passed with --fields.

Board: AM32 ESC molecule (noah/am32-esc-lpm32), adom-aiflow 0.2.56+noah.1, KiCad 10.0.4, adom-fields 0.10.8.

Repro: spec loads.BATN.terminals = R411.2 +8 A, MC9.1 -8 A, U401.4 0 A (INA180 Kelvin, also in spec.kelvin U401.4 -> R411.2); loads.VBAT.terminals with U101.5/U101.8 (LDO input) at 0 A. adom-aiflow analyze current --fields aiflow/run/fields/fields.json.

Got: BATN fail: the BATN pour does not carry the load: it leaves the 0.25 mm piece on F.Cu ... uncovered (487 C at 8.0 A, limit 30 C), and no one pour reaches every terminal (... misses ) and the same for the VBAT LDO input trace. The hint suggests declaring zero-amp terminals, which is already done; the miss list is empty.

Expected: a piece that only joins zero-amp terminals (and a declared Kelvin tap) is not judged at the net's load; the Fields solve with explicit terminals should decide. finish-guard stays at continue on analyze-current because of this.

1 Reply

John Lauer ·

Thanks Noah, the empty miss list in your output was the best clue.

What was wrong. Two things in the pour-coverage screen that analyze current runs before a Fields solve can judge a net:

  1. The screen picked a net's load terminals with its own heuristic (every pad, less the zero-amp ones and pads of parts it thinks cannot pass load) even when loads.<net>.terminals declared them with currents. On your nets the heuristic left fewer than two terminals, so "one pour reaches every terminal" could never pass, and the message printed an empty list (misses )).
  2. A narrow trace that only leads to pads that draw nothing, such as the INA180 Kelvin tap to R411.2 or the LDO input on VBAT, was still judged at the net's full load (487 C at 8 A), because the screen did not know it was a dead end.

What changed in adom-aiflow 0.2.58.

  • When loads.<net>.terminals lists pads with non-zero amps, those are the net's terminals. The heuristic is only for loads without them.
  • A Kelvin sense pad (a key of spec.kelvin, your U401.4) is never a load terminal.
  • A narrow dead-end stub is not judged at the net's load: copper that meets the load path (a pour, a load terminal pad, a track wide enough for the load, or a via) at one place only and otherwise reaches only pads that draw nothing (zero-amp terminals, Kelvin sense pads). The net then passes when the pour covers every other narrow piece, and the result says how many stub pieces were left out. This needs at least two load terminals, so an undeclared net is judged as before.
  • With fewer than two load terminals, the message now says so and names them, instead of an empty miss list.

How it was verified. New unit tests: a 0.25 mm sense trace off a wide load path fails while its far pad may carry load, passes once that pad is declared at 0 A or is a spec.kelvin sense pad, and a narrow trace that joins two load terminals is still judged and fails; one declared terminal gives the "fewer than two load terminals" message. The existing coverage tests (including the token-patch regression from #107) still pass. I could not rerun your AM32 board, so I have not seen your exact BATN and VBAT results.

Still open. If BATN or VBAT still fails on your board, please paste the new message: it now names the piece and the terminals it used. On the Fields side, --fields replaces this screen only when the same-input field screen passes and the report has a review.checks.ampacity row for the net, and the hint says which of those was missing.

Upgrade: tell your AI "give me the latest adom-aiflow" (or adom-wiki pkg install adom/adom-aiflow); adom-aiflow --version says 0.2.58.

John Lauer closed this ·

Log in to reply.