BOM-12 Value field vs the MPN's parameters¶
| Severity | Status | Implementation |
|---|---|---|
| error | runs in better_erc | mid, depends on CFG-9, IMP-6 |
Data it needs: graph, part classes, parts snapshot.
Looks at. The parts snapshot, the value and rating fields.
What it catches. An MPN whose encoded resistance, capacitance, voltage, tolerance or package disagrees with the part's value or footprint: the schematic says 13.7 kΩ, the MPN orders 13.3 kΩ.
Why it matters. The assembler buys by MPN; the reviewer reads the value. A mismatch passes every review that looks at only one of them, and the assembled board has the wrong part. Passive MPNs encode their parameters in a documented scheme (Yageo's RC0603FR-0713K7L is 0603, ±1 %, 13.7 kΩ), so the check can be mechanical.
Example. B200A's analog dividers were drawn 13.7 kΩ and assembled with 13.3 kΩ (R201, R203, ...): the 0-5 V range scales by 0.668 instead of 0.661 and the ADC clips at ~4.94 V; the change list asks "bad MPN? why wasn't it caught?". B153A's SBU pull-ups R219/R222 should be 3.3 kΩ and were fitted with 13.3 kΩ ("wrong second resistor choice"); B135B's C405, C509, C511 and C512 had MPN errors.
How to check. Decode the MPN per vendor family (Yageo RC, Panasonic ERJ, Samsung CL, Murata GRM, ...), compare value, tolerance, voltage and case size with the fields and the footprint; check every alternate MPN of a part too.
better_erc (erc_checks/src/bom/bom_12.rs) takes the facts from the parts snapshot (parts.lock.toml, project file [parts]), where the part source put the decoded and supplier values. For each fitted resistor, capacitor and inductor it checks two kinds of field.
Requirements hold for every MPN on its own:
| Field | Passes when |
|---|---|
Value |
the MPN's resistance, capacitance or inductance equals it, within the MPN's tolerance |
Tolerance, or a tolerance in the value (4k7 1%) |
the MPN's tolerance is at most it |
Display fields state the worst over all MPNs of the part, so the drawing shows what the board is sure to get. A part without the field is held to the board's default, the project's DEFAULT_* text variable the drawing sheet's Defaults box shows (the one berc place-fields hides):
| Field | Default | Must state |
|---|---|---|
Voltage, or a rating in the value (100n 50V) |
DEFAULT_C_VOLTAGE for a capacitor |
the lowest rated voltage among the MPNs |
Power, or a rating in the value |
DEFAULT_R_POWER for a resistor |
the lowest rated power among the MPNs |
Dielectric, or the value's code (100n X7R) |
DEFAULT_C_DIELECTRIC for a capacitor |
the worst dielectric among the ceramic MPNs: the one every other covers |
A voltage or power field states a rating when its text equals the rating, or rounds it. A rounding passes when two conditions hold:
- The rating, rounded half up to the precision of the text, equals the text. The precision is one unit of the last digit written: 1 mW for
63mW, 0.1 W for0.1W, 1 V for50V, 0.1 V for6V3. - The text differs from the rating by at most
drawing.fields.rating_rounding_maxpercent of the rating (default 1 %, set in the project file or with--set).
For example, 63mW states 62.5 mW (1/16 W, which datasheets label 63 mW), because the two are 0.8 % apart. 62mW does not, because 62.5 mW rounds to 63. A coarse text fails the second condition. Examples are 0.1W for 62.5 mW, 1W for 500 mW and 6V for 6.3 V. Each is a finding that names the text to write. A fraction such as 1/16W is not rounded.
One dielectric covers another when it spans at least the same temperatures with at most the same capacitance change (X7R covers X5R, any class 1 code such as C0G covers any class 2). A display miss is one finding on the field (item R911 Power) that names the value to write; Package is LIB-6's. What the circuit needs of the rating is the RATE checks' (Vworking, Vreq_min).
A requirement miss is one finding per part and MPN field (item C4 Mpn2) naming the margin. Every finding carries the hash of the inputs it rests on (the fields, the MPNs' facts), so a waiver pinned to it goes stale when any of them changes. A fact the snapshot lacks is never a pass: the part gets one info finding naming each MPN and fact not checked, or the MPN the part source does not know. An MPN the snapshot does not list is BOM-20's.
Example findings, from B153B: R911: Power states 167 mW, the lowest rating of its MPNs is 63 mW (Mpn2 RL0402FR-070R47L): write Power 63mW; C807 states Voltage 10V, the lowest rating of its two MPNs, and passes.
Fix. Correct the MPN (and its alternates); keep MPNs generated from the value, not typed. For a display field, write the value the finding names, or drop the MPN that is worse than the rest.
References. Yageo RC_L "Ordering information - global part number"; B200 rev B change list (R201, R314); B200A schematic review §0 and §7; B153 rev B change list (R219, R222); B135 rev C change list (C405, C509).
Settings¶
Set them in the project file under [checks."BOM-12"], or for one run with --set BOM-12.NAME=VALUE. A name that starts with drawing. is shared by several checks and is set under that name alone.
| Setting | Default | Meaning |
|---|---|---|
drawing.fields.rating_rounding_max |
1 % | most a rounded Voltage or Power text may differ from the lowest rating of a part's MPNs, in percent of it (BOM-12, berc fields sync) |
Test schematics¶
Each schematic below is in test_schematics/sources. The block under it is what berc check --only BOM-12 reports on it.
bom-12_mpn_vs_fields¶
error BOM-12 #dy4 C2: DEFAULT_C_VOLTAGE states 50 V, the lowest rating of its MPNs is 25 V (Mpn1 GRM155R61E104KA87D): write Voltage 25V
part C2, item C2 Voltage
DEFAULT_C_VOLTAGE = 50V (pro bom-12_mpn_vs_fields.kicad_pro)
Mpn1.rated_voltage = 25 (partdb parts.lock.toml GRM155R61E104KA87D rated_voltage (manual))
drawing.fields.rating_rounding_max = 1 (derived BOM-12 default)
fix: write the Voltage field as the finding says, or change the MPNs; the field states the worst of them
input in1:ccf0a82189ac2c1e
error BOM-12 #33y C3: Dielectric states X7R, its MPNs are Mpn1 X5R, Mpn2 X7R: write Dielectric X5R
part C3, item C3 Dielectric
Dielectric = X7R (sch bom-12_mpn_vs_fields.kicad_sch)
Mpn1.dielectric = X5R (partdb parts.lock.toml GRM155R61C105KA12D dielectric (manual))
Mpn2.dielectric = X7R (partdb parts.lock.toml GRM155R71C105KE11D dielectric (manual))
fix: write the Dielectric field as the finding says, or change the MPNs; the field states the worst of them
input in1:f232a56d03888e87
error BOM-12 #7r1 C5: Voltage states 25 V, the lowest rating of its MPNs is 50 V (Mpn1 GRM155R61H104KE14D): write Voltage 50V
part C5, item C5 Voltage
Voltage = 25V (sch bom-12_mpn_vs_fields.kicad_sch)
Mpn1.rated_voltage = 50 (partdb parts.lock.toml GRM155R61H104KE14D rated_voltage (manual))
drawing.fields.rating_rounding_max = 1 (derived BOM-12 default)
fix: write the Voltage field as the finding says, or change the MPNs; the field states the worst of them
input in1:d74cfe50bb61784e
error BOM-12 #yzm R2 Mpn1 RC0402FR-0713K3L: 13.3 kΩ where Value says 13.7 kΩ, 2.9 % apart, beyond its ±1 %
part R2, item R2 Mpn1
R2.Value = 13700 (sch bom-12_mpn_vs_fields.kicad_sch)
Mpn1.resistance = 13300 (partdb parts.lock.toml RC0402FR-0713K3L resistance (manual))
Mpn1.tolerance = 1 (partdb parts.lock.toml RC0402FR-0713K3L tolerance (manual))
fix: correct the MPN to one of the part's value and tolerance
input in1:ce9e8f3e68cf7609
error BOM-12 #e05 R3: Power states 167 mW, the lowest rating of its MPNs is 63 mW (Mpn2 RL0402FR-070R47L): write Power 63mW
part R3, item R3 Power
Power = 167mW (sch bom-12_mpn_vs_fields.kicad_sch)
Mpn1.power = 0.2 (partdb parts.lock.toml ERJ-2BWFR47X power (manual))
Mpn2.power = 0.063 (partdb parts.lock.toml RL0402FR-070R47L power (manual))
drawing.fields.rating_rounding_max = 1 (derived BOM-12 default)
fix: write the Power field as the finding says, or change the MPNs; the field states the worst of them
input in1:737fb86841f66240
error BOM-12 #0eq R4 Mpn1 RC0402JR-074K7L: ±5 %, Tolerance asks ±1 %
part R4, item R4 Mpn1
R4.Value = 4700 (sch bom-12_mpn_vs_fields.kicad_sch)
Mpn1.resistance = 4700 (partdb parts.lock.toml RC0402JR-074K7L resistance (manual))
R4.Tolerance = 1% (sch bom-12_mpn_vs_fields.kicad_sch)
Mpn1.tolerance = 5 (partdb parts.lock.toml RC0402JR-074K7L tolerance (manual))
fix: correct the MPN to one of the part's value and tolerance
input in1:5357c46058823ed1
info BOM-12 #qbe C4: not checked: Mpn1 CL05A104KA5NNNC has no rated_voltage
part C4
fix: add the facts to the part source and run `berc parts refresh`
BOM-12 also fires on the test schematics of other checks: bom-21_mpn_makers.