hrithik18k/smart-switch-touch

A 45×40 mm four-key capacitive touch panel using a TTP224C controller, touch electrodes, four red LEDs with 220 Ω resistors, filtering/tuning capacitors, and host/indicator wire-land connectors.

Version
1.1.0
License
unset
Stars
0

Use with the tscircuit CLI

tsci is the tscircuit CLI. Install it with npm install -g tscircuit.

tsci clone hrithik18k/smart-switch-touch  # download the package files into ./smart-switch-touch
tsci add hrithik18k/smart-switch-touch    # add it to your project as @tsci/hrithik18k.smart-switch-touch

In a cloned or new (tsci init) project: tsci dev starts a local preview, tsci build outputs Circuit JSON, and tsci push publishes to tscircuit.com.

dist/index.js

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

const A_0603WAF2200T5E = (props) => {
    const { name = "R1", ...restProps } = props;
    return (jsx("resistor", { name: name, resistance: "220ohm", supplierPartNumbers: {
            "jlcpcb": [
                "C22962"
            ]
        }, manufacturerPartNumber: "0603WAF2200T5E", footprint: jsxs("footprint", { children: [jsx("smtpad", { portHints: ["pin2"], pcbX: "0.753364mm", pcbY: "0mm", width: "0.8064754mm", height: "0.8640064mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin1"], pcbX: "-0.753364mm", pcbY: "0mm", width: "0.8064754mm", height: "0.8640064mm", shape: "rect" }), jsx("silkscreenpath", { route: [{ "x": 0.42621199999996406, "y": -0.6606031999999686 }, { "x": 1.3850873999999749, "y": -0.6606031999999686 }, { "x": 1.3850873999999749, "y": 0.6606031999999686 }, { "x": 0.42621199999996406, "y": 0.6606031999999686 }] }), jsx("silkscreenpath", { route: [{ "x": -0.42621200000007775, "y": -0.6606031999999686 }, { "x": -1.3850874000000886, "y": -0.6606031999999686 }, { "x": -1.3850874000000886, "y": 0.6606031999999686 }, { "x": -0.42621200000007775, "y": 0.6606031999999686 }] }), jsx("silkscreentext", { text: "{NAME}", pcbX: "-0.0127mm", pcbY: "1.6604mm", anchorAlignment: "center", fontSize: "1mm" }), jsx("courtyardoutline", { outline: [{ "x": -1.4066016999998965, "y": 0.6820032000000538 }, { "x": 1.4066016999997828, "y": 0.6820032000000538 }, { "x": 1.4066016999997828, "y": -0.6820032000000538 }, { "x": -1.4066016999998965, "y": -0.6820032000000538 }, { "x": -1.4066016999998965, "y": 0.6820032000000538 }] })] }), cadModel: {
            objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C22962.obj?uuid=6bd5cd867e9542ebae21caaf5d2d4c4d",
            stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C22962.step?uuid=6bd5cd867e9542ebae21caaf5d2d4c4d",
            pcbRotationOffset: 90,
            modelOriginPosition: { x: -0.004999999999999977, y: 0, z: -0.01 },
        }, ...restProps }));
};

