imrishabh18/rp2040-motor-controller
This circuit module provides a microcontroller-based NEMA17 stepper motor driver with integrated USB-C Power Delivery, temperature sensing, and safety interlocks.
- Version
- 1.0.16
- License
- unset
- Stars
- 0
schematic/MotorOutputsSection.tsx
import { motorTrace, schematicSections, schematicSheets } from "./config";
export const MotorOutputConnectors = () => (
<connector
footprint={
<footprint insertionDirection="from_above">
{/* JST PH top entry: 2 mm pitch, 0.7–0.8 mm drills, 9.9 × 4.5 mm body.
Manufacturer drawing: https://www.jst-mfg.com/product/pdf/eng/ePH.pdf */}
<platedhole pcbX={-3} pcbY={0} portHints={["1"]}
shape="circle" holeDiameter={0.75} outerDiameter={1.4} />
<platedhole pcbX={-1} pcbY={0} portHints={["2"]}
shape="pill" holeWidth={0.75} holeHeight={0.75} outerWidth={1.2} outerHeight={1.75} />
<platedhole pcbX={1} pcbY={0} portHints={["3"]}
shape="pill" holeWidth={0.75} holeHeight={0.75} outerWidth={1.2} outerHeight={1.75} />
<platedhole pcbX={3} pcbY={0} portHints={["4"]}
shape="pill" holeWidth={0.75} holeHeight={0.75} outerWidth={1.2} outerHeight={1.75} />
<silkscreenrect pcbX={0} pcbY={0.55} width={9.9} height={4.5} strokeWidth={0.1} />
<silkscreentext pcbX={-4} pcbY={-1} text="1" fontSize={0.5} />
<silkscreentext pcbX={0} pcbY={3.25} text="J1" fontSize={0.5} />
<courtyardrect pcbX={0} pcbY={0.55} width={10.9} height={5.5} />
</footprint>
}
manufacturerPartNumber="B4B-PH-K-S(LF)(SN)"
supplierPartNumbers={{ jlcpcb: ["C131334"] }}
pinLabels={{pin1:["A_PLUS"],pin2:["A_MINUS"],pin3:["B_PLUS"],pin4:["B_MINUS"]}}
name="J1"
pcbPinLabels={{
pin1: "A+",
pin2: "A-",
pin3: "B+",
pin4: "B-",
}}
pcbX={22.625}
pcbY={3.25}
pcbRotation={90}
schX={9}
schY={-1.5}
schPinArrangement={{
leftSide: { pins: [1, 2, 3, 4], direction: "top-to-bottom" },
}}
schSheetName={schematicSheets.motorDriver}
schSectionName={schematicSections.motorOutputs}
/>
);
export const MotorOutputTraces = () => (
<>
{/* Reserve room for the wider motor routes before the remaining signals. */}
<trace
name="MOTOR_A_PLUS"
from=".DRIVER > .AOUT1"
to=".J1 > .pin1"
schDisplayLabel="A+"
{...motorTrace}
/>
<trace
name="MOTOR_A_MINUS"
from=".DRIVER > .AOUT2"
to=".J1 > .pin2"
schDisplayLabel="A-"
{...motorTrace}
/>
<trace
name="MOTOR_B_PLUS"
from=".DRIVER > .BOUT1"
to=".J1 > .pin3"
schDisplayLabel="B+"
{...motorTrace}
/>
<trace
name="MOTOR_B_MINUS"
from=".DRIVER > .BOUT2"
to=".J1 > .pin4"
schDisplayLabel="B-"
{...motorTrace}
/>
</>
);