astra/nema17-stepper-motor-controller-spring-clamp-rp2040

A 4-layer RP2040 controller board that negotiates USB‑C PD motor power and drives a NEMA17 stepper via a DRV8825, with current sensing, thermal shutdown, RGB status LED, buzzer alarm, optional AS5600 encoder, protection/filtering, and test points.

Version
1.4.0
License
unset
Stars
0

mechanical/revision-placement.ts

import placement from "./next-placement.json";

/** Absolute board coordinates; subtract the origin for parts in translated groups. */
export function revisionPlacement(name: string, origin = {x: 0, y: 0}) {
  const position = (placement as Record<string, {pcbX:number; pcbY:number; pcbRotation:number}>)[name];
  if (!position) throw new Error(`Missing PCB placement for ${name}`);
  return {...position, pcbX:position.pcbX-origin.x, pcbY:position.pcbY-origin.y};
}