imrishabh18/pd-stepper

This circuit features an ESP32-S23 microcontroller connected to a TMC2209 stepper motor driver, capacitors, resistors, solder jumpers, and a potentiometer, forming a hardware control system for precise motor operation.

Version
1.0.0
License
unset
Stars
0

dist/index.cjs

PCBPCB preview for dist/index.cjs
SchematicSchematic preview for dist/index.cjs
'use strict';

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

const pinLabels = {
    pin1: ["OB2"],
    pin2: ["N_EN"],
    pin3: ["GND2"],
    pin4: ["CPO"],
    pin5: ["CPI"],
    pin6: ["VCP"],
    pin7: ["SPREAD"],
    pin8: ["VOUT"],
    pin9: ["MS1_AD0"],
    pin10: ["MS2_AD1"],
    pin11: ["DIAG"],
    pin12: ["INDEX"],
    pin13: ["CLK"],
    pin14: ["PDN_UART"],
    pin15: ["VCC_IO"],
    pin16: ["STEP"],
    pin17: ["VREF"],
    pin18: ["GND1"],
    pin19: ["DIR"],
    pin20: ["STDBY"],
    pin21: ["OA2"],
    pin22: ["VS1"],
    pin23: ["BRA"],
    pin24: ["OA1"],
    pin25: ["NC"],
    pin26: ["OB1"],
    pin27: ["BRB"],
    pin28: ["VS2"],
    pin29: ["EXP"],
};
const TMC2209_LA_T = (props) => {
    return (jsxRuntime.jsx("chip", { pinLabels: pinLabels, supplierPartNumbers: {
            jlcpcb: ["C2150710"],
        }, manufacturerPartNumber: "TMC2209_LA_T", footprint: jsxRuntime.jsxs("footprint", { children: [jsxRuntime.jsx("smtpad", { portHints: ["pin29"], pcbX: "-0.00012699999999199463mm", pcbY: "-0.0001270000000133109mm", width: "3.4999930000000004mm", height: "3.4999930000000004mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin28"], pcbX: "-2.4999949999999984mm", pcbY: "-1.5012670000000128mm", width: "0.8999982mm", height: "0.2800096mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin27"], pcbX: "-2.4999949999999984mm", pcbY: "-1.0008870000000059mm", width: "0.8999982mm", height: "0.2800096mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin26"], pcbX: "-2.4999949999999984mm", pcbY: "-0.5005070000000131mm", width: "0.8999982mm", height: "0.2800096mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin25"], pcbX: "-2.4999949999999984mm", pcbY: "-0.0001270000000133109mm", width: "0.8999982mm", height: "0.2800096mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin24"], pcbX: "-2.4999949999999984mm", pcbY: "0.5002529999999865mm", width: "0.8999982mm", height: "0.2800096mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin23"], pcbX: "-2.4999949999999984mm", pcbY: "1.0006329999999934mm", width: "0.8999982mm", height: "0.2800096mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin22"], pcbX: "-2.4999949999999984mm", pcbY: "1.5010129999999933mm", width: "0.8999982mm", height: "0.2800096mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin21"], pcbX: "-1.5012669999999915mm", pcbY: "2.4999949999999984mm", width: "0.2800096mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin20"], pcbX: "-1.0008869999999987mm", pcbY: "2.4999949999999984mm", width: "0.2800096mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin19"], pcbX: "-0.5005069999999989mm", pcbY: "2.4999949999999984mm", width: "0.2800096mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin18"], pcbX: "-0.00012699999999199463mm", pcbY: "2.4999949999999984mm", width: "0.2800096mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin17"], pcbX: "0.5002530000000007mm", pcbY: "2.4999949999999984mm", width: "0.2800096mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin16"], pcbX: "1.0006330000000077mm", pcbY: "2.4999949999999984mm", width: "0.2800096mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin15"], pcbX: "1.5010130000000004mm", pcbY: "2.4999949999999984mm", width: "0.2800096mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin14"], pcbX: "2.4999949999999984mm", pcbY: "1.5010129999999933mm", width: "0.8999982mm", height: "0.2800096mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin13"], pcbX: "2.4999949999999984mm", pcbY: "1.0006329999999934mm", width: "0.8999982mm", height: "0.2800096mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin12"], pcbX: "2.4999949999999984mm", pcbY: "0.5002529999999865mm", width: "0.8999982mm", height: "0.2800096mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin11"], pcbX: "2.4999949999999984mm", pcbY: "-0.0001270000000133109mm", width: "0.8999982mm", height: "0.2800096mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin10"], pcbX: "2.4999949999999984mm", pcbY: "-0.5005070000000131mm", width: "0.8999982mm", height: "0.2800096mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin9"], pcbX: "2.4999949999999984mm", pcbY: "-1.0008870000000059mm", width: "0.8999982mm", height: "0.2800096mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin8"], pcbX: "2.4999949999999984mm", pcbY: "-1.5012670000000128mm", width: "0.8999982mm", height: "0.2800096mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin7"], pcbX: "1.5010130000000004mm", pcbY: "-2.4999950000000055mm", width: "0.2800096mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin6"], pcbX: "1.0006330000000077mm", pcbY: "-2.4999950000000055mm", width: "0.2800096mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin5"], pcbX: "0.5002530000000007mm", pcbY: "-2.4999950000000055mm", width: "0.2800096mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin4"], pcbX: "-0.00012699999999199463mm", pcbY: "-2.4999950000000055mm", width: "0.2800096mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin3"], pcbX: "-0.5005069999999989mm", pcbY: "-2.4999950000000055mm", width: "0.2800096mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin2"], pcbX: "-1.0008869999999987mm", pcbY: "-2.4999950000000055mm", width: "0.2800096mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin1"], pcbX: "-1.5012669999999915mm", pcbY: "-2.4999950000000055mm", width: "0.2800096mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("silkscreenpath", { route: [
                        { x: -2.0001991999999973, y: -2.6500328000000053 },
                        { x: -2.6501851999999957, y: -2.6500328000000053 },
                        { x: -2.6501851999999957, y: -2.000046800000007 },
                    ] }), jsxRuntime.jsx("silkscreenpath", { route: [
                        { x: -2.0001991999999973, y: 2.6499311999999975 },
                        { x: -2.6501851999999957, y: 2.6499311999999975 },
                        { x: -2.6501851999999957, y: 1.999945199999992 },
                    ] }), jsxRuntime.jsx("silkscreenpath", { route: [
                        { x: 2.649778800000007, y: 1.999945199999992 },
                        { x: 2.649778800000007, y: 2.6499311999999975 },
                        { x: 1.9997927999999945, y: 2.6499311999999975 },
                    ] }), jsxRuntime.jsx("silkscreenpath", { route: [
                        { x: 1.9997927999999945, y: -2.6500328000000053 },
                        { x: 2.649778800000007, y: -2.6500328000000053 },
                        { x: 2.649778800000007, y: -2.000046800000007 },
                    ] }), jsxRuntime.jsx("silkscreenpath", { route: [
                        { x: -2.451303199999991, y: -2.9997908000000137 },
                        { x: -2.600044255997652, y: -2.8491487702960825 },
                        { x: -2.450033199999993, y: -2.6997713759852644 },
                        { x: -2.300022144002334, y: -2.8491487702960825 },
                        { x: -2.448763199999995, y: -2.9997908000000137 },
                    ] })] }), cadModel: {
            objUrl: "https://modelcdn.tscircuit.com/easyeda_models/download?uuid=ae12e1b5ea7a411e8a6f7d8e9f5ed919&pn=C2150710",
            rotationOffset: { x: 0, y: 0, z: 90 },
            positionOffset: {
                x: -7619999999519678e-20,
                y: 0.00007619999998809135,
                z: 3.30999498,
            },
        }, ...props }));
};

