techmannih/smart-pet-feeder
This code renders a physical PCB with a 1kΩ resistor (R1) and a 1000pF capacitor (C1) connected to R1's pin1 using 0402 footprint components.
- Version
- 0.0.1
- License
- unset
- Stars
- 0
dist/index.js
import { jsx, jsxs } from 'react/jsx-runtime';
const pinLabels = {
pin1: ["EH2"],
pin2: ["EH1"],
pin3: ["EH4"],
pin4: ["EH3"],
pin5: ["B8"],
pin6: ["A5"],
pin7: ["B7"],
pin8: ["A6"],
pin9: ["A7"],
pin10: ["B6"],
pin11: ["A8"],
pin12: ["B5"],
pin13: ["A1B12"],
pin14: ["B1A12"],
pin15: ["B4A9"],
pin16: ["A4B9"],
};
const TYPE_C_31_M_12 = (props) => {
return (jsx("chip", { pinLabels: pinLabels, supplierPartNumbers: {
jlcpcb: ["C165948"],
}, manufacturerPartNumber: "TYPE_C_31_M_12", footprint: jsxs("footprint", { children: [jsx("hole", { pcbX: "-2.899918mm", pcbY: "0.9055672mm", diameter: "0.7500112mm" }), jsx("hole", { pcbX: "2.899918mm", pcbY: "0.9055672mm", diameter: "0.7500112mm" }), jsx("platedhole", { portHints: ["pin2"], pcbX: "4.325112mm", pcbY: "-2.7741308mm", holeWidth: "0.7999984mm", holeHeight: "1.3999972mm", outerWidth: "1.1999976mm", outerHeight: "1.7999964mm", shape: "pill" }), jsx("platedhole", { portHints: ["pin1"], pcbX: "4.325112mm", pcbY: "1.4056932mm", holeWidth: "0.7999984mm", holeHeight: "1.5999968mm", outerWidth: "1.1999976mm", outerHeight: "1.999996mm", shape: "pill" }), jsx("platedhole", { portHints: ["pin4"], pcbX: "-4.325112mm", pcbY: "1.4056932mm", holeWidth: "0.7999984mm", holeHeight: "1.5999968mm", outerWidth: "1.1999976mm", outerHeight: "1.999996mm", shape: "pill" }), jsx("platedhole", { portHints: ["pin3"], pcbX: "-4.325112mm", pcbY: "-2.7741308mm", holeWidth: "0.7999984mm", holeHeight: "1.3999972mm", outerWidth: "1.1999976mm", outerHeight: "1.7999964mm", shape: "pill" }), jsx("smtpad", { portHints: ["pin5"], pcbX: "-1.75006mm", pcbY: "2.1740432mm", width: "0.2999994mm", height: "1.2999974mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin6"], pcbX: "-1.249934mm", pcbY: "2.1740432mm", width: "0.2999994mm", height: "1.2999974mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin7"], pcbX: "-0.750062mm", pcbY: "2.1740432mm", width: "0.2999994mm", height: "1.2999974mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin8"], pcbX: "-0.249936mm", pcbY: "2.1740432mm", width: "0.2999994mm", height: "1.2999974mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin9"], pcbX: "0.249936mm", pcbY: "2.1740432mm", width: "0.2999994mm", height: "1.2999974mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin10"], pcbX: "0.750062mm", pcbY: "2.1740432mm", width: "0.2999994mm", height: "1.2999974mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin11"], pcbX: "1.24968mm", pcbY: "2.1740432mm", width: "0.2999994mm", height: "1.2999974mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin12"], pcbX: "1.75006mm", pcbY: "2.1740432mm", width: "0.2999994mm", height: "1.2999974mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin13"], points: [
{ x: "-2.8999688mm", y: "1.524108mm" },
{ x: "-2.8999688mm", y: "2.8241308mm" },
{ x: "-2.8999688mm", y: "2.8241308mm" },
{ x: "-3.1999682mm", y: "2.8241308mm" },
{ x: "-3.1999682mm", y: "2.8241308mm" },
{ x: "-3.1999682mm", y: "2.8239784mm" },
{ x: "-3.1999682mm", y: "2.8239784mm" },
{ x: "-3.4999422mm", y: "2.8239784mm" },
{ x: "-3.4999422mm", y: "2.8239784mm" },
{ x: "-3.4999422mm", y: "1.5239556mm" },
{ x: "-3.4999422mm", y: "1.5239556mm" },
{ x: "-3.1999428mm", y: "1.5239556mm" },
{ x: "-3.1999428mm", y: "1.5239556mm" },
{ x: "-3.1999428mm", y: "1.524108mm" },
{ x: "-3.1999428mm", y: "1.524108mm" },
{ x: "-2.8999688mm", y: "1.524108mm" },
], shape: "polygon" }), jsx("smtpad", { portHints: ["pin14"], points: [
{ x: "2.8999942mm", y: "2.8241308mm" },
{ x: "2.8999942mm", y: "1.5241588mm" },
{ x: "2.8999942mm", y: "1.5241588mm" },
{ x: "3.1999936mm", y: "1.5241588mm" },
{ x: "3.1999936mm", y: "1.5241588mm" },
{ x: "3.200019mm", y: "1.5241588mm" },
{ x: "3.200019mm", y: "1.5241588mm" },
{ x: "3.5000184mm", y: "1.5241588mm" },
{ x: "3.5000184mm", y: "1.5241588mm" },
{ x: "3.5000184mm", y: "2.8241308mm" },
{ x: "3.5000184mm", y: "2.8241308mm" },
{ x: "3.200019mm", y: "2.8241308mm" },
{ x: "3.200019mm", y: "2.8241308mm" },
{ x: "3.1999936mm", y: "2.8241308mm" },
{ x: "3.1999936mm", y: "2.8241308mm" },
{ x: "2.8999942mm", y: "2.8241308mm" },
], shape: "polygon" }), jsx("smtpad", { portHints: ["pin15"], points: [
{ x: "2.7001724mm", y: "1.5241588mm" },
{ x: "2.7001724mm", y: "2.8241308mm" },
{ x: "2.7001724mm", y: "2.8241308mm" },
{ x: "2.400173mm", y: "2.8241308mm" },
{ x: "2.400173mm", y: "2.8241308mm" },
{ x: "2.4001476mm", y: "2.8241308mm" },
{ x: "2.4001476mm", y: "2.8241308mm" },
{ x: "2.1001482mm", y: "2.8241308mm" },
{ x: "2.1001482mm", y: "2.8241308mm" },
{ x: "2.1001482mm", y: "1.5241588mm" },
{ x: "2.1001482mm", y: "1.5241588mm" },
{ x: "2.4001476mm", y: "1.5241588mm" },
{ x: "2.4001476mm", y: "1.5241588mm" },
{ x: "2.400173mm", y: "1.5241588mm" },
{ x: "2.400173mm", y: "1.5241588mm" },
{ x: "2.7001724mm", y: "1.5241588mm" },
], shape: "polygon" }), jsx("smtpad", { portHints: ["pin16"], points: [
{ x: "-2.0999704mm", y: "1.5240064mm" },
{ x: "-2.0999704mm", y: "2.8239784mm" },
{ x: "-2.0999704mm", y: "2.8239784mm" },
{ x: "-2.3999952mm", y: "2.8239784mm" },
{ x: "-2.3999952mm", y: "2.8239784mm" },
{ x: "-2.3999952mm", y: "2.823953mm" },
{ x: "-2.3999952mm", y: "2.823953mm" },
{ x: "-2.6999438mm", y: "2.823953mm" },
{ x: "-2.6999438mm", y: "2.823953mm" },
{ x: "-2.6999438mm", y: "1.523981mm" },
{ x: "-2.6999438mm", y: "1.523981mm" },
{ x: "-2.399919mm", y: "1.523981mm" },
{ x: "-2.399919mm", y: "1.523981mm" },
{ x: "-2.399919mm", y: "1.5240064mm" },
{ x: "-2.399919mm", y: "1.5240064mm" },
{ x: "-2.0999704mm", y: "1.5240064mm" },
], shape: "polygon" }), jsx("silkscreenpath", { route: [
{ x: -4.4689776000000165, y: -1.6757585999999947 },
{ x: -4.4689776000000165, y: 0.18715359999987413 },
] }), jsx("silkscreenpath", { route: [
{ x: 4.471009600000116, y: -5.394140800000059 },
{ x: -4.4689776000000165, y: -5.394140800000059 },
{ x: -4.4689776000000165, y: -3.91283820000001 },
] }), jsx("silkscreenpath", { route: [
{ x: 4.471009600000116, y: -1.676114200000029 },
{ x: 4.471009600000116, y: 0.18750920000002225 },
] }), jsx("silkscreenpath", { route: [
{ x: 4.471009600000116, y: -5.394140800000059 },
{ x: 4.471009600000116, y: -3.912482600000203 },
] }), jsx("silkscreentext", { text: "{NAME}", pcbX: "0.002794mm", pcbY: "3.8286012mm", anchorAlignment: "center", fontSize: "1mm" }), jsx("courtyardoutline", { outline: [
{ x: -5.174805999999876, y: 3.0786011999998664 },
{ x: 5.180394000000092, y: 3.0786011999998664 },
{ x: 5.180394000000092, y: -5.650998800000025 },
{ x: -5.174805999999876, y: -5.650998800000025 },
{ x: -5.174805999999876, y: 3.0786011999998664 },
] })] }), cadModel: {
objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C165948.obj?uuid=617b05f9bba7410b96c001093d8189e4",
stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C165948.step?uuid=617b05f9bba7410b96c001093d8189e4",
pcbRotationOffset: 180,
modelOriginPosition: {
x: 0,
y: -2.7500289000000517,
z: 0.000010999999999872223,
},
}, ...props }));
};
const buzzerSymbol = (jsxs("symbol", { children: [jsx("port", { name: "pin1", schX: -0.9, schY: 0.35, direction: "left" }), jsx("port", { name: "pin2", schX: -0.9, schY: -0.35, direction: "left" }), jsx("schematicline", { x1: -0.9, y1: 0.35, x2: -0.45, y2: 0.35, strokeWidth: 0.05 }), jsx("schematicline", { x1: -0.9, y1: -0.35, x2: -0.45, y2: -0.35, strokeWidth: 0.05 }), jsx("schematicline", { x1: -0.45, y1: -0.52, x2: -0.45, y2: 0.52, strokeWidth: 0.05 }), jsx("schematicarc", { center: { x: -0.45, y: 0 }, radius: 0.5, startAngleDegrees: 90, endAngleDegrees: 270, strokeWidth: 0.05 })] }));
var index = () => (jsxs("board", { width: 85, height: 50, borderRadius: 3.2, children: [jsx("platedhole", { name: "H1", pcbX: -38.5, pcbY: -20.5, holeDiameter: 3.2, outerDiameter: 6.6, shape: "circle" }), jsx(TYPE_C_31_M_12, { name: "J3", pcbX: -36.5, pcbY: -10.5, pcbRotation: 270, schX: "3", schY: "-1" }), jsx("platedhole", { name: "H2", pcbX: 38.5, pcbY: -20.5, holeDiameter: 3.2, outerDiameter: 6.6, shape: "circle" }), jsx("platedhole", { name: "H3", pcbX: -38.5, pcbY: 20.5, holeDiameter: 3.2, outerDiameter: 6.6, shape: "circle" }), jsx("platedhole", { name: "H4", pcbX: 38.5, pcbY: 20.5, holeDiameter: 3.2, outerDiameter: 6.6, shape: "circle" }), jsx("resistor", { name: "R1", resistance: "1k", footprint: "0603", pcbX: 12, pcbY: 8, schX: "-13", schY: "0", schRotation: "270deg", schSectionName: "user buttons" }), jsx("capacitor", { name: "C1", capacitance: "100nF", footprint: "0603", pcbX: 15, pcbY: 8, schX: "-13", schY: "-2", schRotation: "270deg", schSectionName: "user buttons" }), jsx("pushbutton", { name: "SW1", pcbX: 16, pcbY: 15, pcbRotation: 90, displayName: "", schX: "-12", schY: "-1", schSectionName: "user buttons", footprint: "kicad:Button_Switch_SMD/SW_SPST_TL3342" }), jsx("capacitor", { name: "C2", capacitance: "100nF", footprint: "0603", pcbX: 15, pcbY: -21, schX: "-13", schY: "-7", schRotation: "270deg", schSectionName: "user buttons" }), jsx("capacitor", { name: "C3", capacitance: "100nF", footprint: "0603", pcbX: 15, pcbY: -8, schX: "-13", schY: "-12", schRotation: "270deg", schSectionName: "user buttons" }), jsx("resistor", { name: "R2", resistance: "1k", footprint: "0603", pcbX: 12, pcbY: -21, pcbRotation: 0, schX: "-13", schY: "-5", schRotation: "270deg", schSectionName: "user buttons" }), jsx("resistor", { name: "R3", resistance: "1k", footprint: "0603", pcbX: 12, pcbY: -8, schX: "-13", schY: "-10", schRotation: "270deg", schSectionName: "user buttons" }), jsx("pushbutton", { name: "SW2", pcbX: 16, pcbY: -15.4, pcbRotation: 90, displayName: "", footprint: "kicad:Button_Switch_SMD/SW_SPST_TL3342", schX: "-12", schY: "-6", schSectionName: "user buttons" }), jsx("pushbutton", { name: "SW3", pcbX: 16, pcbY: 0, pcbRotation: 90, displayName: "", footprint: "kicad:Button_Switch_SMD/SW_SPST_TL3342", schX: "-12", schY: "-11", schSectionName: "user buttons" }), jsx("schematicsection", { name: "user buttons", displayName: "User buttons" }), jsx("chip", { name: "U2", footprint: "dip16_w7.62mm", pcbX: 24.6, pcbY: 7, pinLabels: {
pin1: "EN1_2",
pin2: "1A",
pin3: "1Y",
pin4: "GND4",
pin5: "GND5",
pin6: "2Y",
pin7: "2A",
pin8: "VCC2",
pin9: "EN3_4",
pin10: "3A",
pin11: "3Y",
pin12: "GND12",
pin13: "GND13",
pin14: "4Y",
pin15: "4A",
pin16: "VCC1",
}, schX: "-5", schY: "-5" }), jsx("chip", { name: "U5", footprint: "kicad:Package_SO/SSOP-8_3.9x5.05mm_P1.27mm", pcbX: -15.7, pcbY: -3, pinLabels: {
pin1: "UD+",
pin2: "UD-",
pin3: "GND",
pin4: "N_RTS",
pin5: "VCC",
pin6: "TXD",
pin7: "RXD",
pin8: "V3",
}, schX: "6", schY: "-5" }), jsx("chip", { name: "U3", pcbX: -4.5, pcbY: -16.6, layer: "bottom", displayName: "", footprint: "kicad:Connector_JST/JST_XH_B4B-XH-A_1x04_P2.50mm_Vertical", pinLabels: {
pin1: "SCL",
pin2: "SDA",
pin3: "VCC",
pin4: "GND",
}, schX: "-1", schY: "4.5" }), jsx("chip", { name: "U4", pcbX: -15, pcbY: 11, displayName: "", pcbRotation: 90, footprint: "kicad:Connector_PinHeader_2.54mm/PinHeader_1x04_P2.54mm_Vertical", pinLabels: {
pin1: "GND",
pin2: "VDD",
pin3: "SCL",
pin4: "SDA",
}, schX: "2", schY: "4", schRotation: "270deg" }), jsx("resistor", { name: "R4", resistance: "4.7k", footprint: "0603", pcbX: -15.8, pcbY: 16, schX: "-9", schY: "-1", schRotation: "270deg" }), jsx("resistor", { name: "R5", resistance: "4.7k", footprint: "0603", pcbX: -15.8, pcbY: 14.2, schX: "-8", schY: "-1", schRotation: "270deg" }), jsx("resistor", { name: "R6", resistance: "1k", footprint: "0603", pcbX: 1, pcbY: -2.5, pcbRotation: 90, schX: "-10", schY: "3.5" }), jsx("resistor", { name: "R7", resistance: "100k", footprint: "0603", pcbX: 0, pcbY: 0, pcbRotation: 0, schX: "-8.5", schY: "2.5", schRotation: "270deg" }), jsx("resistor", { name: "R8", resistance: "5.1k", footprint: "0603", pcbX: -24.2, pcbY: -5.5, schX: "5", schY: "-2", schRotation: "270deg" }), jsx("resistor", { name: "R9", resistance: "5.1k", footprint: "0603", pcbX: -23.2, pcbY: -2.5, schX: "6", schY: "-2", schRotation: "270deg" }), jsx("capacitor", { name: "C4", capacitance: "100nF", footprint: "0603", pcbX: 27.5, pcbY: 19.2, schX: "-6", schY: "-2", schRotation: "270deg" }), jsx("capacitor", { name: "C5", capacitance: "1uF", footprint: "0603", pcbX: 18.8, pcbY: -7, pcbRotation: 0, schX: "-4", schY: "-2", schRotation: "270deg" }), jsx("capacitor", { name: "C6", capacitance: "100nF", footprint: "0603", pcbX: -23, pcbY: 11.2, pcbRotation: 0, schX: "5", schY: "4", schRotation: "270deg" }), jsx("capacitor", { name: "C7", capacitance: "100nF", footprint: "0603", pcbX: -21, pcbY: -12.8, schX: "8", schY: "-2", schRotation: "270deg" }), jsx("capacitor", { name: "C8", capacitance: "10uF", footprint: "0603", pcbX: -24.5, pcbY: -12.8, schX: "9", schY: "-2", schRotation: "270deg" }), jsx("capacitor", { name: "C9", capacitance: "100nF", footprint: "0603", pcbX: -15.5, pcbY: 2, pcbRotation: 0, schX: "8", schY: "-5", schRotation: "270deg" }), jsx("capacitor", { name: "C10", capacitance: "330uF", pcbX: 24.6, pcbY: -11, displayName: "", footprint: "kicad:Capacitor_SMD/CP_Elec_6.3x7.7", schX: "8", schY: "-13", schRotation: "270deg" }), jsx("capacitor", { name: "C11", capacitance: "100nF", footprint: "0603", pcbX: -15.5, pcbY: -7, pcbRotation: 0, schX: "9", schY: "-5", schRotation: "270deg" }), jsx("fuse", { name: "F1", currentRating: "500mA", voltageRating: "32V", footprint: "1206", pcbX: -24.5, pcbY: -9, pcbRotation: 0, schX: "5", schY: "0" }), jsx("pinheader", { name: "J1", pinCount: 4, footprint: "pinrow4_p2.5mm", pcbRotation: 90, pcbX: 38.5, pcbY: 0, layer: "bottom", displayName: "", pinLabels: ["L2B", "L2A", "L1B", "L1A"], schX: "0", schY: "-5" }), jsx("pinheader", { name: "J2", pinCount: 4, footprint: "kicad:Connector_JST/JST_XH_B4B-XH-A_1x04_P2.50mm_Vertical", pcbX: -18, pcbY: -16.7, layer: "bottom", displayName: "", pinLabels: ["GND", "D-", "D+", "VUSB"], schX: "0", schY: "-8" }), jsx("pinheader", { name: "J4", pinCount: 2, footprint: "kicad:Connector_JST/JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical", pcbX: 25.7, pcbY: -19.4, layer: "bottom", displayName: "", pinLabels: ["GND", "VCC"], schX: "6", schY: "-13" }), jsx("pushbutton", { name: "SW4", pcbX: -37, pcbY: 12, displayName: "", footprint: "kicad:Button_Switch_SMD/SW_Tactile_SPST_NO_Straight_CK_PTS636Sx25SMTRLFS", schX: "6", schY: "4", schRotation: "270deg" }), jsx("pushbutton", { name: "SW5", pcbX: -37, pcbY: 0, displayName: "", footprint: "kicad:Button_Switch_SMD/SW_Tactile_SPST_NO_Straight_CK_PTS636Sx25SMTRLFS", kicadFootprintMetadata: {
footprintName: "Button_Switch_SMD:SW_Tactile_SPST_NO_Straight_CK_PTS636SX25SMTR_LFS",
generator: "tscircuit",
layer: "F.Cu",
attributes: {
smd: true,
},
}, schX: "7", schY: "4", schRotation: "270deg" }), jsx("chip", { name: "BZ1", pcbX: 2.8, pcbY: 11, displayName: "", footprint: "kicad:Buzzer_Beeper/MagneticBuzzer_PUI_AT-0927-TT-6-R", symbol: buzzerSymbol, pinLabels: {
pin1: "BZ+",
pin2: "BZ-",
}, schX: "-6", schY: "5" }), jsx("transistor", { name: "Q1", type: "npn", pcbX: 1.2, pcbY: 3, displayName: "", footprint: "kicad:Package_TO_SOT_THT/TO-92_Inline", schX: "-7.5", schY: "3.5", schRotation: "270deg" }), jsx("solderjumper", { name: "SJ1", footprint: "solderjumper3", pinCount: 3, pcbX: 38.5, pcbY: -14, pcbRotation: 90 })] }));
export { index as default };