// PCB footprint and CAD model imported from the JLCPCB part library.
const CC0603KRX7R9BB104 = (props) => (jsx("capacitor", { capacitance: "100nF", maxVoltageRating: "50V", supplierPartNumbers: {
        "jlcpcb": [
            "C14663"
        ]
    }, manufacturerPartNumber: "CC0603KRX7R9BB104", footprint: jsxs("footprint", { children: [jsx("smtpad", { portHints: ["pin2"], pcbX: "0.700024mm", pcbY: "0mm", width: "0.7999984mm", height: "0.8999982mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin1"], pcbX: "-0.700024mm", pcbY: "0mm", width: "0.7999984mm", height: "0.8999982mm", shape: "rect" }), jsx("silkscreenpath", { route: [{ "x": -0.2801873999999316, "y": -0.7095743999998376 }, { "x": -1.080160400000068, "y": -0.7095743999998376 }] }), jsx("silkscreenpath", { route: [{ "x": 0.28026359999989836, "y": -0.7100315999998656 }, { "x": 1.080236599999921, "y": -0.7100315999998656 }] }), jsx("silkscreenpath", { route: [{ "x": -0.2801873999999316, "y": 0.7101078000000598 }, { "x": -1.080160400000068, "y": 0.7101078000000598 }] }), jsx("silkscreenpath", { route: [{ "x": 0.28026359999989836, "y": 0.7096252000001186 }, { "x": 1.080236599999921, "y": 0.7096252000001186 }] }), jsx("silkscreenpath", { route: [{ "x": -1.3899134000000686, "y": -0.3997452000000976 }, { "x": -1.3899134000000686, "y": 0.40030400000000554 }] }), jsx("silkscreenpath", { route: [{ "x": 1.3900149999998348, "y": 0.39977060000001075 }, { "x": 1.3900149999998348, "y": -0.4002531999999519 }] }), jsx("silkscreenpath", { route: [{ "x": 1.080185799999981, "y": 0.7096252000001186 }, { "x": 1.299277109074751, "y": 0.6188693482574763 }, { "x": 1.3900149999998348, "y": 0.39977060000001075 }] }), jsx("silkscreenpath", { route: [{ "x": 1.3900149999998348, "y": -0.40020240000012564 }, { "x": 1.2992681283295724, "y": -0.6192847283296032 }, { "x": 1.080185799999981, "y": -0.7100315999998656 }] }), jsx("silkscreenpath", { route: [{ "x": -1.0801096000000143, "y": -0.7095743999998376 }, { "x": -1.2991755087698493, "y": -0.6188185485625581 }, { "x": -1.3899134000000686, "y": -0.3997452000000976 }] }), jsx("silkscreenpath", { route: [{ "x": -1.3899134000000686, "y": 0.40022780000003877 }, { "x": -1.2991934705021322, "y": 0.6193339880503572 }, { "x": -1.0801096000000143, "y": 0.7101078000000598 }] }), jsx("silkscreentext", { text: "{NAME}", pcbX: "-0.0127mm", pcbY: "1.7112mm", anchorAlignment: "center", fontSize: "1mm" }), jsx("courtyardoutline", { outline: [{ "x": -1.647000000000162, "y": 0.9612000000000762 }, { "x": 1.6216000000000577, "y": 0.9612000000000762 }, { "x": 1.6216000000000577, "y": -0.9611999999999625 }, { "x": -1.647000000000162, "y": -0.9611999999999625 }, { "x": -1.647000000000162, "y": 0.9612000000000762 }] })] }), cadModel: {
        objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C14663.obj?uuid=ac9b32e974bc448eab36b1293f859dcb",
        stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C14663.step?uuid=ac9b32e974bc448eab36b1293f859dcb",
        pcbRotationOffset: 0,
        modelOriginPosition: { x: 0, y: 0, z: -0.4 },
    }, ...props }));

