imrishabh18/nema-23-stepper-controller

A 4-layer NEMA23 stepper motor controller PCB combining an RP2040, DRV8462 dual-phase driver, USB-C/28V power protection, current/voltage/temperature sensing, alarms, and optional magnetic encoder.

Version
1.4.27
License
unset
Stars
1

imports/DRV8462DDWR.tsx

import { viaSizes } from "../routing/via-sizes"
// Exact EasyEDA C5930226 lands; thermal vias tied to GND, as on the retained DDW layout.
import type { ChipProps } from "@tscircuit/props"

const pinLabels = {
  pin1: ["VCP"],
  pin2: ["VM1"],
  pin3: ["PGNDA1"],
  pin4: ["AOUT11"],
  pin5: ["AOUT12"],
  pin6: ["AOUT13"],
  pin7: ["AOUT21"],
  pin8: ["AOUT22"],
  pin9: ["AOUT23"],
  pin10: ["PGNDA2"],
  pin11: ["VM2"],
  pin12: ["VM3"],
  pin13: ["PGNDB1"],
  pin14: ["BOUT21"],
  pin15: ["BOUT22"],
  pin16: ["BOUT23"],
  pin17: ["BOUT11"],
  pin18: ["BOUT12"],
  pin19: ["BOUT13"],
  pin20: ["PGNDB2"],
  pin21: ["VM4"],
  pin22: ["GND1"],
  pin23: ["GND2"],
  pin24: ["DVDD"],
  pin25: ["VCC"],
  pin26: ["nFAULT"],
  pin27: ["nHOME"],
  pin28: ["MODE"],
  pin29: ["RSVD5"],
  pin30: ["RSVD4"],
  pin31: ["RSVD3"],
  pin32: ["RSVD2"],
  pin33: ["VREF"],
  pin34: ["nSCS","M0"],
  pin35: ["RSVD1","TOFF"],
  pin36: ["SDO","DECAY1"],
  pin37: ["SDI","DECAY0"],
  pin38: ["SCLK","M1"],
  pin39: ["STEP"],
  pin40: ["DIR"],
  pin41: ["ENABLE"],
  pin42: ["nSLEEP"],
  pin43: ["CPL"],
  pin44: ["CPH"],
  pin45: ["EP"]
} as const

const pinAttributes = {
  pin22: {requiresGround: true},
  pin23: {requiresGround: true},
  pin25: {requiresPower: true}
} as const

export const DRV8462DDWR = (props: ChipProps<typeof pinLabels>) => {
  return (
    <chip
      schMarginX={0.35} schMarginY={0.7}
      pinLabels={pinLabels}
      pinAttributes={pinAttributes}
      supplierPartNumbers={{
  "jlcpcb": [
    "C5930226"
  ]
}}
      manufacturerPartNumber="DRV8462DDWR"
      footprint={<footprint>
        <smtpad portHints={["pin1"]} pcbX="-6.6675mm" pcbY="-3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin2"]} pcbX="-6.0325mm" pcbY="-3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin3"]} pcbX="-5.3975mm" pcbY="-3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin4"]} pcbX="-4.7625mm" pcbY="-3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin5"]} pcbX="-4.1275mm" pcbY="-3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin6"]} pcbX="-3.4925mm" pcbY="-3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin7"]} pcbX="-2.8575mm" pcbY="-3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin8"]} pcbX="-2.2225mm" pcbY="-3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin9"]} pcbX="-1.5875mm" pcbY="-3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin10"]} pcbX="-0.9525mm" pcbY="-3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin11"]} pcbX="-0.3175mm" pcbY="-3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin12"]} pcbX="0.3175mm" pcbY="-3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin13"]} pcbX="0.9525mm" pcbY="-3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin14"]} pcbX="1.5875mm" pcbY="-3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin15"]} pcbX="2.2225mm" pcbY="-3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin16"]} pcbX="2.8575mm" pcbY="-3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin17"]} pcbX="3.4925mm" pcbY="-3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin18"]} pcbX="4.1275mm" pcbY="-3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin19"]} pcbX="4.7625mm" pcbY="-3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin20"]} pcbX="5.3975mm" pcbY="-3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin21"]} pcbX="6.0325mm" pcbY="-3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin22"]} pcbX="6.6675mm" pcbY="-3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin44"]} pcbX="-6.6675mm" pcbY="3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin43"]} pcbX="-6.0325mm" pcbY="3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin42"]} pcbX="-5.3975mm" pcbY="3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin41"]} pcbX="-4.7625mm" pcbY="3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin40"]} pcbX="-4.1275mm" pcbY="3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin39"]} pcbX="-3.4925mm" pcbY="3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin38"]} pcbX="-2.8575mm" pcbY="3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin37"]} pcbX="-2.2225mm" pcbY="3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin36"]} pcbX="-1.5875mm" pcbY="3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin35"]} pcbX="-0.9525mm" pcbY="3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin34"]} pcbX="-0.3175mm" pcbY="3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin33"]} pcbX="0.3175mm" pcbY="3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin32"]} pcbX="0.9525mm" pcbY="3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin31"]} pcbX="1.5875mm" pcbY="3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin30"]} pcbX="2.2225mm" pcbY="3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin29"]} pcbX="2.8575mm" pcbY="3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin28"]} pcbX="3.4925mm" pcbY="3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin27"]} pcbX="4.1275mm" pcbY="3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin26"]} pcbX="4.7625mm" pcbY="3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin25"]} pcbX="5.3975mm" pcbY="3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin24"]} pcbX="6.0325mm" pcbY="3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin23"]} pcbX="6.6675mm" pcbY="3.714496mm" width="0.3080004mm" height="1.7290034mm" radius="0.1540002mm" shape="pill" />
