mohan-bee/warm5-flex-strip
A 5 V flexible PCB strip with five parallel warm-white LED branches, each current-limited by a 330 Ω resistor, plus input/output power test terminals and pass-through connections.
- Version
- 0.0.5
- License
- unset
- Stars
- 0
dist/index.cjs
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var jsxRuntime = require('react/jsx-runtime');
var react = require('react');
const RC0805FR_07330RL = (props) => {
const { name = "R1", ...restProps } = props;
return (jsxRuntime.jsx("resistor", { name: name, resistance: "330ohm", supplierPartNumbers: {
"jlcpcb": [
"C105878"
]
}, manufacturerPartNumber: "RC0805FR-07330RL", footprint: jsxRuntime.jsxs("footprint", { children: [jsxRuntime.jsx("smtpad", { portHints: ["pin2"], pcbX: "0.999998mm", pcbY: "0mm", width: "1.1325352mm", height: "1.3770102mm", shape: "rect", solderMaskMargin: 0.1 }), jsxRuntime.jsx("smtpad", { portHints: ["pin1"], pcbX: "-0.999998mm", pcbY: "0mm", width: "1.1325352mm", height: "1.3770102mm", shape: "rect", solderMaskMargin: 0.1 }), jsxRuntime.jsx("courtyardoutline", { outline: [{ "x": -1.8162655999998378, "y": 0.9385051000000431 }, { "x": 1.8162655999998378, "y": 0.9385051000000431 }, { "x": 1.8162655999998378, "y": -0.9385051000000431 }, { "x": -1.8162655999998378, "y": -0.9385051000000431 }, { "x": -1.8162655999998378, "y": 0.9385051000000431 }] })] }), cadModel: {
objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C105878.obj?uuid=c7acac53bcbc44d68fbab8f60a747688",
stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C105878.step?uuid=c7acac53bcbc44d68fbab8f60a747688",
pcbRotationOffset: 0,
modelOriginPosition: { x: 0, y: 0.000012699999842880061, z: 0 },
}, ...restProps }));
};
const pinLabels = {
pin1: ["cathode", "neg"],
pin2: ["anode", "pos"]
};
const XL_2012WWC = (props) => {
const { name = "LED1", ...restProps } = props;
return (jsxRuntime.jsx("led", { name: name, pinLabels: pinLabels, supplierPartNumbers: {
"jlcpcb": [
"C965820"
]
}, manufacturerPartNumber: "XL-2012WWC", footprint: jsxRuntime.jsxs("footprint", { children: [jsxRuntime.jsx("smtpad", { portHints: ["pin2", "anode", "pos"], pcbX: "1.100074mm", pcbY: "0mm", width: "0.999998mm", height: "1.2500102mm", shape: "rect", solderMaskMargin: 0.1 }), jsxRuntime.jsx("smtpad", { portHints: ["pin1", "cathode", "neg"], pcbX: "-1.100074mm", pcbY: "0mm", width: "0.999998mm", height: "1.2500102mm", shape: "rect", solderMaskMargin: 0.1 }), jsxRuntime.jsx("fabricationnotepath", { route: [{ "x": 1.000048799999945, "y": 0.6998715999999376 }, { "x": 1.2000484000000142, "y": 0.6998715999999376 }, { "x": 1.2000484000000142, "y": -0.7001256000000922 }, { "x": 1.000048799999945, "y": -0.7001256000000922 }, { "x": 1.000048799999945, "y": 0.6998715999999376 }], strokeWidth: "0mm", isFilled: true, hasStroke: false }), jsxRuntime.jsx("fabricationnotepath", { route: [{ "x": 0.6346952000000101, "y": -0.09431020000010903 }, { "x": 1.6346932000001289, "y": -0.09431020000010903 }, { "x": 1.6346932000001289, "y": 0.05567680000001474 }, { "x": 0.6346952000000101, "y": 0.05567680000001474 }, { "x": 0.6346952000000101, "y": -0.09431020000010903 }], strokeWidth: "0mm", isFilled: true, hasStroke: false }), jsxRuntime.jsx("fabricationnotepath", { route: [{ "x": -1.5999460000000454, "y": -1015999999935957e-19 }, { "x": -0.5999480000000403, "y": -1015999999935957e-19 }, { "x": -0.5999480000000403, "y": 0.1498853999999028 }, { "x": -1.5999460000000454, "y": 0.1498853999999028 }, { "x": -1.5999460000000454, "y": -1015999999935957e-19 }], strokeWidth: "0mm", isFilled: true, hasStroke: false }), jsxRuntime.jsx("courtyardoutline", { outline: [{ "x": -1.8500730000000658, "y": 0.875005099999953 }, { "x": 1.8500730000000658, "y": 0.875005099999953 }, { "x": 1.8500730000000658, "y": -0.8751194000000169 }, { "x": -1.8500730000000658, "y": -0.8751194000000169 }, { "x": -1.8500730000000658, "y": 0.875005099999953 }] })] }), cadModel: {
objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C965820.obj?uuid=695f4abe86624a1eb9bf94cea2804287",
stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C965820.step?uuid=695f4abe86624a1eb9bf94cea2804287",
pcbRotationOffset: 0,
modelOriginPosition: { x: -5079999993995443e-20, y: 0.00011430000006384944, z: -0.01 },
}, ...restProps }));
};
const ledXs = [-32, -14, 4, 22, 36];
const inputStiffenerOutline = [
{ x: -49.5, y: -2.5 }, { x: -42, y: -2.5 }, { x: -42, y: 2.5 },
...Array.from({ length: 9 }, (_, i) => ({
x: -49.5 + 0.5 * Math.cos(Math.PI / 2 + i * Math.PI / 16),
y: 2 + 0.5 * Math.sin(Math.PI / 2 + i * Math.PI / 16),
})),
...Array.from({ length: 9 }, (_, i) => ({
x: -49.5 + 0.5 * Math.cos(Math.PI + i * Math.PI / 16),
y: -2 + 0.5 * Math.sin(Math.PI + i * Math.PI / 16),
})),
];
function StripContents({ referenceOffset = 0, terminalBase = 1, schematicName = "main", netPrefix = "" }) {
const powerPin = `.TP${terminalBase} > .pin1`;
const groundPin = `.TP${terminalBase + 1} > .pin1`;
const outputPowerPin = `.TP${terminalBase + 2} > .pin1`;
const outputGroundPin = `.TP${terminalBase + 3} > .pin1`;
return (jsxRuntime.jsxs("schematicsheet", { name: schematicName, displayName: "WARM5 \u2014 five LED 5 V flex strip", children: [jsxRuntime.jsx("pcbstiffener", { name: "input_support", layer: "bottom", material: "polyimide", shape: "polygon", outline: inputStiffenerOutline, thickness: 0.2 }), jsxRuntime.jsx("pcbstiffener", { name: "output_support", layer: "bottom", material: "polyimide", shape: "polygon", outline: inputStiffenerOutline.map(({ x, y }) => ({ x: -x, y })).reverse(), thickness: 0.2 }), jsxRuntime.jsx("schematicsection", { name: "input", displayName: "5 V DC input" }), jsxRuntime.jsx("schematicsection", { name: "output", displayName: "5 V DC pass-through" }), jsxRuntime.jsx("schematicsection", { name: "lights", displayName: "Five warm-white LED branches" }), jsxRuntime.jsx("net", { name: `${netPrefix}V5` }), jsxRuntime.jsx("net", { name: `${netPrefix}GND` }), jsxRuntime.jsx("testpoint", { name: `TP${terminalBase}`, doNotPlace: true, footprintVariant: "pad", padShape: "rect", width: 5, height: 1.5, pcbX: -46, pcbY: 1.1, schX: -8, schY: 3, schSectionName: "input", footprint: jsxRuntime.jsx("footprint", { children: jsxRuntime.jsx("smtpad", { portHints: ["pin1"], shape: "rect", width: 5, height: 1.5, solderMaskMargin: 0.1, noSolderPaste: true }) }), connections: { pin1: `net.${netPrefix}V5` } }), jsxRuntime.jsx("testpoint", { name: `TP${terminalBase + 1}`, doNotPlace: true, footprintVariant: "pad", padShape: "rect", width: 5, height: 1.5, pcbX: -46, pcbY: -1.1, schX: -8, schY: -3, schSectionName: "input", footprint: jsxRuntime.jsx("footprint", { children: jsxRuntime.jsx("smtpad", { portHints: ["pin1"], shape: "rect", width: 5, height: 1.5, solderMaskMargin: 0.1, noSolderPaste: true }) }), connections: { pin1: `net.${netPrefix}GND` } }), jsxRuntime.jsx("testpoint", { name: `TP${terminalBase + 2}`, doNotPlace: true, footprintVariant: "pad", padShape: "rect", width: 5, height: 1.5, pcbX: 46, pcbY: 1.1, schX: 20, schY: 3, schSectionName: "output", footprint: jsxRuntime.jsx("footprint", { children: jsxRuntime.jsx("smtpad", { portHints: ["pin1"], shape: "rect", width: 5, height: 1.5, solderMaskMargin: 0.1, noSolderPaste: true }) }), connections: { pin1: `net.${netPrefix}V5` } }), jsxRuntime.jsx("testpoint", { name: `TP${terminalBase + 3}`, doNotPlace: true, footprintVariant: "pad", padShape: "rect", width: 5, height: 1.5, pcbX: 46, pcbY: -1.1, schX: 20, schY: -3, schSectionName: "output", footprint: jsxRuntime.jsx("footprint", { children: jsxRuntime.jsx("smtpad", { portHints: ["pin1"], shape: "rect", width: 5, height: 1.5, solderMaskMargin: 0.1, noSolderPaste: true }) }), connections: { pin1: `net.${netPrefix}GND` } }), ledXs.map((x, i) => {
const n = i + 1 + referenceOffset;
const r = `.R${n} > .pin2`;
const k = `.D${n} > .pin1`;
return (jsxRuntime.jsxs(react.Fragment, { children: [jsxRuntime.jsx(RC0805FR_07330RL, { name: `R${n}`, pcbX: x - 4, pcbY: 0, pcbRotation: 180, schX: i * 4, schY: 2, schRotation: 90, schSectionName: "lights" }), jsxRuntime.jsx(XL_2012WWC, { name: `D${n}`, color: "white", schDisplayValue: "2500\u20133100 K", datasheetUrl: "https://www.lcsc.com/datasheet/C965820.pdf", pcbX: x, pcbY: 0, pcbRotation: 180, schX: i * 4, schY: -1, schRotation: 270, schSectionName: "lights" }), jsxRuntime.jsx("trace", { name: `LED${n}`, from: `.R${n} > .pin1`, to: `.D${n} > .pin2`, width: 0.4, pcbPaths: [[`.R${n} > .pin1`, `.D${n} > .pin2`]] }), jsxRuntime.jsx("trace", { name: `V5_${n}`, from: i === 0 ? powerPin : `.R${n - 1} > .pin2`, to: r, width: 0.6, pcbPathRelativeTo: powerPin, pcbPaths: [i === 0
? [powerPin, { x: 2.5, y: 0 }, { x: 3.05, y: 0.55 }, { x: x + 41.000002, y: 0.55 }, r]
: [`.R${n - 1} > .pin2`, { x: ledXs[i - 1] + 41.000002, y: 0.55 }, { x: x + 41.000002, y: 0.55 }, r]] }), jsxRuntime.jsx("trace", { name: `GND_${n}`, from: i === 0 ? groundPin : `.D${n - 1} > .pin1`, to: k, width: 0.6, pcbPathRelativeTo: groundPin, pcbPaths: [i === 0
? [groundPin, { x: 2.5, y: 0 }, { x: 3.05, y: -0.55 }, { x: x + 47.100074, y: -0.55 }, k]
: [`.D${n - 1} > .pin1`, { x: ledXs[i - 1] + 47.100074, y: -0.55 }, { x: x + 47.100074, y: -0.55 }, k]] }), i < ledXs.length - 1 && jsxRuntime.jsx("silkscreentext", { text: `D${n}`, pcbX: x + 5.3, pcbY: 0, fontSize: 1.7, pcbStyle: { silkscreenTextVisibility: "visible" } }), jsxRuntime.jsx("silkscreentext", { text: "K", pcbX: x + 2.7, pcbY: 0, fontSize: 1.7, pcbStyle: { silkscreenTextVisibility: "visible" } })] }, n));
}), jsxRuntime.jsx("trace", { name: "V5_out", from: `.R${referenceOffset + 5} > .pin2`, to: outputPowerPin, width: 0.6, pcbPathRelativeTo: powerPin, pcbPaths: [[`.R${referenceOffset + 5} > .pin2`, { x: ledXs[4] + 41.000002, y: 0.55 }, { x: 88.95, y: 0.55 }, { x: 89.5, y: 0 }, outputPowerPin]] }), jsxRuntime.jsx("trace", { name: "GND_out", from: `.D${referenceOffset + 5} > .pin1`, to: outputGroundPin, width: 0.6, pcbPathRelativeTo: groundPin, pcbPaths: [[`.D${referenceOffset + 5} > .pin1`, { x: ledXs[4] + 47.100074, y: -0.55 }, { x: 88.95, y: -0.55 }, { x: 89.5, y: 0 }, outputGroundPin]] }), jsxRuntime.jsx("silkscreentext", { text: "+5V", pcbX: -40, pcbY: 1, fontSize: 1.7, pcbStyle: { silkscreenTextVisibility: "visible" } }), jsxRuntime.jsx("silkscreentext", { text: "-", pcbX: -40, pcbY: -1, fontSize: 1.7, pcbStyle: { silkscreenTextVisibility: "visible" } }), jsxRuntime.jsx("silkscreentext", { text: "+5V", pcbX: 41.1, pcbY: 1.1, fontSize: 1.7, pcbStyle: { silkscreenTextVisibility: "visible" } }), jsxRuntime.jsx("silkscreentext", { text: "-", pcbX: 41.1, pcbY: -1.1, fontSize: 1.7, pcbStyle: { silkscreenTextVisibility: "visible" } })] }));
}
function WarmLedFlexStrip() {
return (jsxRuntime.jsx("board", { width: 100, height: 5, borderRadius: 0.5, material: "flex", layers: 1, thickness: 0.07, solderMaskColor: "yellow", silkscreenColor: "black", title: "WARM5 FLEX REV D \u2014 JLCPCB parts \u2014 5 V DC \u2014 terminals at both ends", minTraceWidth: 0.4, minBoardEdgeClearance: 0.5, minTraceToPadEdgeClearance: 0.25, minPadEdgeToPadEdgeClearance: 0.25, pcbStyle: { silkscreenTextVisibility: "hidden" }, autorouter: "auto-local", routeRemaining: false, schLayout: { layoutMode: "none" }, children: jsxRuntime.jsx(StripContents, {}) }));
}
exports.StripContents = StripContents;
exports.default = WarmLedFlexStrip;