// PCB footprint and CAD model imported from the JLCPCB part library.
const CL10C100JB8NNNC = (props) => (jsx("capacitor", { capacitance: "10pF", maxVoltageRating: "50V", supplierPartNumbers: {
        "jlcpcb": [
            "C1634"
        ]
    }, manufacturerPartNumber: "CL10C100JB8NNNC", footprint: jsxs("footprint", { children: [jsx("smtpad", { noSolderPaste: true, portHints: ["pin2"], pcbX: "0.700024mm", pcbY: "0mm", width: "0.7999984mm", height: "0.8999982mm", shape: "rect" }), jsx("smtpad", { noSolderPaste: true, portHints: ["pin1"], pcbX: "-0.700024mm", pcbY: "0mm", width: "0.7999984mm", height: "0.8999982mm", shape: "rect" }), jsx("silkscreenpath", { route: [{ "x": -0.2801873999999316, "y": -0.7095743999998376 }, { "x": -1.080160400000068, "y": -0.7095743999998376 }] }), jsx("silkscreenpath", { route: [{ "x": 0.28026359999989836, "y": -0.7100315999998656 }, { "x": 1.080236599999921, "y": -0.7100315999998656 }] }), jsx("silkscreenpath", { route: [{ "x": -0.2801873999999316, "y": 0.7101078000000598 }, { "x": -1.080160400000068, "y": 0.7101078000000598 }] }), jsx("silkscreenpath", { route: [{ "x": 0.28026359999989836, "y": 0.7096252000001186 }, { "x": 1.080236599999921, "y": 0.7096252000001186 }] }), jsx("silkscreenpath", { route: [{ "x": -1.3899134000000686, "y": -0.3997452000000976 }, { "x": -1.3899134000000686, "y": 0.40030400000000554 }] }), jsx("silkscreenpath", { route: [{ "x": 1.3900149999998348, "y": 0.39977060000001075 }, { "x": 1.3900149999998348, "y": -0.4002531999999519 }] }), jsx("silkscreenpath", { route: [{ "x": 1.080185799999981, "y": 0.7096252000001186 }, { "x": 1.299277109074751, "y": 0.6188693482574763 }, { "x": 1.3900149999998348, "y": 0.39977060000001075 }] }), jsx("silkscreenpath", { route: [{ "x": 1.3900149999998348, "y": -0.40020240000012564 }, { "x": 1.2992681283295724, "y": -0.6192847283296032 }, { "x": 1.080185799999981, "y": -0.7100315999998656 }] }), jsx("silkscreenpath", { route: [{ "x": -1.0801096000000143, "y": -0.7095743999998376 }, { "x": -1.2991755087698493, "y": -0.6188185485625581 }, { "x": -1.3899134000000686, "y": -0.3997452000000976 }] }), jsx("silkscreenpath", { route: [{ "x": -1.3899134000000686, "y": 0.40022780000003877 }, { "x": -1.2991934705021322, "y": 0.6193339880503572 }, { "x": -1.0801096000000143, "y": 0.7101078000000598 }] }), jsx("silkscreentext", { text: "{NAME}", pcbX: "-0.0127mm", pcbY: "1.7112mm", anchorAlignment: "center", fontSize: "1mm" }), jsx("courtyardoutline", { outline: [{ "x": -1.647000000000162, "y": 0.9612000000000762 }, { "x": 1.6216000000000577, "y": 0.9612000000000762 }, { "x": 1.6216000000000577, "y": -0.9611999999999625 }, { "x": -1.647000000000162, "y": -0.9611999999999625 }, { "x": -1.647000000000162, "y": 0.9612000000000762 }] })] }), cadModel: {
        objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C1634.obj?uuid=ac9b32e974bc448eab36b1293f859dcb",
        stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C1634.step?uuid=ac9b32e974bc448eab36b1293f859dcb",
        pcbRotationOffset: 0,
        modelOriginPosition: { x: 0, y: 0, z: -0.4 },
    }, ...props }));

function E6Q1206URAC1UDA(props) {
    return (jsx("led", { manufacturerPartNumber: "E6Q1206URAC1UDA", supplierPartNumbers: { jlcpcb: ["C375579"] }, pinLabels: { pin1: ["cathode", "neg"], pin2: ["anode", "pos"] }, footprint: jsxs("footprint", { children: [jsx("hole", { pcbX: 0, pcbY: 0, diameter: "2mm" }), jsx("smtpad", { shape: "rect", pcbX: -2, pcbY: 0, width: "1.5mm", height: "1.5mm", portHints: ["pin1", "cathode", "neg"] }), jsx("smtpad", { shape: "rect", pcbX: 2, pcbY: 0, width: "1.5mm", height: "1.5mm", portHints: ["pin2", "anode", "pos"] }), jsx("silkscreenpath", { route: [{ x: -2.98, y: -0.98 }, { x: -2.98, y: 0.98 }] }), jsx("silkscreentext", { text: "{NAME}", pcbX: 0, pcbY: 2.11, fontSize: "1mm", anchorAlignment: "center" }), jsx("courtyardrect", { pcbX: 0, pcbY: 0, width: "6.15mm", height: "2.1mm" })] }), cadModel: {
            objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C375579.obj?uuid=3bb8a05ba20a43a790e12029445fe6d6",
            stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C375579.step?uuid=3bb8a05ba20a43a790e12029445fe6d6",
        }, ...props }));
}

