molecule
ESC G431
Public Made by Adomby adom
Single-motor ESC for the drone test cell: STM32G431 + DRV8300 driving a 3-phase bridge of six BSC016N06NS MOSFETs, TPSM365 buck to 12 V, INA181 low-side current sense (25 mV/A, 131 A full-scale). Runs AM32. 64 x 74 mm, 4-layer.
main
John Lauer
Add local values, both-face contact leaders, J1 per-pin labels and MOSFET pin1 markers
181f6be
21d ago
from pathlib import Path
import re,json,uuid
p=Path(__file__).parent;s=(p/'esc-g431-astra-silkscreen-v18.kicad_pcb').read_text();s,n=re.subn(r'(\(gr_text "C34" .*?\(size )0.6 0.6(\) \(thickness )[0-9.]+',r'\g<1>0.4 0.4\g<2>0.06',s,count=1,flags=re.S);assert n==1
l=dict(text='100nF',x=132.35,y=82.352,angle=90,size=.2,layer='F.SilkS',reference='C34',role='paired value',source='C34 actual board value')
t=f'(gr_text "100nF" (at 132.35 82.352 90) (layer "F.SilkS") (uuid "{uuid.uuid4()}") (effects (font (size 0.2 0.2) (thickness 0.03))))';out=p/'esc-g431-astra-silkscreen-v19.kicad_pcb';out.write_text(s.rstrip()[:-1]+'\n'+t+'\n)\n');m=json.loads((p/'labels-v18.json').read_text());next(v for v in m['labels'] if v['text']=='C34')['size']=.4;m['labels'].append(l);m.update(board=str(out),missingFrontValues=[]);(p/'labels-v19.json').write_text(json.dumps(m,indent=2))