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-controllerIn 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/check-jlc-sourcing.mjs
/** Check the compiled PCB BOM, not just source imports. Inventory is a separate check. */
import {readFileSync,mkdirSync,writeFileSync} from 'node:fs'
const input=process.argv[2] ?? 'dist/pcb/circuit.json'
const rows=JSON.parse(readFileSync(input,'utf8'))
const mounted=new Set(rows.filter(r=>r.type==='pcb_component').map(r=>r.source_component_id))
const parts=rows.filter(r=>r.type==='source_component' && mounted.has(r.source_component_id) && r.ftype!=='simple_test_point')
const missing=parts.filter(r=>!r.manufacturer_part_number || !r.supplier_part_numbers?.jlcpcb?.some(n=>/^C\d+$/.test(n)))
// 2 December 2026 substitutions: C187, D4, L2, Q7, R182, R185, U15, U23 (docs/part-substitutions.md).
const expected={C187:['CL31B105KBHNNNE','C1848'],D4:['SMBJ22A','C151920'],L2:['SWPA3015S100MT','C45403'],Q7:['YJQ62G06A','C2908529'],U15:['74LVC1G74DP-Q100H','C548409'],U23:['TCA9517ADGKR','C201698'],C183:['CL31B475KAHNNNE','C1872'],C191:['GVL0J332M1213','C52711639'],U24:['TPS3808G01DRVR','C477447'],J21:['0.5K-HX-24PWB','C2919499'],Q1:['SI7625DN-T1-GE3','C553985'],Q2:['SI7625DN-T1-GE3','C553985'],U3:['AP63200WU-7','C2071868'],L1:['VLS6045EX-6R8M','C415364'],R194:['0402WGF4702TCE','C25792'],R195:['0402WGF1502TCE','C25756'],R181:['RT1206BRD071KL','C706405'],R182:['ARG03FTC68R1','C218122'],R185:['25121WF150JT4E','C20087'],R192:['RT0603BRD0754K9L','C728593'],R193:['RT0603BRD0710KL','C95204']}
const mismatches=Object.entries(expected).filter(([name,[mpn,code]])=>{
const p=parts.find(r=>r.name===name)
return p?.manufacturer_part_number!==mpn || !p?.supplier_part_numbers?.jlcpcb?.includes(code)
}).map(([name])=>name)
const report={status:parts.length>0&&!missing.length&&!mismatches.length?'PASS':'FAIL',input,
populatedComponents:parts.length,missing:missing.map(r=>r.name),mismatches,
limitation:'Verifies BOM identifiers only. Does not certify stock, part equivalence, footprint, or hardware operation.'}
mkdirSync('.tscircuit/checks',{recursive:true})
writeFileSync('.tscircuit/checks/jlc-sourcing.json',JSON.stringify(report,null,2)+'\n')
console.log(JSON.stringify(report,null,2));process.exitCode=report.status==='PASS'?0:1