MustafaMulla29/rp2040-bldc-motor-controller

Hardware assembly metadata and PCB geometry for a controller board with a snap-off rotary-encoder section, plus four parallel 150 µF/50 V bulk electrolytic capacitors filtering the motor supply.

Version
2.0.40
License
unset
Stars
0

Use with the tscircuit CLI

tsci is the tscircuit CLI. Install it with npm install -g tscircuit.

tsci clone MustafaMulla29/rp2040-bldc-motor-controller  # download the package files into ./rp2040-bldc-motor-controller
tsci add MustafaMulla29/rp2040-bldc-motor-controller    # add it to your project as @tsci/MustafaMulla29.rp2040-bldc-motor-controller

In a cloned or new (tsci init) project: tsci dev starts a local preview, tsci build outputs Circuit JSON, and tsci push publishes to tscircuit.com.

scripts/pcb-audit/check-gate-loop-lengths.py

"""Regression limits for the 16 November routing cleanup, not TI electrical ratings.

Consume the independently reconstructed native-copper path report and reject a
stale report. Clearance, track widths, paired vias and Kelvin isolation have
separate checks; this check does not replace them.
"""
import hashlib,json,sys
from pathlib import Path
root=Path(__file__).resolve().parents[2]
path=Path(sys.argv[1]) if len(sys.argv)>1 else root/'dist/index/circuit.json'
report=json.loads((root/'.tscircuit/review/route-lengths.json').read_text())
assert report['sha256']==hashlib.sha256(path.read_bytes()).hexdigest(),'Regenerate audit-route-lengths.py for this circuit'
limits=[('U7.10','Q10.3',22,0),('U7.21','Q11.3',35,2),('U7.21','Q13.3',43,2),
        ('U7.21','Q15.3',38.55,2),('U7.12','R92.1',26.2,3),
        ('U7.16','R96.1',23.5,2),('U7.20','R100.1',30,2)]
results=[]
for start,end,length,vias in limits:
 p=next(p for p in report['paths'] if (p['start'],p['end'])==(start,end))
 results.append(dict(start=start,end=end,lengthMm=p['planarLengthMm'],viaCount=p['viaCount'],
                     maxLengthMm=length,maxViaCount=vias,passed=p['planarLengthMm']<=length and p['viaCount']<=vias))
out=dict(sha256=report['sha256'],scope=__doc__,paths=results,status='PASS' if all(x['passed'] for x in results) else 'FAIL')
(root/'.tscircuit/review/audit-final/gate-loop-lengths.json').write_text(json.dumps(out,indent=2)+'\n')
print(json.dumps(out,indent=2))
sys.exit(out['status']!='PASS')