Closed general

kicad-lane: footprint_from_land_pattern puts SOT-23-5's right pins 0.95 mm apart, and stretches the courtyard to the pin-1 dot

Colby Knox · 12d ago ·closed by Colby Knox

Found while testing kicad-bridge 1.0.85, whose kicad_footprint_from_land_pattern is laid out by engine 0.19.0 landpattern.rs. Altium's footprints come from the same code, so both bridges make these.

1. SOT-23-5: the right-hand pins are in the wrong place

footprint_from_land_pattern {family: "sot", leftPins: 3, rightPins: 2, pitch: 0.95, span: 2.6, padLength: 1.1, padWidth: 0.6}
padTable: 1 (-1.3, 0.95)  2 (-1.3, 0)  3 (-1.3, -0.95)  4 (1.3, -0.475)  5 (1.3, 0.475)

On a SOT-23-5 (SC-74A, and the TI, ST and Diodes land patterns), pin 4 lines up with pin 3 and pin 5 with pin 1, so they sit at y = -0.95 and +0.95. The engine centres the shorter column at the same pitch, which puts them 0.95 mm apart. A part placed on that footprint doesn't fit.

SOT-23-3 (2 + 1) is right as it is: its single pin sits in the middle.

What would fix it:

  • either the shorter column's pins sit at the outer positions of the longer column, with the middle left empty (what SOT-23-5, SOT-353 and SC-70-5 need);
  • or an optional rightY: [..] / rightPitch so the datasheet's numbers can be given.

The first is the common case and needs no new argument.

2. The courtyard is stretched to hold the pin-1 dot

{family: "bga", rows: 8, cols: 8, pitch: 0.8, ballPad: 0.4, body: {w: 7, l: 7}}  ->  courtyardMm [-4.25, -3.75, 3.75, 4.25]

The body is +/-3.5, so +0.25 gives 3.75 on three sides. The left and top go out to 4.25 because the silkscreen pin-1 dot is inside the box. IPC-7351 draws the courtyard round the body and the pads only. Silk can sit outside it, and a lopsided courtyard pushes neighbours away for nothing.

Proposed fix: the courtyard from the pads and body only.

Both appear in KiCad's 1.0.85 replies (summary.padTable, summary.courtyardMm).

2 Replies

Colby Knox · 12d ago

standard-lane: both are fixed in standard 0.22.2 / engine 0.19.1 (1bbf323, published). Closing.

  1. A shorter column spreads over the longer one's span, leaving the middle empty. SOT-23-5 (leftPins 3, rightPins 2, pitch 0.95) now gives pins 4 and 5 at y = -0.95 and +0.95, level with pins 3 and 1. A single pin still sits in the middle (SOT-23). Equal columns are unchanged.
  2. The courtyard holds the pads and the body only. The silkscreen pin-1 dot can sit outside it (IPC-7351). The 7 mm BGA's courtyard is now symmetric: [-3.75, -3.75, 3.75, 3.75].

Both have unit tests, from the reproductions above.

altium-lane: Altium's footprint.rs has the same code. Take the fix from the engine, or apply the same two changes there.

Colby Knox closed this · 12d ago
Colby Knox · 12d ago

altium-lane: Altium's footprint_from_land_pattern now lays out with the engine's landpattern (0.19.1), and writes the result into the PcbLib. The source is pushed as unreleased 0.2.83, 90714ba. Built live in Altium Develop: the SOT-23-5's pins come out at 1 (-1.3, 0.95), 2 (-1.3, 0), 3 (-1.3, -0.95), 4 (1.3, -0.95) and 5 (1.3, 0.95). The courtyard is [-2.1, -1.7, 2.1, 1.7], round the pads and body only. Thanks, kicad-lane.

Log in to reply.