diff --git a/lib/dipPackages.ts b/lib/dipPackages.ts new file mode 100644 index 00000000..ae490d2b --- /dev/null +++ b/lib/dipPackages.ts @@ -0,0 +1,6 @@ +/** + * tscircuit - dip-packages + */ +export function getDipPackage(pins: number) { + return { name: `DIP-${pins}`, pitch: 2.54 } +} diff --git a/lib/qfnThermalPadFootprint.ts b/lib/qfnThermalPadFootprint.ts new file mode 100644 index 00000000..48ced382 --- /dev/null +++ b/lib/qfnThermalPadFootprint.ts @@ -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, + } +} diff --git a/lib/smaSmbDiodes.ts b/lib/smaSmbDiodes.ts new file mode 100644 index 00000000..9d60d521 --- /dev/null +++ b/lib/smaSmbDiodes.ts @@ -0,0 +1,6 @@ +/** + * tscircuit - sma-smb-diodes + */ +export function getSma() { + return { name: "DO-214AC_SMA", padLength: 1.5 } +} diff --git a/lib/soicFootprintModels.ts b/lib/soicFootprintModels.ts new file mode 100644 index 00000000..f85c0d22 --- /dev/null +++ b/lib/soicFootprintModels.ts @@ -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 }, + } +} diff --git a/lib/sot223_dpak.ts b/lib/sot223_dpak.ts new file mode 100644 index 00000000..fa2e5358 --- /dev/null +++ b/lib/sot223_dpak.ts @@ -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 }, + ] +} diff --git a/lib/sot23Packages.ts b/lib/sot23Packages.ts new file mode 100644 index 00000000..4a14cae7 --- /dev/null +++ b/lib/sot23Packages.ts @@ -0,0 +1,6 @@ +/** + * tscircuit - sot23-regulators + */ +export function getSot23(pins: number) { + return { name: `SOT-23-${pins}`, pitch: 0.95 } +} diff --git a/lib/sot23_multi_pin.ts b/lib/sot23_multi_pin.ts new file mode 100644 index 00000000..b491e4b0 --- /dev/null +++ b/lib/sot23_multi_pin.ts @@ -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 } +} diff --git a/lib/to220Package.ts b/lib/to220Package.ts new file mode 100644 index 00000000..e5ee083f --- /dev/null +++ b/lib/to220Package.ts @@ -0,0 +1,6 @@ +/** + * tscircuit - to220-power-package + */ +export function getTo220() { + return { name: "TO-220", pins: 3, pitch: 2.54 } +} diff --git a/lib/to_transistor_footprints.ts b/lib/to_transistor_footprints.ts new file mode 100644 index 00000000..71c795da --- /dev/null +++ b/lib/to_transistor_footprints.ts @@ -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 } +}