<smtpad portHints={["pin45"]} pcbX="0mm" pcbY="0mm" width="7.2999854mm" height="4.4299886mm" shape="rect" />
<via connectsTo="net.GND" pcbX="-2.499868mm" pcbY="0.999998mm" {...viaSizes.driverThermal} layers={["top","bottom"]} />
<via connectsTo="net.GND" pcbX="-1.49987mm" pcbY="0.999998mm" {...viaSizes.driverThermal} layers={["top","bottom"]} />
<via connectsTo="net.GND" pcbX="-0.499872mm" pcbY="0.999998mm" {...viaSizes.driverThermal} layers={["top","bottom"]} />
<via connectsTo="net.GND" pcbX="0.500126mm" pcbY="0.999998mm" {...viaSizes.driverThermal} layers={["top","bottom"]} />
<via connectsTo="net.GND" pcbX="1.500124mm" pcbY="0.999998mm" {...viaSizes.driverThermal} layers={["top","bottom"]} />
<via connectsTo="net.GND" pcbX="2.500122mm" pcbY="0.999998mm" {...viaSizes.driverThermal} layers={["top","bottom"]} />
<via connectsTo="net.GND" pcbX="2.500122mm" pcbY="0mm" {...viaSizes.driverThermal} layers={["top","bottom"]} />
<via connectsTo="net.GND" pcbX="1.500124mm" pcbY="0mm" {...viaSizes.driverThermal} layers={["top","bottom"]} />
<via connectsTo="net.GND" pcbX="0.500126mm" pcbY="0mm" {...viaSizes.driverThermal} layers={["top","bottom"]} />
<via connectsTo="net.GND" pcbX="-0.499872mm" pcbY="0mm" {...viaSizes.driverThermal} layers={["top","bottom"]} />
<via connectsTo="net.GND" pcbX="-1.49987mm" pcbY="0mm" {...viaSizes.driverThermal} layers={["top","bottom"]} />
<via connectsTo="net.GND" pcbX="-2.499868mm" pcbY="0mm" {...viaSizes.driverThermal} layers={["top","bottom"]} />
<via connectsTo="net.GND" pcbX="-2.499868mm" pcbY="-0.999998mm" {...viaSizes.driverThermal} layers={["top","bottom"]} />
<via connectsTo="net.GND" pcbX="-1.49987mm" pcbY="-0.999998mm" {...viaSizes.driverThermal} layers={["top","bottom"]} />
<via connectsTo="net.GND" pcbX="-0.499872mm" pcbY="-0.999998mm" {...viaSizes.driverThermal} layers={["top","bottom"]} />
<via connectsTo="net.GND" pcbX="0.500126mm" pcbY="-0.999998mm" {...viaSizes.driverThermal} layers={["top","bottom"]} />
<via connectsTo="net.GND" pcbX="1.500124mm" pcbY="-0.999998mm" {...viaSizes.driverThermal} layers={["top","bottom"]} />
<via connectsTo="net.GND" pcbX="2.500122mm" pcbY="-0.999998mm" {...viaSizes.driverThermal} layers={["top","bottom"]} />
<silkscreenpath route={[{"x":-7.076211400000034,"y":-2.621406999999863},{"x":-7.076211400000034,"y":2.6214069999999765},{"x":7.07621139999992,"y":2.6214069999999765},{"x":7.07621139999992,"y":-2.621406999999863},{"x":-7.076211400000034,"y":-2.621406999999863}]} />
<silkscreencircle pcbX="-6.6675mm" pcbY="-1.868932mm" radius="0.150114mm" />
<silkscreencircle pcbX="-7.273798mm" pcbY="-3.714496mm" radius="0.150114mm" />
<silkscreentext text="{NAME}" pcbX="-0.1651mm" pcbY="5.4196mm" anchorAlignment="center" fontSize="1mm" />
<courtyardoutline outline={[{"x":-7.249986000000035,"y":4.828997699999945},{"x":7.249985999999922,"y":4.828997699999945},{"x":7.249985999999922,"y":-4.828997699999945},{"x":-7.249986000000035,"y":-4.828997699999945},{"x":-7.249986000000035,"y":4.828997699999945}]} />
      </footprint>}
      cadModel={{
        objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C5930226.obj?uuid=f5ff692d197d47599c0c932c5e8c1b71",
        stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C5930226.step?uuid=f5ff692d197d47599c0c932c5e8c1b71",
        pcbRotationOffset: 90,
        modelOriginPosition: { x: 0, y: 0, z: -0.099083 },
      }}
      {...props}
    />
  )
}