shibosoftwaredev/f1c100s-linux-nema17-stepper-controller

Compact four-layer NEMA 17 carrier PCB combining an F1C100S Linux SoC, USB-C PD power and buck regulation, W5500 10/100 Ethernet, STM32 safety/motion control, and DRV8825 stepper-driver hardware with protection, sensing, connectors, and dual-sided SMT assembly.

Version
0.4.15
License
unset
Stars
0

modules/f1c100s/src/UnroutedModule.tsx

import { capacitorSpecs, isLargeCapacitor } from "./capacitor-specs";
import { Fragment } from "react";
import { BreakoutTestPoint } from "./BreakoutTestPoint";
import { ClockCrystal } from "./ClockCrystal";
import { F1C100S } from "../imports/F1C100S";
import { makeLayout } from "./layout";
import type { LayoutProfile } from "./profiles";

export function UnroutedModule({
	layoutProfile,
}: {
	layoutProfile: LayoutProfile;
}) {
	const layout = makeLayout(layoutProfile);
	return (
		<group name="MODULE" pcbX={0} pcbY={0}>
			<F1C100S
				name="U1"
				pcbRotation={layout.rotation}
				schX={0}
				schY={0}
				schWidth={14}
				schHeight={24}
			/>
			<ClockCrystal placement={layout.crystal} />
			{layout.terminals.map((t) => (
				<BreakoutTestPoint key={t.name} terminal={t} />
			))}
			{layout.passives.map((p, i) =>
				p.kind === "capacitor" ? (
					<capacitor
						key={p.name}
						name={p.name}
						capacitance={p.value}
						{...capacitorSpecs(p.name, p.value)}
						layer={layoutProfile !== "native" && isLargeCapacitor(p.name, p.value) ? "bottom" : "top"}
						pcbX={p.x}
						pcbY={p.y}
						pcbRotation={p.rotation}
						schX={-22 + (i % 5) * 3}
						schY={18 - Math.floor(i / 5) * 3}
					/>
				) : (
					<resistor
						key={p.name}
						name={p.name}
						resistance={p.value}
						pcbRotation={p.rotation}
						footprint="0402"
						layer="top"
						pcbX={p.x}
						pcbY={p.y}
						schX={-22 + (i % 5) * 3}
						schY={18 - Math.floor(i / 5) * 3}
					/>
				),
			)}
			{/* maxLength bounds the aggregate multi-terminal rail tree. It is not a
        decoupling-loop constraint. The generator requires a separate physical branch
        from every C_D supply pad to its assigned U1 pin before routing these rails.
        Runtime inflation exposes those branches as explicit two-port traces. */}
			{Object.entries(layout.nets).map(([name, ports]) => (
				<Fragment key={name}>
				<trace
					name={`N_${name}`}
					path={ports}
					thickness={0.12}
					maxLength={1000}
				/>
				</Fragment>
			))}
		</group>
	);
}