AnasSarkiz/rp2040-usb-c-single-axis-dm542t-motion-controller--01a0e89c

A USB‑C RP2040 controller board with external QSPI flash, crystal clock, regulated 3.3/1.1/5 V power, boost-converted motor-driver supply, protected USB and limit inputs, status LEDs, reset/boot switches, and AO3400A MOSFET outputs for stepper-control signals.

Version
0.1.0-prototype.19
License
unset
Stars
0

lib/passives.ts

import type { passiveComponents } from "./passive-components"

export interface Passive {
  name: string
  kind: "resistor" | "capacitor"
  rating: string
  code: keyof typeof passiveComponents
  footprint: "0402" | "0603" | "0805"
  nets: [string, string]
  pcbX: number
  pcbY: number
  pcbRotation?: number
  purpose: string
}

export const passives: Passive[] = [
  {
    name: "R1",
    kind: "resistor",
    rating: "5.1k",
    code: "C23186",
    footprint: "0603",
    nets: ["CC1", "GND"],
    pcbX: -34,
    pcbY: 6,
    purpose: "USB-C CC1 sink termination",
  },
  {
    name: "R2",
    kind: "resistor",
    rating: "5.1k",
    code: "C23186",
    footprint: "0603",
    nets: ["CC2", "GND"],
    pcbX: -36,
    pcbY: -7.5,
    purpose: "USB-C CC2 sink termination",
  },
  {
    name: "R3",
    pcbRotation: 90,
    kind: "resistor",
    rating: "27",
    code: "C25190",
    footprint: "0603",
    nets: ["USB_DP", "MCU_DP"],
    pcbX: -18,
    pcbY: 1,
    purpose: "USB D+ series termination",
  },
  {
    name: "R4",
    pcbRotation: 90,
    kind: "resistor",
    rating: "27",
    code: "C25190",
    footprint: "0603",
    nets: ["USB_DM", "MCU_DM"],
    pcbX: -18,
    pcbY: 5,
    purpose: "USB D- series termination",
  },
  {
    name: "R5",
    pcbRotation: 180,
    kind: "resistor",
    rating: "10k",
    code: "C25804",
    footprint: "0603",
    nets: ["V3V3", "QSPI_CS"],
    pcbX: -20,
    pcbY: 12,
    purpose: "Flash CS startup pullup",
  },
  {
    name: "R6",
    pcbRotation: 180,
    kind: "resistor",
    rating: "1k",
    code: "C21190",
    footprint: "0603",
    nets: ["QSPI_CS", "BOOT_SW"],
    pcbX: -25,
    pcbY: 10,
    purpose: "BOOTSEL current limitation",
  },
  {
    name: "R7",
    pcbRotation: 90,
    kind: "resistor",
    rating: "1k",
    code: "C21190",
    footprint: "0603",
    nets: ["XOUT", "XTAL_OUT"],
    pcbX: -1.5,
    pcbY: 1,
    purpose: "Crystal drive damping",
  },
  {
    name: "R8",
    pcbRotation: 180,
    kind: "resistor",
    rating: "1k",
    code: "C21190",
    footprint: "0603",
    nets: ["SUPERVISOR_RESET", "RUN"],
    pcbX: 2,
    pcbY: -7,
    purpose: "Supervisor output isolation for RESET button",
  },
  {
    name: "R9",
    pcbRotation: 180,
    kind: "resistor",
    rating: "10k",
    code: "C25804",
    footprint: "0603",
    nets: ["V3V3", "LED_PWR"],
    pcbX: -25,
    pcbY: 23,
    purpose: "Power LED current limitation",
  },
  {
    name: "R10",
    pcbRotation: 180,
    kind: "resistor",
    rating: "1k",
    code: "C21190",
    footprint: "0603",
    nets: ["STATUS", "LED_STATUS"],
    pcbX: -17,
    pcbY: 19,
    purpose: "Status LED current limitation",
  },
  {
    name: "R11",
    kind: "resistor",
    rating: "100",
    code: "C22775",
    footprint: "0603",
    nets: ["STEP", "STEP_GATE"],
    pcbX: 8,
    pcbY: 8,
    purpose: "STEP MOSFET gate series",
  },
  {
    name: "R12",
    kind: "resistor",
    rating: "10k",
    code: "C25804",
    footprint: "0603",
    nets: ["STEP_GATE", "GND"],
    pcbX: 12,
    pcbY: 5,
    purpose: "STEP default off",
  },
  {
    name: "R13",
    kind: "resistor",
    rating: "100",
    code: "C22775",
    footprint: "0603",
    nets: ["ARM", "ARM_GATE"],
    pcbX: 8,
    pcbY: 1,
    purpose: "Arm MOSFET gate series",
  },
  {
    name: "R14",
    kind: "resistor",
    rating: "10k",
    code: "C25804",
    footprint: "0603",
    nets: ["ARM_GATE", "GND"],
    pcbX: 12,
    pcbY: -2,
    purpose: "Arm default off",
  },
  {
    name: "R15",
    kind: "resistor",
    rating: "100",
    code: "C22775",
    footprint: "0603",
    nets: ["DIR", "DIR_GATE"],
    pcbX: -1,
    pcbY: 8,
    purpose: "DIR MOSFET gate series",
  },
  {
    name: "R16",
    kind: "resistor",
    rating: "10k",
    code: "C25804",
    footprint: "0603",
    nets: ["DIR_GATE", "GND"],
    pcbX: 3,
    pcbY: 4,
    purpose: "DIR default off",
  },
  {
    name: "R17",
    kind: "resistor",
    rating: "100k",
    code: "C25803",
    footprint: "0603",
    nets: ["VDRV", "DISABLE_GATE"],
    pcbX: 10.5,
    pcbY: -6,
    purpose: "Driver default disabled while powered",
  },
  {
    name: "R18",
    kind: "resistor",
    rating: "100",
    code: "C22775",
    footprint: "0603",
    nets: ["ENABLE", "ENABLE_GATE"],
    pcbX: 20,
    pcbY: -2,
    purpose: "Enable inverter gate series",
  },
  {
    name: "R19",
    kind: "resistor",
    rating: "100k",
    code: "C25803",
    footprint: "0603",
    nets: ["ENABLE_GATE", "GND"],
    pcbX: 25.5,
    pcbY: -6,
    purpose: "Enable command default off",
  },
  {
    name: "R20",
    pcbRotation: 180,
    kind: "resistor",
    rating: "1k",
    code: "C21190",
    footprint: "0603",
    nets: ["LIMIT_MIN_WIRE", "LIMIT_MIN"],
    pcbX: 11,
    pcbY: -13,
    purpose: "Minimum limit input series protection",
  },
  {
    name: "R21",
    kind: "resistor",
    rating: "10k",
    code: "C25804",
    footprint: "0603",
    nets: ["V3V3", "LIMIT_MIN"],
    pcbX: 7,
    pcbY: -16,
    purpose: "Minimum limit open-wire detection",
  },
  {
    name: "R22",
    kind: "resistor",
    rating: "1k",
    code: "C21190",
    footprint: "0603",
    nets: ["LIMIT_MAX_WIRE", "LIMIT_MAX"],
    pcbX: 22,
    pcbY: -13,
    purpose: "Maximum limit input series protection",
  },
  {
    name: "R23",
    kind: "resistor",
    rating: "10k",
    code: "C25804",
    footprint: "0603",
    nets: ["V3V3", "LIMIT_MAX"],
    pcbX: 26,
    pcbY: -16,
    purpose: "Maximum limit open-wire detection",
  },
  {
    name: "R24",
    kind: "resistor",
    rating: "100k",
    code: "C25803",
    footprint: "0603",
    nets: ["V5", "VBUS_SENSE"],
    pcbX: -19,
    pcbY: 10,
    purpose: "5V measurement upper divider",
  },
  {
    name: "R25",
    kind: "resistor",
    rating: "100k",
    code: "C25803",
    footprint: "0603",
    nets: ["VBUS_SENSE", "GND"],
    pcbX: -15,
    pcbY: 10,
    purpose: "5V measurement lower divider",
  },
  {
    name: "C1",
    kind: "capacitor",
    rating: "1uF",
    code: "C52923",
    footprint: "0402",
    nets: ["VBUS", "GND"],
    pcbX: -35,
    pcbY: 10,
    purpose: "USB input bypass",
  },
  {
    name: "C2",
    pcbRotation: 180,
    kind: "capacitor",
    rating: "1uF",
    code: "C52923",
    footprint: "0402",
    nets: ["V5", "GND"],
    pcbX: -28,
    pcbY: -7,
    purpose: "LDO input stability",
  },
  {
    name: "C3",
    kind: "capacitor",
    rating: "2.2uF",
    code: "C19110",
    footprint: "0805",
    nets: ["V3V3", "GND"],
    pcbX: -22.8,
    pcbY: -10,
    purpose: "LDO output stability",
  },
  {
    name: "C4",
    pcbRotation: 90,
    kind: "capacitor",
    rating: "1uF",
    code: "C52923",
    footprint: "0402",
    nets: ["V3V3", "GND"],
    pcbX: -13,
    pcbY: 7,
    purpose: "RP2040 VREG_IN stability",
  },
  {
    name: "C5",
    pcbRotation: 90,
    kind: "capacitor",
    rating: "1uF",
    code: "C52923",
    footprint: "0402",
    nets: ["V1V1", "GND"],
    pcbX: -15,
    pcbY: 6,
    purpose: "RP2040 VREG_OUT stability",
  },
  {
    name: "C6",
    pcbRotation: 90,
    kind: "capacitor",
    rating: "100nF",
    code: "C1525",
    footprint: "0402",
    nets: ["V3V3", "GND"],
    pcbX: -11.4,
    pcbY: -6.8,
    purpose: "U1 IOVDD pin1 bypass",
  },
  {
    name: "C7",
    pcbRotation: 90,
    kind: "capacitor",
    rating: "100nF",
    code: "C1525",
    footprint: "0402",
    nets: ["V3V3", "GND"],
    pcbX: -8.0,
    pcbY: -7.1,
    purpose: "U1 IOVDD pin10 bypass",
  },
  {
    name: "C8",
    pcbRotation: 90,
    kind: "capacitor",
    rating: "100nF",
    code: "C1525",
    footprint: "0402",
    nets: ["V3V3", "GND"],
    pcbX: -3.8,
    pcbY: 1.3,
    purpose: "U1 IOVDD pin22 bypass",
  },
  {
    name: "C9",
    pcbRotation: 90,
    kind: "capacitor",
    rating: "100nF",
    code: "C1525",
    footprint: "0402",
    nets: ["V1V1", "GND"],
    pcbX: -4.4,
    pcbY: 4.5,
    purpose: "U1 DVDD pin23 bypass",
  },
  {
    name: "C10",
    pcbRotation: 90,
    kind: "capacitor",
    rating: "100nF",
    code: "C1525",
    footprint: "0402",
    nets: ["V3V3", "GND"],
    pcbX: -7.3,
    pcbY: 5.5,
    purpose: "U1 IOVDD pin33 bypass",
  },
  {
    name: "C11",
    pcbRotation: 90,
    kind: "capacitor",
    rating: "100nF",
    code: "C1525",
    footprint: "0402",
    nets: ["V3V3", "GND"],
    pcbX: -8.9,
    pcbY: 5.5,
    purpose: "U1 IOVDD pin42 and ADC bypass",
  },
  {
    name: "C12",
    pcbRotation: 90,
    kind: "capacitor",
    rating: "100nF",
    code: "C1525",
    footprint: "0402",
    nets: ["V3V3", "GND"],
    pcbX: -15.2,
    pcbY: 2.9,
    purpose: "U1 USB_VDD and IOVDD49 bypass",
  },
  {
    name: "C13",
    pcbRotation: 90,
    kind: "capacitor",
    rating: "100nF",
    code: "C1525",
    footprint: "0402",
    nets: ["V1V1", "GND"],
    pcbX: -15.6,
    pcbY: -0.3,
    purpose: "U1 DVDD pin50 bypass",
  },
  {
    name: "C14",
    pcbRotation: 180,
    kind: "capacitor",
    rating: "100nF",
    code: "C1525",
    footprint: "0402",
    nets: ["V3V3", "GND"],
    pcbX: -28.5,
    pcbY: -4.5,
    purpose: "Flash bypass",
  },
  {
    name: "C15",
    pcbRotation: 90,
    kind: "capacitor",
    rating: "15pF",
    code: "C1548",
    footprint: "0402",
    nets: ["XIN", "GND"],
    pcbX: -2,
    pcbY: -7.2,
    purpose: "Crystal 10pF load network",
  },
  {
    name: "C16",
    pcbRotation: 90,
    kind: "capacitor",
    rating: "15pF",
    code: "C1548",
    footprint: "0402",
    nets: ["XTAL_OUT", "GND"],
    pcbX: 0.3,
    pcbY: -2,
    purpose: "Crystal 10pF load network",
  },
  {
    name: "C17",
    kind: "capacitor",
    rating: "100nF",
    code: "C14663",
    footprint: "0603",
    nets: ["LIMIT_MIN", "GND"],
    pcbX: 11,
    pcbY: -16,
    purpose: "Minimum limit RC filter",
  },
  {
    name: "C18",
    pcbRotation: 180,
    kind: "capacitor",
    rating: "100nF",
    code: "C14663",
    footprint: "0603",
    nets: ["LIMIT_MAX", "GND"],
    pcbX: 22,
    pcbY: -16,
    purpose: "Maximum limit RC filter",
  },
  {
    name: "C19",
    pcbRotation: 90,
    kind: "capacitor",
    rating: "100nF",
    code: "C14663",
    footprint: "0603",
    nets: ["VBUS_SENSE", "GND"],
    pcbX: -11,
    pcbY: 6,
    purpose: "Supply ADC filtering",
  },
  {
    name: "R26",
    kind: "resistor",
    rating: "75k",
    code: "C723587",
    footprint: "0603",
    nets: ["VDRV", "DRIVER_FB_SERIES"],
    pcbX: 1,
    pcbY: -23,
    purpose: "Driver feedback upper series resistor",
  },
  {
    name: "R27",
    kind: "resistor",
    rating: "10k",
    code: "C95204",
    footprint: "0603",
    nets: ["DRIVER_FB_SERIES", "DRIVER_FB"],
    pcbX: 1,
    pcbY: -20,
    purpose: "Driver feedback upper series resistor",
  },
  {
    name: "R28",
    kind: "resistor",
    rating: "10k",
    code: "C95204",
    footprint: "0603",
    nets: ["DRIVER_FB", "GND"],
    pcbX: 3,
    pcbY: -17,
    purpose: "Driver feedback lower resistor: 4.75 V nominal",
  },
  {
    name: "R29",
    kind: "resistor",
    rating: "100k",
    code: "C25803",
    footprint: "0603",
    nets: ["DRIVER_POWER", "GND"],
    pcbX: -18,
    pcbY: -26,
    purpose: "Driver load switch defaults off",
  },
  {
    name: "R30",
    pcbRotation: 180,
    kind: "resistor",
    rating: "100k",
    code: "C25803",
    footprint: "0603",
    nets: ["DRIVER_REG_ENABLE", "GND"],
    pcbX: -2,
    pcbY: -26.5,
    purpose: "Driver regulator defaults off",
  },
  {
    name: "R31",
    kind: "resistor",
    rating: "10k",
    code: "C25804",
    footprint: "0603",
    nets: ["VDRV", "GND"],
    pcbX: -3,
    pcbY: -12,
    purpose: "Discharge driver rail after shutdown",
  },
  {
    name: "R32",
    kind: "resistor",
    rating: "100k",
    code: "C25803",
    footprint: "0603",
    nets: ["DRIVER_ILIM", "GND"],
    pcbX: -22,
    pcbY: -22,
    purpose: "Driver branch current limit (100k, 1%)",
  },
  {
    name: "R33",
    kind: "resistor",
    rating: "10k",
    code: "C25804",
    footprint: "0603",
    nets: ["V3V3", "DRIVER_FAULT"],
    pcbX: -22,
    pcbY: -25,
    purpose: "Open-drain current-limit fault pull-up",
  },
  {
    name: "C21",
    kind: "capacitor",
    rating: "22uF",
    code: "C45783",
    footprint: "0805",
    nets: ["DRIVER_VIN", "GND"],
    pcbX: -5,
    pcbY: -24,
    purpose: "Buck-boost input reservoir",
  },
  {
    name: "C22",
    kind: "capacitor",
    rating: "22uF",
    code: "C45783",
    footprint: "0805",
    nets: ["VDRV", "GND"],
    pcbX: -5,
    pcbY: -16,
    purpose: "Buck-boost output reservoir",
  },
  {
    name: "C23",
    pcbRotation: 180,
    kind: "capacitor",
    rating: "22uF",
    code: "C45783",
    footprint: "0805",
    nets: ["VDRV", "GND"],
    pcbX: -10.5,
    pcbY: -12.5,
    purpose: "Buck-boost output reservoir",
  },
  {
    name: "C24",
    kind: "capacitor",
    rating: "100nF",
    code: "C1525",
    footprint: "0402",
    nets: ["DRIVER_VIN", "GND"],
    pcbX: 0,
    pcbY: -15,
    purpose: "Buck-boost analog bypass",
  },
  {
    name: "C25",
    kind: "capacitor",
    rating: "100nF",
    code: "C1525",
    footprint: "0402",
    nets: ["V3V3", "GND"],
    pcbX: 4,
    pcbY: -11,
    purpose: "Supervisor supply bypass",
  },
  {
    name: "C26",
    kind: "capacitor",
    rating: "1uF",
    code: "C52923",
    footprint: "0402",
    nets: ["V5", "GND"],
    pcbX: -14.5,
    pcbY: -23,
    purpose: "Load switch input bypass",
  },
]