diff --git a/src/fn/index.ts b/src/fn/index.ts index c3ee18a1..8ca07c07 100644 --- a/src/fn/index.ts +++ b/src/fn/index.ts @@ -80,3 +80,4 @@ export { sot343 } from "./sot343" export { m2host } from "./m2host" export { mountedpcbmodule } from "./mountedpcbmodule" export { to92l } from "./to92l" +export { wson } from "./wson" diff --git a/src/fn/wson.ts b/src/fn/wson.ts new file mode 100644 index 00000000..0a6f05da --- /dev/null +++ b/src/fn/wson.ts @@ -0,0 +1,28 @@ +import type { AnySoupElement } from "circuit-json" +import { base_quad_def, quad, quadTransform } from "./quad" +import type { z } from "zod" + +/** + * WSON (Very Very Thin Small Outline No-lead) footprint + * Similar to SON/DFN but typically with exposed thermal pad + * Common for TI power management ICs + */ +export const wson_def = base_quad_def.extend({}).transform(quadTransform) + +export const wson = ( + parameters: z.input, +): { circuitJson: AnySoupElement[]; parameters: any } => { + parameters.legsoutside = false + // WSON typically has thermal pad + if (parameters.thermalpad === undefined) { + parameters.thermalpad = true + } + // Default pad dimensions for WSON if not specified + if (!parameters.pl) { + parameters.pl = 0.5 + } + if (!parameters.pw) { + parameters.pw = 0.25 + } + return quad(parameters) +}