Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/dipPackages.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* 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
};
}
4 changes: 4 additions & 0 deletions lib/smaSmbDiodes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* tscircuit - sma-smb-diodes
*/
export function getSma() { return { name: "DO-214AC_SMA", padLength: 1.5 }; }
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 }
};
}
3 changes: 3 additions & 0 deletions lib/sot223_dpak.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
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 }];
}
4 changes: 4 additions & 0 deletions lib/sot23Packages.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* tscircuit - sot23-regulators
*/
export function getSot23(pins: number) { return { name: `SOT-23-${pins}`, pitch: 0.95 }; }
3 changes: 3 additions & 0 deletions lib/sot23_multi_pin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function getSot23MultiPinDimensions(pinCount: 5 | 6): { pinPitch: number; bodyWidthMm: number } {
return { pinPitch: 0.95, bodyWidthMm: pinCount === 5 ? 1.6 : 1.75 };
}
4 changes: 4 additions & 0 deletions lib/to220Package.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* tscircuit - to220-power-package
*/
export function getTo220() { return { name: "TO-220", pins: 3, pitch: 2.54 }; }
6 changes: 6 additions & 0 deletions lib/to_transistor_footprints.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
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