Ayushjhawar8/stepper-mini-motor
This code defines a schematic and PCB layout for a motor driver IC (TC78H670FTG) with associated passive components, power supply capacitors, resistors, headers, and mechanical footprints, all mapped with specific pin configurations and connections.
Usage: To use the stepper motor driver components in a tscircuit project: 1. Import the components: ```tsx import { TC78H670FTG_EL } from "@tsci/Ayushjhawar8.stepper-mini-motor" import { VGF39NCHXT_B103 } from "@tsci/Ayushjhawar8.stepper-mini-motor" ``` 2. Add components to your board with optional positioning and connections: ```tsx <TC78H670FTG_EL name="U1" pcbX={0} pcbY={0} connections={{ pin3: sel.net().VM, pin5: sel.net().OUT_A_POS, // other pin connections }} /> <VGF39NCHXT_B103 name="R2" pcbX={3.7} pcbY={-7.5} connections={{ pin2: sel.net().VREF, // other pin connections }} /> ``` The components come pre-configured with pin labels, footprints, and CAD models.
- Version
- 1.0.2
- License
- unset
- Stars
- 0
dist/index.js
PCB
Schematic
import { jsx, jsxs } from 'react/jsx-runtime';
import { sel } from 'tscircuit';
const pinLabels$1 = {
pin1: ["MODE3_CW_CCW"],
pin2: ["AGND"],
pin3: ["VM"],
pin4: ["PGND_A"],
pin5: ["OUT_A_POS"],
pin6: ["OUT_A_NEG"],
pin7: ["OUT_B_NEG"],
pin8: ["OUT_B_POS"],
pin9: ["PGND_B"],
pin10: ["VREF"],
pin11: ["OSCM"],
pin12: ["STBY"],
pin13: ["EN_ERR"],
pin14: ["MODE0_UP_DW"],
pin15: ["MODE1_SET_EN_LATCH"],
pin16: ["MODE2_CLK_S_CLK"],
pin17: ["GND_PAD"]
};
const TC78H670FTG_EL = (props) => {
return (jsx("chip", Object.assign({ pinLabels: pinLabels$1, supplierPartNumbers: {
"jlcpcb": [
"C6331347"
]
}, manufacturerPartNumber: "TC78H670FTG_EL", footprint: jsxs("footprint", { children: [jsx("smtpad", { portHints: ["pin1"], pcbX: "-1.4999970000000076mm", pcbY: "0.7491729999999279mm", width: "0.7999983999999999mm", height: "0.2800096mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin2"], pcbX: "-1.4999970000000076mm", pcbY: "0.24879299999997784mm", width: "0.7999983999999999mm", height: "0.2800096mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin3"], pcbX: "-1.4999970000000076mm", pcbY: "-0.24904700000001867mm", width: "0.7999983999999999mm", height: "0.2800096mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin4"], pcbX: "-1.4999970000000076mm", pcbY: "-0.7494270000000824mm", width: "0.7999983999999999mm", height: "0.2800096mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin5"], pcbX: "-0.7491730000000416mm", pcbY: "-1.4999970000000076mm", width: "0.2800096mm", height: "0.7999983999999999mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin6"], pcbX: "-0.24879299999997784mm", pcbY: "-1.4999970000000076mm", width: "0.2800096mm", height: "0.7999983999999999mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin7"], pcbX: "0.24904700000001867mm", pcbY: "-1.4999970000000076mm", width: "0.2800096mm", height: "0.7999983999999999mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin8"], pcbX: "0.7494270000000824mm", pcbY: "-1.4999970000000076mm", width: "0.2800096mm", height: "0.7999983999999999mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin9"], pcbX: "1.4999970000000076mm", pcbY: "-0.7494270000000824mm", width: "0.7999983999999999mm", height: "0.2800096mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin10"], pcbX: "1.4999970000000076mm", pcbY: "-0.24904700000001867mm", width: "0.7999983999999999mm", height: "0.2800096mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin11"], pcbX: "1.4999970000000076mm", pcbY: "0.24879299999997784mm", width: "0.7999983999999999mm", height: "0.2800096mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin12"], pcbX: "1.4999970000000076mm", pcbY: "0.7491729999999279mm", width: "0.7999983999999999mm", height: "0.2800096mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin13"], pcbX: "0.7494270000000824mm", pcbY: "1.4999970000000076mm", width: "0.2800096mm", height: "0.7999983999999999mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin14"], pcbX: "0.24904700000001867mm", pcbY: "1.4999970000000076mm", width: "0.2800096mm", height: "0.7999983999999999mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin15"], pcbX: "-0.24879299999997784mm", pcbY: "1.4999970000000076mm", width: "0.2800096mm", height: "0.7999983999999999mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin16"], pcbX: "-0.7491730000000416mm", pcbY: "1.4999970000000076mm", width: "0.2800096mm", height: "0.7999983999999999mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin17"], pcbX: "0.0001269999999067295mm", pcbY: "-0.0001269999999067295mm", width: "1.6999966mm", height: "1.6999966mm", shape: "rect" }), jsx("silkscreenpath", { route: [{ "x": 1.5000986000000012, "y": 1.5000477999999475 }, { "x": 1.5000986000000012, "y": 1.044295600000055 }] }), jsx("silkscreenpath", { route: [{ "x": 1.5000986000000012, "y": -1.0441940000000614 }, { "x": 1.5000986000000012, "y": -1.4999462000000676 }] }), jsx("silkscreenpath", { route: [{ "x": -1.499895400000014, "y": 1.5000477999999475 }, { "x": -1.499895400000014, "y": 1.044295600000055 }] }), jsx("silkscreenpath", { route: [{ "x": -1.499895400000014, "y": -1.0441940000000614 }, { "x": -1.499895400000014, "y": -1.4999462000000676 }] }), jsx("silkscreenpath", { route: [{ "x": 1.5000986000000012, "y": 1.5000477999999475 }, { "x": 1.044346399999995, "y": 1.5000477999999475 }] }), jsx("silkscreenpath", { route: [{ "x": -1.0441432000000077, "y": 1.5000477999999475 }, { "x": -1.499895400000014, "y": 1.5000477999999475 }] }), jsx("silkscreenpath", { route: [{ "x": -1.499895400000014, "y": -1.4999462000000676 }, { "x": -1.0441432000000077, "y": -1.4999462000000676 }] }), jsx("silkscreenpath", { route: [{ "x": 1.044346399999995, "y": -1.4999462000000676 }, { "x": 1.5000986000000012, "y": -1.4999462000000676 }] }), jsx("silkscreenpath", { route: [{ "x": -1.7399508000000878, "y": 1.2513056000000233 }, { "x": -1.7200165108359897, "y": 1.2500356000001602 }, { "x": -1.7399507999999742, "y": 1.2487656000000698 }] })] }), cadModel: {
objUrl: "https://modelcdn.tscircuit.com/easyeda_models/download?uuid=871bf70eb5f842f5af27500461e35d8a&pn=C6331347",
rotationOffset: { x: 0, y: 0, z: 0 },
positionOffset: { x: 0, y: 0, z: 0 },
} }, props)));
};
const pinLabels = {
pin1: ["pin1"],
pin2: ["pin2"],
pin3: ["pin3"]
};
const VGF39NCHXT_B103 = (props) => {
return (jsx("chip", Object.assign({ pinLabels: pinLabels, supplierPartNumbers: {
"jlcpcb": [
"C22461454"
]
}, manufacturerPartNumber: "VGF39NCHXT_B103", footprint: jsxs("footprint", { children: [jsx("smtpad", { portHints: ["pin1"], pcbX: "1.7750028000000384mm", pcbY: "-0.9999979999998914mm", width: "1.1999975999999999mm", height: "1.1999975999999999mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin2"], pcbX: "-1.5750031999999692mm", pcbY: "0.008890000000064902mm", width: "1.5999967999999998mm", height: "1.499997mm", shape: "rect" }), jsx("smtpad", { portHints: ["pin3"], pcbX: "1.7750028000000384mm", pcbY: "0.999998000000005mm", width: "1.1999975999999999mm", height: "1.1999975999999999mm", shape: "rect" }), jsx("silkscreenpath", { route: [{ "x": 2.0069301999999425, "y": 0.2541016000000127 }, { "x": 2.0069301999999425, "y": -0.2538983999999118 }] }), jsx("silkscreenpath", { route: [{ "x": -1.8030698000001166, "y": -0.9722357999999076 }, { "x": -1.8030698000001166, "y": -1.5238984000000073 }, { "x": 0.8639301999999134, "y": -1.5238984000000073 }] }), jsx("silkscreenpath", { route: [{ "x": 0.8187689999998611, "y": 1.5241015999999945 }, { "x": -1.8030698000001166, "y": 1.5241015999999945 }, { "x": -1.8030698000001166, "y": 0.9900158000000374 }] })] }), cadModel: {
objUrl: "https://modelcdn.tscircuit.com/easyeda_models/download?uuid=e9297dc616d24881a01257e804dc42a9&pn=C22461454",
rotationOffset: { x: 0, y: 0, z: 0 },
positionOffset: { x: -5080000016732811e-20, y: 1.1368683772161603e-13, z: 0.289 },
} }, props)));
};
var index = () => (jsxs("board", { width: "15.24mm", height: "20.32mm", routingDisabled: true, children: [jsx("schematictext", { text: "TC78H670FTG Motor Driver IC", fontSize: 0.4, color: "brown", schY: 6, schX: 0 }), jsx("schematictext", { text: "Power supply (VM) operation voltage: 2.5V to 16.0V", fontSize: 0.25, color: "brown", schY: 5.4, schX: 0 }), jsx("schematictext", { text: "Output Current ratings: 2.0 A (max)", fontSize: 0.25, color: "brown", schY: 5, schX: 0 }), jsx("schematictext", { text: "Logic Level 3.3V tolerant", fontSize: 0.25, color: "brown", schY: 4.6, schX: 0 }), jsx(TC78H670FTG_EL, { name: "U1", pcbX: 0, pcbY: 0, pcbRotation: 90, schX: 0, schY: 0, schWidth: 3, schHeight: 6, schPinSpacing: 0.6, schPinArrangement: {
leftSide: {
direction: "top-to-bottom",
pins: [3, 10, 12, 1, 16, 15, 14, 13, 17],
},
rightSide: {
direction: "top-to-bottom",
pins: [5, 6, 4, 8, 7, 9, 2, 11],
},
}, connections: {
pin1: sel.net().DIR,
pin2: sel.net().AGND,
pin3: sel.net().VM,
pin4: sel.net().GND,
pin5: sel.net().OUT_A_POS,
pin6: sel.net().OUT_A_NEG,
pin7: sel.net().OUT_B_NEG,
pin8: sel.net().OUT_B_POS,
pin9: sel.net().GND,
pin10: sel.net().VREF,
pin11: sel.net().OSCM,
pin12: sel.net().STBY,
pin13: sel.net().ERR,
pin14: sel.net().MODE0,
pin15: sel.net().MODE1,
pin16: sel.net().STEP,
pin17: sel.net().GND,
} }), jsx("capacitor", { name: "C1", capacitance: "0.1uF", footprint: "0603", pcbX: 1, pcbY: -3.857, pcbRotation: 0, schRotation: 0, schX: -4, schY: 3.5, connections: {
pin1: sel.net().VM,
pin2: sel.net.GND,
} }), jsx("capacitor", { name: "C2", capacitance: "0.1uF", footprint: "0603", pcbX: 2.01, pcbY: 3.67, pcbRotation: 0, schRotation: 0, schX: -5, schY: 1, connections: {
pin1: sel.net().VREF,
pin2: sel.net.GND,
} }), jsx("capacitor", { name: "C3", capacitance: "22nF", footprint: "0603", pcbX: 3.09, pcbY: 9.15, pcbRotation: 0, schRotation: 0, schX: -5, schY: -3.5, connections: {
pin1: sel.net().ERR,
pin2: sel.net.GND,
} }), jsx("schematictext", { text: "Current Control", fontSize: 0.4, color: "brown", schY: -9, schX: -9 }), jsx("resistor", { name: "R1", resistance: "8.2k", footprint: "0603", pcbX: 0, pcbY: -9, pcbRotation: 0, schRotation: 90, schX: -9, schY: -11, connections: {
pin1: sel.net.V3_3,
pin2: sel.net()["R1_Pad2"],
} }), jsx(VGF39NCHXT_B103, { name: "R2", pcbX: 3.7, pcbY: -7.5, pcbRotation: -90, schX: -9, schY: -13, connections: {
pin1: sel.net()["R1_Pad2"],
pin2: sel.net().VREF,
pin3: sel.net.GND,
} }), jsx("schematictext", { text: "Pull-up/down Resistors", fontSize: 0.4, color: "brown", schY: -10, schX: 0 }), jsx("resistor", { name: "R3", resistance: "10k", footprint: "0603", pcbX: -3.55, pcbY: 9.15, pcbRotation: 180, schRotation: 90, schX: -7, schY: -3.5, connections: {
pin1: sel.net().EN,
pin2: sel.net.GND
} }), jsx("resistor", { name: "R4", resistance: "10k", footprint: "0603", pcbX: -0.12, pcbY: 9.15, pcbRotation: 180, schRotation: 90, schX: -6, schY: -2, connections: {
pin1: sel.net().ERR,
pin2: sel.net().EN,
} }), jsx("resistor", { name: "R5", resistance: "10k", footprint: "0603", pcbX: -3.55, pcbY: -9, pcbRotation: 180, schRotation: 90, schX: -1, schY: -13, connections: {
pin1: sel.net.V3_3,
pin2: sel.net().DIR,
} }), jsx("resistor", { name: "R7", resistance: "10k", footprint: "0603", pcbX: -3.55, pcbY: -7, pcbRotation: 180, schRotation: 90, schX: 1, schY: -13, connections: {
pin1: sel.net.V3_3,
pin2: sel.net().STEP,
} }), jsx("resistor", { name: "R8", resistance: "10k", footprint: "0603", pcbX: -3.55, pcbY: 7.15, pcbRotation: 180, schRotation: 90, schX: 3, schY: -13, connections: {
pin1: sel.net.V3_3,
pin2: sel.net().MODE1,
} }), jsx("resistor", { name: "R9", resistance: "10k", footprint: "0603", pcbX: -0.12, pcbY: 7.15, pcbRotation: 0, schRotation: 90, schX: 5, schY: -13, connections: {
pin1: sel.net.V3_3,
pin2: sel.net().MODE0,
} }), jsx("resistor", { name: "R10", resistance: "47k", footprint: "0603", pcbX: -1.568, pcbY: 3.67, pcbRotation: 180, schRotation: 90, schX: 4, schY: -1, connections: {
pin1: sel.net().OSCM,
pin2: sel.net().GND,
} }), jsx("schematictext", { text: "PTH 0.1'' Header Connectors", fontSize: 0.4, color: "brown", schY: -10, schX: 9 }), jsx("pinheader", { name: "J1", pinCount: 8, pcbX: -6.5, pcbY: -0.1, pcbRotation: 270, schPinArrangement: {
leftSide: {
direction: "top-to-bottom",
pins: [1, 2, 3, 4, 5, 6, 7, 8],
},
}, schX: 9, schY: -13, connections: {
pin1: sel.net().EN,
pin2: sel.net().MODE1,
pin3: sel.net().MODE0,
pin4: sel.net().ERR,
pin5: sel.net().VREF,
pin6: sel.net().STBY,
pin7: sel.net().STEP,
pin8: sel.net().DIR,
} }), jsx("pinheader", { name: "J2", pinCount: 8, pcbX: 6.5, pcbY: -0.1, pcbRotation: 270, schPinArrangement: {
leftSide: {
direction: "top-to-bottom",
pins: [1, 2, 3, 4, 5, 6, 7, 8],
},
}, schX: 13, schY: -13, connections: {
pin1: sel.net().VM,
pin2: sel.net().GND,
pin3: sel.net().OUT_B_POS,
pin4: sel.net().OUT_B_NEG,
pin5: sel.net().OUT_A_NEG,
pin6: sel.net().OUT_A_POS,
pin7: sel.net.V3_3,
pin8: sel.net().GND,
} })] }));
export { index as default };