gokul/flex-led-wristband

A flexible, rechargeable touch wristband PCB with MCP73831 Li-ion charging, switched 3.0 V regulation, ATtiny402 control, TTP223 capacitive touch sensing, and six charlieplexed red LEDs plus power/charge indicators.

Version
0.0.3
License
unset
Stars
0

dist/index.cjs

'use strict';

var jsxRuntime = require('react/jsx-runtime');

// Dimensions are millimetres. References are recorded in FOOTPRINT_REVIEW.txt.
function ChargerFootprint() {
    return (jsxRuntime.jsxs("footprint", { insertionDirection: "from_above", children: [[
                [1, -1.4, 0.95],
                [2, -1.4, 0],
                [3, -1.4, -0.95],
                [4, 1.4, -0.95],
                [5, 1.4, 0.95],
            ].map(([pin, x, y]) => (jsxRuntime.jsx("smtpad", { portHints: [String(pin)], pcbX: x, pcbY: y, width: 1.1, height: 0.6, shape: "rect", coveredWithSolderMask: true }))), [-1.4, 1.4].map((x) => (jsxRuntime.jsx("pcbsoldermaskopening", { layer: "top", shape: "rect", pcbX: x, pcbY: 0, width: 1.3, height: 2.7 }, x))), jsxRuntime.jsx("courtyardrect", { width: 4.4, height: 3.5 })] }));
}
function RegulatorFootprint() {
    return (jsxRuntime.jsxs("footprint", { insertionDirection: "from_above", children: [[
                [1, -1.15, 0.95],
                [2, -1.15, -0.95],
                [3, 1.15, 0],
            ].map(([pin, x, y]) => (jsxRuntime.jsx("smtpad", { portHints: [String(pin)], pcbX: x, pcbY: y, width: 1.05, height: 0.65, shape: "rect", solderMaskMargin: 0.1 }))), jsxRuntime.jsx("courtyardrect", { width: 3.85, height: 3.5 })] }));
}
function TouchFootprint() {
    return (jsxRuntime.jsxs("footprint", { insertionDirection: "from_above", children: [[
                [1, -1.3, 0.95],
                [2, -1.3, 0],
                [3, -1.3, -0.95],
                [4, 1.3, -0.95],
                [5, 1.3, 0],
                [6, 1.3, 0.95],
            ].map(([pin, x, y]) => (jsxRuntime.jsx("smtpad", { portHints: [String(pin)], pcbX: x, pcbY: y, width: 1, height: 0.6, shape: "rect", coveredWithSolderMask: true }))), [-1.3, 1.3].map((x) => (jsxRuntime.jsx("pcbsoldermaskopening", { layer: "top", shape: "rect", pcbX: x, pcbY: 0, width: 1.2, height: 2.7 }, x))), jsxRuntime.jsx("courtyardrect", { width: 4.1, height: 3.6 })] }));
}
function LedFootprint() {
    return (jsxRuntime.jsxs("footprint", { insertionDirection: "from_above", children: [jsxRuntime.jsx("smtpad", { portHints: ["1", "anode"], pcbX: -0.75, pcbY: 0, width: 0.8, height: 0.8, shape: "rect", solderMaskMargin: 0.05 }), jsxRuntime.jsx("smtpad", { portHints: ["2", "cathode"], pcbX: 0.75, pcbY: 0, width: 0.8, height: 0.8, shape: "rect", solderMaskMargin: 0.05 }), jsxRuntime.jsx("courtyardrect", { width: 2.8, height: 1.3 }), jsxRuntime.jsx("silkscreentext", { text: "K", pcbX: 1.9, pcbY: 0, fontSize: 0.8 })] }));
}

