MustafaMulla29/unaligned-traces

This code defines a SOT-23-5 package-based voltage regulator module with selectable 3.3V or 5V output, including pins for input (VIN), ground (GND), and output (VOUT), along with associated schematic symbols and circuit layout.

Version
0.0.1
License
unset
Stars
0

dist/index.js

import { jsx, jsxs } from 'react/jsx-runtime';
import 'tscircuit';

const pinLabels = {
    pin1: "VIN",
    pin2: "NC",
    pin3: ["GND_3", "GND"],
    pin4: ["GND_4", "GND"],
    pin5: "VOUT",
};
/**
 * TIDA-01421 TPS7B69-Q1 SOT-23-5 symbol shared by the 3.3 V and 5 V variants.
 * Pin numbers are verified against the TPS7B69-Q1 DBV package table.
 */
const TPS7B69QDBVRQ1 = ({ manufacturerPartNumber, ...props }) => (jsx("chip", { manufacturerPartNumber: manufacturerPartNumber, datasheetUrl: "https://www.ti.com/lit/gpn/TPS7B69-Q1", footprint: "kicad:Package_TO_SOT_SMD/SOT-23-5", pinLabels: pinLabels, schWidth: 3.6, schHeight: 3, schPinArrangement: {
        leftSide: {
            direction: "top-to-bottom",
            pins: ["VIN", "NC"],
        },
        rightSide: {
            direction: "top-to-bottom",
            pins: ["VOUT", "GND_3", "GND_4"],
        },
    }, schPinStyle: {
        NC: { marginTop: 1.2 },
        GND_3: { marginTop: 0.6 },
    }, ...props }));
const TPS7B6933QDBVRQ1 = (props) => jsx(TPS7B69QDBVRQ1, { manufacturerPartNumber: "TPS7B6933QDBVRQ1", ...props });
const TPS7B6950QDBVRQ1 = (props) => jsx(TPS7B69QDBVRQ1, { manufacturerPartNumber: "TPS7B6950QDBVRQ1", ...props });

/**
 * TIDA-01421 Altium binary SchDoc coordinates are stored on a 10 mil grid.
 *
 * Every schematic coordinate in this extraction uses one transform:
 *   schX = (altiumX - originX) * 0.028
 *   schY = (altiumY - originY) * 0.028
 *
 * The positive Y direction is unchanged. Altium stores this schematic on a
 * 10-mil grid. The 0.028 scale preserves every relative Altium component
 * center while matching the source sheet's visual density with native
 * tscircuit symbols.
 * Native symbols are not all the same size as their Altium counterparts, so
 * the previous 0.029 scale made the extracted blocks unnecessarily sparse.
 */
const TIDA01421_ALTIUM_SCALE = 0.028;
const roundCoordinate = (value) => Number(value.toFixed(6));
const tida01421Delta = (value) => roundCoordinate(value * TIDA01421_ALTIUM_SCALE);
const tida01421Position = (x, y, origin) => ({
    schX: tida01421Delta(x - origin.x),
    schY: tida01421Delta(y - origin.y),
});

const TIDA01421_POWER_ORIGIN = {
    x: 795,
    y: 360,
};
const p = (x, y) => tida01421Position(x, y, TIDA01421_POWER_ORIGIN);
/**
 * Only the TIDA-01421 local 3.3 V and 5 V regulators required by the analog
 * chain. J3, D1, the ADCBAT monitor, D2, and LaunchPad circuitry are excluded.
 */
const PinchDetectionPower_TPS7B69 = (props) => (jsxs("subcircuit", { exposedNets: ["PWR", "V3_3", "V5", "GND"], schAutoLayoutEnabled: false, schMaxTraceDistance: "20mm", routingDisabled: true, ...props, children: [jsx("net", { name: "GND", isGroundNet: true }), jsx("net", { name: "PWR", isPowerNet: true }), jsx("net", { name: "V3_3", isPowerNet: true }), jsx("net", { name: "V5", isPowerNet: true }), jsx(TPS7B6933QDBVRQ1, { name: "U4", noConnect: ["NC"], ...p(790, 440) }), jsx(TPS7B6950QDBVRQ1, { name: "U5", noConnect: ["NC"], ...p(790, 280) }), jsx("capacitor", { name: "C11", capacitance: "4.7uF", footprint: "0805", schOrientation: "vertical", ...p(690, 440) }), jsx("capacitor", { name: "C12", capacitance: "2.2uF", footprint: "0805", schOrientation: "vertical", ...p(900, 440) }), jsx("capacitor", { name: "C13", capacitance: "4.7uF", footprint: "0805", schOrientation: "vertical", ...p(690, 280) }), jsx("capacitor", { name: "C14", capacitance: "2.2uF", footprint: "0805", schOrientation: "vertical", ...p(900, 280) }), jsx("trace", { from: "C11.pin1", to: "U4.VIN" }), jsx("trace", { from: "U4.VIN", to: "U5.VIN" }), jsx("trace", { from: "U5.VIN", to: "C13.pin1" }), jsx("trace", { from: "U4.VOUT", to: "C12.pin1" }), jsx("trace", { from: "U5.VOUT", to: "C14.pin1" }), jsx("trace", { from: "U4.GND_3", to: "U4.GND_4" }), jsx("trace", { from: "U4.GND_3", to: "C12.pin2" }), jsx("trace", { from: "U5.GND_3", to: "U5.GND_4" }), jsx("trace", { from: "U5.GND_3", to: "C14.pin2" }), jsx("trace", { from: "U4.VIN", to: "net.PWR" }), jsx("trace", { from: "U4.VOUT", to: "net.V3_3" }), jsx("trace", { from: "U5.VOUT", to: "net.V5" }), jsx("trace", { from: "C11.pin2", to: "net.GND" }), jsx("trace", { from: "C12.pin2", to: "net.GND" }), jsx("trace", { from: "C13.pin2", to: "net.GND" }), jsx("trace", { from: "C14.pin2", to: "net.GND" })] }));

export { PinchDetectionPower_TPS7B69, TIDA01421_POWER_ORIGIN, PinchDetectionPower_TPS7B69 as default };