fix: make every BOM Value unambiguous for the fab, and switch D_INV_ISO1 to SOT-323 - #61
Merged
Merged
Conversation
…SO1 to SOT-323 PCBWay flagged D_INV_ISO1: "BAT54W" is SOT-323 from nearly every maker, but we had picked Yangjie's SOD-123 variant. A fab only sees Designator, Footprint, Quantity and Value in the BOM (never MF/MPN/LCSC), so a bare part name is ambiguous. Fixes the class of problem, not just this part: - Every component's Value is now "<label> | <MPN> | <manufacturer> | <package>" (label dropped when it repeats the MPN; commas/periods stripped so the CSV never needs quoting). BT1 keeps its RIGHT-ANGLE HORIZONTAL note. Applied to all 81 parts across every sheet and the PCB. - scripts/bom_values.py builds, applies, and checks these values, including that the PCB copy of Value/MF/MPN/footprint matches the schematic. New footprints must be added to its package table on purpose; hand-sourced parts with no MPN (J_STICK1) are listed explicitly. - D_INV_ISO1 -> Diodes BAT54W-7-F in SOT-323 (common part, several makers). Pin 1 anode / pin 2 not connected / pin 3 cathode, confirmed against Nexperia's numbered pinning table and Diodes' datasheet. Uses KiCad's Diode:BAT54W symbol; PCB footprint replaced and rerouted. Electrically the same BAT54 family (30V, 200mA, 2uA leakage at 25V), so the SPICE model and scripts/spice/latch_sim.py still pass. - Layout diagrams now say AO3401A for Q_PWR1 (they were stale since it was swapped from DMG2305UX) and BAT54W-7-F/SOT-323 for D_INV_ISO1. - Repo CLAUDE.md documents the Value rule and the script. ERC/DRC clean; production files regenerated. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PCBWay flagged
D_INV_ISO1: "BAT54W" is SOT-323 from nearly every maker, but we had picked Yangjie's SOD-123 variant. A fab only sees Designator, Footprint, Quantity and Value in the BOM — never MF, MPN or LCSC — so a bare part name is ambiguous. This fixes the class of problem, not just one part.<label> | <MPN> | <manufacturer> | <package>, e.g.100nF | CL05B104KO5NNNC | Samsung Electro-Mechanics | 0402. The label is dropped when it repeats the MPN, and commas/periods are stripped so the BOM CSV never needs quoting.BT1keeps its RIGHT-ANGLE HORIZONTAL note. Applied to all 81 parts across every sheet and the PCB.scripts/bom_values.pybuilds, applies and checks these values (--apply/--check), and fails if the PCB copy of a part's Value, MF, MPN or footprint differs from the schematic. New footprints must be added to its package table on purpose; hand-sourced parts with no MPN (J_STICK1) are listed explicitly rather than silently blank.D_INV_ISO1→ DiodesBAT54W-7-F, SOT-323 (the common part, made by several vendors). Pin 1 anode / pin 2 not connected / pin 3 cathode, confirmed against Nexperia's numbered pinning table and the Diodes datasheet. Same BAT54 family electrically (30V, 200mA, 2µA leakage at 25V), so the SPICE model andscripts/spice/latch_sim.pystill pass. PCB footprint replaced and rerouted.Q_PWR1(they were stale since it was swapped from DMG2305UX) and BAT54W-7-F / SOT-323 forD_INV_ISO1.CLAUDE.mddocuments the Value rule and the script. Production files regenerated.Notes
PCB/snips_controller.kicad_pro: KiCad only reordered its used-designators list (one line, no functional change).scripts/jlc_match.pysearches on Value, which now includes the MPN, so its Basic-library alternative search may behave oddly. That workflow is retired.D_INV_ISO1.Test plan
python3 scripts/bom_values.py --check— 81 parts, all Values and PCB fields in sync (and--applyis idempotent)kicad-cli sch erc— 0 errors, 1 pre-existing benign warning (D_RGB1lib_symbol_mismatch)kicad-cli sch export netlist—D_INV_ISO1pin 1 →PWR_BTN_INV_BASE, pin 3 →PWR_BTN_SENSE, pin 2 no-connectkicad-cli pcb drc— 0 violations, 0 unconnected padspython3 scripts/spice/latch_sim.py— all checks pass🤖 Generated with Claude Code