const pinLabels = {
    pin1: ["TP0"],
    pin2: ["TP1"],
    pin3: ["TP2"],
    pin4: ["TP3"],
    pin5: ["AHLB"],
    pin6: ["VDD"],
    pin7: ["TOG"],
    pin8: ["LPMB"],
    pin9: ["MOT0"],
    pin10: ["VSS"],
    pin11: ["OD"],
    pin12: ["SM"],
    pin13: ["TPQ3"],
    pin14: ["TPQ2"],
    pin15: ["TPQ1"],
    pin16: ["TPQ0"]
};
const TTP224C_BSBN = (props) => {
    return (jsx("chip", { pinLabels: pinLabels, supplierPartNumbers: {
            "jlcpcb": [
                "C2890350"
            ]
        }, manufacturerPartNumber: "TTP224C_BSBN", footprint: jsxs("footprint", { children: [jsx("smtpad", { portHints: ["pin9"], pcbX: "2.2225mm", pcbY: "2.654808mm", width: "0.3556mm", height: "1.8148046mm", radius: "0.1778mm", shape: "pill" }), jsx("smtpad", { portHints: ["pin10"], pcbX: "1.5875mm", pcbY: "2.654808mm", width: "0.3556mm", height: "1.8148046mm", radius: "0.1778mm", shape: "pill" }), jsx("smtpad", { portHints: ["pin11"], pcbX: "0.9525mm", pcbY: "2.654808mm", width: "0.3556mm", height: "1.8148046mm", radius: "0.1778mm", shape: "pill" }), jsx("smtpad", { portHints: ["pin12"], pcbX: "0.3175mm", pcbY: "2.654808mm", width: "0.3556mm", height: "1.8148046mm", radius: "0.1778mm", shape: "pill" }), jsx("smtpad", { portHints: ["pin13"], pcbX: "-0.3175mm", pcbY: "2.654808mm", width: "0.3556mm", height: "1.8148046mm", radius: "0.1778mm", shape: "pill" }), jsx("smtpad", { portHints: ["pin14"], pcbX: "-0.9525mm", pcbY: "2.654808mm", width: "0.3556mm", height: "1.8148046mm", radius: "0.1778mm", shape: "pill" }), jsx("smtpad", { portHints: ["pin15"], pcbX: "-1.5875mm", pcbY: "2.654808mm", width: "0.3556mm", height: "1.8148046mm", radius: "0.1778mm", shape: "pill" }), jsx("smtpad", { portHints: ["pin16"], pcbX: "-2.2225mm", pcbY: "2.654808mm", width: "0.3556mm", height: "1.8148046mm", radius: "0.1778mm", shape: "pill" }), jsx("smtpad", { portHints: ["pin8"], pcbX: "2.2225mm", pcbY: "-2.654808mm", width: "0.3556mm", height: "1.8148046mm", radius: "0.1778mm", shape: "pill" }), jsx("smtpad", { portHints: ["pin7"], pcbX: "1.5875mm", pcbY: "-2.654808mm", width: "0.3556mm", height: "1.8148046mm", radius: "0.1778mm", shape: "pill" }), jsx("smtpad", { portHints: ["pin6"], pcbX: "0.9525mm", pcbY: "-2.654808mm", width: "0.3556mm", height: "1.8148046mm", radius: "0.1778mm", shape: "pill" }), jsx("smtpad", { portHints: ["pin5"], pcbX: "0.3175mm", pcbY: "-2.654808mm", width: "0.3556mm", height: "1.8148046mm", radius: "0.1778mm", shape: "pill" }), jsx("smtpad", { portHints: ["pin4"], pcbX: "-0.3175mm", pcbY: "-2.654808mm", width: "0.3556mm", height: "1.8148046mm", radius: "0.1778mm", shape: "pill" }), jsx("smtpad", { portHints: ["pin3"], pcbX: "-0.9525mm", pcbY: "-2.654808mm", width: "0.3556mm", height: "1.8148046mm", radius: "0.1778mm", shape: "pill" }), jsx("smtpad", { portHints: ["pin2"], pcbX: "-1.5875mm", pcbY: "-2.654808mm", width: "0.3556mm", height: "1.8148046mm", radius: "0.1778mm", shape: "pill" }), jsx("smtpad", { portHints: ["pin1"], pcbX: "-2.2225mm", pcbY: "-2.654808mm", width: "0.3556mm", height: "1.8148046mm", radius: "0.1778mm", shape: "pill" }), jsx("silkscreenpath", { route: [{ "x": -2.5286970000000792, "y": -1.5188945999999532 }, { "x": -2.5286970000000792, "y": 1.518894600000067 }, { "x": 2.5286969999999656, "y": 1.518894600000067 }, { "x": 2.5286969999999656, "y": -1.5188945999999532 }, { "x": -2.5286970000000792, "y": -1.5188945999999532 }] }), jsx("silkscreenpath", { route: [{ "x": -2.7025600000000622, "y": -2.6548080000001164 }, { "x": -2.7076750105126166, "y": -2.6936603621365975 }, { "x": -2.722671462536482, "y": -2.729865000000018 }, { "x": -2.7465273726490977, "y": -2.7609546273509977 }, { "x": -2.7776170000000775, "y": -2.784810537463727 }, { "x": -2.813821637863498, "y": -2.799806989487479 }, { "x": -2.8526740000002064, "y": -2.804922000000033 }, { "x": -2.891526362136574, "y": -2.799806989487479 }, { "x": -2.927731000000108, "y": -2.784810537463727 }, { "x": -2.9588206273512014, "y": -2.7609546273509977 }, { "x": -2.982676537463817, "y": -2.729865000000018 }, { "x": -2.997672989487569, "y": -2.6936603621365975 }, { "x": -3.0027880000000096, "y": -2.6548080000001164 }, { "x": -2.997672989487569, "y": -2.615955637863408 }, { "x": -2.982676537463817, "y": -2.5797509999999875 }, { "x": -2.9588206273512014, "y": -2.5486613726490077 }, { "x": -2.927731000000108, "y": -2.524805462536392 }, { "x": -2.891526362136574, "y": -2.5098090105125266 }, { "x": -2.8526740000002064, "y": -2.504693999999972 }, { "x": -2.813821637863498, "y": -2.5098090105125266 }, { "x": -2.7776170000000775, "y": -2.524805462536392 }, { "x": -2.7465273726490977, "y": -2.5486613726490077 }, { "x": -2.722671462536482, "y": -2.5797509999999875 }, { "x": -2.7076750105126166, "y": -2.615955637863408 }, { "x": -2.7025600000000622, "y": -2.6548080000001164 }] }), jsx("silkscreenpath", { route: [{ "x": -1.8945860000001176, "y": -1.0967719999999872 }, { "x": -1.899701010512672, "y": -1.135624362136582 }, { "x": -1.9146974625364237, "y": -1.1718290000001161 }, { "x": -1.9385533726490394, "y": -1.2029186273509822 }, { "x": -1.9696430000001328, "y": -1.2267745374635979 }, { "x": -2.0058476378635532, "y": -1.241770989487577 }, { "x": -2.0447000000000344, "y": -1.2468860000000177 }, { "x": -2.083552362136743, "y": -1.241770989487577 }, { "x": -2.1197570000001633, "y": -1.2267745374635979 }, { "x": -2.150846627351143, "y": -1.2029186273509822 }, { "x": -2.1747025374637587, "y": -1.1718290000001161 }, { "x": -2.189698989487624, "y": -1.135624362136582 }, { "x": -2.1948140000001786, "y": -1.0967719999999872 }, { "x": -2.189698989487624, "y": -1.057919637863506 }, { "x": -2.1747025374637587, "y": -1.021714999999972 }, { "x": -2.150846627351143, "y": -0.9906253726489922 }, { "x": -2.1197570000001633, "y": -0.9667694625363765 }, { "x": -2.083552362136743, "y": -0.9517730105125111 }, { "x": -2.0447000000000344, "y": -0.9466580000000704 }, { "x": -2.0058476378635532, "y": -0.9517730105125111 }, { "x": -1.9696430000001328, "y": -0.9667694625363765 }, { "x": -1.9385533726490394, "y": -0.9906253726489922 }, { "x": -1.9146974625364237, "y": -1.021714999999972 }, { "x": -1.899701010512672, "y": -1.057919637863506 }, { "x": -1.8945860000001176, "y": -1.0967719999999872 }] }), jsx("silkscreentext", { text: "{NAME}", pcbX: "-0.2286mm", pcbY: "4.3782mm", anchorAlignment: "center", fontSize: "1mm" }), jsx("courtyardoutline", { outline: [{ "x": -3.2472000000001344, "y": 3.6282000000001062 }, { "x": 2.7899999999999636, "y": 3.6282000000001062 }, { "x": 2.7899999999999636, "y": -3.80600000000004 }, { "x": -3.2472000000001344, "y": -3.80600000000004 }, { "x": -3.2472000000001344, "y": 3.6282000000001062 }] })] }), cadModel: {
            objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C2890350.obj?uuid=7930a2c82b96440c94ac54eca19670c7",
            stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C2890350.step?uuid=7930a2c82b96440c94ac54eca19670c7",
            pcbRotationOffset: 90,
            modelOriginPosition: { x: -12700000070253736e-21, y: -12700000070253736e-21, z: 0.075575 },
        }, ...props }));
};

