shibosoftwaredev/f1c100s-linux-nema17-stepper-controller

A four-layer NEMA 17 motor-controller PCB combining an Allwinner F1C100S Linux computer, USB‑PD/buck power system, W5500 Ethernet, STM32 real-time motion control, DRV8825 stepper driver, protection/temperature/current telemetry, USB interfaces, and local LED/buzzer diagnostics.

Version
0.4.56
License
unset
Stars
0

scripts/finish-usb-top-manual.py

"""Authored final local copper corrections, checked independently afterward."""
from route_geometry import *
p=Path("routing/usb-top-physical-candidate.json");c=json.loads(p.read_text())
# Restore the controller's existing VBUS via directly to the switch source
# bus, rather than letting the low-current ADC feed become a rail shortcut.
assert any(v["net"]=="N99" and math.dist((v["x"],v["y"]),(19.5,12.65))<1e-6 for v in c["vias"])
c["wires"].append(dict(net="N99",layer="top",width=.35,points=[(19.5,12.65),(19.5,11.275)]))
# The full through-via must clear the 5.5 mm TOP screw head, not merely the
# smaller motor-side spacer. Retain its inner/bottom connections via two
# short horizontal stubs; the top-side old location becomes copper-free.
v=next(v for v in c["vias"] if math.dist((v["x"],v["y"]),(18.05,14.2))<1e-6)
assert v["net"]=="N57"
v["y"]=13.65
for layer in ["inner2","bottom"]:
    c["wires"].append(dict(net="N57",layer=layer,width=.12,points=[(18.05,14.2),(18.05,13.65)]))
Path("routing/usb-top-manual-physical.json").write_text(json.dumps(c,indent=2)+"\n")