Closed general

finish: LED states treats every D reference as an LED (BAT54, TVS, clamp diodes)

noah · ·closed by John Lauer

Version: adom-aiflow 0.2.56 (local build 0.2.56+noah.1), KiCad lane, kicad-cli 10.0.6 in the container.

What I ran: finish on a 24 V LED driver with three indicator LEDs (D3, D4, D5, each with a complete entry in led-states.json beside the board) and thirteen ordinary diodes: D1 BAT54CW, D2 SMBJ28A (TVS), D6 BAT54, D7-D16 PMEG6010CEJ (freewheel clamps).

What happened: LED states: 16 LED(s) (D1, D10, D11, D12, D13, D14, D15, D16, D2, D3, D4, D5, D6, D7, D8, D9), 13 problem(s) in led-states.json and the open item LED states: D1 has no entry; D10 has no entry; ... D9 has no entry (write led-states.json beside the board ...). Every D reference is treated as an LED.

Expected: only LEDs need an entry. The footprints and values say which parts are LEDs (IN-S63BTG, IN-S63BTR, IN-S63BTA; the others are D_SOD-323F, smbj28a, SOT-23, SOT-323_SC-70 with values BAT54, SMBJ28A, PMEG6010CEJ). The page builder's own LED_RE has the same problem (a description mentioning "LED bar" made the PMEG clamps draw as LEDs in the circuit explorer).

Workaround: deviate "LED states" --why ....

1 Reply

John Lauer ·

Thanks Noah, this one was a clear and easy-to-check report.

What was wrong. The LED check decided "is this an LED" by looking for led anywhere in the footprint's full library id, nickname included. Your board's project footprint library is named after the board (an LED driver), so every D footprint on it, ...:D_SOD-323F, ...:SOT-23, ...:smbj28a, matched, and BAT54, SMBJ28A and the PMEG clamps were all treated as LEDs.

What changed in adom-aiflow 0.2.58.

  • A D* or CR* reference counts as an LED when its footprint name (the part after the colon, never the library nickname) or its Value has a word starting with "LED" (LED_0603_1608Metric, LED-RGB, a value of LED_Red). "led" in the middle of a word (SOLDERED, SEALED) does not count.
  • References LED*, and any reference you declare in led-states.json (your D3, D4 and D5 on the IN-S63BT* footprints), still count as before.
  • finish lists an LED with no complete entry as an open item. A BAT54, TVS or clamp diode needs no entry.
  • The hint, the module docs and the skill text now say this.

How it was verified. I added a unit test with your parts on a led-driver: library (BAT54CW, SMBJ28A, PMEG6010CEJ, IN-S63BTG) next to a stock LED footprint and a diode whose value is LED_Red; only the last two are found. A new workflow suite (tests/stage-return-workflow.py) runs finish on a board with a BAT54 on such a library and checks for LED states: no LEDs on the board. The full unit and workflow suites pass.

Still open. The project page builder's LED_RE (the circuit explorer drawing the PMEG clamps as LEDs because a description says "LED bar") lives in the page tooling, not in this binary. I have noted it for a separate fix.

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.