// The solder-mask-covered electrode side is the faceplate side.
// Bottom-side viewing flips X, so the front reads 1, 2 / 3, 4.
const keys = [
    { number: 1, x: 13.5, y: 11, input: "TP0", output: "TPQ0", trimX: -5.6, trimY: -1.2 },
    { number: 2, x: -13.5, y: 11, input: "TP1", output: "TPQ1", trimX: -5.6, trimY: -4.3 },
    { number: 3, x: 13.5, y: -11, input: "TP2", output: "TPQ2", trimX: -1.5, trimY: -7.5 },
    { number: 4, x: -13.5, y: -11, input: "TP3", output: "TPQ3", trimX: 2.0, trimY: -8.4 },
];
const harness = ["3V3", "GND", "OUT1", "OUT2", "OUT3", "OUT4"];
const indicatorHarness = ["LED1", "LED2", "LED3", "LED4", "GND"];
function WireLands({ labels, labelOffset }) {
    return (jsx("footprint", { insertionDirection: "from_above", children: labels.map((label, index) => {
            const x = (index - (labels.length - 1) / 2) * 2.54;
            return (jsxs(Fragment, { children: [jsx("platedhole", { name: label, shape: "circle", pcbX: x, pcbY: 0, holeDiameter: "1mm", outerDiameter: "1.8mm", portHints: [`pin${index + 1}`] }), jsx("silkscreentext", { text: label, pcbX: x, pcbY: labelOffset, fontSize: "0.85mm" })] }, label));
        }) }));
}
function SmartSwitchTouchPanel() {
    return (jsxs("board", { width: "45mm", height: "40mm", thickness: "1.6mm", layers: 2, minTraceWidth: "0.15mm", minViaHoleDiameter: "0.3mm", minViaPadDiameter: "0.6mm", minTraceToPadEdgeClearance: "0.15mm", minPadEdgeToPadEdgeClearance: "0.15mm", children: [jsx("schematicsection", { name: "Sense", displayName: "Keys" }), jsx("schematicsection", { name: "Control", displayName: "Touch controller" }), jsx("schematicsection", { name: "Interface", displayName: "Host interface" }), jsx("schematicsection", { name: "Indicators", displayName: "Status LEDs" }), jsx("net", { name: "VCC" }), jsx("net", { name: "GND" }), jsx(TTP224C_BSBN, { name: "U1", manufacturerPartNumber: "TTP224C-BSBN", schSectionName: "Control", schX: 0, schY: 0, schPinArrangement: {
                    leftSide: ["TP0", "TP1", "TP2", "TP3", "AHLB", "TOG", "SM", "OD"],
                    rightSide: ["TPQ0", "TPQ1", "TPQ2", "TPQ3", "VDD", "LPMB", "VSS", "MOT0"],
                }, pinAttributes: {
                    TP0: { isInput: true },
                    TP1: { isInput: true },
                    TP2: { isInput: true },
                    TP3: { isInput: true },
                    VDD: { requiresPower: true },
                    VSS: { requiresGround: true },
                    LPMB: { isInput: true },
                    AHLB: { doNotConnect: true },
                    TOG: { doNotConnect: true },
                    MOT0: { doNotConnect: true },
                    SM: { doNotConnect: true },
                    OD: { doNotConnect: true },
                    TPQ0: { isOutput: true },
                    TPQ1: { isOutput: true },
                    TPQ2: { isOutput: true },
                    TPQ3: { isOutput: true },
                }, pcbX: 0, pcbY: 0 }), jsx(CC0603KRX7R9BB104, { name: "C1", schSectionName: "Control", schX: 1, schY: -3.5, schRotation: -90, pcbX: 4.8, pcbY: -3 }), jsx("trace", { from: ".U1 > .VDD", to: "net.VCC" }), jsx("trace", { from: ".U1 > .LPMB", to: "net.VCC" }), jsx("trace", { from: ".U1 > .VSS", to: "net.GND" }), jsx("trace", { from: ".C1 > .pin1", to: "net.VCC" }), jsx("trace", { from: ".C1 > .pin2", to: "net.GND" }), keys.map(({ number, x, y, input, output, trimX, trimY }, index) => (jsxs(Fragment, { children: [jsx("net", { name: `SENSE${number}` }), jsx("net", { name: `OUT${number}` }), jsx("net", { name: `LED${number}` }), jsx("chip", { name: `E${number}`, manufacturerPartNumber: "PCB touch electrode", doNotPlace: true, pinLabels: { pin1: "ELECTRODE", pin2: "UPPER", pin3: "OUTER", pin4: "LOWER" }, pinAttributes: {
                            ELECTRODE: { isPassive: true },
                            UPPER: { isPassive: true },
                            OUTER: { isPassive: true },
                            LOWER: { isPassive: true },
                        }, internallyConnectedPins: [[1, 2, 3, 4]], schSectionName: "Sense", schX: -10, schY: 4.5 - 3 * index, pcbX: x, pcbY: y, layer: "bottom", footprint: jsxs("footprint", { children: [jsx("smtpad", { shape: "rect", pcbX: 3.7 * Math.sign(x), pcbY: 0, width: "4.6mm", height: "3.4mm", coveredWithSolderMask: true, portHints: ["pin1"] }), jsx("smtpad", { shape: "rect", pcbX: 0, pcbY: 3.7, width: "12mm", height: "4.6mm", coveredWithSolderMask: true, portHints: ["pin2"] }), jsx("smtpad", { shape: "rect", pcbX: -3.7 * Math.sign(x), pcbY: 0, width: "4.6mm", height: "3.4mm", coveredWithSolderMask: true, portHints: ["pin3"] }), jsx("smtpad", { shape: "rect", pcbX: 0, pcbY: -3.7, width: "12mm", height: "4.6mm", coveredWithSolderMask: true, portHints: ["pin4"] }), jsx("silkscreentext", { text: String(number), fontSize: "1.6mm", pcbX: 0, pcbY: -3.4 })] }) }), jsx("keepout", { shape: "rect", layers: ["top"], pcbX: x, pcbY: y + 4, width: "12.4mm", height: "4.4mm" }), jsx("keepout", { shape: "rect", layers: ["top"], pcbX: x, pcbY: y - 4, width: "12.4mm", height: "4.4mm" }), jsx(E6Q1206URAC1UDA, { name: `D${number}`, color: "red", schSectionName: "Indicators", schX: 13 + 2 * index, schY: 0, schRotation: -90, pcbX: x, pcbY: y, pcbRotation: x > 0 ? 180 : 0 }), jsx(A_0603WAF2200T5E, { name: `R${number}`, schSectionName: "Indicators", schX: 13 + 2 * index, schY: 2.4, schRotation: -90, pcbX: Math.sign(x) * 5.6, pcbY: y, pcbRotation: x > 0 ? 0 : 180 }), jsx(CL10C100JB8NNNC, { name: `C${number + 1}`, schSectionName: "Sense", schX: -6, schY: 4.5 - 3 * index, schRotation: -90, pcbX: trimX, pcbY: trimY, doNotPlace: true }), jsx("trace", { from: `.E${number} > .pin1`, to: `net.SENSE${number}` }), jsx("trace", { from: `.U1 > .${input}`, to: `net.SENSE${number}` }), jsx("trace", { from: `.C${number + 1} > .pin1`, to: `net.SENSE${number}` }), jsx("trace", { from: `.C${number + 1} > .pin2`, to: "net.GND" }), jsx("trace", { from: `.U1 > .${output}`, to: `net.OUT${number}` }), jsx("trace", { from: `.J1 > .pin${number + 2}`, to: `net.OUT${number}` }), jsx("trace", { from: `.J2 > .pin${number}`, to: `net.LED${number}` }), jsx("trace", { from: `.R${number} > .pin1`, to: `net.LED${number}` }), jsx("trace", { from: `.R${number} > .pin2`, to: `.D${number} > .anode` }), jsx("trace", { from: `.D${number} > .cathode`, to: "net.GND" })] }, number))), jsx("connector", { name: "J1", manufacturerPartNumber: "PCB wire lands", doNotPlace: true, pinLabels: { pin1: "VCC", pin2: "GND", pin3: "OUT1", pin4: "OUT2", pin5: "OUT3", pin6: "OUT4" }, pinAttributes: {
                    VCC: { providesPower: true, providesVoltage: "3.3V" },
                    GND: { providesGround: true },
                    OUT1: { isPassive: true },
                    OUT2: { isPassive: true },
                    OUT3: { isPassive: true },
                    OUT4: { isPassive: true },
                }, schSectionName: "Interface", schX: 7, schY: 1.5, schWidth: 1.46, schPinArrangement: { leftSide: [1, 2, 3, 4, 5, 6] }, pcbX: 0, pcbY: 18.35, footprint: jsx(WireLands, { labels: harness, labelOffset: -1.8 }) }), jsx("trace", { from: ".J1 > .pin1", to: "net.VCC" }), jsx("trace", { from: ".J1 > .pin2", to: "net.GND" }), jsx("connector", { name: "J2", manufacturerPartNumber: "PCB wire lands", doNotPlace: true, pinLabels: { pin1: "LED1", pin2: "LED2", pin3: "LED3", pin4: "LED4", pin5: "GND" }, pinAttributes: {
                    LED1: { isPassive: true },
                    LED2: { isPassive: true },
                    LED3: { isPassive: true },
                    LED4: { isPassive: true },
                    GND: { isPassive: true },
                }, schSectionName: "Indicators", schX: 17, schY: 4.65, symbol: jsxs("symbol", { children: [jsx("schematicrect", { schX: 0, schY: 0, width: 9.4, height: 0.8, isFilled: false }), jsx("schematictext", { text: "J2", schX: -4.35, schY: 0.7, fontSize: 0.19 }), indicatorHarness.map((label, index) => {
                            const pinX = 2 * (index - 2);
                            return (jsxs(Fragment, { children: [jsx("schematictext", { text: label, schX: pinX, schY: 0, anchor: "center", fontSize: 0.19 }), jsx("port", { name: label, pinNumber: index + 1, direction: "down", schX: pinX, schY: -0.8, schStemLength: 0.4 })] }, label));
                        })] }), pcbX: 0, pcbY: -18.35, footprint: jsx(WireLands, { labels: indicatorHarness, labelOffset: 1.8 }) }), jsx("trace", { from: ".J2 > .pin5", to: "net.GND" })] }));
}

export { SmartSwitchTouchPanel as default };