// Circular one-millimetre fillets, discretised to at most six degrees per chord.
// This includes the concave shoulder corners, where a flex outline can tear.
function roundCorners(vertices, radius) {
    return vertices.flatMap((vertex, index) => {
        const previous = vertices[(index + vertices.length - 1) % vertices.length];
        const next = vertices[(index + 1) % vertices.length];
        const previousLength = Math.hypot(previous.x - vertex.x, previous.y - vertex.y);
        const nextLength = Math.hypot(next.x - vertex.x, next.y - vertex.y);
        const previousDirection = {
            x: (previous.x - vertex.x) / previousLength,
            y: (previous.y - vertex.y) / previousLength,
        };
        const nextDirection = {
            x: (next.x - vertex.x) / nextLength,
            y: (next.y - vertex.y) / nextLength,
        };
        const angle = Math.acos(previousDirection.x * nextDirection.x +
            previousDirection.y * nextDirection.y);
        const tangentDistance = Math.min(radius / Math.tan(angle / 2), previousLength / 3, nextLength / 3);
        const actualRadius = tangentDistance * Math.tan(angle / 2);
        const bisectorLength = Math.hypot(previousDirection.x + nextDirection.x, previousDirection.y + nextDirection.y);
        const centerDistance = actualRadius / Math.sin(angle / 2);
        const center = {
            x: vertex.x +
                ((previousDirection.x + nextDirection.x) * centerDistance) /
                    bisectorLength,
            y: vertex.y +
                ((previousDirection.y + nextDirection.y) * centerDistance) /
                    bisectorLength,
        };
        const startAngle = Math.atan2(vertex.y + previousDirection.y * tangentDistance - center.y, vertex.x + previousDirection.x * tangentDistance - center.x);
        const endAngle = Math.atan2(vertex.y + nextDirection.y * tangentDistance - center.y, vertex.x + nextDirection.x * tangentDistance - center.x);
        let sweep = endAngle - startAngle;
        while (sweep > Math.PI)
            sweep -= 2 * Math.PI;
        while (sweep < -Math.PI)
            sweep += 2 * Math.PI;
        const segments = Math.ceil(Math.abs(sweep) / (Math.PI / 30));
        return Array.from({ length: segments + 1 }, (_, step) => ({
            x: center.x +
                actualRadius * Math.cos(startAngle + (sweep * step) / segments),
            y: center.y +
                actualRadius * Math.sin(startAngle + (sweep * step) / segments),
        }));
    });
}
const boardOutline = roundCorners([
    { x: -45, y: -5 },
    { x: -17, y: -5 },
    { x: -15, y: -16 },
    { x: 15, y: -16 },
    { x: 17, y: -5 },
    { x: 45, y: -5 },
    { x: 45, y: 5 },
    { x: 17, y: 5 },
    { x: 15, y: 16 },
    { x: -15, y: 16 },
    { x: -17, y: 5 },
    { x: -45, y: 5 },
], 1);

