Skip to content
6 changes: 6 additions & 0 deletions lib/dipPackages.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* tscircuit - dip-packages
*/
export function getDipPackage(pins: number) {
return { name: `DIP-${pins}`, pitch: 2.54 }
}
24 changes: 24 additions & 0 deletions lib/qfnThermalPadFootprint.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* tscircuit/footprinter - QFN IC Footprints with Thermal Pads
*/
export interface QfnFootprintOptions {
pinCount: 16 | 24
pitch?: number // default 0.5mm
bodySize?: number // 4x4mm or 5x5mm
thermalPadSize?: number
}

export function generateQfnFootprintJson(options: QfnFootprintOptions) {
const pitch = options.pitch ?? 0.5
const pinCount = options.pinCount
const bodySize = options.bodySize ?? (pinCount === 16 ? 4.0 : 5.0)
const thermalPad = options.thermalPadSize ?? bodySize * 0.55

return {
type: "footprint",
package: `QFN-${pinCount}`,
body: { width: bodySize, height: bodySize },
thermalPad: { width: thermalPad, height: thermalPad, pin: "EP" },
pitch,
}
}
16 changes: 16 additions & 0 deletions lib/soicFootprintModels.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* tscircuit/footprinter - Standard SOIC IC Models
*/
export function getSoicFootprint(pinCount: 8 | 14 | 16, wide: boolean = false) {
const pitch = 1.27
const bodyWidth = wide ? 7.5 : 3.9
const padLength = 1.5
const padWidth = 0.6

return {
package: `SOIC-${pinCount}${wide ? "-WIDE" : ""}`,
pins: pinCount,
pitch,
dimensions: { bodyWidth, padLength, padWidth },
}
}
8 changes: 8 additions & 0 deletions lib/sot223_dpak.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export function generateSot223Pads() {
return [
{ pad: 1, x: -2.3, y: -3.0 },
{ pad: 2, x: 0, y: -3.0 },
{ pad: 3, x: 2.3, y: -3.0 },
{ pad: 4, x: 0, y: 3.0 },
]
}
6 changes: 6 additions & 0 deletions lib/sot23_multi_pin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export function getSot23MultiPinDimensions(pinCount: 5 | 6): {
pinPitch: number
bodyWidthMm: number
} {
return { pinPitch: 0.95, bodyWidthMm: pinCount === 5 ? 1.6 : 1.75 }
}
9 changes: 9 additions & 0 deletions lib/to_transistor_footprints.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export function getPowerTransistorFootprint(packageType: "TO220" | "TO247"): {
pinPitch: number
holeDiameter: number
} {
if (packageType === "TO220") {
return { pinPitch: 2.54, holeDiameter: 1.0 }
}
return { pinPitch: 5.45, holeDiameter: 1.6 }
}
Loading