ShiboSoftwareDev/nema8-20mm-usbc-pd-controller

A compact four-layer USB‑C PD–powered NEMA8 stepper controller combining a CH32X035 MCU, TMC2209 driver, 3.3 V regulation, USB data/ESD protection, current-sense resistors, protection diodes, and motor connector.

Version
1.0.11
License
unset
Stars
0

imports/TMC2209_LA_T.tsx

import { Fragment } from "react"
import type { ChipProps } from "@tscircuit/props"

const pinLabels = {
  pin1: ["OB2"],
  pin2: ["ENN"],
  pin3: ["GND2"],
  pin4: ["CPO"],
  pin5: ["CPI"],
  pin6: ["VCP"],
  pin7: ["SPREAD"],
  pin8: ["5VOUT"],
  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: ["VS2"],
  pin23: ["BRA"],
  pin24: ["OA1"],
  pin25: ["UNUSED"],
  pin26: ["OB1"],
  pin27: ["BRB"],
  pin28: ["VS1"],
  pin29: ["EP"]
} as const

const pinAttributes = {
  pin3: {requiresGround: true},
  pin18: {requiresGround: true},
  pin29: {requiresGround: true}
} as const

const footprinterPinLabels = {
  ...pinLabels,
  "pin29": [...pinLabels["pin29"], "thermalpad"],
} as const

export const TMC2209_LA_T = (props: ChipProps<typeof pinLabels>) => {
  const bottomPins = [-1.5, -1, -0.5, 0, 0.5, 1, 1.5]
  const sidePins = [-1.5, -1, -0.5, 0, 0.5, 1, 1.5]
  return (
    <chip
      pinLabels={footprinterPinLabels}
      pinAttributes={pinAttributes}
      supplierPartNumbers={{
  "jlcpcb": [
    "C2150710"
  ]
}}
      manufacturerPartNumber="TMC2209-LA-T"
      footprint={
        <footprint>
          {bottomPins.map((x, index) => (
            <Fragment key={`bottom-${index}`}>
              <smtpad portHints={[`pin${index + 1}`]} pcbX={`${x}mm`} pcbY="-2.5mm"
                width="0.9mm" height="0.28mm" shape="rotated_pill" radius="0.14mm" ccwRotation={90} />
            </Fragment>
          ))}
          {sidePins.map((y, index) => (
            <Fragment key={`right-${index}`}>
              <smtpad portHints={[`pin${index + 8}`]} pcbX="2.5mm" pcbY={`${y}mm`}
                width="0.28mm" height="0.9mm" shape="rotated_pill" radius="0.14mm" ccwRotation={90} />
            </Fragment>
          ))}
          {bottomPins.map((x, index) => (
            <Fragment key={`top-${index}`}>
              <smtpad portHints={[`pin${index + 15}`]} pcbX={`${1.5 - index * 0.5}mm`} pcbY="2.5mm"
                width="0.9mm" height="0.28mm" shape="rotated_pill" radius="0.14mm" ccwRotation={90} />
            </Fragment>
          ))}
          {sidePins.map((y, index) => (
            <Fragment key={`left-${index}`}>
              <smtpad portHints={[`pin${index + 22}`]} pcbX="-2.5mm" pcbY={`${1.5 - index * 0.5}mm`}
                width="0.28mm" height="0.9mm" shape="rotated_pill" radius="0.14mm" ccwRotation={90} />
            </Fragment>
          ))}
          <smtpad portHints={["pin29", "thermalpad"]} pcbX="0mm" pcbY="0mm"
            width="3.5mm" height="3.5mm" shape="rect" />
          <silkscreenpath route={[{ x: -2.8, y: -2.8 }, { x: 2.8, y: -2.8 }, { x: 2.8, y: 2.8 }, { x: -2.8, y: 2.8 }, { x: -2.8, y: -2.8 }]} />
          <courtyardoutline outline={[{ x: -2.95, y: -2.95 }, { x: 2.95, y: -2.95 }, { x: 2.95, y: 2.95 }, { x: -2.95, y: 2.95 }, { x: -2.95, y: -2.95 }]} />
        </footprint>
      }
      cadModel={{
        objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C2150710.obj?uuid=ae12e1b5ea7a411e8a6f7d8e9f5ed919",
        stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C2150710.step?uuid=ae12e1b5ea7a411e8a6f7d8e9f5ed919",
        pcbRotationOffset: 90,
        modelOriginPosition: { x: -0.00006349999998889189, y: -0.00006349999999599731, z: -0.02 },
      }}
      {...props}
    />
  )
}