const PowerSwitch = (props) => (jsxRuntime.jsx("chip", { footprint: jsxRuntime.jsxs("footprint", { children: [jsxRuntime.jsx("courtyardoutline", { outline: [
                    { x: -5, y: 2.25 },
                    { x: -5, y: -2.25 },
                    { x: -3.25, y: -2.25 },
                    { x: -3.25, y: -2.75 },
                    { x: -2.5, y: -2.75 },
                    { x: -2.5, y: -4.25 },
                    { x: 2.5, y: -4.25 },
                    { x: 2.5, y: -2.5 },
                    { x: 3.25, y: -2.5 },
                    { x: 3.25, y: -2.25 },
                    { x: 5, y: -2.25 },
                    { x: 5, y: 2.25 },
                    { x: 3.5, y: 2.25 },
                    { x: 3.5, y: 4.5 },
                    { x: -3.5, y: 4.5 },
                    { x: -3.5, y: 2.25 },
                ], layer: "top" }), jsxRuntime.jsx("hole", { pcbX: "-3.4mm", pcbY: "0mm", diameter: "0.9mm" }), jsxRuntime.jsx("hole", { pcbX: "3.4mm", pcbY: "0mm", diameter: "0.9mm" }), jsxRuntime.jsx("smtpad", { portHints: ["1"], pcbX: "-2.5mm", pcbY: "2.75mm", layer: "top", width: "1.2mm", height: "2.5mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["2"], pcbX: "0mm", pcbY: "2.75mm", layer: "top", width: "1.2mm", height: "2.5mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["3"], pcbX: "2.5mm", pcbY: "2.75mm", layer: "top", width: "1.2mm", height: "2.5mm", shape: "rect" }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: 3.2, y: 1.9 },
                    { x: 4.6, y: 1.9 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: 4.6, y: 1.9 },
                    { x: 4.6, y: -1.9 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: -4.6, y: -1.9 },
                    { x: -4.6, y: 1.9 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: -4.6, y: 1.9 },
                    { x: -3.2, y: 1.9 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: 1.8, y: 1.9 },
                    { x: 0.7, y: 1.9 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: 0.7, y: 1.9 },
                    { x: 0.7, y: 1.9 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: -0.7, y: 1.9 },
                    { x: -1.8, y: 1.9 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: -1.8, y: 1.9 },
                    { x: -1.8, y: 1.9 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: 4.6, y: -1.9 },
                    { x: 2.9, y: -1.9 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: 2.9, y: -1.9 },
                    { x: 2.9, y: -2.2 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: 2.9, y: -2.2 },
                    { x: 2.1, y: -2.2 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: 2.1, y: -2.2 },
                    { x: 2.1, y: -1.9 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: 2.1, y: -1.9 },
                    { x: 0.4, y: -1.9 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: 0.4, y: -1.9 },
                    { x: 0.4, y: -2.2 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: 0.4, y: -2.2 },
                    { x: -0.4, y: -2.2 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: -0.4, y: -2.2 },
                    { x: -0.4, y: -1.9 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: -0.4, y: -1.9 },
                    { x: -2.1, y: -1.9 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: -2.1, y: -1.9 },
                    { x: -2.1, y: -2.2 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: -2.1, y: -2.2 },
                    { x: -2.9, y: -2.2 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: -2.9, y: -2.2 },
                    { x: -2.9, y: -1.9 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: -2.9, y: -1.9 },
                    { x: -4.6, y: -1.9 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: -4.6, y: -1.9 },
                    { x: -4.6, y: -1.9 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: -2, y: -3.8 },
                    { x: -2, y: -3.3 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: -2, y: -3.3 },
                    { x: -2, y: -3.3 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: -2, y: -3.8 },
                    { x: -1.5, y: -3.8 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: -1.5, y: -3.8 },
                    { x: -1.5, y: -3.8 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: 2, y: -3.8 },
                    { x: 1.5, y: -3.8 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: 1.5, y: -3.8 },
                    { x: 1.5, y: -3.8 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: 2, y: -3.8 },
                    { x: 2, y: -3.3 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: 2, y: -3.3 },
                    { x: 2, y: -3.3 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: 2, y: -3 },
                    { x: 2, y: -2.5 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: 2, y: -2.5 },
                    { x: 2, y: -2.5 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: -2, y: -3 },
                    { x: -2, y: -2.5 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: -2, y: -2.5 },
                    { x: -2, y: -2.5 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: -1.2, y: -3.8 },
                    { x: -0.7, y: -3.8 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: -0.7, y: -3.8 },
                    { x: -0.7, y: -3.8 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: 1.2, y: -3.8 },
                    { x: 0.7, y: -3.8 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: 0.7, y: -3.8 },
                    { x: 0.7, y: -3.8 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: 0.4, y: -3.8 },
                    { x: -0.4, y: -3.8 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("silkscreenpath", { route: [
                    { x: -0.4, y: -3.8 },
                    { x: -0.4, y: -3.8 },
                ], strokeWidth: 0.12 }), jsxRuntime.jsx("fabricationnotepath", { route: [
                    { x: -4.5, y: 1.8 },
                    { x: 4.5, y: 1.8 },
                ], strokeWidth: 0.1 }), jsxRuntime.jsx("fabricationnotepath", { route: [
                    { x: 4.5, y: 1.8 },
                    { x: 4.5, y: -1.8 },
                ], strokeWidth: 0.1 }), jsxRuntime.jsx("fabricationnotepath", { route: [
                    { x: 4.5, y: -1.8 },
                    { x: -4.4, y: -1.8 },
                ], strokeWidth: 0.1 }), jsxRuntime.jsx("fabricationnotepath", { route: [
                    { x: -4.4, y: -1.8 },
                    { x: -4.5, y: -1.8 },
                ], strokeWidth: 0.1 }), jsxRuntime.jsx("fabricationnotepath", { route: [
                    { x: -4.5, y: -1.8 },
                    { x: -4.5, y: -1.8 },
                ], strokeWidth: 0.1 }), jsxRuntime.jsx("fabricationnotepath", { route: [
                    { x: -4.5, y: 1.8 },
                    { x: -4.5, y: -1.8 },
                ], strokeWidth: 0.1 }), jsxRuntime.jsx("fabricationnotepath", { route: [
                    { x: -4.5, y: -1.8 },
                    { x: -4.5, y: -1.8 },
                ], strokeWidth: 0.1 }), jsxRuntime.jsx("fabricationnotepath", { route: [
                    { x: -1.5, y: -1.8 },
                    { x: -1.5, y: -1.8 },
                ], strokeWidth: 0.1 }), jsxRuntime.jsx("fabricationnotepath", { route: [
                    { x: 0.3, y: -1.8 },
                    { x: 0.3, y: -2.1 },
                ], strokeWidth: 0.1 }), jsxRuntime.jsx("fabricationnotepath", { route: [
                    { x: 0.3, y: -2.1 },
                    { x: -0.3, y: -2.1 },
                ], strokeWidth: 0.1 }), jsxRuntime.jsx("fabricationnotepath", { route: [
                    { x: -0.3, y: -2.1 },
                    { x: -0.3, y: -1.8 },
                ], strokeWidth: 0.1 }), jsxRuntime.jsx("fabricationnotepath", { route: [
                    { x: -0.3, y: -1.8 },
                    { x: -0.3, y: -1.8 },
                ], strokeWidth: 0.1 }), jsxRuntime.jsx("fabricationnotepath", { route: [
                    { x: -2.2, y: -1.8 },
                    { x: -2.2, y: -2.1 },
                ], strokeWidth: 0.1 }), jsxRuntime.jsx("fabricationnotepath", { route: [
                    { x: -2.2, y: -2.1 },
                    { x: -2.8, y: -2.1 },
                ], strokeWidth: 0.1 }), jsxRuntime.jsx("fabricationnotepath", { route: [
                    { x: -2.8, y: -2.1 },
                    { x: -2.8, y: -1.8 },
                ], strokeWidth: 0.1 }), jsxRuntime.jsx("fabricationnotepath", { route: [
                    { x: -2.8, y: -1.8 },
                    { x: -2.8, y: -1.8 },
                ], strokeWidth: 0.1 }), jsxRuntime.jsx("fabricationnotepath", { route: [
                    { x: 2.2, y: -1.8 },
                    { x: 2.2, y: -2.1 },
                ], strokeWidth: 0.1 }), jsxRuntime.jsx("fabricationnotepath", { route: [
                    { x: 2.2, y: -2.1 },
                    { x: 2.8, y: -2.1 },
                ], strokeWidth: 0.1 }), jsxRuntime.jsx("fabricationnotepath", { route: [
                    { x: 2.8, y: -2.1 },
                    { x: 2.8, y: -1.8 },
                ], strokeWidth: 0.1 }), jsxRuntime.jsx("fabricationnotepath", { route: [
                    { x: 2.8, y: -1.8 },
                    { x: 2.8, y: -1.8 },
                ], strokeWidth: 0.1 }), jsxRuntime.jsx("fabricationnotepath", { route: [
                    { x: -0.5, y: -1.8 },
                    { x: -0.5, y: -3.8 },
                ], strokeWidth: 0.1 }), jsxRuntime.jsx("fabricationnotepath", { route: [
                    { x: -0.5, y: -3.8 },
                    { x: -2, y: -3.8 },
                ], strokeWidth: 0.1 }), jsxRuntime.jsx("fabricationnotepath", { route: [
                    { x: -2, y: -3.8 },
                    { x: -2, y: -1.8 },
                ], strokeWidth: 0.1 }), jsxRuntime.jsx("fabricationnotepath", { route: [
                    { x: -2, y: -1.8 },
                    { x: -2, y: -1.8 },
                ], strokeWidth: 0.1 })] }), ...props }));

const padFootprint = (jsxRuntime.jsxs("footprint", { insertionDirection: "from_above", children: [jsxRuntime.jsx("smtpad", { noSolderPaste: true, portHints: ["1"], pcbX: 0, pcbY: 0, width: 2.5, height: 3.1, solderMaskMargin: -0.35, shape: "rect" }), jsxRuntime.jsx("courtyardrect", { width: 2.9, height: 3.5 })] }));
function Pad(props) {
    return (jsxRuntime.jsx("chip", { doNotPlace: true, footprint: padFootprint, ...props, pinAttributes: props.pinAttributes ?? { pin1: { isPassive: true } } }));
}
function FlexLedWristband() {
    return (jsxRuntime.jsxs("board", { partsEngine: { findPart: () => ({}) }, pcbStyle: { silkscreenFontSize: 0.8 }, schSheetName: "Main", title: "Touch LED wristband", material: "flex", thickness: "0.12mm", layers: 2, width: 90, height: 32, outline: boardOutline, autorouter: { local: true, traceClearance: 0.22 }, minViaHoleDiameter: 0.3, minViaPadDiameter: 0.6, minViaEdgeToPadEdgeClearance: 0.2, minViaHoleEdgeToViaHoleEdgeClearance: 0.25, minTraceToPadEdgeClearance: 0.2, minPadEdgeToPadEdgeClearance: 0.2, minTraceToHoleEdgeClearance: 0.25, minTraceWidth: "0.2mm", minBoardEdgeClearance: "0.5mm", schLayout: { grid: true, gridCols: 3, gridGap: 2 }, children: [jsxRuntime.jsx("keepout", { shape: "rect", pcbX: 10, pcbY: 1, width: 7, height: 7, layers: ["bottom"] }), [-1, 1].flatMap((side) => [
                jsxRuntime.jsx("keepout", { shape: "rect", pcbX: side * 16, pcbY: 0, width: 2, height: 10, layers: ["bottom"] }),
                ...[25, 35, 44].map((x) => (jsxRuntime.jsx("keepout", { shape: "rect", pcbX: side * x, pcbY: 0, width: x === 44 ? 2 : 4, height: 10, layers: ["bottom"] }))),
            ]), jsxRuntime.jsx("keepout", { shape: "rect", pcbX: 2, pcbY: -5, width: 1.2, height: 3.4, layers: ["bottom"] }), jsxRuntime.jsx("keepout", { shape: "rect", pcbX: -10.4, pcbY: -5, width: 1.3, height: 2.7, layers: ["bottom"] }), jsxRuntime.jsx("keepout", { shape: "rect", pcbX: -7.6, pcbY: -5, width: 1.3, height: 2.7, layers: ["bottom"] }), jsxRuntime.jsx("keepout", { shape: "rect", pcbX: -9, pcbY: -8, width: 2.6, height: 1.1, layers: ["bottom"] }), jsxRuntime.jsx("schematicsheet", { name: "Main", sheetSize: "ANSI_B" }), jsxRuntime.jsx("schematicsection", { name: "power", displayName: "Power and 50 mA charging" }), jsxRuntime.jsx("schematicsection", { name: "control", displayName: "ATtiny402 control / regulated 3.0 V" }), jsxRuntime.jsx("schematicsection", { name: "touch", displayName: "Capacitive touch / 2\u20135.5 V" }), jsxRuntime.jsx("schematicsection", { name: "lights", displayName: "Six charlieplexed red LEDs" }), jsxRuntime.jsx("pcbstiffener", { name: "CENTER", shape: "rect", width: 30, height: 30, layer: "bottom", material: "fr4", thickness: 0.4, adhesiveThickness: 0.05 }), [-40, -30, -20, 20, 30, 40].map((pcbX, i) => (jsxRuntime.jsx("pcbstiffener", { name: `LED_SUPPORT_${i + 1}`, pcbX: pcbX, pcbY: 0, shape: "rect", width: 6, height: 8, layer: "bottom", material: "polyimide", thickness: 0.2, adhesiveThickness: 0.05 }, i))), jsxRuntime.jsx(Pad, { schSectionName: "power", pinAttributes: { pin1: { providesPower: true } }, name: "J_BAT_P", pcbX: -12, pcbY: 12, connections: { pin1: "net.BAT" } }), jsxRuntime.jsx(Pad, { schSectionName: "power", pinAttributes: { pin1: { providesGround: true } }, name: "J_BAT_N", pcbX: -9, pcbY: 12, connections: { pin1: "net.GND" } }), jsxRuntime.jsx(Pad, { schSectionName: "power", pinAttributes: { pin1: { providesPower: true, providesVoltage: 5 } }, name: "J_5V", pcbX: -12, pcbY: -12, connections: { pin1: "net.VBUS" } }), jsxRuntime.jsx(Pad, { schSectionName: "power", pinAttributes: { pin1: { providesGround: true } }, name: "J_0V", pcbX: -9, pcbY: -12, connections: { pin1: "net.GND" } }), jsxRuntime.jsx("chip", { schSectionName: "power", pinAttributes: {
                    VDD: { requiresPower: true },
                    GND: { requiresGround: true },
                    VBAT: { isPassive: true },
                    PROG: { isPassive: true },
                    STAT: {
                        isOutput: true,
                        canUseOpenDrain: true,
                        isUsingOpenDrain: true,
                    },
                }, pcbStyle: { silkscreenTextVisibility: "hidden" }, name: "U2", manufacturerPartNumber: "MCP73831T-2ACI/OT", footprint: jsxRuntime.jsx(ChargerFootprint, {}), pcbX: -9, pcbY: -5, pinLabels: {
                    pin1: "STAT",
                    pin2: "GND",
                    pin3: "VBAT",
                    pin4: "VDD",
                    pin5: "PROG",
                }, connections: {
                    STAT: "net.CHARGE",
                    GND: "net.GND",
                    VBAT: "net.BAT",
                    VDD: "net.VBUS",
                    PROG: "net.PROG",
                } }), jsxRuntime.jsx("resistor", { schSectionName: "power", name: "RPROG", manufacturerPartNumber: "RC0603FR-0720KL", resistance: "20k", footprint: "0603", pcbX: -9, pcbY: -8, connections: { pin1: "net.PROG", pin2: "net.GND" } }), jsxRuntime.jsx("capacitor", { schSectionName: "power", name: "CIN", manufacturerPartNumber: "GRM188R61A475KE15D", capacitance: "4.7uF", maxVoltageRating: 10, footprint: "0603", pcbX: -13, pcbY: -5, pcbRotation: 90, connections: { pin1: "net.VBUS", pin2: "net.GND" } }), jsxRuntime.jsx("capacitor", { schSectionName: "power", name: "CBAT", manufacturerPartNumber: "GRM188R61A475KE15D", capacitance: "4.7uF", maxVoltageRating: 10, footprint: "0603", pcbX: -5, pcbY: -5, pcbRotation: 90, connections: { pin1: "net.BAT", pin2: "net.GND" } }), jsxRuntime.jsx(PowerSwitch, { schSectionName: "power", pinAttributes: {
                    pin1: { isPassive: true },
                    pin2: { isPassive: true },
                    pin3: { isPassive: true, providesPower: true },
                }, name: "SW1", manufacturerPartNumber: "JS102011SAQN", pcbX: 0, pcbY: 11, pcbRotation: 180, connections: { pin2: "net.BAT", pin3: "net.VSW" } }), jsxRuntime.jsx("chip", { name: "U4", schSectionName: "power", manufacturerPartNumber: "MCP1700T-3002E/TT", footprint: jsxRuntime.jsx(RegulatorFootprint, {}), pcbX: -1, pcbY: -6, pinLabels: { pin1: "GND", pin2: "VOUT", pin3: "VIN" }, pinAttributes: {
                    GND: { requiresGround: true },
                    VIN: { requiresPower: true },
                    VOUT: { providesPower: true, providesVoltage: 3 },
                }, connections: { GND: "net.GND", VIN: "net.VSW", VOUT: "net.VCC" } }), jsxRuntime.jsx("capacitor", { name: "C4", schSectionName: "power", manufacturerPartNumber: "GRM188R61A475KE15D", capacitance: "4.7uF", maxVoltageRating: 10, footprint: "0603", pcbX: -4, pcbY: -9, connections: { pin1: "net.VSW", pin2: "net.GND" } }), jsxRuntime.jsx("capacitor", { pcbStyle: { silkscreenTextVisibility: "hidden" }, name: "C5", schSectionName: "power", manufacturerPartNumber: "GRM188R61A475KE15D", capacitance: "4.7uF", maxVoltageRating: 10, footprint: "0603", pcbX: -1, pcbY: -9, connections: { pin1: "net.VCC", pin2: "net.GND" } }), jsxRuntime.jsx("resistor", { schSectionName: "power", name: "RPWR", manufacturerPartNumber: "RC0603FR-0710KL", resistance: "10k", footprint: "0603", pcbX: 8, pcbY: 7, connections: { pin1: "net.VCC", pin2: "net.PWR_LED" } }), jsxRuntime.jsx("led", { schSectionName: "power", pcbStyle: { silkscreenTextVisibility: "hidden" }, name: "DPWR", color: "green", manufacturerPartNumber: "LTST-C190KGKT", footprint: jsxRuntime.jsx(LedFootprint, {}), pcbX: 12, pcbY: 7, connections: { anode: "net.PWR_LED", cathode: "net.GND" } }), jsxRuntime.jsx("resistor", { schSectionName: "power", name: "RCHG", manufacturerPartNumber: "RC0603FR-073K3L", resistance: "3.3k", footprint: "0603", pcbX: 8, pcbY: 11, connections: { pin1: "net.VBUS", pin2: "net.CHG_LED" } }), jsxRuntime.jsx("led", { schSectionName: "power", pcbStyle: { silkscreenTextVisibility: "hidden" }, name: "DCHG", color: "red", manufacturerPartNumber: "LTST-C190KRKT", footprint: jsxRuntime.jsx(LedFootprint, {}), pcbX: 12, pcbY: 11, connections: { anode: "net.CHG_LED", cathode: "net.CHARGE" } }), jsxRuntime.jsx("chip", { schSectionName: "control", pinAttributes: {
                    VDD: { requiresPower: true },
                    GND: { requiresGround: true },
                    PA6: {
                        isBidirectional: true,
                        canUseTriState: true,
                        isUsingTriState: true,
                    },
                    PA7: {
                        isBidirectional: true,
                        canUseTriState: true,
                        isUsingTriState: true,
                    },
                    PA1: {
                        isBidirectional: true,
                        canUseTriState: true,
                        isUsingTriState: true,
                    },
                    PA2: { isInput: true },
                    PA3: { isInput: true },
                    UPDI: { isBidirectional: true },
                }, pcbStyle: { silkscreenTextVisibility: "hidden" }, name: "U1", manufacturerPartNumber: "ATTINY402-SSN", footprint: "soic8_w6.95mm_pl1.55mm_pw0.6mm", pcbX: -3, pcbY: 2, pinLabels: {
                    pin1: "VDD",
                    pin2: "PA6",
                    pin3: "PA7",
                    pin4: "PA1",
                    pin5: "PA2",
                    pin6: "UPDI",
                    pin7: "PA3",
                    pin8: "GND",
                }, connections: {
                    VDD: "net.VCC",
                    GND: "net.GND",
                    PA6: "net.GPIO_A",
                    PA7: "net.GPIO_B",
                    PA1: "net.GPIO_C",
                    PA2: "net.TOUCH",
                    UPDI: "net.UPDI",
                } }), jsxRuntime.jsx("capacitor", { schSectionName: "control", name: "C1", manufacturerPartNumber: "GRM188R71C104KA01D", maxVoltageRating: 16, capacitance: "100nF", footprint: "0603", pcbX: -8, pcbY: 4, pcbRotation: 90, connections: { pin1: "net.VCC", pin2: "net.GND" } }), jsxRuntime.jsx("resistor", { schSectionName: "control", name: "RA", manufacturerPartNumber: "RC0603FR-07330RL", resistance: "330", footprint: "0603", pcbX: -13, pcbY: 4, connections: { pin1: "net.GPIO_A", pin2: "net.A" } }), jsxRuntime.jsx("resistor", { schSectionName: "control", name: "RB", manufacturerPartNumber: "RC0603FR-07330RL", resistance: "330", footprint: "0603", pcbX: -13, pcbY: 1, connections: { pin1: "net.GPIO_B", pin2: "net.B" } }), jsxRuntime.jsx("resistor", { schSectionName: "control", name: "RC", manufacturerPartNumber: "RC0603FR-07330RL", resistance: "330", footprint: "0603", pcbX: -9, pcbY: -1, connections: { pin1: "net.GPIO_C", pin2: "net.C" } }), jsxRuntime.jsx(Pad, { schSectionName: "control", name: "J_UPDI", pcbX: 0, pcbY: -12, connections: { pin1: "net.UPDI" } }), jsxRuntime.jsx(Pad, { schSectionName: "control", name: "J_VREF", pcbX: 3, pcbY: -12, connections: { pin1: "net.VCC" } }), jsxRuntime.jsx(Pad, { schSectionName: "control", name: "J_GND", pcbX: 6, pcbY: -12, connections: { pin1: "net.GND" } }), jsxRuntime.jsx("chip", { schSectionName: "touch", pinAttributes: {
                    VDD: { requiresPower: true },
                    GND: { requiresGround: true },
                    Q: { isOutput: true },
                    I: { isPassive: true },
                    AHLB: { isInput: true },
                    TOG: { isInput: true },
                }, pcbStyle: { silkscreenTextVisibility: "hidden" }, name: "U3", manufacturerPartNumber: "TTP223-BA6", footprint: jsxRuntime.jsx(TouchFootprint, {}), pcbX: 6, pcbY: -5, pinLabels: {
                    pin1: "Q",
                    pin2: "GND",
                    pin3: "I",
                    pin4: "AHLB",
                    pin5: "VDD",
                    pin6: "TOG",
                }, connections: {
                    Q: "net.TOUCH",
                    GND: "net.GND",
                    I: "net.SENSE",
                    AHLB: "net.GND",
                    VDD: "net.VCC",
                    TOG: "net.GND",
                } }), jsxRuntime.jsx("capacitor", { schSectionName: "touch", pcbStyle: { silkscreenTextVisibility: "hidden" }, name: "C3", manufacturerPartNumber: "GRM188R71C104KA01D", maxVoltageRating: 16, capacitance: "100nF", footprint: "0603", pcbX: 2, pcbY: -5, pcbRotation: 90, connections: { pin1: "net.VCC", pin2: "net.GND" } }), jsxRuntime.jsx("chip", { schSectionName: "touch", doNotPlace: true, pinAttributes: { pin1: { isPassive: true } }, name: "J_TOUCH", pcbX: 10, pcbY: 1, connections: { pin1: "net.SENSE" }, footprint: jsxRuntime.jsxs("footprint", { insertionDirection: "from_above", children: [jsxRuntime.jsx("smtpad", { noSolderPaste: true, coveredWithSolderMask: true, shape: "circle", radius: 2.5, portHints: ["1"], pcbX: 0, pcbY: 0 }), jsxRuntime.jsx("courtyardcircle", { radius: 2.75 })] }) }), [
                [-40, "A", "B"],
                [-30, "B", "A"],
                [-20, "A", "C"],
                [20, "C", "A"],
                [30, "B", "C"],
                [40, "C", "B"],
            ].map(([pcbX, anode, cathode], i) => (jsxRuntime.jsx("led", { schSectionName: "lights", name: `D${i + 1}`, manufacturerPartNumber: "LTST-C190KRKT", color: "red", footprint: jsxRuntime.jsx(LedFootprint, {}), pcbX: pcbX, pcbY: 0, connections: { anode: `net.${anode}`, cathode: `net.${cathode}` } }, i))), jsxRuntime.jsx("silkscreentext", { text: "BAT+", pcbX: -12, pcbY: 14.2, fontSize: 0.8 }), jsxRuntime.jsx("silkscreentext", { text: "BAT-", pcbX: -9, pcbY: 14.2, fontSize: 0.8 }), jsxRuntime.jsx("silkscreentext", { text: "5V", pcbX: -12, pcbY: -14.2, fontSize: 0.8 }), jsxRuntime.jsx("silkscreentext", { text: "GND", pcbX: -9, pcbY: -14.2, fontSize: 0.8 }), jsxRuntime.jsx("silkscreentext", { text: "UPDI", pcbX: 0, pcbY: -14.2, fontSize: 0.8 }), jsxRuntime.jsx("silkscreentext", { text: "VCC", pcbX: 3, pcbY: -14.2, fontSize: 0.8 }), jsxRuntime.jsx("silkscreentext", { text: "GND", pcbX: 6, pcbY: -14.2, fontSize: 0.8 }), jsxRuntime.jsx("silkscreentext", { text: "PWR", pcbX: 12, pcbY: 8.5, fontSize: 0.8 }), jsxRuntime.jsx("silkscreentext", { text: "CHG", pcbX: 12, pcbY: 12.5, fontSize: 0.8 }), jsxRuntime.jsx("silkscreentext", { text: "TOUCH", pcbX: 10, pcbY: 4.4, fontSize: 0.8 }), jsxRuntime.jsx("silkscreentext", { text: "ON", pcbX: 4, pcbY: 15, fontSize: 0.8 }), jsxRuntime.jsx("silkscreentext", { text: "OFF", pcbX: -4, pcbY: 15, fontSize: 0.8 })] }));
}

module.exports = FlexLedWristband;