const StepperDriver = () => {
    return (jsxRuntime.jsxs("group", { name: "StepperDriver", children: [jsxRuntime.jsx("schematictext", { text: "Stepper Driver", fontSize: 0.4 }), jsxRuntime.jsx(TMC2209_LA_T, { name: "U1", schWidth: 2.2, schHeight: 5.2, schPinStyle: {
                    N_EN: {
                        marginBottom: "0.3",
                    },
                    CLK: {
                        marginBottom: "0.3",
                        marginTop: "0.3",
                    },
                    CPO: {
                        marginBottom: "0.3",
                    },
                    VCP: {
                        marginBottom: "0.3",
                    },
                    VREF: {
                        marginTop: "0.3",
                    },
                    INDEX: {
                        marginBottom: "0.3",
                        marginTop: "0.3",
                    },
                    BRA: {
                        marginTop: "0.3",
                    },
                    BRB: {
                        marginBottom: "0.3",
                    },
                }, schPinArrangement: {
                    leftSide: [
                        "pin2",
                        "pin16",
                        "pin19",
                        "pin9",
                        "pin10",
                        "pin13",
                        "pin5",
                        "pin4",
                        "pin7",
                        "pin14",
                        "pin17",
                        "pin20",
                    ],
                    rightSide: [
                        "pin15",
                        "pin22",
                        "pin28",
                        "pin8",
                        "pin6",
                        "pin11",
                        "pin12",
                        "pin24",
                        "pin26",
                        "pin21",
                        "pin1",
                        "pin23",
                        "pin27",
                        "pin25",
                        "pin29",
                        "pin18",
                        "pin3",
                    ],
                }, connections: {
                    EXP: tscircuit.sel.net.GND,
                    GND1: tscircuit.sel.net.GND,
                    GND2: tscircuit.sel.net.GND,
                    CLK: tscircuit.sel.net.GND,
                    VS2: tscircuit.sel.U1.VS1,
                    VOUT: "net.VCC_5",
                } }), jsxRuntime.jsx("chip", { name: "P1", schWidth: 0.6, schPinArrangement: {
                    leftSide: ["pin1", "pin2", "pin3", "pin4"],
                }, pinLabels: {
                    pin1: "A1",
                    pin2: "B1",
                    pin3: "A2",
                    pin4: "B2",
                }, connections: {
                    pin1: tscircuit.sel.U1.OA1,
                    pin2: tscircuit.sel.U1.OB1,
                    pin3: tscircuit.sel.U1.OA2,
                    pin4: tscircuit.sel.U1.OB2,
                } }), jsxRuntime.jsx("capacitor", { name: "C3", capacitance: "0.1uF", footprint: "0402", connections: {
                    pin1: "net.GND",
                    pin2: tscircuit.sel.U1.VCC_IO,
                } }), jsxRuntime.jsxs("group", { children: [jsxRuntime.jsx("capacitor", { name: "C6", capacitance: "0.1uF", footprint: "0402", connections: {
                            pin2: "net.GND",
                            pin1: tscircuit.sel.U1.VS1,
                        } }), jsxRuntime.jsx("capacitor", { name: "C7", capacitance: "0.1uF", footprint: "0402", connections: {
                            pin2: "net.GND",
                            pin1: tscircuit.sel.U1.VS1,
                        } }), jsxRuntime.jsx("capacitor", { name: "C8", capacitance: "0.1uF", footprint: "0402", connections: {
                            pin2: "net.GND",
                            pin1: tscircuit.sel.U1.VS1,
                        } })] }), jsxRuntime.jsx("capacitor", { name: "C9", capacitance: "0.1uF", footprint: "0402", connections: {
                    pin1: "net.GND",
                    pin2: "net.VCC_5",
                } }), jsxRuntime.jsx("capacitor", { name: "C10", capacitance: "0.1uF", footprint: "0402", connections: {
                    pin1: tscircuit.sel.U1.VCP,
                    pin2: tscircuit.sel.U1.VS1,
                } }), jsxRuntime.jsx("capacitor", { name: "C12", capacitance: "22nF", footprint: "0402", connections: {
                    pin1: tscircuit.sel.U1.CPI,
                    pin2: tscircuit.sel.U1.CPO,
                } }), jsxRuntime.jsx("resistor", { name: "R2", resistance: "100ohm", footprint: "0402", connections: {
                    pin1: "net.VCC_3",
                    pin2: tscircuit.sel.U1.N_EN,
                } }), jsxRuntime.jsx("resistor", { name: "R6", resistance: "100ohm", footprint: "0402", connections: {
                    pin1: "net.GND",
                    pin2: tscircuit.sel.U1.BRA,
                } }), jsxRuntime.jsx("resistor", { name: "R7", resistance: "100ohm", footprint: "0402", connections: {
                    pin1: "net.GND",
                    pin2: tscircuit.sel.U1.BRB,
                } }), jsxRuntime.jsx("resistor", { name: "R8", resistance: "100ohm", footprint: "0402", connections: {
                    pin1: "net.VCC_5",
                    pin2: tscircuit.sel.R10.pin1,
                } }), jsxRuntime.jsx("solderjumper", { name: "J1", pinCount: 3, connections: {
                    pin1: "net.VCC_3",
                    pin2: tscircuit.sel.U1.MS1_AD0,
                    pin3: "net.GND",
                } }), jsxRuntime.jsx("solderjumper", { name: "J2", pinCount: 3, connections: {
                    pin1: "net.VCC_3",
                    pin2: tscircuit.sel.U1.MS2_AD1,
                    pin3: "net.GND",
                } }), jsxRuntime.jsx("solderjumper", { name: "J3", pinCount: 3, connections: {
                    pin1: "net.VCC_3",
                    pin2: tscircuit.sel.U1.SPREAD,
                    pin3: "net.GND",
                } }), jsxRuntime.jsx("potentiometer", { name: "R10", maxResistance: "20kohm", symbolName: "potentiometer3_right", footprint: "0402", connections: {
                    pin2: tscircuit.sel.U1.VREF,
                    pin3: "net.GND",
                } })] }));
};

var index_circuit = () => (jsxRuntime.jsx("board", { routingDisabled: true, children: jsxRuntime.jsx(StepperDriver, {}) }));

module.exports = index_circuit;